pyepo.model.mpax.shortestpath

Shortest path problem

Attributes

_HAS_MPAX

cost

Classes

shortestPathModel

This class is an optimization model for the 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 an optimization model for the shortest path problem

grid

Size of grid network

Type:

tuple of int

arcs

List of arcs

Type:

list

grid
arcs = []
_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