|
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 --abs-rand"); 00060 oc.addCallExample("--net-file <INPUT>.net.xml --stat-file <INPUT>.stat.xml --output <OUTPUT>.rou.xml --duration-d <NBR_OF_DAYS>"); 00061 00062 // Add categories and insert the standard options 00063 SystemFrame::addConfigurationOptions(oc); 00064 oc.addOptionSubTopic("Input"); 00065 oc.addOptionSubTopic("Output"); 00066 oc.addOptionSubTopic("Processing"); 00067 oc.addOptionSubTopic("Time"); 00068 SystemFrame::addReportOptions(oc); 00069 RandHelper::insertRandOptions(); 00070 00071 // Insert options 00072 oc.doRegister("net-file", 'n', new Option_FileName()); 00073 oc.addSynonyme("net-file", "net"); 00074 oc.addDescription("net-file", "Input", "Use FILE as SUMO-network to route on"); 00075 00076 oc.doRegister("stat-file", 's', new Option_FileName()); 00077 oc.addDescription("stat-file", "Input", "Loads the SUMO-statistics FILE"); 00078 00079 oc.doRegister("output-file", 'o', new Option_FileName()); 00080 oc.addSynonyme("output-file", "output", true); 00081 oc.addDescription("output-file", "Output", "Write generated routes to FILE"); 00082 00083 oc.doRegister("debug", new Option_Bool(false)); 00084 oc.addDescription("debug", "Report", 00085 "Detailed messages about every single step"); 00086 00087 // TODO: What time options are consistent with other parts of SUMO and 00088 // useful for the user? 00089 oc.doRegister("begin", 'b', new Option_Integer()); 00090 oc.addDescription("begin", "Time", "Sets the time of beginning of the simulation during the first day (in seconds)"); 00091 00092 oc.doRegister("end", 'e', new Option_Integer()); 00093 oc.addDescription("end", "Time", "Sets the time of ending of the simulation during the last day (in seconds)"); 00094 00095 oc.doRegister("duration-d", new Option_Integer()); 00096 oc.addDescription("duration-d", "Time", "Sets the duration of the simulation in days"); 00097 00098 // Options needed by the router 00099 oc.doRegister("weights.interpolate", new Option_Bool(false)); 00100 oc.addSynonyme("weights.interpolate", "interpolate", true); 00101 oc.addDescription("weights.interpolate", "Processing", "Interpolate edge weights at interval boundaries"); 00102 00103 oc.doRegister("weights.expand", new Option_Bool(false)); 00104 oc.addSynonyme("weights.expand", "expand-weights", true); 00105 oc.addDescription("weights.expand", "Processing", "Expand weights behind the simulation's end"); 00106 } 00107 00108 00109 bool AGFrame::checkOptions() { 00110 return true; 00111 }