mascoptCplex.algos.abstractalgos
Class AddSimpleFlowRouting

java.lang.Object
  |
  +--mascoptCplex.algos.abstractalgos.AddSimpleFlowRouting

public class AddSimpleFlowRouting
extends Object

Version:
04/0205 This class add a simple flow on a graph without using requests. It just put equations for each nodes: flow_in = flow_out. This flow is added to a linear program in a IloCplex object.
Author:
jflaland@sophia.inria.fr

Field Summary
 String FORBIDEN_EDGE
          The string which is used to forbid an edge.
 boolean integerComputation_
          Choice of the type of variables.
static int MAX_FLOW
          The correpsondance between each request and the variable wich provides its size.
 
Constructor Summary
AddSimpleFlowRouting(AbstractGraph g, ilog.cplex.IloCplex cplex, boolean integerComputation)
          Constructs the AddFlowRouting object.
 
Method Summary
 void createFlow()
          Add a flow system on the network.
 double getDouVarEdge(AbstractEdge e)
          Give the value representing the flow on an arc and for a request r.
 ilog.concert.IloNumVar getVarEdge(AbstractEdge e)
          Give the variable representing the flow on an arc and for a request r.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_FLOW

public static int MAX_FLOW
The correpsondance between each request and the variable wich provides its size.


FORBIDEN_EDGE

public String FORBIDEN_EDGE
The string which is used to forbid an edge. If this string is set to "true" on an edge, no flow is allowed on it.


integerComputation_

public boolean integerComputation_
Choice of the type of variables. The flow can be written with integer variables or not. By default the flow is computed with real variables.

Constructor Detail

AddSimpleFlowRouting

public AddSimpleFlowRouting(AbstractGraph g,
                            ilog.cplex.IloCplex cplex,
                            boolean integerComputation)
Constructs the AddFlowRouting object.

Parameters:
g - the graph used for the routing.
cplex - the cplex object where to put constraints.
Method Detail

createFlow

public void createFlow()
Add a flow system on the network.


getVarEdge

public ilog.concert.IloNumVar getVarEdge(AbstractEdge e)
Give the variable representing the flow on an arc and for a request r.

Parameters:
e - the edge considered.
Returns:
the cplex variable.

getDouVarEdge

public double getDouVarEdge(AbstractEdge e)
Give the value representing the flow on an arc and for a request r.

Parameters:
e - the edge considered.
Returns:
the double variable.