pyepo.model.mpax.shortestpath

Shortest path problem

Attributes

_HAS_MPAX

cost

Classes

shortestPathModel

This class is optimization model for shortest path problem

Module Contents

pyepo.model.mpax.shortestpath._HAS_MPAX = True
class pyepo.model.mpax.shortestpath.shortestPathModel(grid)

Bases: pyepo.model.mpax.mpaxmodel.optMpaxModel

This class is optimization model for shortest path problem

grid

Size of grid network

Type:

tuple of int

arcs

List of arcs

Type:

list

grid
arcs = []
_getArcs()

A method to get list of arcs for grid network

Returns:

arcs

Return type:

list

_constructMatrix()

Constructs the incidence matrix A, supply/demand vector b, and upper bound u for the shortest path problem.

Returns:

Incidence matrix for flow conservation b (jnp.ndarray): Supply/demand vector u (jnp.ndarray): Upper bound for flow variables

Return type:

A (jnp.ndarray)

pyepo.model.mpax.shortestpath.cost