Aimsun Next Scripting: GKPublicLineTimeTableSchedule Class Reference
Aimsun Next Scripting  22
Public Types | Public Member Functions | List of all members
GKPublicLineTimeTableSchedule Class Reference
Inheritance diagram for GKPublicLineTimeTableSchedule:
GKObject GKBaseObject

Public Types

enum  GKPublicLineTimeTableScheduleDepartureType { eInterval , eFixed }
 
- Public Types inherited from GKObject
enum  IdentifierFormFlag {
  eIdentifierDefault , eIdentifierId , eIdentifierName , eIdentifierExternalId ,
  eIdentifierTypeExternalName , eIdentifierDescription , eIdentifierStandard , eIdentifierStandardWithType ,
  eIdentifierAll
}
 
enum  GKLockType { eNone , eModification , eDelete , eModificationDelete }
 
enum  GKObjectStatus { eNew , eSaved , eModified , eDeleted }
 
typedef QFlags< GKObject::IdentifierFormFlagIdentifierForm
 

Public Member Functions

 GKPublicLineTimeTableSchedule (GKModel *model)
 
const QTime & getTime () const
 
void setTime (const QTime &atime)
 
void setDuration (const GKTimeDuration &aduration)
 
const GKTimeDurationgetDuration () const
 
void setConsiderOffsetsInModel (bool value)
 
bool getConsiderOffsetsInModel () const
 
void addStop (GKBusStop *stop, int indexAppearance)
 
void removeStop (GKBusStop *stop, int indexAppearance)
 
void setStopTime (GKBusStop *stop, int indexAppearance, float mean, float deviation, float offset=0.0f)
 
void setStopTime (GKBusStop *stop, int indexAppearance, const GKPublicLineTimeTableScheduleStopTime &time)
 
void setPedestrians (GKBusStop *stop, int indexAppearance, float secondsByPedestrian, float _pedestriansGen, float _genDeviation, float _pedestrianGat, float _gatDeviation)
 
void setPedestrians (GKBusStop *stop, int indexAppearance, const GKPublicLineTimeTableScheduleStopTime &time)
 
const GKPublicLineTimeTableScheduleStopTimegetStopTime (GKBusStop *stop, int indexAppearance) const
 
QList< GKPublicLineTimeTableScheduleStopTimegetStopTimes (GKBusStop *stop) const
 
void removeStops ()
 
GKPublicLineTimeTableScheduleDepartureType getDepartureType () const
 
void setDepartureType (const GKPublicLineTimeTableScheduleDepartureType atype)
 
void addDepartureTime (const GKPublicLineTimeTableScheduleDeparture &departure)
 
void setDepartureTime (int pos, const GKPublicLineTimeTableScheduleDeparture &departure)
 
void removeDepartureTime (uint pos)
 
const GKPublicLineTimeTableScheduleDeparturegetDepartureTime (int pos)
 
void removeDepartureTimes ()
 
const QVector< GKPublicLineTimeTableScheduleDeparture > & getDepartureTimes () const
 
void sortDepartureTimes ()
 
- Public Member Functions inherited from GKObject
 GKObject ()
 
 GKObject (const GKObject &o)
 
virtual void addedToCatalog ()
 
virtual void removedFromCatalog ()
 
uint getTick () const
 
virtual void increaseTick ()
 
void setTick (uint t)
 
virtual GKObjectclone (bool addItToModel=true) const
 
virtual GKObjectcloneAsTemporary (bool addItToModel=true) const
 
GKFoldergetCreateRootFolder ()
 
GKFoldergetRootFolder () const
 
void setRootFolder (GKFolder *afolder)
 
GKFolderfindFolder (const QString &byName) const
 
QVector< GKFolder * > getParentFolders () const
 
bool isDataValueNull (const GKColumn *attr) const
 
virtual QVariant * getDataValue (const GKColumn *attr, bool *deleteit, const GKContext &context=GKContext::anyContext) const
 
QVariant * getDataValueByID (uint attrId, bool *deleteit, const GKContext &context=GKContext::anyContext) const
 
virtual void setDataValue (const GKColumn *attr, const QVariant &v)
 
void setDataValueByID (uint attrId, const QVariant &v)
 
virtual void setDataValueObject (const GKColumn *attr, const GKObject *obj)
 
void setDataValueObjectByID (uint attrId, const GKObject *obj)
 
virtual void setDataValueDouble (const GKColumn *attr, double v)
 
void setDataValueDoubleByID (uint attrId, double v)
 
virtual double getDataValueInTS (const GKColumn *attr, GKTimeSerieIndex index, double *deviation=NULL) const
 
double getDataValueInTSByID (uint attrId, GKTimeSerieIndex index, double *deviation=NULL) const
 
bool hasAnyTSWithData () const
 
virtual GKTimeSeriegetDataValueTS (const GKColumn *attr) const
 
