Comments (5)
I'll look into it this evening
from flips.
@smoothdeveloper There's a new version released (2.3.5) which has these changes. I've tested writing a net5.0 app and everything seems to work. Thanks for the PR!
from flips.
@matthewcrews thanks, it loads in FSI from Visual Studio now, the next issue is loading the native dependency, I'm not sure there is an easy built-in way for this:
System.TypeInitializationException: The type initializer for 'Google.OrTools.LinearSolver.operations_research_linear_solverPINVOKE' threw an exception. ---> System.TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'google-ortools-native': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at Google.OrTools.LinearSolver.operations_research_linear_solverPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_operations_research_linear_solver(ExceptionDelegate applicationDelegate, ExceptionDelegate arithmeticDelegate, ExceptionDelegate divideByZeroDelegate, ExceptionDelegate indexOutOfRangeDelegate, ExceptionDelegate invalidCastDelegate, ExceptionDelegate invalidOperationDelegate, ExceptionDelegate ioDelegate, ExceptionDelegate nullReferenceDelegate, ExceptionDelegate outOfMemoryDelegate, ExceptionDelegate overflowDelegate, ExceptionDelegate systemExceptionDelegate)
at Google.OrTools.LinearSolver.operations_research_linear_solverPINVOKE.SWIGExceptionHelper..cctor()
--- End of inner exception stack trace ---
at Google.OrTools.LinearSolver.operations_research_linear_solverPINVOKE.SWIGExceptionHelper..ctor()
at Google.OrTools.LinearSolver.operations_research_linear_solverPINVOKE..cctor()
--- End of inner exception stack trace ---
at Google.OrTools.LinearSolver.operations_research_linear_solverPINVOKE.Solver_CreateSolver(String jarg1)
at Google.OrTools.LinearSolver.Solver.CreateSolver(String solver_id)
at Flips.ORTools.solve(OrToolsSolverType solverType, SolverSettings settings, Model model)
at FSI_0007.solve() in C:\work\flips.fsx:line 10
at <StartupCode$FSI_0008>.$FSI_0008.main@()
from flips.
Ok, here is a workaround for using in VS:
#r "nuget: NativeLibraryLoader"
open NativeLibraryLoader
new NativeLibrary(@"path\to\libz3.dll")
new NativeLibrary(@"path\to\google-ortools-native.dll")
from flips.
Huh, that's weird. That's seems like a regression on the Microsoft side. We had an issue with the native library loader in beta but they fixed it. Seems like it broke again.
from flips.
Related Issues (20)
- Correctness of evaluateNode HOT 5
- Correctness of evaluateNode HOT 1
- Summing a list of floating-point numbers HOT 21
- LinearExpression.Evaluate is incorrect HOT 2
- Update Examples to current API HOT 3
- Flips 3.0 design: explore gener(ic)alization space
- Add tests that ensure recursion uses tail calls HOT 4
- Would you be interesting in some background / related links ? HOT 2
- why is #r "nuget: Flips,2.4.4" saying .net framework and not netstandard? HOT 8
- Units of Measure missing overload HOT 1
- Sample code snippet and introduction for the fslab website
- Out of memory only for CBC and GLOP HOT 7
- question - validate decisions dynamically based on values of other decisions HOT 4
- Question - Using objective expression in a constraint HOT 6
- Version 2.4.7 locked to FSharp.Core 5.0.0 HOT 2
- Add up-for-grabs issues HOT 4
- Question - Division or multiplication between decisions in linear expression HOT 6
- Incorrect UoM for float multiplied with LinearExpression
- [docs] Missing `WriteMPSFile` field in settings type of introduction
- It throws me an System.BadImageFormatException exception HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flips.