![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <TrafficLight.h>
Static Public Member Functions | |
| static void | addConstraint (const std::string &tlsID, const std::string &tripId, const std::string &foeSignal, const std::string &foeId, const int type=0, const int limit=0) |
| static std::vector< libsumo::TraCILogic > | getAllProgramLogics (const std::string &tlsID) |
| static std::vector< std::string > | getBlockingVehicles (const std::string &tlsID, int linkIndex) |
| static std::vector< libsumo::TraCILogic > | getCompleteRedYellowGreenDefinition (const std::string &tlsID) |
| static std::vector< libsumo::TraCISignalConstraint > | getConstraints (const std::string &tlsID, const std::string &tripId="") |
| static std::vector< libsumo::TraCISignalConstraint > | getConstraintsByFoe (const std::string &foeSignal, const std::string &foeId="") |
| static std::vector< std::string > | getControlledJunctions (const std::string &tlsID) |
| static std::vector< std::string > | getControlledLanes (const std::string &tlsID) |
| static std::vector< std::vector< libsumo::TraCILink > > | getControlledLinks (const std::string &tlsID) |
| static double | getNextSwitch (const std::string &tlsID) |
| static int | getPhase (const std::string &tlsID) |
| static double | getPhaseDuration (const std::string &tlsID) |
| static std::string | getPhaseName (const std::string &tlsID) |
| static std::vector< std::string > | getPriorityVehicles (const std::string &tlsID, int linkIndex) |
| static std::string | getProgram (const std::string &tlsID) |
| static std::string | getRedYellowGreenState (const std::string &tlsID) |
| static std::vector< std::string > | getRivalVehicles (const std::string &tlsID, int linkIndex) |
| static int | getServedPersonCount (const std::string &tlsID, int index) |
| static double | getSpentDuration (const std::string &tlsID) |
| static bool | handleVariable (const std::string &objID, const int variable, VariableWrapper *wrapper, tcpip::Storage *paramData) |
| static std::shared_ptr< VariableWrapper > | makeWrapper () |
| static void | removeConstraints (const std::string &tlsID, const std::string &tripId, const std::string &foeSignal, const std::string &foeId) |
| static void | setCompleteRedYellowGreenDefinition (const std::string &tlsID, const libsumo::TraCILogic &logic) |
| static void | setNemaCycleLength (const std::string &tlsID, double cycleLength) |
| static void | setNemaMaxGreens (const std::string &tlsID, const std::vector< double > &maxGreens) |
| static void | setNemaOffset (const std::string &tlsID, double offset) |
| static void | setNemaSplits (const std::string &tlsID, const std::vector< double > &splits) |
| static void | setPhase (const std::string &tlsID, const int index) |
| static void | setPhaseDuration (const std::string &tlsID, const double phaseDuration) |
| static void | setPhaseName (const std::string &tlsID, const std::string &name) |
| static void | setProgram (const std::string &tlsID, const std::string &programID) |
| static void | setProgramLogic (const std::string &tlsID, const libsumo::TraCILogic &logic) |
| LIBSUMO_ID_PARAMETER_API static LIBSUMO_SUBSCRIPTION_API void | setRedYellowGreenState (const std::string &tlsID, const std::string &state) |
| static std::vector< libsumo::TraCISignalConstraint > | swapConstraints (const std::string &tlsID, const std::string &tripId, const std::string &foeSignal, const std::string &foeId) |
| static void | updateConstraints (const std::string &vehID, std::string tripId="") |
Private Member Functions | |
| TrafficLight ()=delete | |
| invalidated standard constructor | |
Static Private Member Functions | |
| static libsumo::TraCISignalConstraint | buildConstraint (const std::string &tlsID, const std::string &tripId, MSRailSignalConstraint *constraint) |
| static std::vector< libsumo::TraCISignalConstraint > | findConstraintsDeadLocks (const std::string &foeId, const std::string &tripId, const std::string &foeSignal, const std::string &tlsID) |
| perform swapConstraints to resolve deadlocks and return the new constraints | |
| static std::vector< std::string > | getFutureTripIds (const std::string vehID) |
| static std::vector< std::pair< std::string, std::string > > | getSwapParams (int constraintType) |
| static SUMOVehicle * | getVehicleByTripId (const std::string tripOrVehID) |
| static void | swapParameters (MSRailSignalConstraint *c) |
| static void | swapParameters (MSRailSignalConstraint *c, const std::string &key1, const std::string &key2) |
| static void | swapParameters (TraCISignalConstraint &c) |
| static void | swapParameters (TraCISignalConstraint &c, const std::string &key1, const std::string &key2) |
Static Private Attributes | |
| static ContextSubscriptionResults | myContextSubscriptionResults |
| static SubscriptionResults | mySubscriptionResults |
Definition at line 43 of file TrafficLight.h.
|
privatedelete |
invalidated standard constructor
|
static |
Definition at line 309 of file libsumo/TrafficLight.cpp.
References addConstraint(), MSRailSignal::addConstraint(), MSTLLogicControl::TLSLogicVariants::getDefault(), and libsumo::Helper::getTLS().
Referenced by addConstraint().
|
staticprivate |
Definition at line 961 of file libsumo/TrafficLight.cpp.
References buildConstraint(), MSRailSignalConstraint_Predecessor::cleared(), Named::getID(), Parameterised::getParametersMap(), MSRailSignalConstraint::getType(), MSRailSignalConstraint_Predecessor::isActive(), MSRailSignalConstraint_Predecessor::myFoeSignal, MSRailSignalConstraint_Predecessor::myLimit, and MSRailSignalConstraint_Predecessor::myTripId.
Referenced by buildConstraint(), findConstraintsDeadLocks(), getConstraints(), and getConstraintsByFoe().
|
staticprivate |
perform swapConstraints to resolve deadlocks and return the new constraints
Definition at line 551 of file libsumo/TrafficLight.cpp.
References buildConstraint(), MSRailSignalConstraint_Predecessor::cleared(), SUMOVehicleParameter::depart, findConstraintsDeadLocks(), SUMOTrafficObject::getEdge(), MSRoute::getEdges(), getFutureTripIds(), Named::getID(), MSRailSignalControl::getInstance(), SUMOTrafficObject::getNumericalID(), Parameterised::getParameter(), SUMOTrafficObject::getParameter(), SUMOTrafficObject::getPositionOnLane(), SUMOVehicle::getRoute(), SUMOTrafficObject::getRoutePosition(), MSEdge::getToJunction(), getVehicleByTripId(), SUMOVehicle::hasDeparted(), MSRailSignalConstraint::INSERTION_PREDECESSOR, MSRailSignalConstraint_Predecessor::isActive(), MSRailSignalConstraint_Predecessor::myTripId, swapConstraints(), swapParameters(), TL, toString(), VEHPARS_FORCE_REROUTE, SUMOVehicleParameter::wasSet(), and WRITE_WARNINGF.
Referenced by findConstraintsDeadLocks(), and swapConstraints().
|
static |
Definition at line 78 of file libsumo/TrafficLight.cpp.
References MSTLLogicControl::TLSLogicVariants::getAllLogics(), getAllProgramLogics(), libsumo::Helper::getTLS(), and STEPS2TIME.
Referenced by getAllProgramLogics(), getCompleteRedYellowGreenDefinition(), and handleVariable().
|
static |
Definition at line 223 of file libsumo/TrafficLight.cpp.
References getBlockingVehicles(), MSTrafficLightLogic::getBlockingVehicles(), MSTLLogicControl::TLSLogicVariants::getDefault(), MSTrafficLightLogic::getNumLinks(), libsumo::Helper::getTLS(), and toString().
Referenced by getBlockingVehicles(), and handleVariable().
|
inlinestatic |
Definition at line 81 of file TrafficLight.h.
References getAllProgramLogics().
|
static |
Definition at line 266 of file libsumo/TrafficLight.cpp.
References buildConstraint(), getConstraints(), MSRailSignal::getConstraints(), MSTLLogicControl::TLSLogicVariants::getDefault(), and libsumo::Helper::getTLS().
Referenced by getConstraints(), and handleVariable().
|
static |
Definition at line 285 of file libsumo/TrafficLight.cpp.
References buildConstraint(), MSRailSignal::getConstraints(), getConstraintsByFoe(), MSTLLogicControl::TLSLogicVariants::getDefault(), Named::getID(), libsumo::Helper::getTLS(), MSRailSignalConstraint_Predecessor::myFoeSignal, and MSRailSignalConstraint_Predecessor::myTripId.
Referenced by getConstraintsByFoe(), and handleVariable().
|
static |
Definition at line 96 of file libsumo/TrafficLight.cpp.
References MSTLLogicControl::TLSLogicVariants::getActive(), getControlledJunctions(), MSTrafficLightLogic::getLinks(), and libsumo::Helper::getTLS().
Referenced by getControlledJunctions(), and handleVariable().
|
static |
Definition at line 109 of file libsumo/TrafficLight.cpp.
References MSTLLogicControl::TLSLogicVariants::getActive(), getControlledLanes(), MSTrafficLightLogic::getLaneVectors(), and libsumo::Helper::getTLS().
Referenced by getControlledLanes(), and handleVariable().
|
static |
Definition at line 122 of file libsumo/TrafficLight.cpp.
References MSTLLogicControl::TLSLogicVariants::getActive(), getControlledLinks(), Named::getID(), MSLink::getLane(), MSTrafficLightLogic::getLaneVectors(), MSTrafficLightLogic::getLinks(), libsumo::Helper::getTLS(), and MSLink::getViaLane().
Referenced by getControlledLinks(), and handleVariable().
|
staticprivate |
Definition at line 785 of file libsumo/TrafficLight.cpp.
References getFutureTripIds(), MSNet::getInstance(), MSBaseVehicle::getParameter(), Parameterised::getParameter(), MSBaseVehicle::getStops(), MSVehicleControl::getVehicle(), and MSNet::getVehicleControl().
Referenced by findConstraintsDeadLocks(), and getFutureTripIds().
|
static |
Definition at line 170 of file libsumo/TrafficLight.cpp.
References getNextSwitch(), libsumo::Helper::getTLS(), and STEPS2TIME.
Referenced by getNextSwitch(), and handleVariable().
|
static |
Definition at line 152 of file libsumo/TrafficLight.cpp.
References MSTLLogicControl::TLSLogicVariants::getActive(), MSTrafficLightLogic::getCurrentPhaseIndex(), getPhase(), and libsumo::Helper::getTLS().
Referenced by getPhase(), and handleVariable().
|
static |
Definition at line 164 of file libsumo/TrafficLight.cpp.
References getPhaseDuration(), libsumo::Helper::getTLS(), and STEPS2TIME.
Referenced by getPhaseDuration(), and handleVariable().
|
static |
Definition at line 158 of file libsumo/TrafficLight.cpp.
References MSTLLogicControl::TLSLogicVariants::getActive(), MSTrafficLightLogic::getCurrentPhaseDef(), MSPhaseDefinition::getName(), getPhaseName(), and libsumo::Helper::getTLS().
Referenced by getPhaseName(), and handleVariable().
|
static |
Definition at line 252 of file libsumo/TrafficLight.cpp.
References MSTLLogicControl::TLSLogicVariants::getDefault(), MSTrafficLightLogic::getNumLinks(), getPriorityVehicles(), MSTrafficLightLogic::getPriorityVehicles(), libsumo::Helper::getTLS(), and toString().
Referenced by getPriorityVehicles(), and handleVariable().
|
static |
Definition at line 146 of file libsumo/TrafficLight.cpp.
References MSTLLogicControl::TLSLogicVariants::getActive(), getProgram(), MSTrafficLightLogic::getProgramID(), and libsumo::Helper::getTLS().
Referenced by getProgram(), and handleVariable().
|
static |
Definition at line 72 of file libsumo/TrafficLight.cpp.
References MSTLLogicControl::TLSLogicVariants::getActive(), MSTrafficLightLogic::getCurrentPhaseDef(), getRedYellowGreenState(), MSPhaseDefinition::getState(), and libsumo::Helper::getTLS().
Referenced by getRedYellowGreenState(), and handleVariable().
|
static |
Definition at line 238 of file libsumo/TrafficLight.cpp.
References MSTLLogicControl::TLSLogicVariants::getDefault(), MSTrafficLightLogic::getNumLinks(), getRivalVehicles(), MSTrafficLightLogic::getRivalVehicles(), libsumo::Helper::getTLS(), and toString().
Referenced by getRivalVehicles(), and handleVariable().
|
static |
Definition at line 181 of file libsumo/TrafficLight.cpp.
References MSTLLogicControl::TLSLogicVariants::getActive(), MSLane::getEdge(), MSTransportable::getEdge(), Named::getID(), MSTransportable::getLane(), MSLane::getLinkCont(), MSTrafficLightLogic::getLinksAt(), MSEdge::getPersons(), MSTrafficLightLogic::getPhaseNumber(), MSTrafficLightLogic::getPhases(), getServedPersonCount(), libsumo::Helper::getTLS(), LINKSTATE_TL_GREEN_MAJOR, and toString().
Referenced by getServedPersonCount(), and handleVariable().
|
static |
Definition at line 176 of file libsumo/TrafficLight.cpp.
References getSpentDuration(), libsumo::Helper::getTLS(), and STEPS2TIME.
Referenced by getSpentDuration(), and handleVariable().
|
staticprivate |
Definition at line 370 of file libsumo/TrafficLight.cpp.
References MSRailSignalConstraint::BIDI_PREDECESSOR, and getSwapParams().
Referenced by getSwapParams(), swapParameters(), and swapParameters().
|
staticprivate |
Definition at line 772 of file libsumo/TrafficLight.cpp.
References Named::getID(), MSNet::getInstance(), Parameterised::getParameter(), SUMOTrafficObject::getParameter(), getVehicleByTripId(), MSNet::getVehicleControl(), MSVehicleControl::loadedVehBegin(), and MSVehicleControl::loadedVehEnd().
Referenced by findConstraintsDeadLocks(), and getVehicleByTripId().
|
static |
Definition at line 989 of file libsumo/TrafficLight.cpp.
References getAllProgramLogics(), getBlockingVehicles(), getConstraints(), getConstraintsByFoe(), getControlledJunctions(), getControlledLanes(), getControlledLinks(), getNextSwitch(), getPhase(), getPhaseDuration(), getPhaseName(), getPriorityVehicles(), getProgram(), getRedYellowGreenState(), getRivalVehicles(), getServedPersonCount(), getSpentDuration(), handleVariable(), libsumo::ID_COUNT, libsumo::StorageHelper::readTypedInt(), libsumo::StorageHelper::readTypedString(), libsumo::TL_BLOCKING_VEHICLES, libsumo::TL_COMPLETE_DEFINITION_RYG, libsumo::TL_CONSTRAINT, libsumo::TL_CONSTRAINT_BYFOE, libsumo::TL_CONTROLLED_JUNCTIONS, libsumo::TL_CONTROLLED_LANES, libsumo::TL_CONTROLLED_LINKS, libsumo::TL_CURRENT_PHASE, libsumo::TL_CURRENT_PROGRAM, libsumo::TL_NEXT_SWITCH, libsumo::TL_PHASE_DURATION, libsumo::TL_PRIORITY_VEHICLES, libsumo::TL_RED_YELLOW_GREEN_STATE, libsumo::TL_RIVAL_VEHICLES, libsumo::TL_SPENT_DURATION, libsumo::TRACI_ID_LIST, libsumo::VAR_NAME, libsumo::VAR_PARAMETER, libsumo::VAR_PARAMETER_WITH_KEY, and libsumo::VAR_PERSON_NUMBER.
Referenced by handleVariable(), and makeWrapper().
|
static |
Definition at line 983 of file libsumo/TrafficLight.cpp.
References handleVariable(), makeWrapper(), myContextSubscriptionResults, and mySubscriptionResults.
Referenced by makeWrapper().
|
static |
Definition at line 439 of file libsumo/TrafficLight.cpp.
References MSRailSignal::getConstraints(), MSTLLogicControl::TLSLogicVariants::getDefault(), Named::getID(), libsumo::Helper::getTLS(), MSRailSignalConstraint_Predecessor::myFoeSignal, MSRailSignalConstraint_Predecessor::myTripId, removeConstraints(), and MSRailSignalConstraint::setActive().
Referenced by removeConstraints().
|
inlinestatic |
Definition at line 84 of file TrafficLight.h.
References setProgramLogic().
|
static |
Definition at line 950 of file libsumo/TrafficLight.cpp.
References setNemaCycleLength(), and toString().
Referenced by setNemaCycleLength().
|
static |
Definition at line 945 of file libsumo/TrafficLight.cpp.
References setNemaMaxGreens(), and toString().
Referenced by setNemaMaxGreens().
|
static |
Definition at line 955 of file libsumo/TrafficLight.cpp.
References setNemaOffset(), and toString().
Referenced by setNemaOffset().
|
static |
Definition at line 940 of file libsumo/TrafficLight.cpp.
References setNemaSplits(), and toString().
Referenced by setNemaSplits().
|
static |
Definition at line 823 of file libsumo/TrafficLight.cpp.
References MSTrafficLightLogic::changeStepAndDuration(), MSPhaseDefinition::duration, MSTLLogicControl::TLSLogicVariants::getActive(), MSNet::getCurrentTimeStep(), MSNet::getInstance(), MSTrafficLightLogic::getPhase(), MSTrafficLightLogic::getPhaseNumber(), libsumo::Helper::getTLS(), setPhase(), and toString().
Referenced by setPhase().
|
static |
Definition at line 852 of file libsumo/TrafficLight.cpp.
References MSTrafficLightLogic::changeStepAndDuration(), MSTLLogicControl::TLSLogicVariants::getActive(), MSNet::getCurrentTimeStep(), MSNet::getInstance(), libsumo::Helper::getTLS(), setPhaseDuration(), and TIME2STEPS.
Referenced by setPhaseDuration().
|
static |
Definition at line 835 of file libsumo/TrafficLight.cpp.
References MSTLLogicControl::TLSLogicVariants::getActive(), MSTrafficLightLogic::getCurrentPhaseDef(), libsumo::Helper::getTLS(), MSPhaseDefinition::setName(), and setPhaseName().
Referenced by setPhaseName().
|
static |
Definition at line 842 of file libsumo/TrafficLight.cpp.
References MSNet::getInstance(), libsumo::Helper::getTLS(), setProgram(), and MSTLLogicControl::TLSLogicVariants::switchTo().
Referenced by setProgram().
|
static |
Definition at line 860 of file libsumo/TrafficLight.cpp.
References ACTUATED, MSTLLogicControl::TLSLogicVariants::addLogic(), MSNet::createTLWrapper(), DELAYBASED, MSTLLogicControl::TLSLogicVariants::executeOnSwitchActions(), MSNet::getCurrentTimeStep(), MSNet::getInstance(), MSTLLogicControl::TLSLogicVariants::getLogic(), libsumo::Helper::getTLS(), MSNet::getTLSControl(), MSTrafficLightLogic::init(), MSPhaseDefinition::maxDuration, MSPhaseDefinition::minDuration, NEMA, MSPhaseDefinition::nextPhases, MSSimpleTrafficLightLogic::setPhases(), setProgramLogic(), MSTrafficLightLogic::setTrafficLightSignals(), STATIC, TIME2STEPS, and toString().
Referenced by setCompleteRedYellowGreenDefinition(), and setProgramLogic().
|
static |
Definition at line 817 of file libsumo/TrafficLight.cpp.
References MSNet::getInstance(), libsumo::Helper::getTLS(), setRedYellowGreenState(), and MSTLLogicControl::TLSLogicVariants::setStateInstantiatingOnline().
Referenced by setRedYellowGreenState().
|
static |
Definition at line 326 of file libsumo/TrafficLight.cpp.
References MSRailSignal::addConstraint(), findConstraintsDeadLocks(), MSRailSignal::getConstraints(), MSTLLogicControl::TLSLogicVariants::getDefault(), Named::getID(), Parameterised::getParametersMap(), MSRailSignalConstraint::getSwappedType(), libsumo::Helper::getTLS(), MSRailSignalConstraint_Predecessor::myFoeSignal, MSRailSignalConstraint_Predecessor::myLimit, MSRailSignalConstraint_Predecessor::myTripId, MSRailSignal::removeConstraint(), swapConstraints(), swapParameters(), and Parameterised::updateParameters().
Referenced by findConstraintsDeadLocks(), and swapConstraints().
|
staticprivate |
Definition at line 388 of file libsumo/TrafficLight.cpp.
References getSwapParams(), MSRailSignalConstraint::getType(), and swapParameters().
Referenced by findConstraintsDeadLocks(), swapConstraints(), swapParameters(), swapParameters(), swapParameters(), and swapParameters().
|
staticprivate |
Definition at line 396 of file libsumo/TrafficLight.cpp.
References Parameterised::getParameter(), Parameterised::setParameter(), swapParameters(), and Parameterised::unsetParameter().
|
staticprivate |
Definition at line 412 of file libsumo/TrafficLight.cpp.
References getSwapParams(), and swapParameters().
|
staticprivate |
Definition at line 420 of file libsumo/TrafficLight.cpp.
References swapParameters().
|
static |
Definition at line 466 of file libsumo/TrafficLight.cpp.
References MSRailSignalConstraint_Predecessor::cleared(), MSBaseVehicle::getCurrentRouteEdge(), MSRoute::getEdges(), Named::getID(), MSRailSignalControl::getInstance(), MSEdge::getLanes(), MSBaseVehicle::getParameter(), Parameterised::getParameter(), MSBaseVehicle::getRoute(), MSBaseVehicle::getStops(), MSLink::getTLLogic(), MSEdge::getToJunction(), MSJunction::getType(), libsumo::Helper::getVehicle(), MSRailSignalConstraint_Predecessor::isActive(), MSRailSignalConstraint_Predecessor::myFoeSignal, MSRailSignalConstraint_Predecessor::myTripId, RAIL_SIGNAL, and updateConstraints().
Referenced by updateConstraints().
|
staticprivate |
Definition at line 113 of file TrafficLight.h.
Referenced by makeWrapper().
|
staticprivate |
Definition at line 112 of file TrafficLight.h.
Referenced by makeWrapper().