Commit 8d77dd5a authored by BONNEAU Alexandre's avatar BONNEAU Alexandre

argc work

parent 2c892a7c
......@@ -37,9 +37,31 @@ using namespace std;
int main( int argc, char * argv[] )
{
CrowdSimulator cs;
char * output = "./output/";
// char * masterConfigFile = "./MainConfig.xml";
char * masterConfigFile = "C:/Users/abonneau/Stage/OCSR/OCSR/release/MainConfig.xml";
if (argc ==2) {
if (argv[1] == "-c" || argv[1] == "-h" || argv[1] == "-help") {
std::cout << " The optional arguments are : " << std::endl;
std::cout << argv[0] << " outputDirectory" << std::endl;
std::cout << argv[0] <<" outputDirectory mainConfigDirectory/MainConfig.xml " << std::endl;
std::cout << argv[0] << " -c mainConfigDirectory/MainConfig.xml " << std::endl;
return -1;
}
else {
output = argv[1];
}
}
cs.setOutputDir("./output/");
cs.runMasterConfigFile("./MainConfig.xml");
if (argc == 3) {
if (argv[1] != "-c") {
output = argv[1];
}
masterConfigFile = argv[2];
}
cs.setOutputDir(output);
cs.runMasterConfigFile(masterConfigFile);
//cs.runWorld(1000, 0.0333);
std::cout << "Simulation done"<< std::endl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment