|
SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00007 // Configuration of the options of ActivityGen 00008 /****************************************************************************/ 00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00010 // Copyright (C) 2001-2011 DLR (http://www.dlr.de/) and contributors 00011 // activitygen module 00012 // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) 00013 /****************************************************************************/ 00014 // 00015 // This program is free software; you can redistribute it and/or modify 00016 // it under the terms of the GNU General Public License as published by 00017 // the Free Software Foundation; either version 2 of the License, or 00018 // (at your option) any later version. 00019 // 00020 /****************************************************************************/ 00021 00022 00023 // =========================================================================== 00024 // included modules 00025 // =========================================================================== 00026 #ifdef _MSC_VER 00027 #include <windows_config.h> 00028 #else 00029 #include <config.h> 00030 #endif 00031 00032 #ifdef HAVE_VERSION_H 00033 #include <version.h> 00034 #endif 00035 00036 #include "AGFrame.h" 00037 #include <router/ROFrame.h> 00038 #include <duarouter/RODUAFrame.h> 00039 #include <utils/common/SystemFrame.h> 00040 #include <utils/common/RandHelper.h> 00041 #include <utils/options/OptionsCont.h> 00042 00043 00044 // =========================================================================== 00045 // method definitions 00046 // =========================================================================== 00047 void AGFrame::fillOptions() { 00048 OptionsCont& oc = OptionsCont::getOptions(); 00049 // give some application descriptions 00050 oc.setApplicationDescription( 00051 "Generates routes of persons throughout a day for the microscopic road traffic simulation SUMO."); 00052 oc.setApplicationName("activitygen", "SUMO activitygen Version " + (std::string)VERSION_STRING); 00053 oc.addCopyrightNotice("Copyright (C) 2010-2011 Technische Universitaet Muenchen"); 00054 // Options handling 00055 oc.addCallExample("--net-file <INPUT>.net.xml --stat-file <INPUT>.stat.xml --output <OUTPUT>.rou.xml --abs-rand"); 00056 oc.addCallExample("--net-file <INPUT>.net.xml --stat-file <INPUT>.stat.xml --output <OUTPUT>.rou.xml --duration-d <NBR_OF_DAYS>"); 00057 00058 // Add categories and insert the standard options 00059 SystemFrame::addConfigurationOptions(oc); 00060 oc.addOptionSubTopic("Input"); 00061 oc.addOptionSubTopic("Output"); 00062 oc.addOptionSubTopic("Processing"); 00063 oc.addOptionSubTopic("Time"); 00064 SystemFrame::addReportOptions(oc); 00065 RandHelper::insertRandOptions(); 00066 00067 // Insert options 00068 oc.doRegister("net-file", 'n', new Option_FileName()); 00069 oc.addSynonyme("net-file", "net"); 00070 oc.addDescription("net-file", "Input", "Use FILE as SUMO-network to route on"); 00071 00072 oc.doRegister("stat-file", 's', new Option_FileName()); 00073 oc.addDescription("stat-file", "Input", "Loads the SUMO-statistics FILE"); 00074 00075 oc.doRegister("output-file", 'o', new Option_FileName()); 00076 oc.addSynonyme("output-file", "output", true); 00077 oc.addDescription("output-file", "Output", "Write generated routes to FILE"); 00078 00079 oc.doRegister("debug", new Option_Bool(false)); 00080 oc.addDescription("debug", "Report", 00081 "Detailed messages about every single step"); 00082 00083 // TODO: What time options are consistent with other parts of SUMO and 00084 // useful for the user? 00085 oc.doRegister("begin", 'b', new Option_Integer()); 00086 oc.addDescription("begin", "Time", "Sets the time of beginning of the simulation during the first day (in seconds)"); 00087 00088 oc.doRegister("end", 'e', new Option_Integer()); 00089 oc.addDescription("end", "Time", "Sets the time of ending of the simulation during the last day (in seconds)"); 00090 00091 oc.doRegister("duration-d", new Option_Integer()); 00092 oc.addDescription("duration-d", "Time", "Sets the duration of the simulation in days"); 00093 00094 // Options needed by the router 00095 oc.doRegister("weights.interpolate", new Option_Bool(false)); 00096 oc.addSynonyme("weights.interpolate", "interpolate", true); 00097 oc.addDescription("weights.interpolate", "Processing", "Interpolate edge weights at interval boundaries"); 00098 00099 oc.doRegister("weights.expand", new Option_Bool(false)); 00100 oc.addSynonyme("weights.expand", "expand-weights", true); 00101 oc.addDescription("weights.expand", "Processing", "Expand weights behind the simulation's end"); 00102 } 00103 00104 00105 bool AGFrame::checkOptions() { 00106 return true; 00107 }