Are regular functions in SCIP callable in PySCIPOpt?

93 views Asked by At

I am currently using SCIP in a Linux environment and would like to move towards using PySCIPOpt as my research is slowly moving towards Machine Learning.

I have read the PySCIPOpt tutorial in Github as well as a document by S Maher and found them not being able to answer my question before I make the jump.

Will regular functions in SCIP such as read (problem) be available in PySCIPOpt too? This is because I have mps fils, pbo files and would not like to rewrite functions or classes that parse the file to fit them into the format found in Maher's document:

from pyscipopt import Model scip = Model ()

x = scip.addVar(’x’, vtype=’C’)

y = scip.addVar(’y’, vtype=’I’)

scip. setObjective (x + y)

scip.addCons(2∗x + y∗y >= 10)

scip.optimize ()

1

There are 1 answers

0
Leon On BEST ANSWER

I think you mean the commands that you use in the interactive shell? (there is no read function in SCIP). All functions that you can use in PySCIPopt are wrapped in the scip.pyx file in the src directory of PySCIPopt.

So you can read a Problem with readProblem which wraps the SCIP API function SCIPreadProb

The code would look something like:

from pyscipopt import Model

model = Model()

model.readProblem('filename')

model.optimize()