pyepo.model.ort.ortmodel
Abstract optimization model based on Google OR-Tools (pywraplp)
Attributes
Classes
This is an abstract class for an OR-Tools pywraplp optimization model |
Module Contents
- pyepo.model.ort.ortmodel._HAS_ORTOOLS = True
- class pyepo.model.ort.ortmodel.optOrtModel(solver='scip')
Bases:
pyepo.model.opt.optModelThis is an abstract class for an OR-Tools pywraplp optimization model
- _model
OR-Tools linear solver
- Type:
pywraplp.Solver
- solver
solver backend (e.g. “scip”, “glop”, “cbc”)
- Type:
str
- solver = 'scip'
- _extra_constrs = []
- __repr__()
- setObj(c)
A method to set the objective function
- Parameters:
c (np.ndarray / list) – cost of objective function
- solve()
A method to solve the model
- Returns:
optimal solution (list) and objective value (float)
- Return type:
tuple
- pyepo.model.ort.ortmodel.num_vars = 10