IBM ILOG Dispatcher User's Manual > The Basics > Minimizing the Number of Vehicles > Model > Define the loadGraphInformation function

First, you build the road network graph using the function loadGraphInformation. This function takes the arc file and turn file as parameters. The member function IloDispatcherGraph::createArcsFromFile loads the network topology from a csv file and creates all necessary arcs and nodes. The member function IloDispatcheGraph::loadArcDimensionDataFromFile loads the arc cost information relating to the dimension _time from the arc file. The member function IloDispatcherGraph::loadTurnDimensionDataFromFile loads turn penalty information from the turn file. By default, all turns are allowed with no penalty. The loadGraphInformation function calls the lastMinuteGraphChanges function to allow for direct manipulation of the road network graph.

Step 3   -  

Load the graph information

Add the following code after the comment //Load the graph information

void RoutingModel::loadGraphInformation ( char* arcFileName,
                                          char* turnFileName)    {
  _graph.createArcsFromFile (arcFileName);
  _graph.loadArcDimensionDataFromFile (arcFileName, _time);
  _graph.loadTurnDimensionDataFromFile(turnFileName, _time);
  lastMinuteGraphChanges();
}