PyANGKernel.GKControlPlan

class GKControlPlan

Control plan information for a set of nodes and ramp meters in the network.

Details

A node or a ramp meter can belong to more than one control plan (that is different green times, signal group order, control type… the whole configuration).

The GKControlPlan class has, for each node, an associated GKControlJunction object, and for each ramp meter, an associated GKControlMetering object.

The internal name of the control plans folder is “GKModel::controlPlans”. The external name is “Control Plans”.

Inheritance diagram of PyANGKernel.GKControlPlan

Synopsis

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

__init__()
addControlJunction(node, junc)
Parameters:

Assign a control plan for a junction “junc” to a node for this plan. junc is adopted.

addControlMetering(metering, meter)
Parameters:

Associates the control information defined in “meter” with the ramp meter “idmetering”. Object “meter” is adopted. Note that only one control information can be associated with a ramp meter in a control plan. If a GKControlMetering was already present it will be removed first from the association and the GKControlMetering instance will be deleted.

clearControlJunctions(deleteObjects)
Parameters:

deleteObjectsObjectDeletionBehaviour

Deletes all the control junction info from this control plan. If deleteObjects is eDeleteObjects then it deletes the control junction objects too.

clearControlMeterings(deleteObjects)
Parameters:

deleteObjectsObjectDeletionBehaviour

Deletes all the control ramp meter info from this control plan. If deleteObjects is eDeleteObjects then it deletes the control ramp meter objects too.

createControlJunction(node)
Parameters:

nodeGKNode

Return type:

GKControlJunction

Creates a new control plan information for node if no control information has been created before. * Otherwise it returns the current control plan information.

This method is equivalent to:

GKControlJunction *control = controlPlan->getControlJunction( node );
if( control == nullptr ){
        control = controlPlan->createControlJunction( node );
}
createControlMetering(metering)
Parameters:

meteringGKMetering

Return type:

GKControlMetering

Creates a new control of the same type as the ramp meter (green, flow or delay) if the ramp meter is uncontrolled. Otherwise, the method will return the current control ramp meter. By default, new controls are initialized to eUnspecified.

getControlJunction(node)
Parameters:

nodeGKNode

Return type:

GKControlJunction

Returns this control plan information for node. If no control is associated it returns nullptr. The method createControlJunction can be used to create a new (eUnspecified) control junction.

getControlJunctions()
Return type:

Dictionary with keys of type .uint and values of type GKControlJunction.

getControlMetering(metering)
Parameters:

meteringGKMetering

Return type:

GKControlMetering

Returns the control information (a GKControlMetering ) associated with the specified ramp meter id. If no control information is associated it returns nullptr.

getControlMeterings()
Return type:

Dictionary with keys of type .uint and values of type GKControlMetering.

getNameAutomatically()
Return type:

str

Generates the name of this object automatically based on its initial time The string will be: Control Plan “initial Time”

getOffset()
Return type:

int

Gets the offset for this control plan. Note that this offset have not the same meaning as the offset in the GKControlJunction . This one is the time the control plan was designed to start at, that is, an offset from the 00:00:00 at which the control plan will be set as be in the second 0.

removeControlJunction(node)
Parameters:

nodeGKNode

Removed the assigned control plan for node. The control plan (a GKControlJunction ) is not deleted. Is the responsibility of the caller to delete it. The actual GKControlJunction assigned to the node can be get with getControlJunction before this call.

removeControlMetering(metering)
Parameters:

meteringGKMetering

Desassociate the control information defined for the ramp meter “idmetering”.

setOffset(off)
Parameters:

off – int

Sets the offset for this control plan. Note that this offset have not the same meaning as the offset in the GKControlJunction . This one is the time the control plan was designed to start at, that is, an offset from the 00:00:00 at which the control plan will be set as be in the second 0.