51 myCity(city), net(net) {}
118 }
catch (
const std::exception& e) {
138 }
catch (
const std::exception& e) {
155 }
catch (
const std::exception& e) {
172 if (std::isnan(pop)) {
179 if (std::isnan(work)) {
185 if (street ==
nullptr) {
192 }
catch (
const std::exception& e) {
210 }
catch (
const std::exception& e) {
229 }
catch (
const std::exception& e) {
244 }
catch (
const std::exception& e) {
273 AGSchool sch(capacity, posi, beginAge, endAge, openingHour, closingHour);
276 }
catch (
const std::exception& e) {
297 }
catch (
const std::exception& e) {
314 }
catch (
const std::exception& e) {
353 }
catch (
const std::exception& e) {
373 }
catch (
const std::exception& e) {
392 bool overlapping =
false;
394 if (beginAge < endAge) {
396 if (!(beginAge >= it->second || endAge <= it->first)) {
417 }
catch (
const std::exception& e) {
#define WRITE_WARNINGF(...)
#define WRITE_ERRORF(...)
@ AGEN_TAG_CITYGATES
city entrances
@ AGEN_TAG_STATION
station for a certain vehicle
@ AGEN_TAG_STREET
streets object
@ AGEN_TAG_BRACKET
alternative definition for Population
@ AGEN_TAG_FREQUENCY
frequency of a object
@ AGEN_TAG_SCHOOL
schools object
@ AGEN_TAG_CLOSING
closing for workingHours object
@ AGEN_TAG_POPULATION
population and children accompaniment brackets
@ AGEN_TAG_REV_STATIONS
rev stations for certain vehicles
@ AGEN_TAG_WORKHOURS
workingHours object
@ AGEN_TAG_SCHOOLS
school object
@ AGEN_TAG_STATIONS
stations for certain vehicles
@ AGEN_TAG_OPENING
opening for workingHours object
@ AGEN_TAG_GENERAL
ActivityGen Tags.
@ AGEN_TAG_ENTRANCE
alternative definition for city entrances
@ AGEN_TAG_PARAM
parameters
@ AGEN_TAG_BUSSTATION
busStation and bus objects
@ AGEN_TAG_BUSLINE
bus line
@ AGEN_ATTR_DEP_VARIATION
@ SUMO_ATTR_BEGIN
weights: time range begin
@ AGEN_ATTR_UNI_RAND_TRAFFIC
@ SUMO_ATTR_END
weights: time range end
@ AGEN_ATTR_OUT_WORKPOSITION
@ AGEN_ATTR_MAX_TRIP_DURATION
@ AGEN_ATTR_UNEMPLOYEMENT
@ AGEN_ATTR_MAX_FOOT_DIST
void parseBusStation(const SUMOSAXAttributes &attrs)
AGBusLine * currentBusLine
bool isRevStation
indicator whether the current station (in bus line context) is a reverse station or not.
void parseBracket(const SUMOSAXAttributes &attrs)
void parseBusLine(const SUMOSAXAttributes &attrs)
void parseCityGates(const SUMOSAXAttributes &attrs)
void parseSchool(const SUMOSAXAttributes &attrs)
void parseClosingHour(const SUMOSAXAttributes &attrs)
void parseOpeningHour(const SUMOSAXAttributes &attrs)
void parseParameters(const SUMOSAXAttributes &attrs)
AGCity & myCity
The city to store the information into.
std::string myCurrentObject
The name of the object that is currently processed.
RONet * net
The loaded network.
AGActivityGenHandler(AGCity &city, RONet *net)
Constructor.
void parseFrequency(const SUMOSAXAttributes &attrs)
void parseGeneralCityInfo(const SUMOSAXAttributes &attrs)
virtual void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
void parseStreets(const SUMOSAXAttributes &attrs)
void parseStation(const SUMOSAXAttributes &attrs)
virtual ~AGActivityGenHandler()
Destructor.
void locateRevStation(AGPosition pos)
void locateStation(AGPosition pos)
void generateBuses(int start, int stop, int rate)
void setMaxTripTime(int time)
std::vector< AGStreet * > streets
std::vector< AGPosition > cityGates
std::list< AGSchool > schools
AGDataAndStatistics & statData
std::list< AGBusLine > busLines
const AGStreet & getStreet(const std::string &edge)
std::map< int, double > incoming
double departureVariation
double uniformRandomTrafficRate
double freeTimeActivityRate
std::map< int, double > endWorkHours
std::map< int, AGPosition > busStations
std::map< int, int > ageSpan
std::map< int, double > beginWorkHours
std::map< int, double > outgoing
std::map< int, double > population
A location in the 2D plane freely positioned on a street.
A model of the street in the city.
void setWorkplaceNumber(const double work)
Modifies the number of work places in this street.
void setPopulation(const double pop)
Modifies the number of persons living in this street.
double getLength() const
Returns the length of the edge.
The router's network representation.
ROEdge * getEdge(const std::string &name) const
Retrieves an edge from the network.
Encapsulated SAX-Attributes.
virtual std::string getString(int id, bool *isPresent=nullptr) const =0
Returns the string-value of the named (by its enum-value) attribute.
T getOpt(int attr, const char *objectid, bool &ok, T defaultValue=T(), bool report=true) const
Tries to read given attribute assuming it is an int.
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
virtual bool hasAttribute(int id) const =0
Returns the information whether the named (by its enum-value) attribute is within the current list.
int getInt(int id) const
Returns the int-value of the named (by its enum-value) attribute.
double getFloat(int id) const
Returns the double-value of the named (by its enum-value) attribute.
SAX-handler base for SUMO-files.
static SequentialStringBijection Attrs
The names of SUMO-XML attributes for use in netbuild.
static SequentialStringBijection Tags
The names of SUMO-XML elements for use in netbuild.