PyANGKernel.GKScenarioChange

class GKScenarioChange

A change in the simulation.

Details

A Scenario Change is a change in the simulation conditions (lane closure, speed modification) that is not pressent always in the network (if its always present it will be coded directly on it).

A change is part of a GKPolicy or a GKTrafficCondition and is applied when these classes say so.

Inheritance diagram of PyANGKernel.GKScenarioChange

Inherited by: GKTurningCooperationChange, GKTurningClosingChange, GKTurningBehaviouralParametersChange, GKSectionChange, GKSpeedChange, GKSectionIncident, GKPeriodicSectionIncident, GKSectionBehaviouralParametersChange, GKRoadPricing, GKParkAndRideChange, GKLaneClosingChange, GKForceTurning, GKDisableReservedLaneChange, GKDestinationChange, GKPeriodicCall, GKForceEnrouteAssignment, GKControlPlanChange

Synopsis

Methods

Virtual methods

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 GKScenarioChangeType
__init__()
activateMessagesInVMS()

Someone has activate this change. This method will set the messages on the VMS.

canBeUsed(arg__1, arg__2)
Parameters:
Return type:

bool

Returns true if this Scenario changed can be used in an experiment simulation. It will check: - All the used objects are inside the Subnetwork is a Subnetwork is used - Centroids are in the used Centroid Configuration

clearMessages()

Removes all the messages.

deactivateMessagesInVMS()

Someone has deactivate this change. This method will remove the messages on the VMS.

getChangeType()
Return type:

GKScenarioChangeType

Returns the change type associated with the class.

getComplianceLevel()
Return type:

str

Returns the compliance level (a percentage: [0,100] ) as a string (as it can be a variable).

getMessage(vms)
Parameters:

vmsGKVMS

Return type:

str

Gets the message for the vms.

getPolicy()
Return type:

GKPolicy

Returns the policy in where this change is.

getPosition()
Return type:

GKPoint

Returns the position of the change’s “main” object ; per example, a GKSectionChange would return the center of the affected section. * Returns GKPoint::zero if the change is not related to a GKGeoObject in particular.

getVehicleClass()
Return type:

GKVehicleClass

Returns the vehicle class affected by this change. A NULL means that all the classes are affected.

removeMessage(vms)
Parameters:

vmsGKVMS

Removes the message, if any, associated with a vms.

setComplianceLevel(value)
Parameters:

value – str

Sets the compliance level percentage. It can be a variable.

setMessage(vms, message)
Parameters:
  • vmsGKVMS

  • message – str

Sets the message for the vms.

setPolicy(apolicy)
Parameters:

apolicyGKPolicy

Sets the policy in where this change is.

setVehicleClass(vehClass)
Parameters:

vehClassGKVehicleClass

Sets which vehicle class is affected by this change. A NULL means that all the classes are affected.