Comments (7)
You're totally right! No MOSEK license should be required.
@FabianHofmann something maybe going wrong with the new context manager?
Lines 57 to 66 in a97febe
from linopy.
mmh, it works for me for all combinations:
- package uninstalled, no license
- package installed, no license
- package installed, with license
are you on the latest master?
from linopy.
I installed with pip.
from linopy.
okay, could you then update the linopy package via pip? I just released version 0.3.2
from linopy.
It works now, thanks a lot.
from linopy.
great!
from linopy.
Hello @FabianHofmann
I am having a similar issue where I am not able to use the MOSEK solver although I do not get any error messages. I have installed the MOSEK package in the environment but it does not show up in the list of "available_solvers" in "linopy". I tried updating "linopy" as explained above but does not seem to change anything. Interestingly, I was able to use MOSEK a couple of days ago before the weekend but when I tried to use it again, it did not show up in the list of "available_solvers". I tried to work with gurobi to check if I was missing something but I was able to use gurobi.
Update:
with contextlib.suppress(ImportError):
import mosek
with contextlib.suppress(mosek.Error):
with mosek.Env() as m:
t = m.Task()
t.optimize()
m.checkinall()
available_solvers.append("mosek")
When I was debugging, the code stopped at "t.optimize()" and did not reach checkinall and append.
And it seems like it is a licensing error:
raise Error(rescode(_res_optimizetrm),_msg_optimizetrm)
mosek.Error: rescode.err_license_cannot_connect(1021): MOSEK cannot connect to the license server.
But from what I understand, I should be able to use MOSEK without license. Am I right or am I missing something?
Update - Solution:
I was able to figure it out.
It seemed like the code was not able to access the license file.
I manually added this during debugging to point out the location:
os.environ["MOSEKLM_LICENSE_FILE"] = "pathtolicensefile"
and from next time on it was able to automatically locate the license file.
Please look into this issue if necessary.
from linopy.
Related Issues (20)
- [Feature] Support early stopping for solving such as allowing a relative optimality gap HOT 1
- Add solution values for linear expressions HOT 3
- Enable broadcasting when multiplying with pandas objects HOT 1
- How to add multi-objectives? HOT 6
- Support constant values in objective HOT 1
- Indicate applied masking in string representation of constraints HOT 3
- Change `dims` keyword of sum functions to `dim` HOT 1
- Support for sparse xarrays HOT 23
- show benchmark in readme
- Missing dimension when initializing variable with boundaries of lower dimensions HOT 2
- Improve documentation on overriding coordinates feature HOT 8
- Inconsistent coordinate override in arithmetic expressions HOT 3
- Docstring of `Model.solve()` has wrong return type
- `io_api="mps"` leads to memory overhead
- Error using scip
- Licensed CPLEX not detected HOT 3
- MPS IO changes with highspy >= 1.7
- Re-solving a changed model with "direct" api results in wrong model being solved HOT 1
- add_constraints lhs eats constant HOT 2
- Explore PytOptInferface for writing matrix over native C API HOT 9
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 linopy.