traffic-generator/src/ModelRead.cpp
/**
 * Parse the modelFile given and store all information in the global variables.
 *
 * @param modelFile The model file stream
 */
Parse the modelFile given and store all information in the global variables.
@param modelFile The model file stream
Parse the modelFile given and store all information in the global variables . @param modelFile The model file stream
void ReadModel(ifstream& modelFile) {
	cout << "Reading model\n";
	ReadHierarchy(modelFile);
	string header;
	for(int i = 0; i < g_hierClasses; i++) {
		modelFile >> header;
		modelFile >> g_hierClass;
		ReadParameters(modelFile);
		ReadMarkov1(modelFile);
		cout << ".\n";
		ReadSpatial(modelFile);
		cout << ".\n";
		ReadFlows2(modelFile);
		cout << ".\n";
		ReadInjections2(modelFile);
		cout << ".\n";
		ReadForwards(modelFile);
		cout << ".\n";
		ReadInvalidates(modelFile);
		cout << ".\n";
		modelFile >> header;
		cout << "*\n";
	}
	g_hierClass = 1;
	cout << " Done!" << endl;
}
void ReadModel ( ifstream & modelFile ) { cout << " \n " ; ReadHierarchy ( modelFile ) ; string header ; for ( int i = 0 ; i < g_hierClasses ; i ++ ) { modelFile >> header ; modelFile >> g_hierClass ; ReadParameters ( modelFile ) ; ReadMarkov1 ( modelFile ) ; cout << " \n " ; ReadSpatial ( modelFile ) ; cout << " \n " ; ReadFlows2 ( modelFile ) ; cout << " \n " ; ReadInjections2 ( modelFile ) ; cout << " \n " ; ReadForwards ( modelFile ) ; cout << " \n " ; ReadInvalidates ( modelFile ) ; cout << " \n " ; modelFile >> header ; cout << " \n " ; } g_hierClass = 1 ; cout << " " << endl ; }
Parse the modelFile given and store all information in the global variables.
Parse the modelFile given and store all information in the global variables .
//Active Model //Reactive Model