Exemplo n.º 1
0
    void
    Plan::sequenceNodes(void)
    {
      PlanMap::iterator itr = m_graph.find(m_spec->start_man_id);

      while (true)
      {
        m_seq_nodes.push_back(itr->second.pman);

        if (!itr->second.trans.size())
          break;
        else if (itr->second.trans[0]->dest_man == "_done_")
          break;

        // Check if plan is cyclical
        if (maneuverExists(itr->second.trans[0]->dest_man))
        {
          m_properties |= IMC::PlanStatistics::PRP_NONLINEAR;
          m_properties |= IMC::PlanStatistics::PRP_INFINITE;
          m_properties |= IMC::PlanStatistics::PRP_CYCLICAL;
          return;
        }

        itr = m_graph.find(itr->second.trans[0]->dest_man);
      }
    }
Exemplo n.º 2
0
    void
    Plan::sequenceNodes(void)
    {
      PlanMap::iterator itr = m_graph.find(m_spec->start_man_id);

      while (true)
      {
        m_seq_nodes.push_back(itr->second.pman);

        if (!itr->second.trans.size())
          break;
        else if (itr->second.trans[0]->dest_man == "_done_")
          break;

        // Check if plan is cyclical
        if (maneuverExists(itr->second.trans[0]->dest_man))
        {
          m_sequential = false;
          return;
        }

        itr = m_graph.find(itr->second.trans[0]->dest_man);
      }

      m_sequential = true;
    }