Skip to content

Latest commit

 

History

History

ommx-pyscipopt-adapter

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

OMMX adapter for SCIP

This package provides an adapter for the SCIP from OMMX

Usage

ommx-pyscipopt-adapter can be installed from PyPI as follows:

pip install ommx-pyscipopt-adapter

SCIP can be used through ommx-pyscipopt-adapter by using the following:

from ommx_pyscipopt_adapter import OMMXPySCIPOptAdapter
from ommx.v1 import Instance, DecisionVariable

x1 = DecisionVariable.integer(1, lower=0, upper=5)
ommx_instance = Instance.from_components(
    decision_variables=[x1],
    objective=x1,
    constraints=[],
    sense=Instance.MINIMIZE,
)

# Create `ommx.v1.Solution` from the `pyscipot.Model`
ommx_solution = OMMXPySCIPOptAdapter.solve(ommx_instance)

print(ommx_solution)

Reference

TBW