当前位置: 首页>>代码示例>>C++>>正文


C++ NBEdge::setControllingTLInformation方法代码示例

本文整理汇总了C++中NBEdge::setControllingTLInformation方法的典型用法代码示例。如果您正苦于以下问题:C++ NBEdge::setControllingTLInformation方法的具体用法?C++ NBEdge::setControllingTLInformation怎么用?C++ NBEdge::setControllingTLInformation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NBEdge的用法示例。


在下文中一共展示了NBEdge::setControllingTLInformation方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: getID

void
NBOwnTLDef::setTLControllingInformation(const NBEdgeCont&) const {
    // set the information about the link's positions within the tl into the
    //  edges the links are starting at, respectively
    for (NBConnectionVector::const_iterator j = myControlledLinks.begin(); j != myControlledLinks.end(); ++j) {
        const NBConnection& conn = *j;
        NBEdge* edge = conn.getFrom();
        edge->setControllingTLInformation(conn, getID());
    }
}
开发者ID:harora,项目名称:ITS,代码行数:10,代码来源:NBOwnTLDef.cpp

示例2: throw

void
NBOwnTLDef::setTLControllingInformation(const NBEdgeCont &) const throw() {
    // set the information about the link's positions within the tl into the
    //  edges the links are starting at, respectively
    unsigned int pos = 0;
    for (NBConnectionVector::const_iterator j=myControlledLinks.begin(); j!=myControlledLinks.end(); ++j) {
        const NBConnection &conn = *j;
        NBEdge *edge = conn.getFrom();
        if (edge->setControllingTLInformation(conn.getFromLane(), conn.getTo(), conn.getToLane(), getID(), pos)) {
            pos++;
        }
    }
}
开发者ID:NeziheSozen,项目名称:sumo,代码行数:13,代码来源:NBOwnTLDef.cpp

示例3: assert

void
NBLoadedSUMOTLDef::setTLControllingInformation() const {
    // if nodes have been removed our links may have been invalidated as well
    // since no logic will be built anyway there is no reason to inform any edges
    if (amInvalid()) {
        return;
    }
    // set the information about the link's positions within the tl into the
    //  edges the links are starting at, respectively
    for (NBConnectionVector::const_iterator it = myControlledLinks.begin(); it != myControlledLinks.end(); it++) {
        const NBConnection& c = *it;
        assert(c.getTLIndex() < (int)myTLLogic->getNumLinks());
        NBEdge* edge = c.getFrom();
        edge->setControllingTLInformation(c, getID());
    }
}
开发者ID:RamonHPSilveira,项目名称:urbansim,代码行数:16,代码来源:NBLoadedSUMOTLDef.cpp

示例4: ProcessError

void
NBLoadedSUMOTLDef::setTLControllingInformation() const {
    // if nodes have been removed our links may have been invalidated as well
    // since no logic will be built anyway there is no reason to inform any edges
    if (amInvalid()) {
        return;
    }
    // set the information about the link's positions within the tl into the
    //  edges the links are starting at, respectively
    for (NBConnectionVector::const_iterator it = myControlledLinks.begin(); it != myControlledLinks.end(); it++) {
        const NBConnection& c = *it;
        if (c.getTLIndex() >= (int)myTLLogic->getNumLinks()) {
            throw ProcessError("Invalid linkIndex " + toString(c.getTLIndex()) + " for traffic light '" + getID() +
                               "' with " + toString(myTLLogic->getNumLinks()) + " links.");
        }
        NBEdge* edge = c.getFrom();
        if (edge != 0) {
            edge->setControllingTLInformation(c, getID());
        }
    }
}
开发者ID:cbrafter,项目名称:sumo,代码行数:21,代码来源:NBLoadedSUMOTLDef.cpp

示例5: tst

void
NBLoadedTLDef::setTLControllingInformation(const NBEdgeCont& ec) const {
    // assign the links to the connections
    unsigned int pos = 0;
    for (SignalGroupCont::const_iterator m = mySignalGroups.begin(); m != mySignalGroups.end(); m++) {
        SignalGroup* group = (*m).second;
        unsigned int linkNo = group->getLinkNo();
        for (unsigned int j = 0; j < linkNo; j++) {
            const NBConnection& conn = group->getConnection(j);
            assert(conn.getFromLane() < 0 || (int) conn.getFrom()->getNumLanes() > conn.getFromLane());
            NBConnection tst(conn);
            tst.setTLIndex(pos);
            if (tst.check(ec)) {
                NBEdge* edge = conn.getFrom();
                if (edge->setControllingTLInformation(tst, getID())) {
                    pos++;
                }
            } else {
                WRITE_WARNING("Could not set signal on connection (signal: " + getID() + ", group: " + group->getID() + ")");
            }
        }
    }
}
开发者ID:cathyyul,项目名称:sumo-0.18,代码行数:23,代码来源:NBLoadedTLDef.cpp


注:本文中的NBEdge::setControllingTLInformation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。