simulation config can now be passed as a argument to the console program

This commit is contained in:
robert
2014-04-16 10:52:00 +02:00
parent afc218b2b0
commit b074e3777d
4 changed files with 38 additions and 3 deletions

View File

@@ -35,7 +35,12 @@ int sc_main(int argc, char **argv)
{
sc_set_time_resolution(1, SC_PS);
resources = pathOfFile(argv[0]) + string("/../resources/");
string simulationToRun = "sim-batch.xml";
string simulationToRun;
if(argc > 1)
simulationToRun = argv[1];
else
simulationToRun = "sim-batch.xml";
SimulationManager manager(resources);
manager.loadSimulationsFromXML(resources + "/simulations/" + simulationToRun);