Aimsun Next Scripting: GKSectionLane Class Reference
Aimsun Next Scripting  22
Public Types | Public Member Functions | List of all members
GKSectionLane Class Reference

Public Types

enum  GKSectionLaneFlowDirection { eNormal , eInverse , eBidirectional }
 

Public Member Functions

 GKSectionLane ()
 
bool canUse (GKVehicleClass *) const
 
const GKSectionLaneFlowDirection getFlowDirection () const
 
void setFlowDirection (const GKSectionLaneFlowDirection)
 
double getInitialOffset () const
 
double getFinalOffset () const
 
void setOffsets (double, double)
 
const GKCoord getSideLaneLength2D () const
 
void setLength (const GKCoord)
 
double getWidth () const
 
void setWidth (double w)
 
bool isFullLane () const
 
bool isAnEntryLateral () const
 
bool isAnExitLateral () const
 
bool canEnterFlow () const
 
bool canExitFlow () const
 
void setLaneType (GKLaneType *laneType)
 
GKLaneTypegetLaneType () const
 
bool isReserved () const
 
bool isReserved (GKVehicle *vehicle) const
 
bool getReserveFirstSegment (const GKSection *section) const
 
void setReserveFirstSegment (bool value)
 
bool getReserveLastSegment (const GKSection *section) const
 
void setReserveLastSegment (bool value)
 
QVector< GKSectionLaneSolid > & getSolidLines ()
 
void clearSolidLines ()
 
void addSolidLine (GKSectionLaneSolid &solid)
 
void removeSolidLine (GKSectionLaneSolid &solid)
 
void unselectAllSolidLines ()
 
void changeDirection (GKCoord sectionLength)
 
double getStopLine () const
 
void setStopLine (double v)
 

Detailed Description

It can be a full lane or a side lane. If it is a side lane it can be an entry or an exit side lane.

An entry side lane have initialOffset equal to 0.0 and finalOffset equal to the length of the side lane.

An exit side lane have initialOffset equal to the length of the side lane (but negative) and finalOffset equal to 0.0.

Example: an entry side lane of 10 m will have:

Other side lane configurations are possible but not supported (as laterals that starts and ends at position that are not the start and end of the section).

A lane can also have a solid line disabling lane change. A lane specifies solid line information for its right part, that is:


LANE 0 ->

A lane can have more that one solid line:


- - - - - - - - - - - - - - - - - - -------------— - - - - - -

In the previous example the lane has three solid lines, at right, at left and at both sides.

Note that a solid line at left and at right in the same position is equivalent to a solid line at both sides.

A lane can also be reserved (using the GKLaneType) for a particular vehicle class. If so the user can select if the last and/or first segments of the lane are reserved too (In some cases the last segment is not reserved to allow a turn for any vehicle class).

Member Enumeration Documentation

◆ GKSectionLaneFlowDirection

Flow direction:

  • eNormal: the flow direction is the same as the line/curve direction
  • eInverse: the flow direction is the inverse of the line/curve direction
  • eBididectional: both ways direction.
Enumerator
eNormal 
eInverse 
eBidirectional 

Constructor & Destructor Documentation

◆ GKSectionLane()

GKSectionLane::GKSectionLane ( )

Member Function Documentation

◆ addSolidLine()

void GKSectionLane::addSolidLine ( GKSectionLaneSolid solid)

Add a solid line. The object is adopted.

◆ canEnterFlow()

bool GKSectionLane::canEnterFlow ( ) const

Returns true if flow can enter in this lane (it do not check if the lane is connected to in a turn but just if it can be connected and, thus, receive flow).

◆ canExitFlow()

bool GKSectionLane::canExitFlow ( ) const

Returns true if flow can exit from this lane (it do not check if the lane is connected to in a turn but just if it can be connected and, thus, flow can use it to exit the section).

◆ canUse()

bool GKSectionLane::canUse ( GKVehicleClass ) const

Return true if this vehicle class can use this section lane.

◆ changeDirection()

void GKSectionLane::changeDirection ( GKCoord  sectionLength)

Changes the lane direction, that is moves the solid lines, speed segments,... to maintain its original position in the lane with a changed direction.

◆ clearSolidLines()

