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)
Inherited by:
GKPolicy,GKTrafficConditionSynopsis¶
Methods¶
def
__init__()def
getCycle()def
getFromTime()def
getStopTrigger()def
isRelativeFrom()def
setCycle()def
setFromTime()def
setStopTrigger()
Virtual methods¶
def
activate()def
desactivate()
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
GKTriggercondition - eExternal: activated using Aimsun Next API calls. - ePulse: at a given time (usegetFromTime) - ePeriodic: given an initial time, it is repeated at every specific period (use fromTime and cycle)
- __init__()¶
Activate this event in a simulator.
- addStartTrigger(trigger, initialTime, duration)¶
- Parameters:
trigger –
GKTriggerinitialTime –
QTimeduration –
GKTimeDuration
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
Deactivates this event in a simulator.
- getActivationType()¶
- Return type:
The event activation type
- static getActivationTypeExternalName(eventActivationType)¶
- Parameters:
eventActivationType –
GKSimulationEventActivationType- Return type:
The external name for the event activation type
Returns the cycle time
- getDurationTime()¶
- Return type:
Deactivation time
Activation time
- getRelativeFromTime()¶
- Return type:
Activation time
Returns the activation trigger for the selected time, or nullptr if there isn’t any
Deactivation trigger
- getTriggerMinDuration()¶
- Return type:
Get the minimum duration before checking the Stop Trigger
Returns true if there is at least one start trigger configured, false otherwise
If activation is
eTime, returns true if the activation time is relative to the simulation initial time and false if it is an absolute timeRemoves all start trigger intervals that use the desired trigger
- setActivationType(atype)¶
- Parameters:
atype –
GKSimulationEventActivationType
The event activation type
Sets the cycle time for a
ePeriodicevent- setDurationTime(atime)¶
- Parameters:
atime –
GKTimeDuration
Deactivation time
Activation time
- setRelativeFromTime(atime)¶
- Parameters:
atime –
GKTimeDuration
Deactivation time
Sets a start trigger from 00:00h to 24:00h
See also
Deactivation trigger
- setTimeAsRelative(value)¶
- Parameters:
value – bool
- setTriggerMinDuration(duration)¶
- Parameters:
duration –
GKTimeDuration
Set the minimum duration before checking the Stop Trigger