コード例 #1
0
ファイル: MSTLLogicControl.cpp プロジェクト: behrisch/sumo
void
MSTLLogicControl::TLSLogicVariants::switchTo(MSTLLogicControl& tlc, const std::string& programID) {
    // set the found wished sub-program as this tls' current one
    myCurrentProgram = getLogicInstantiatingOff(tlc, programID);
    myCurrentProgram->setTrafficLightSignals(MSNet::getInstance()->getCurrentTimeStep());
    executeOnSwitchActions();
}
コード例 #2
0
bool
MSTLLogicControl::TLSLogicVariants::switchTo(MSTLLogicControl &tlc, const std::string &programID) {
    // set the found wished sub-program as this tls' current one
    myCurrentProgram = getLogicInstantiatingOff(tlc, programID);
    // in the case we have switched to an off-state, we'll reset the links
    if (programID=="off") {
        myCurrentProgram->resetLinkStates(myOriginalLinkStates);
    }
    return true;
}
コード例 #3
0
void
MSTLLogicControl::TLSLogicVariants::switchTo(MSTLLogicControl& tlc, const std::string& programID) {
    // set the found wished sub-program as this tls' current one
    myCurrentProgram = getLogicInstantiatingOff(tlc, programID);
}