GKTimeSeriegetDataValueTSByID (uint attrId) const
 
virtual void setDataValueInTS (const GKColumn *attr, GKTimeSerieIndex index, double value, double deviation, GKTSDescription *aDescription=NULL, int reservedSize=0)
 
virtual void setDataValueInTS (const GKColumn *attr, GKTimeSerieIndex index, double value, double deviation, double lowerValue, GKTSDescription *aDescription=NULL, int reservedSize=0)
 
virtual void setDataValueInSingleTS (const GKColumn *attr, GKTimeSerieIndex index, double value, double deviation, GKTSDescription *aDescription)
 
void setDataValueInTSByID (uint attrId, GKTimeSerieIndex index, double value, double deviation, GKTSDescription *aDescription=NULL, int reservedSize=0)
 
virtual void setAggregatedValueInTS (const GKColumn *attr, double value, double deviation, GKTSDescription *aDescription=NULL)
 
void setAggregatedValueInTSByID (uint attrId, double value, double deviation, GKTSDescription *aDescription=NULL)
 
virtual void clearDataValueTS (const GKColumn *attr, GKTSDescription *aDescription=NULL)
 
void clearDataValueTSByID (uint attrId, GKTSDescription *aDescription=NULL)
 
virtual int getDataValueInt (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const
 
int getDataValueIntByID (uint attrId, const GKContext &context=GKContext::anyContext) const
 
virtual double getDataValueDouble (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const
 
double getDataValueDoubleByID (uint attrId, const GKContext &context=GKContext::anyContext) const
 
QString getDataValueString (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const
 
QString getDataValueStringByID (uint attrId, const GKContext &context=GKContext::anyContext) const
 
virtual bool getDataValueBool (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const
 
bool getDataValueBoolByID (uint attrId, const GKContext &context=GKContext::anyContext) const
 
virtual GKObjectgetDataValueObject (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const
 
GKObjectgetDataValueObjectByID (uint attrId, const GKContext &context=GKContext::anyContext) const
 
QDate getDataValueDate (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const
 
QDate getDataValueDateByID (uint attrId, const GKContext &context=GKContext::anyContext) const
 
QTime getDataValueTime (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const
 
QTime getDataValueTimeByID (uint attrId, const GKContext &context=GKContext::anyContext) const
 
QDateTime getDataValueDateTime (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const
 
QDateTime getDataValueDateTimeByID (uint attrId, const GKContext &context=GKContext::anyContext) const
 
GKTimeDuration getDataValueTimeDuration (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const
 
GKTimeDuration getDataValueTimeDurationByID (uint attrId, const GKContext &context=GKContext::anyContext) const
 
void removeDataValue (const GKColumn *attr)
 
void removeDataValueByID (uint attrId)
 
const QString & getDescription () const
 
void setDescription (const QString &adescription)
 
const QString & getExternalId () const
 
void setExternalId (const QString &anId)
 
virtual GKObjectDelCmd * getDelCmd ()
 
virtual GKObjectConnectionDelCmd * getDelConnectionCmd (GKObject *target)
 
virtual void nonCommandObjectRemoved (GKObject *)
 
virtual void init ()
 
virtual void setId (uint aid, GKModel *model)
 
uint getId () const
 
QUuid getUUID () const
 
virtual void setName (const QString &aname)
 
const QString & getName () const
 
QString getExtendedId (IdentifierForm form=eIdentifierDefault) const
 
QString getNameOrExtendedId (IdentifierForm form=eIdentifierDefault) const
 
virtual const QString & getTypeName () const
 
virtual QString getTypeExternalName () const
 
const GKObjectgetMaster () const
 
GKTypegetType () const
 
virtual void setType (GKType *atype)
 
bool isA (const GKType *atype) const
 
bool isA (const QString &typeName) const
 
virtual void setModel (GKModel *amodel)
 
GKModelgetModel () const
 
virtual void setLock (GKLockType atype)
 
GKLockType getLock () const
 
virtual bool canBeDeleted () const
 
virtual bool canBeModified () const
 
virtual bool canBeEdited () const
 
GKObjectStatus getStatus () const
 
virtual void setStatus (const GKObjectStatus astatus)
 
void notifyStatusChange ()
 
bool isTemporary () const
 
void setTemporary (bool value)
 
bool isExternal () const
 
void setExternal (bool value)
 
virtual void preferencesChanged ()
 
void removeColumn (GKColumn *column)
 
void resetColumn (GKColumn *column)
 
- Public Member Functions inherited from GKBaseObject
 GKBaseObject ()
 
 if (base)
 
virtual uint getId () const =0
 
virtual const QString & getTypeName () const =0
 
virtual QString getTypeExternalName () const =0
 
virtual const GKObjectgetMaster () const =0
 
virtual const QString & getName () const =0
 
virtual const QString & getExternalId () const =0
 
virtual const QString & getDescription () const =0
 
virtual GKModelgetModel () const =0
 
virtual QVariant * getDataValue (const GKColumn *attr, bool *deleteit, const GKContext &context=GKContext::anyContext) const =0
 
virtual QVariant * getDataValueByID (uint attrId, bool *deleteit, const GKContext &context=GKContext::anyContext) const =0
 
virtual double getDataValueInTS (const GKColumn *attr, GKTimeSerieIndex index, double *deviation=NULL) const =0
 
virtual double getDataValueInTSByID (uint attrId, GKTimeSerieIndex index, double *deviation=NULL) const =0
 
virtual GKTimeSeriegetDataValueTS (const GKColumn *attr) const =0
 
virtual GKTimeSeriegetDataValueTSByID (uint attrId) const =0
 
virtual int getDataValueInt (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0
 
virtual int getDataValueIntByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0
 
virtual double getDataValueDouble (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0
 
virtual double getDataValueDoubleByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0
 
virtual QString getDataValueString (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0
 
virtual QString getDataValueStringByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0
 
virtual bool getDataValueBool (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0
 
virtual bool getDataValueBoolByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0
 
virtual GKObjectgetDataValueObject (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0
 
virtual GKObjectgetDataValueObjectByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0
 
virtual QDate getDataValueDate (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0
 
virtual QDate getDataValueDateByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0
 
virtual QTime getDataValueTime (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0
 
virtual QTime getDataValueTimeByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0
 
virtual QDateTime getDataValueDateTime (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0
 
virtual QDateTime getDataValueDateTimeByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0
 
virtual GKTimeDuration getDataValueTimeDuration (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0
 
virtual GKTimeDuration getDataValueTimeDurationByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0
 

Additional Inherited Members

- Public Attributes inherited from GKBaseObject
ConvertToSubClassCode Py_BEGIN_ALLOW_THREADS GKBaseObjectbase = (GKBaseObject*)sipCpp
 
 sipType = 0
 
- Static Public Attributes inherited from GKObject
static uint typeNameAtt
 
static uint typeExternalNameAtt
 
static uint revisedAtt
 
- Static Public Attributes inherited from GKBaseObject
Py_END_ALLOW_THREADS static End uint idAtt
 
static uint nameAtt
 
static uint externalIdAtt
 
static uint descriptionAtt
 

Detailed Description

The schedule of a transit line.

A schedule has a time in where the simulator will apply it. For example 08:00:00 (08:00 AM) means that this schedule starts at 8:00. If the simulation starts at 9:00 it will not be used. If the simulation starts at 7:00 another schedule can be used until 8:00, then this one will be used.

The schedule has all the stop times (GKPublicLineTimeTableScheduleStopTime) for alll the stops in the line. The user can set 0 as a stop time to remove a stop during this schedule.

The last piece of information is the schedule f the busses (GKPublicLineTimeTableScheduleDeparture). This information can be by interval (every 5 minutes for example. In this case only one GKPublicLineTimeTableScheduleDeparture will be in the schedule) or at a fixed time (8:00, 8:05, 8:10, 8:25...).

See GKPublicLineTimeTable for more information in how to create these objects.

Member Enumeration Documentation

◆ GKPublicLineTimeTableScheduleDepartureType

Departure type:

Enumerator
eInterval 
eFixed 

Constructor & Destructor Documentation

◆ GKPublicLineTimeTableSchedule()

GKPublicLineTimeTableSchedule::GKPublicLineTimeTableSchedule ( GKModel model)

Member Function Documentation

◆ addDepartureTime()

void GKPublicLineTimeTableSchedule::addDepartureTime ( const GKPublicLineTimeTableScheduleDeparture departure)

Adds a departure to this schedule.

◆ addStop()

void GKPublicLineTimeTableSchedule::addStop ( GKBusStop stop,
int  indexAppearance 
)

Adds stop information (the stop must be in the line already) to this schedule. The indexAppearance goes from 1 to times this stop appears in the line. (1 for the first time, 2 for the second time, ...)

◆ getConsiderOffsetsInModel()

bool GKPublicLineTimeTableSchedule::getConsiderOffsetsInModel ( ) const

Returns true if the offsets defined in the stop times are to be consider by the simulation model or false if they are to be considered just as informative values, for the API for example.

◆ getDepartureTime()

const GKPublicLineTimeTableScheduleDeparture & GKPublicLineTimeTableSchedule::getDepartureTime ( int  pos)

Gets the departure at "pos".

◆ getDepartureTimes()

const QVector< GKPublicLineTimeTableScheduleDeparture > & GKPublicLineTimeTableSchedule::getDepartureTimes ( ) const

Returns all the departures.

◆ getDepartureType()

GKPublicLineTimeTableScheduleDepartureType GKPublicLineTimeTableSchedule::getDepartureType ( ) const

Returns the departure type:

◆ getDuration()

const GKTimeDuration & GKPublicLineTimeTableSchedule::getDuration ( ) const

Returns the duration of this schedule

◆ getStopTime()

const GKPublicLineTimeTableScheduleStopTime & GKPublicLineTimeTableSchedule::getStopTime ( GKBusStop stop,
int  indexAppearance 
) const

Gets the stop time for the specified stop and the specified appearance. The indexAppearance goes from 1 to times this stop appears in the line. (1 for the first time, 2 for the second time, ...)

◆ getStopTimes()

QList< GKPublicLineTimeTableScheduleStopTime > GKPublicLineTimeTableSchedule::getStopTimes ( GKBusStop stop) const

Returns the stop times assigned to all the appearances for the specified stop.

◆ getTime()

const QTime & GKPublicLineTimeTableSchedule::getTime ( ) const

Returns the time starting from which this schedule is valid.

◆ removeDepartureTime()

void GKPublicLineTimeTableSchedule::removeDepartureTime ( uint  pos)

Removes the departure at "pos" from the list of departures of this schedule. The departure itself is not deleted.

◆ removeDepartureTimes()

void GKPublicLineTimeTableSchedule::removeDepartureTimes ( )

Removes all the departures from the list of departures of this schedule. The departures themselves are not deleted.

◆ removeStop()

void GKPublicLineTimeTableSchedule::removeStop ( GKBusStop stop,
int  indexAppearance 
)

Removes the information of the specified stop at the specified indexAppearance position from this schedule. The stop itself is not deleted. The indexAppearance goes from 1 to times this stop appears in the line. (1 for the first time, 2 for the second time, ...)

◆ removeStops()

void GKPublicLineTimeTableSchedule::removeStops ( )

Removes all the stops' information for this schedule. The stops themselves are not deleted.

◆ setConsiderOffsetsInModel()

void GKPublicLineTimeTableSchedule::setConsiderOffsetsInModel ( bool  value)

Sets the offsets defined in the stop times to be consider by the simulation model (if value is true) or just as informative values, for the API for example, if value is false.

◆ setDepartureTime()

void GKPublicLineTimeTableSchedule::setDepartureTime ( int  pos,
const GKPublicLineTimeTableScheduleDeparture departure 
)

Sets the departure at a position (0 to N-1 in the list of departures) in this schedule.

◆ setDepartureType()

void GKPublicLineTimeTableSchedule::setDepartureType ( const GKPublicLineTimeTableScheduleDepartureType  atype)

Sets the departure type:

◆ setDuration()

void GKPublicLineTimeTableSchedule::setDuration ( const GKTimeDuration aduration)

Sets the duration of this schedule

◆ setPedestrians() [1/2]

void GKPublicLineTimeTableSchedule::setPedestrians ( GKBusStop stop,
int  indexAppearance,
const GKPublicLineTimeTableScheduleStopTime time 
)

Adds pedestrians information to the stop (the stop must be in the line already) to this schedule. The indexAppearance goes from 1 to times this stop appears in the line. (1 for the first time, 2 for the second time, ...)

◆ setPedestrians() [2/2]

void GKPublicLineTimeTableSchedule::setPedestrians ( GKBusStop stop,
int  indexAppearance,
float  secondsByPedestrian,
float  _pedestriansGen,
float  _genDeviation,
float  _pedestrianGat,
float  _gatDeviation 
)

Adds pedestrians information to the stop (the stop must be in the line already) to this schedule.The indexAppearance goes from 1 to times this stop appears in the line. (1 for the first time, 2 for the second time, ...)

◆ setStopTime() [1/2]

void GKPublicLineTimeTableSchedule::setStopTime ( GKBusStop stop,
int  indexAppearance,
const GKPublicLineTimeTableScheduleStopTime time 
)

Adds stop information (the stop must be in the line already) to this schedule with the specified time information. The indexAppearance goes from 1 to times this stop appears in the line. (1 for the first time, 2 for the second time, ...)

◆ setStopTime() [2/2]

void GKPublicLineTimeTableSchedule::setStopTime ( GKBusStop stop,
int  indexAppearance,
float  mean,
float  deviation,
float  offset = 0.0f 
)

Adds stop information (the stop must be in the line already) to this schedule with the specified time information. The indexAppearance goes from 1 to times this stop appears in the line. (1 for the first time, 2 for the second time, ...)

◆ setTime()

void GKPublicLineTimeTableSchedule::setTime ( const QTime &  atime)

Sets the time starting from which this schedule is valid.

◆ sortDepartureTimes()

void GKPublicLineTimeTableSchedule::sortDepartureTimes ( )

Sorts departures by departure time.

© Aimsun SLU
Aimsun ®