Skip to content

Query

Getter methods to inspect the problem and its data.


Graph

getNumberOfNodes

int getNumberOfNodes()

Returns the number of nodes.

getOrigin

int getOrigin()

Returns the origin node id.

getDestination

int getDestination()

Returns the destination node id.

isDirected

bool isDirected()

Returns true if the graph is directed.

isSymmetric

bool isSymmetric()

Returns true if the graph is symmetric.

isGraphCyclic

bool isGraphCyclic()

Returns true if the graph is cyclic.

getName

std::string getName()

Returns the problem name.

getProblem

Problem* getProblem()

Returns a pointer to the internal Problem object.


Objective

getInitCost

double getInitCost()

Returns the initial cost of the problem.

getObjLB

double getObjLB()

Returns the lower bound on the objective value.

getObjUB

double getObjUB()

Returns the upper bound on the objective value.

getNodeCost

double getNodeCost(int i)

Returns the cost of node i.

  • i (int) — node id.

getNodeCosts

std::vector<double> getNodeCosts()

Returns the costs of all nodes.

getArcCost

double getArcCost(int i, int j)

Returns the cost of arc (i, j).

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

Resources

getNumRes

int getNumRes()

Returns the number of resources.

getResLB

int getResLB(int res_id)

Returns the global lower bound of a resource.

  • res_id (int) — resource id.

getResUB

int getResUB(int res_id)

Returns the global upper bound of a resource.

  • res_id (int) — resource id.

getResNodeLB

int getResNodeLB(int res_id, int node)

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

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

getResNodeUB

int getResNodeUB(int res_id, int node)

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

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

getResArcConsumption

int getResArcConsumption(int res_id, int i, int j)

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

int getResNodeConsumption(int res_id, int i)

Returns the consumption of a resource at node i.

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