Ejemplo n.º 1
0
        private info getInfo()
        {
            info one = new info();

            one.n = m_items.Count;

            vehTool    m_veh = new vehTool("D:\\logistics data\\address-backup.sqlite");
            List <Veh> vehs  = m_veh.GetVehs();

            m_veh.close();
            one.nj = vehs[0].number;
            one.nx = vehs[1].number;

            one.Lj = vehs[0].distance;
            one.Lx = vehs[1].distance;

            one.Vj = vehs[0].capacity;
            one.Vx = vehs[1].capacity;

            one.Cj = vehs[0].cost;
            one.Cx = vehs[1].cost;

            envTool m_env = new envTool("D:\\logistics data\\address-backup.sqlite");

            one.Pt = m_env.getLoadTime();
            one.At = m_env.getWorkTime();
            m_env.close();

            addrAnalyser       m_addr = new addrAnalyser(m_items, false);
            List <PointLatLng> points = m_addr.getTargets();

            List <good> targets = new List <good>();

            good center = new good();

            center.pos = points[0];
            targets.Add(center);

            for (int i = 0; i < one.n; ++i)
            {
                good g = new good();
                g.pos = points[i + 1];
            }

            return(one);
        }
Ejemplo n.º 2
0
        private void loadVeh()
        {
            vehTool    veh  = new vehTool("D:\\logistics data\\address-backup.sqlite");
            List <Veh> vehs = veh.GetVehs();

            Jinbei      = 0;
            XinNengyuan = 0;
            foreach (var c in vehs)
            {
                if (c.name.IndexOf("金杯") != -1)
                {
                    Jinbei = c.number;
                }
                else if (c.name.IndexOf("新能源") != -1)
                {
                    XinNengyuan = c.number;
                }
            }
            flagv = !(Jinbei == 0 && XinNengyuan == 0);
        }
Ejemplo n.º 3
0
 private void init()
 {
     changed = false;
     m_veh   = new vehTool("D:\\logistics data\\address-backup.sqlite");
     loadData();
 }