Skip to content

Query

Getter methods to inspect the problem and its data.


Graph

getNumberOfNodes

def getNumberOfNodes(self) -> int

Returns the number of nodes.

getOrigin

def getOrigin(self) -> int

Returns the origin node id.

getDestination

def getDestination(self) -> int

Returns the destination node id.

isDirected

def isDirected(self) -> bool

Returns True if the graph is directed.

isSymmetric

def isSymmetric(self) -> bool

Returns True if the graph is symmetric.

isGraphCyclic

def isGraphCyclic(self) -> bool

Returns True if the graph is cyclic.

getName

def getName(self) -> str

Returns the problem name.


Objective

getInitCost

def getInitCost(self) -> float

Returns the initial cost of the problem.

getObjLB

def getObjLB(self) -> float

Returns the lower bound on the objective value.

getObjUB

def getObjUB(self) -> float

Returns the upper bound on the objective value.

getNodeCost

def getNodeCost(self, i) -> float

Returns the cost of node i.

  • i (int) — node id.

getNodeCosts

def getNodeCosts(self) -> list[float]

Returns the costs of all nodes.

getArcCost

def getArcCost(self, i, j) -> float

Returns the cost of arc (i, j).

  • i (int) — source node id.
  • j (int) — target node id.

Resources

getNumRes

def getNumRes(self) -> int

Returns the number of resources.

getResLB

def getResLB(self, res_id) -> int

Returns the global lower bound of a resource.

  • res_id (int) — resource id.

getResUB

def getResUB(self, res_id) -> int

Returns the global upper bound of a resource.

  • res_id (int) — resource id.

getResNodeLB

def getResNodeLB(self, res_id, node) -> int

Returns the lower bound of a resource at a specific node.

  • res_id (int) — resource id.
  • node (int) — node id.

getResNodeUB

def getResNodeUB(self, res_id, node) -> int

Returns the upper bound of a resource at a specific node.

  • res_id (int) — resource id.
  • node (int) — node id.

getResArcConsumption

def getResArcConsumption(self, res_id, i, j) -> int

Returns the consumption of a resource on arc (i, j).

  • res_id (int) — resource id.
  • i (int) — source node id.
  • j (int) — target node id.

getResNodeConsumption

def getResNodeConsumption(self, res_id, i) -> int

Returns the consumption of a resource at node i.

  • res_id (int) — resource id.
  • i (int) — node id.