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. More...
 
const std::string & getName () const
 Provides the id of this edge. More...
 
SUMOReal getPopulation () const
 Provides the number of persons living in this street. More...
 
SUMOReal getWorkplaceNumber () const
 Provides the number of work places in this street. More...
 
void print () const
 Prints a summary of the properties of this street to standard output. More...
 
void setPopulation (const SUMOReal pop)
 Modifies the number of persons living in this street. More...
 
void setWorkplaceNumber (const SUMOReal work)
 Modifies the number of work places in this street. More...
 

Private Attributes

const ROEdgeedge
 
SUMOReal pop
 
SUMOReal 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 58 of file AGStreet.h.

Constructor & Destructor Documentation

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

Definition at line 44 of file AGStreet.cpp.

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

Member Function Documentation

SUMOReal AGStreet::getLength ( ) const

Provides the length of this edge.

Returns
the length of this edge

Definition at line 58 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 64 of file AGStreet.cpp.

References edge, and Named::getID().

Referenced by AGActivityTripWriter::addTrip().

SUMOReal AGStreet::getPopulation ( ) const

Provides the number of persons living in this street.

Returns
the number of inhabitants

Definition at line 70 of file AGStreet.cpp.

References pop.

SUMOReal AGStreet::getWorkplaceNumber ( ) const

Provides the number of work places in this street.

Returns
the number of work places

Definition at line 82 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, Named::getID(), ROEdge::getLength(), pop, and work.

void AGStreet::setPopulation ( const SUMOReal  pop)

Modifies the number of persons living in this street.

Parameters
[in]popthe new number of inhabitants

Definition at line 76 of file AGStreet.cpp.

References pop.

void AGStreet::setWorkplaceNumber ( const SUMOReal  work)

Modifies the number of work places in this street.

Parameters
[in]workthe new number of work places

Definition at line 88 of file AGStreet.cpp.

References work.

Friends And Related Function Documentation

friend class AGPosition
friend

Definition at line 104 of file AGStreet.h.

Field Documentation

const ROEdge* AGStreet::edge
private

Definition at line 106 of file AGStreet.h.

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

SUMOReal AGStreet::pop
private

Definition at line 107 of file AGStreet.h.

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

SUMOReal AGStreet::work
private

Definition at line 108 of file AGStreet.h.

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


The documentation for this class was generated from the following files: