資源簡介
多AGV調(diào)度系統(tǒng)實(shí)現(xiàn),代碼包含5個AGV基于A*算法搜路,基于兩階段算法進(jìn)行調(diào)度

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Text;
using?System.Threading.Tasks;
namespace?AGVS
{
????class?AxingTest
????{
????????List?Open_List?=?new?List();
????????List?Close_List?=?new?List();
????????byte[]?R;
????????public?AxingTest(byte[]?R)
????????{
????????????this.R?=?R;
????????}
????????//從開啟列表查找F值最小的節(jié)點(diǎn)??
????????//判斷一個點(diǎn)是否為障礙物??
????????private?bool?IsBar(MyPoint?p?byte[]?map)
????????{
????????????if?(map[p.y?p.x]?==?0)?return?true;
????????????return?false;
????????}
????????//判斷關(guān)閉列表是否包含某個坐標(biāo)的點(diǎn)??
????????private?bool?IsInCloseList(int?x?int?y)
????????{
????????????foreach?(MyPoint?p?in?Close_List)
????????????????if?(p.x?==?x?&&?p.y?==?y)
????????????????????return?true;
????????????return?false;
????????}
????????//從關(guān)閉列表返回對應(yīng)坐標(biāo)的點(diǎn)??
????????private?MyPoint?GetPointFromCloseList(int?x?int?y)
????????{
????????????foreach?(MyPoint?p?in?Close_List)
????????????????if?(p.x?==?x?&&?p.y?==?y)
????????????????????return?p;
????????????return?null;
????????}
????????//判斷開始列表是否包含某個坐標(biāo)的點(diǎn)
????????private?bool?IsInOpenList(int?x?int?y)
????????{
????????????foreach?(MyPoint?p?in?Open_List)
????????????????if?(p.x?==?x?&&?p.y?==?y)
????????????????????return?true;
????????????return?false;
????????}
????????//從開始列表返回對應(yīng)坐標(biāo)的點(diǎn)?
????????private?MyPoint?GetPointFromeOpenList(int?x?int?y)
????????{
????????????foreach?(MyPoint?p?in?Open_List)
????????????????if?(p.x?==?x?&&?p.y?==?y)
????????????????????return?p;
????????????return?null;
????????}
????????//計算g
????????private?int?GetG(MyPoint?p)
????????{
????????????if?(p.father?==?null)?return?0;
????????????if?(p.x?==?p.father.x?||?p.y?==?p.father.y)
????????????????return?p.father.G?+?10;
????????????else
????????????????return?0;
????????}
????????//計算h
????????private?int?GetH(MyPoint?p?MyPoint?pb)
????????{
????????????return?Math.Abs(p.x?-?pb.x)?*?10?+?Math.Abs(p.y?-?pb.y)?*?10;
????????}
????????//更新開啟列表
????????private?MyPoint?CheckP4(MyPoint?p0?byte[]?map?MyPoint?pa?ref?MyPoint?pb)
????????{
????????????MyPoint?Hmin?=?new?MyPoint();
????????????Hmin?=?null;
????????????for?(int?xt?=?p0.x?-?1;?xt?<=?p0.x?+?1;?xt++)
????????????{
????????????????for?(int?yt?=?p0.y?-?1;?yt?<=?p0.y?+?1;?yt++)
????????????????{
????????????????????//取上下左右鄰點(diǎn)
????????????????????if?(xt?==?p0.x?||?yt?==?p0.y)
????????????????????{
????????????????????????//排除超過邊界和關(guān)閉自身的點(diǎn)??
????????????????????????if?((xt?>=?0?&&?xt?=?0?&&?yt?????????????????????????{
????????????????????????????//排除障礙點(diǎn)和關(guān)閉列表中的點(diǎn)??
????????????????????????????if?(map[xt?yt]?!=?0?&&?!IsInCloseList(xt?yt))
????????????????????????????{
????????????????????????????????//如果在上一次開啟列表里
????????????????????????????????if?(IsInOpenList(xt?yt))
????????????????????????????????{
???????????????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????4293??2018-04-23?16:07??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\AGVS.csproj
?????文件????????187??2018-04-02?14:26??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\App.config
?????文件???????5383??2018-04-23?16:21??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\AxingTest.cs
?????文件??????19968??2018-04-24?11:31??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\bin\Debug\AGVS.exe
?????文件????????187??2018-04-02?14:26??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\bin\Debug\AGVS.exe.config
?????文件??????46592??2018-04-24?11:31??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\bin\Debug\AGVS.pdb
?????文件??????24224??2018-04-28?15:12??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\bin\Debug\AGVS.vshost.exe
?????文件????????187??2018-04-02?14:26??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\bin\Debug\AGVS.vshost.exe.config
?????文件????????490??2017-09-29?21:43??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\bin\Debug\AGVS.vshost.exe.manifest
?????文件????????687??2018-04-19?21:56??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\MyPoint.cs
?????文件???????4238??2018-04-28?15:12??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\obj\Debug\AGVS.csproj.FileListAbsolute.txt
?????文件???????1169??2018-04-23?16:03??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\obj\Debug\AGVS.csproj.GenerateResource.Cache
?????文件??????33175??2018-04-02?15:46??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\obj\Debug\AGVS.csprojResolveAssemblyReference.cache
?????文件??????19968??2018-04-24?11:31??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\obj\Debug\AGVS.exe
?????文件??????46592??2018-04-24?11:31??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\obj\Debug\AGVS.pdb
?????文件????????180??2018-04-23?16:07??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\obj\Debug\AGVS.Properties.Resources.resources
?????文件????????180??2018-04-23?16:07??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\obj\Debug\AGVS.主界面.resources
?????文件??????21067??2018-04-03?09:18??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\obj\Debug\DesignTimeResolveAssemblyReferences.cache
?????文件???????7776??2018-04-28?15:12??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件??????????0??2018-04-02?14:26??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
?????文件??????????0??2018-04-02?14:26??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
?????文件??????????0??2018-04-02?14:26??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
?????文件????????520??2018-04-02?16:16??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\Program.cs
?????文件???????1332??2018-04-02?14:26??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\Properties\AssemblyInfo.cs
?????文件???????2860??2018-04-02?14:26??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\Properties\Resources.Designer.cs
?????文件???????5612??2018-04-02?14:26??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\Properties\Resources.resx
?????文件???????1091??2018-04-02?14:26??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\Properties\Settings.Designer.cs
?????文件????????249??2018-04-02?14:26??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\Properties\Settings.settings
?????文件???????3163??2018-04-19?21:59??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\run.cs
?????文件??????12912??2018-04-28?15:13??備份3:5AGV模擬實(shí)現(xiàn)版\AGVS\主界面.cs
............此處省略17個文件信息
評論
共有 條評論