Esempio n. 1
0
 public Program(string mapFileName)
 {
     m_rm = new ReadMap(mapFileName);
     m_rm.loadRegion();
     Box box;
     box.xmin = 121.47070008731318;
     box.xmax = 121.49708348652267;
     box.ymin = 31.229476036434761;
     box.ymax = 31.243319909952547;
     MapRegion region = m_rm.getSmallRegion(box);
     Console.WriteLine(GeneralTool.distanceInMeter(box.xmin, box.ymin, box.xmin, box.ymax));
     Console.WriteLine(GeneralTool.distanceInMeter(box.xmin, box.ymin, box.xmax, box.ymin));
     m_genRoute = new GenRandRoute(region);
     m_estRoute = new EstimateRoute(region);
 }
Esempio n. 2
0
        public void genRandRoute()
        {
            m_genRoute = new GenRandRoute(m_currentRegion);
            m_originTurn = m_genRoute.genRoute(30);
            m_originRoute.Clear();
            for (int i = 0; i < m_originTurn.Count; i++)
                m_originRoute.Add(m_originTurn[i].outRoadID);

            m_originRoute.Add(m_originTurn[m_originTurn.Count - 1].inRoadID);
        }