pyepo.model.ort.shortestpath

Shortest path problem

Attributes

_HAS_ORTOOLS

cost

Classes

shortestPathModel

This class is an optimization model for the shortest path problem

shortestPathCpModel

This class is an optimization model for the shortest path problem using CP-SAT

Module Contents

pyepo.model.ort.shortestpath._HAS_ORTOOLS = True
class pyepo.model.ort.shortestpath.shortestPathModel(grid, solver='glop')

Bases: pyepo.model.ort.ortmodel.optOrtModel

This class is an optimization model for the shortest path problem

_model

OR-Tools linear solver

Type:

pywraplp.Solver

solver

solver backend

Type:

str

grid

size of grid network

Type:

tuple of int

arcs

list of arcs

Type:

list

grid
arcs = []
_getModel()

A method to build OR-Tools pywraplp model

Returns:

optimization model and variables

Return type:

tuple

class pyepo.model.ort.shortestpath.shortestPathCpModel(grid)

Bases: pyepo.model.ort.ortcpmodel.optOrtCpModel

This class is an optimization model for the shortest path problem using CP-SAT

_model

OR-Tools CP-SAT model

Type:

cp_model.CpModel

grid

size of grid network

Type:

tuple of int

arcs

list of arcs

Type:

list

grid
arcs = []
_getModel()

A method to build OR-Tools CP-SAT model

Returns:

optimization model and variables

Return type:

tuple

pyepo.model.ort.shortestpath.cost