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