void GKSectionLane::clearSolidLines ( )

Discard all the solid lines. Objects are deleted.

◆ getFinalOffset()

double GKSectionLane::getFinalOffset ( ) const

For side lanes, returns the final offset of the lane. See GKSectionLane.

◆ getFlowDirection()

const GKSectionLaneFlowDirection GKSectionLane::getFlowDirection ( ) const

Return the flow direction. See GKSectionLane::GKSectionLaneFlowDirection.

◆ getInitialOffset()

double GKSectionLane::getInitialOffset ( ) const

For side lanes, returns the initial offset of the lane. See GKSectionLane.

◆ getLaneType()

GKLaneType * GKSectionLane::getLaneType ( ) const

Get the lane's laneType attribute. Returns NULL any lane type has been defined,

See also
GKLaneType.

◆ getReserveFirstSegment()

bool GKSectionLane::getReserveFirstSegment ( const GKSection section) const

Returns true is the first segment is reserved too.

◆ getReserveLastSegment()

bool GKSectionLane::getReserveLastSegment ( const GKSection section) const

Returns true is the last segment is reserved too.

◆ getSideLaneLength2D()

const GKCoord GKSectionLane::getSideLaneLength2D ( ) const

Returns the length of this lane if it is a side lane.

◆ getSolidLines()

QVector< GKSectionLaneSolid > & GKSectionLane::getSolidLines ( )

Get all the solid lines from this lane.

◆ getStopLine()

double GKSectionLane::getStopLine ( ) const

Stop Line distance from the beginning of the section (in meters).

See also
GKSection::getStopLine.

◆ getWidth()

double GKSectionLane::getWidth ( ) const

Return the lane width. The value can be 0.0. In this case no width has been set and the default value from GKSection::getLaneWidth must be used.

It is better to access this value through the section method GKSection::getLaneWidth( uint lanepos ) as it will take care of 0.0 values.

◆ isAnEntryLateral()

bool GKSectionLane::isAnEntryLateral ( ) const

Check if the section lane is an entry lateral lane.

◆ isAnExitLateral()

bool GKSectionLane::isAnExitLateral ( ) const

Check if the section lane is an exit lateral lane.

◆ isFullLane()

bool GKSectionLane::isFullLane ( ) const

Return true is this lane goes from the beginning to the end of the section.

◆ isReserved() [1/2]

bool GKSectionLane::isReserved ( ) const

Returns true if this lane is reserved for any vehicle type.

◆ isReserved() [2/2]

bool GKSectionLane::isReserved ( GKVehicle vehicle) const

Returns true if this lane is reserved for the vehicle type.

◆ removeSolidLine()

void GKSectionLane::removeSolidLine ( GKSectionLaneSolid solid)

Remove a solid line. The object is removed from the list but not deleted.

◆ setFlowDirection()

void GKSectionLane::setFlowDirection ( const  GKSectionLaneFlowDirection)

Sets the flow direction. See GKSectionLane::GKSectionLaneFlowDirection.

◆ setLaneType()

void GKSectionLane::setLaneType ( GKLaneType laneType)

Set the lane's laneType attribute,

See also
GKLaneType.

◆ setLength()

void GKSectionLane::setLength ( const  GKCoord)

Change the length of this lane if it is a side lane.

◆ setOffsets()

void GKSectionLane::setOffsets ( double  ,
double   
)

For side lanes, sets the offsets of the lane. A side lane cannot be shorter than 5 meters. See GKSectionLane.

◆ setReserveFirstSegment()

void GKSectionLane::setReserveFirstSegment ( bool  value)

Set the reservation status of the first segment.

◆ setReserveLastSegment()

void GKSectionLane::setReserveLastSegment ( bool  value)

Set the reservation status of the last segment.

◆ setStopLine()

void GKSectionLane::setStopLine ( double  v)

Stop Line distance from the beginning of the section (in meters)

See also
GKSection::getStopLine.

◆ setWidth()

void GKSectionLane::setWidth ( double  w)

Set the lane width.

◆ unselectAllSolidLines()

void GKSectionLane::unselectAllSolidLines ( )

Unselect all the selected solid lines.

© Aimsun SLU
Aimsun ®