Esempio n. 1
0
        public void SetGoPiont(string GoPoint)
        {
            string BeginP = "";
            string EndP   = "";
            string ReBack = "";

            BeginP = GetValue(LocalPoint).Replace("_", "");
            if (LocalPoint.Trim() == "")
            {
                MessageBox.Show("无当前坐标!");
                return;
            }
            if (BeginP != GoPoint)
            {
                BeginP = "A" + BeginP;
                EndP   = "A" + GoPoint;
            }
            RoutePlanResult Tresult = planner.Paln(_ComData.nodeList, BeginP, EndP);

            foreach (string strln in Tresult.getPassedNodeIDs())
            {
                ReBack += "_" + strln;
            }

            string PassStr = ReBack + "_" + EndP;

            SetTask(PassStr.Replace("A", ""));
        }
Esempio n. 2
0
 private void printRouteResult(RoutePlanResult result)
 {
     Response.Write("<br />路径");
     string[] tmp = result.getPassedNodeIDs();
     for (int i = 0; i < tmp.Length; i++)
     {
         Response.Write(tmp[i] + "--");
     }
 }
 private void printRouteResult(RoutePlanResult _result)
 {
     string[] tmp = _result.getPassedNodeIDs();
     for (int i = 0; i < tmp.Length; i++)
     {
         Response.Write(tmp[i] + "-->");
     }
     Response.Write(ddlEnd.SelectedValue);
     Response.Write("<br>");
 }
Esempio n. 4
0
 private void printRouteResult(RoutePlanResult _result)
 {
     Response.Write("</br>路径:");
     //获取最短路径结果中,所有的节点
     string[] tmp = _result.getPassedNodeIDs();
     for (int i = 0; i < tmp.Length; i++)
     {
         Response.Write(tmp[i] + "-->");
     }
 }
Esempio n. 5
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (comboBox2.Text == comboBox4.Text)
            {
                MessageBox.Show("不能同在一个地标上!");
                return;
            }
            LocalPoint = this.comboBox4.Text;

            string Fction = "";
            string BeginP = "A14";
            string EndP   = "A11";
            string ReBack = "";

            if (LocalPoint.Trim() == "")
            {
                MessageBox.Show("无当前坐标!");
                return;
            }
            if (LocalPoint != comboBox2.Text)
            {
                BeginP = "A" + LocalPoint;
                EndP   = "A" + comboBox2.Text;
            }
            RoutePlanResult Tresult = planner.Paln(_ComData.nodeList, BeginP, EndP);

            foreach (string strln in Tresult.getPassedNodeIDs())
            {
                Fction += ">" + strln;
                ReBack += "_" + strln;
            }
            Fction  = Fction + "->" + EndP;
            PassStr = ReBack + "_" + EndP;

            if (_hts.ContainsKey(comboBox5.Text))
            {
                if (MessageBox.Show("已经设置过AGV#" + comboBox5.Text + ",是否要覆盖之前设置", "提示!", MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes)
                {
                    _hts[comboBox5.Text] = PassStr;
                    return;
                }
                else
                {
                    return;
                }
            }
            _hts.Add(comboBox5.Text, PassStr);
            this.richTextBox1.Text += "\nAGV#编号: " + comboBox5.Text + " 已设置,";
            richTextBox1.Text      += " 路径:" + Fction.Replace("A", "");

            DevID = comboBox5.Text;
        }
Esempio n. 6
0
        public void SetCall()
        {
            string          Fction  = "";
            string          BeginP  = "A14";
            string          EndP    = "A11";
            RoutePlanResult Tresult = planner.Paln(_ComData.nodeList, BeginP, EndP);

            foreach (string strln in Tresult.getPassedNodeIDs())
            {
                Fction += strln;
            }
            CreateNode(Fction + EndP);
        }
Esempio n. 7
0
        private string DetailedRoute(RoutePlanResult result)
        {
            string[] point = result.getPassedNodeIDs();
            string   route = "";

            for (int i = 0; i < point.Length; i++)
            {
                route += point[i] + "--->";
            }
            route += ddlEnd.SelectedValue;

            return(route);
        }
Esempio n. 8
0
        private void button3_Click(object sender, EventArgs e)
        {
            if (comboBox5.Text == comboBox4.Text)
            {
                MessageBox.Show("不能同在一个地标上!");
                return;
            }
            LocalPoint              = this.comboBox4.Text;
            this.richTextBox1.Text += "\n AGV#" + comboBox2.Text + ">> 起始地标: " + LocalPoint + " 开往目的地标:" + comboBox5.Text + " 已设定。";
            string Fction = "";
            string BeginP = "A14";
            string EndP   = "A11";
            string ReBack = "";

            if (LocalPoint.Trim() == "")
            {
                MessageBox.Show("无当前坐标!");
                return;
            }
            if (LocalPoint != comboBox5.Text)
            {
                BeginP = "A" + LocalPoint;
                EndP   = "A" + comboBox5.Text;
            }
            RoutePlanResult Tresult = planner.Paln(_ComData.nodeList, BeginP, EndP);

            foreach (string strln in Tresult.getPassedNodeIDs())
            {
                Fction += "->" + strln;
                ReBack += "_" + strln;
            }
            Fction  = Fction + "->>" + EndP;
            PassStr = ReBack + "_" + EndP;

            richTextBox1.Text += " 路径:" + Fction.Replace("A", "");

            DevID = comboBox2.Text;
        }