IBM ILOG Dispatcher User's Manual > The Basics > Adding Visit Disjunctions > Model > Define the loadGraphInformation function

The loadGraphInformation function is defined as in Minimizing the Number of Vehicles. First, you build the road network graph using the function loadGraphInformation. Then you load the network topology from a csv file and create all necessary arcs and nodes. The member function IloDispatcherGraph::loadArcDimensionDataFromFile loads the arc cost information relating to the dimensions _time and _distance. 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. The following code is provided for you:

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