Closed rezabayani closed 2 years ago
I guess you could export them in standard file formats such as lp
, mps
or cip
(which is specific to SCIP). These can be loaded by solvers, including via PySCIPOpt. Note that you'll have to identify variables by name.
By Julia optimization model, I'll assume this is a JuMP model, you may want to look into the following function: https://jump.dev/JuMP.jl/stable/reference/models/#JuMP.write_to_file
@rschwarz @matbesancon Thank you, it works! and yes I am using JuMP, and saving with *.mps format. However, the pyscipopt objective value was the exact negative of what was in my original model! Could it be because mps format treats all models as minimization problems? (my original problem was Max and it is fixed with Min) I also wonder if I could do the same with nonlinear models because I was not able to use JuMP.write_to_file for a model with non-linear constraints?
thanks @rezabayani that's unexpected. Can you re-read the MPS in JuMP to see if the MPS itself was transformed or if pyscipopt is inverting it upon reading? From the JuMP MPS writer, it seems writing out both min and max are supported
@matbesancon I found an issue where if the mps file contains the objective sense, pyscipop returns error. It was fixed when I manually deleted that line from the mps file.
@rschwarz @matbesancon I am still facing an issue where pyscipopt can not load 'mps' files unless I manually delete the ObjSesne line in the saved file. Do you think there is a remedy to this besides manually editing these files?
I want to export my julia optimization models as files supported by scip solver so I can use them in other frameworks such as pyscipopt in python. Is this possible?