SUMO - Simulation of Urban MObility
AGStreet Class Reference

A model of the street in the city. More...

#include <AGStreet.h>

Public Member Functions

 AGStreet (const ROEdge *edge, SUMOReal popD=0, SUMOReal workD=0)
SUMOReal getLength () const
 Provides the length of this edge.
const std::string & getName () const
 Provides the id of this edge.
int getPopulation () const
 Provides the number of persons living in this street.
int getWorkplaceNumber () const
 Provides the number of work places in this street.
void print () const
 Prints a summary of the properties of this street to standard output.
void setPopulation (const int &pop)
 Modifies the number of persons living in this street.
void setWorkplaceNumber (const int &work)
 Modifies the number of work places in this street.

Private Attributes

const ROEdgeedge
int pop
int work

Friends

class AGPosition

Detailed Description

A model of the street in the city.

AGStreet represents a street in the city. It contains all model relevant properties and is associated with a ROEdge of the routing network.

Definition at line 57 of file AGStreet.h.


Constructor & Destructor Documentation

AGStreet::AGStreet ( const ROEdge edge,
SUMOReal  popD = 0,
SUMOReal  workD = 0 
)

Definition at line 43 of file AGStreet.cpp.

References ROEdge::getLength(), pop, and work.


Member Function Documentation

Provides the length of this edge.

Returns:
the length of this edge

Definition at line 59 of file AGStreet.cpp.

References edge, and ROEdge::getLength().

Referenced by AGPosition::compute2dPosition(), AGPosition::print(), and AGPosition::randomPositionInStreet().

const std::string & AGStreet::getName ( ) const

Provides the id of this edge.

Returns:
the id of this edge

Definition at line 66 of file AGStreet.cpp.

References edge, and ROEdge::getID().

Referenced by AGActivityTripWriter::addTrip().

Provides the number of persons living in this street.

Returns:
the number of inhabitants

Definition at line 73 of file AGStreet.cpp.

References pop.

Provides the number of work places in this street.

Returns:
the number of work places

Definition at line 87 of file AGStreet.cpp.

References work.

void AGStreet::print ( ) const

Prints a summary of the properties of this street to standard output.

Definition at line 52 of file AGStreet.cpp.

References edge, ROEdge::getID(), ROEdge::getLength(), pop, and work.

void AGStreet::setPopulation ( const int pop)

Modifies the number of persons living in this street.

Parameters:
[in]popthe new number of inhabitants

Definition at line 80 of file AGStreet.cpp.

References pop.

void AGStreet::setWorkplaceNumber ( const int work)

Modifies the number of work places in this street.

Parameters:
[in]workthe new number of work places

Definition at line 94 of file AGStreet.cpp.

References work.


Friends And Related Function Documentation

friend class AGPosition [friend]

Definition at line 103 of file AGStreet.h.


Field Documentation

const ROEdge* AGStreet::edge [private]

Definition at line 105 of file AGStreet.h.

Referenced by AGPosition::compute2dPosition(), getLength(), getName(), and print().

int AGStreet::pop [private]

Definition at line 106 of file AGStreet.h.

Referenced by AGStreet(), getPopulation(), print(), and setPopulation().

int AGStreet::work [private]

Definition at line 107 of file AGStreet.h.

Referenced by AGStreet(), getWorkplaceNumber(), print(), and setWorkplaceNumber().


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines