Build the Time Evolution Vector.
226 fTimeStep.insert( pair<double ,int>(t,1) );
238 fTimeStep.insert( pair<cSecond ,int>(step,1) );
244 fTimeStep.insert( pair<cSecond ,int>(step,1) );
250 for(
int i = 0; i < (int)
fReactor.size();i++)
252 double step =
fReactor[i]->GetCreationTime();
253 double coolingstep =
fReactor[i]->GetAssociedPool()->GetCoolingTime();
254 double fabricationstep = 0;
256 if(
fReactor[i]->IsFuelFixed() ==
false)
257 fabricationstep =
fReactor[i]->GetFabricationPlant()->GetFabricationTime();
266 pair< map<cSecond, int>::iterator,
bool > IResult =
fTimeStep.insert( pair<cSecond ,int>(
fReactor[i]->GetCreationTime() +
fReactor[i]->GetLifeTime(),2) );
267 if( IResult.second ==
false ) IResult.first->second |= 2;
271 &&
fReactor[i]->GetCreationTime() +
fReactor[i]->GetLifeTime()+coolingstep <= t)
273 pair< map<cSecond, int>::iterator,
bool > IResult =
fTimeStep.insert( pair<cSecond ,int>(
fReactor[i]->GetCreationTime() +
fReactor[i]->GetLifeTime()+coolingstep,8) );
274 if( IResult.second ==
false ) IResult.first->second |= 8;
282 pair< map<cSecond, int>::iterator,
bool > IResult =
fTimeStep.insert( pair<cSecond ,int>(step,4) );
283 if( IResult.second ==
false ) IResult.first->second |= 4;
287 if(
fReactor[i]->IsFuelFixed() ==
false)
291 pair< map<cSecond, int>::iterator,
bool > IResult =
fTimeStep.insert( pair<cSecond ,int>(step -fabricationstep,16) );
292 if( IResult.second ==
false ) IResult.first->second |= 16;
296 cout <<
"!!Warning!! !!!CLASS!!! Can't Build Fuel before Scenario's start\"\n" << endl;
297 fLog->
fLog <<
"!!Warning!! !!!CLASS!!! Can't Build Fuel before Scenario's start\"\n" << endl;
304 step +=
fReactor[i]->GetCycleTime();
310 if(
fReactor[i]->IsFuelFixed() ==
false)
313 pair< map<cSecond, int>::iterator,
bool > IResult =
fTimeStep.insert( pair<cSecond ,int>(step -fabricationstep,16) );
314 if( IResult.second ==
false ) IResult.first->second |= 16;
321 pair< map<cSecond, int>::iterator,
bool > IResult =
fTimeStep.insert( pair<cSecond ,int>(step,4) );
322 if( IResult.second ==
false ) IResult.first->second |= 4;
328 pair< map<cSecond, int>::iterator,
bool > IResult =
fTimeStep.insert( pair<cSecond ,int>(step+coolingstep,8) );
329 if( IResult.second ==
false ) IResult.first->second |= 8;
331 step +=
fReactor[i]->GetCycleTime();
333 while(step <= t && step <=
fReactor[i]->GetCreationTime() +
fReactor[i]->GetLifeTime() );
338 for(
int i =0; i < (int)
fPool.size(); i++)
343 for(
int j = 0; j<(int)
fPool[i]->GetIVCooling().size(); j++ )
347 pair< map<cSecond, int>::iterator,
bool > IResult;
348 IResult =
fTimeStep.insert( pair<cSecond ,int>(
fPool[i]->GetCoolingStartingTime()[j] +
fPool[i]->GetCoolingTime(),8) );
349 if( IResult.second ==
false ) IResult.first->second |= 8;
357 ofstream TimeStepfile(
"CLASS_TimeStep", ios_base::app);
361 cout <<
"!!Warning!! !!!CLASS!!! Can't open \" CLASS_TimeStep \"\n" << endl;
362 fLog->
fLog <<
"!!Warning!! !!!CLASS!!! Can't open \" CLASS_TimeStep \"\n" << endl;
364 map<cSecond ,int >::iterator
it;
366 TimeStepfile << (
double)((*it).first/3600/24./365.25) <<
" " << (*it).second << endl;