Пример #1
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);
    myCurrentProgram->setTrafficLightSignals(MSNet::getInstance()->getCurrentTimeStep());
    executeOnSwitchActions();
}
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;
}
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);
}