Coder Social home page Coder Social logo

Comments (6)

rschwarz avatar rschwarz commented on September 22, 2024 1

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.

from scip.jl.

matbesancon avatar matbesancon commented on September 22, 2024

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

from scip.jl.

rezabayani avatar rezabayani commented on September 22, 2024

@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?

from scip.jl.

matbesancon avatar matbesancon commented on September 22, 2024

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

from scip.jl.

rezabayani avatar rezabayani commented on September 22, 2024

@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.

from scip.jl.

rezabayani avatar rezabayani commented on September 22, 2024

@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?

from scip.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.