PyANGKernel.GKSimulationEvent

class GKSimulationEvent

Base class for all simulation events

Details

Events to execute are detailed in the simulation scenario and experiment. They can be activated in several ways in order to change somthing in the current simulation (i.e. changing a section speed)

Inheritance diagram of PyANGKernel.GKSimulationEvent

Inherited by: GKPolicy, GKTrafficCondition

Synopsis

Methods

Virtual methods

Static functions

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

class GKSimulationEventActivationType

Activation method for a simulation event: - eAlways: from the beginning to the end of a simulation - eTime: during a specific simulation period - eTrigger: due to a GKTrigger condition - eExternal: activated using Aimsun Next API calls. - ePulse: at a given time (use getFromTime ) - ePeriodic: given an initial time, it is repeated at every specific period (use fromTime and cycle)

__init__()
activate(simulator, time)
Parameters:
Return type:

bool

Activate this event in a simulator.

addStartTrigger(trigger, initialTime, duration)
Parameters:

Adds a start trigger for the selected period. If there was another trigger for the same period it will be overwritten. Allowed time goes from 00:00h to 24:00h.

clearStartTriggers()

Removes all start triggers

desactivate(simulator, time)
Parameters:
Return type:

bool

Deactivates this event in a simulator.

getActivationType()
Return type:

GKSimulationEventActivationType

The event activation type

static getActivationTypeExternalName(eventActivationType)
Parameters:

eventActivationTypeGKSimulationEventActivationType

Return type:

str

The external name for the event activation type

getCycle()
Return type:

QTime

Returns the cycle time

getDurationTime()
Return type:

GKTimeDuration

Deactivation time

getFromTime()
Return type:

QTime

Activation time

getRelativeFromTime()
Return type:

GKTimeDuration

Activation time

getStartTrigger(time)
Parameters:

timeQTime

Return type:

GKTrigger

Returns the activation trigger for the selected time, or nullptr if there isn’t any

getStopTrigger()
Return type:

GKTrigger

Deactivation trigger

getTriggerMinDuration()
Return type:

GKTimeDuration

Get the minimum duration before checking the Stop Trigger

hasStartTrigger()
Return type:

bool

Returns true if there is at least one start trigger configured, false otherwise

isRelativeFrom()
Return type:

bool

If activation is eTime , returns true if the activation time is relative to the simulation initial time and false if it is an absolute time

removeStartTrigger(trigger)
Parameters:

triggerGKTrigger

Removes all start trigger intervals that use the desired trigger

setActivationType(atype)
Parameters:

atypeGKSimulationEventActivationType

The event activation type

setCycle(time)
Parameters:

timeQTime

Sets the cycle time for a ePeriodic event

setDurationTime(atime)
Parameters:

atimeGKTimeDuration

Deactivation time

setFromTime(atime)
Parameters:

atimeQTime

Activation time

setRelativeFromTime(atime)
Parameters:

atimeGKTimeDuration

Deactivation time

setStartTrigger(atrigger)
Parameters:

atriggerGKTrigger

Sets a start trigger from 00:00h to 24:00h

setStopTrigger(atrigger)
Parameters:

atriggerGKTrigger

Deactivation trigger

setTimeAsRelative(value)
Parameters:

value – bool

setTriggerMinDuration(duration)
Parameters:

durationGKTimeDuration

Set the minimum duration before checking the Stop Trigger