|
SUMO - Simulation of Urban MObility
|
#include <config.h>#include <xercesc/sax/SAXException.hpp>#include <xercesc/sax/SAXParseException.hpp>#include <utils/common/TplConvert.h>#include <iostream>#include <string>#include <limits.h>#include <ctime>#include <vector>#include <router/ROLoader.h>#include <router/RONet.h>#include <router/ROEdge.h>#include <utils/vehicle/RouteCostCalculator.h>#include <utils/vehicle/DijkstraRouterTT.h>#include <utils/vehicle/DijkstraRouterEffort.h>#include <utils/vehicle/AStarRouter.h>#include <utils/vehicle/CHRouter.h>#include <utils/vehicle/CHRouterWrapper.h>#include <utils/common/MsgHandler.h>#include <utils/options/Option.h>#include <utils/options/OptionsCont.h>#include <utils/options/OptionsIO.h>#include <utils/common/UtilExceptions.h>#include <utils/common/SystemFrame.h>#include <utils/common/RandHelper.h>#include <utils/common/ToString.h>#include <utils/xml/XMLSubSys.h>#include <utils/iodevices/OutputDevice.h>#include <od/ODCell.h>#include <od/ODDistrict.h>#include <od/ODDistrictCont.h>#include <od/ODDistrictHandler.h>#include <od/ODMatrix.h>#include <utils/distribution/Distribution_Points.h>#include "ROMAFrame.h"#include "ROMAAssignments.h"#include "ROMAEdgeBuilder.h"#include "ROMARouteHandler.h"#include "ROMAEdge.h"
Go to the source code of this file.
Functions | |
| void | computeAllPairs (RONet &net, OptionsCont &oc) |
| void | computeRoutes (RONet &net, OptionsCont &oc, ODMatrix &matrix) |
| SUMOReal | getTravelTime (const ROEdge *const edge, const ROVehicle *const , SUMOReal) |
| void | initNet (RONet &net, ROLoader &loader, OptionsCont &oc) |
| int | main (int argc, char **argv) |
| void | writeInterval (OutputDevice &dev, const SUMOTime begin, const SUMOTime end, const RONet &net, const ROVehicle *const veh) |
Definition in file marouter_main.cpp.
| void computeAllPairs | ( | RONet & | net, |
| OptionsCont & | oc | ||
| ) |
Computes all pair shortest paths, saving them
Definition at line 128 of file marouter_main.cpp.
References ROEdge::ET_INTERNAL, OptionsCont::getBool(), RONet::getEdgeNo(), RONet::getInternalEdgeNumber(), OptionsCont::getString(), getTravelTime(), and FileHelpers::writeFloat().
Referenced by main().
| void computeRoutes | ( | RONet & | net, |
| OptionsCont & | oc, | ||
| ODMatrix & | matrix | ||
| ) |
Computes the routes saving them
Definition at line 175 of file marouter_main.cpp.
References ODMatrix::applyCurve(), ODCell::begin, RONet::cleanup(), OutputDevice::closeTag(), OutputDevice::createDeviceByOption(), DEFAULT_VTYPE_ID, ODCell::departures, ODCell::destination, ODCell::end, OptionsCont::getBool(), OutputDevice::getDeviceByOption(), RONet::getEdgeNo(), OptionsCont::getFloat(), OptionsCont::getInt(), ROEdge::getNoiseEffort(), OptionsCont::getOptions(), ROMAAssignments::getPenalizedEffort(), ROMAAssignments::getPenalizedTT(), RONet::getRouteOutput(), OptionsCont::getString(), OptionsCont::getStringVector(), ROMAAssignments::getTravelTime(), ROEdge::getTravelTimeStatic(), RONet::getVehicleTypeSecure(), RONet::hasPermissions(), OptionsCont::isSet(), max, MIN2(), RONet::openOutput(), OutputDevice::openTag(), ODCell::origin, ODMatrix::parseTimeLine(), ODCell::pathsVector, SUMOAbstractRouter< E, V >::recomputeCosts(), ROMAAssignments::resetFlows(), ODMatrix::sortByBeginTime(), string2time(), SUMO_ATTR_BEGIN, SUMO_ATTR_DEPART, SUMO_ATTR_END, SUMO_ATTR_ID, SUMO_ATTR_NUMBER, SUMO_TAG_FLOW, SUMO_TAG_ROUTE_DISTRIBUTION, SUMO_TAG_VEHICLE, SVC_IGNORING, time2string(), toString(), ODCell::vehicleNumber, OutputDevice::writeAttr(), and writeInterval().
Referenced by main().
Definition at line 119 of file marouter_main.cpp.
References ROEdge::getLength(), and ROEdge::getSpeed().
Referenced by computeAllPairs().
| void initNet | ( | RONet & | net, |
| ROLoader & | loader, | ||
| OptionsCont & | oc | ||
| ) |
loads the net The net is in this meaning made up by the net itself and the dynamic weights which may be supplied in a separate file
Definition at line 98 of file marouter_main.cpp.
References OptionsCont::getBool(), OptionsCont::getString(), OptionsCont::isSet(), ROLoader::loadNet(), ROLoader::loadWeights(), and ROEdge::setGlobalOptions().
Referenced by main().
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 367 of file marouter_main.cpp.
References TplConvert::_2str(), ROMAFrame::checkOptions(), MsgHandler::clear(), SystemFrame::close(), computeAllPairs(), computeRoutes(), ROMAFrame::fillOptions(), OptionsCont::getBool(), getBuildName(), RONet::getDistricts(), MsgHandler::getErrorInstance(), ODMatrix::getNoLoaded(), OptionsIO::getOptions(), OptionsCont::getOptions(), OptionsCont::getString(), MsgHandler::inform(), XMLSubSys::init(), initNet(), MsgHandler::initOutputOptions(), RandHelper::initRandGlobal(), OptionsCont::isSet(), ODMatrix::loadMatrix(), ODMatrix::loadRoutes(), ODDistrictCont::makeDistricts(), OptionsCont::processMetaOptions(), OptionsCont::setApplicationDescription(), OptionsCont::setApplicationName(), OptionsIO::setArgs(), XMLSubSys::setValidation(), toString(), VERSION_STRING, WRITE_ERROR, and WRITE_MESSAGE.
| void writeInterval | ( | OutputDevice & | dev, |
| const SUMOTime | begin, | ||
| const SUMOTime | end, | ||
| const RONet & | net, | ||
| const ROVehicle *const | veh | ||
| ) |
Writes the travel times for a single interval
Definition at line 152 of file marouter_main.cpp.
References OutputDevice::closeTag(), ROEdge::ET_NORMAL, ROMAAssignments::getCapacity(), RONet::getEdgeMap(), ROMAEdge::getFlow(), ROEdge::getFunc(), Named::getID(), ROEdge::getLength(), ROEdge::getTravelTime(), OutputDevice::openTag(), STEPS2TIME, SUMO_ATTR_BEGIN, SUMO_ATTR_END, SUMO_ATTR_ID, SUMO_TAG_EDGE, SUMO_TAG_INTERVAL, SUMOReal, time2string(), and OutputDevice::writeAttr().
Referenced by computeRoutes().