Closed sschnug closed 8 years ago
@sschnug, have you looked at using Pyomo? It has a built-in NL file writer which is much more reliable than OSiL for connecting to solvers.
Can you post the /home/sascha/.julia/v0.4/CoinOptServices/.osil/problem.osil to gist.github.com and link to it here?
To save you some headaches, if you're working in Python I'd recommend using Pyomo to write .nl files. OS has many bugs, see #6 as one example.
Gist of problem.osil
EDIT: Not sure if it matters: this example seems to be one of few (or the only one), that's calling solve(m) twice and add a constraint between both calls!
@mlubin & @tkelman Thank you both for the mentioning of Pyomo, which i was aware of. If i'm right, Pyomo works in the same style as Ampl which means, that you need to leave your programming-language and work with some custom-language which i don't like at all (and which i think is the reason for a lot of people using tools like JuMP).
(I just closed this issue by accident)
@sschnug, Pyomo was designed to be standalone like AMPL, though it's possible to use it embedded inside a normal python script. You'll have to consult their documentation.
@mlubin Thanks for mentioning this possibility. I think i will give it another try.
Nonetheless i like the approach of CoinOptServices (linking to the huge world of Coin-projects), even if it is kind of experimental (or dependent on the maturity of other tools).
I missed that you uploaded the osil file via an edit, github didn't send a notification. There was a bug in handling of the MathConst π which I just fixed. If you still have issues let me know.
My setup:
Failing example (mle.jl from repo + changes to use CoinOptServices):
Ouput / Error
Very interesting project! I'm trying to mimic this within a python-project (using OSServices & translating to XML; only a small portion of functionality; early stage) and stumbled upon the above error when trying to compare the instance-xml's.