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
GKControlPlanclass has, for each node, an associatedGKControlJunctionobject, and for each ramp meter, an associatedGKControlMeteringobject.The internal name of the control plans folder is “GKModel::controlPlans”. The external name is “Control Plans”.
Synopsis¶
Methods¶
def
__init__()def
getOffset()def
setOffset()
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:
node –
GKNodejunc –
GKControlJunction
Assign a control plan for a junction “junc” to a node for this plan. junc is adopted.
- addControlMetering(metering, meter)¶
- Parameters:
metering –
GKMeteringmeter –
GKControlMetering
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
GKControlMeteringwas already present it will be removed first from the association and theGKControlMeteringinstance will be deleted.- clearControlJunctions(deleteObjects)¶
- Parameters:
deleteObjects –
ObjectDeletionBehaviour
Deletes all the control junction info from this control plan. If deleteObjects is
eDeleteObjectsthen it deletes the control junction objects too.- clearControlMeterings(deleteObjects)¶
- Parameters:
deleteObjects –
ObjectDeletionBehaviour
Deletes all the control ramp meter info from this control plan. If deleteObjects is
eDeleteObjectsthen it deletes the control ramp meter objects too.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:
metering –
GKMetering- Return type:
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.
Returns this control plan information for node. If no control is associated it returns nullptr. The method
createControlJunctioncan 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:
metering –
GKMetering- Return type:
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.
Generates the name of this object automatically based on its initial time The string will be: Control Plan “initial Time”
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.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 actualGKControlJunctionassigned to the node can be get withgetControlJunctionbefore this call.- removeControlMetering(metering)¶
- Parameters:
metering –
GKMetering
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.