traffic-generator/src/ModelRead.cpp
/**
 * Parse the hierarchical parameters of the model
 *
 * @param modelFile The model file stream
 */
Parse the hierarchical parameters of the model
@param modelFile The model file stream
Parse the hierarchical parameters of the model @param modelFile The model file stream
void ReadHierarchy(ifstream& modelFile) {
	string header;
	modelFile >> header;
	modelFile >> g_hierClasses;
	modelFile >> header;
	modelFile >> g_timeSpan;
	double transition;
	modelFile >> header;
	for(int i = 1; i <= g_hierClasses; i++) {
		for(int j = 0; j < g_hierClasses; j++) {
			modelFile >> transition;
			g_hierState[i].Add(transition);
		}
	}
	modelFile >> header;
	modelFile >> header;
	for(int i = 0; i < g_hierClasses; i++) {
		modelFile >> transition;
		g_hierSState.push_back(transition);
	}
	modelFile >> header;
}
void ReadHierarchy ( ifstream & modelFile ) { string header ; modelFile >> header ; modelFile >> g_hierClasses ; modelFile >> header ; modelFile >> g_timeSpan ; double transition ; modelFile >> header ; for ( int i = 1 ; i <= g_hierClasses ; i ++ ) { for ( int j = 0 ; j < g_hierClasses ; j ++ ) { modelFile >> transition ; g_hierState [ i ] . Add ( transition ) ; } } modelFile >> header ; modelFile >> header ; for ( int i = 0 ; i < g_hierClasses ; i ++ ) { modelFile >> transition ; g_hierSState . push_back ( transition ) ; } modelFile >> header ; }
Parse the hierarchical parameters of the model
 @param modelFile The model file stream
Parse the hierarchical parameters of the model @param modelFile The model file stream
//Hierarchical Markov Model //Read steady state