设为首页收藏本站

最大的系统仿真与系统优化公益交流社区

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8228|回复: 9

[求助] 用AGV模板发生了以下错误,请解!

  [复制链接]
发表于 2011-11-5 16:38:28 | 显示全部楼层 |阅读模式
问题在哪里?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
 楼主| 发表于 2011-11-14 10:37:54 | 显示全部楼层
没有解决,再顶一下。
 楼主| 发表于 2011-11-17 11:03:27 | 显示全部楼层
/* called by:        entrance ctrl of the object 'track'
& {8 W5 }1 w/ [7 ^*/  h/ O' Q  L$ q: [# i
is
3 Q* ?5 }2 f/ l# X+ Y  N1 b) k; i        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 t2 ?4 u" m! A" m. J/ u3 `  ado
9 h% C  A1 ^+ ]' A        Lan := rootfolder.Internal.Tools.AOLlanguage;  l# S& A0 ~0 A  U
        if current = @.Destination -- else return4 u$ a7 ]% _  {; v8 Y" Q
        then1 p3 \1 `6 q" o; {( z
                @.Destination := void;. T- a: G' [; ~
                if @.occupied then3 E& g* K' l! |3 q1 X& I" I
                        part := @.cont;6 Q- k* t) V; }
                        @.transpOrder := void;  L/ ~9 i* W4 K  ?
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 @8 n+ H& a' ^8 ]- {$ p/ Q
                                @,root.eventcontroller.simTime);
4 q  i( B1 r6 X# B; P, p                        @.HasOrder := false;
' q: a: Q* n# i% H                        @.DrivingHome := true;+ K5 Y% p  i" T# ~5 G2 \
                        rgManager.tryToStartTransOrder;$ F$ }1 c" N9 U. F0 ^' M9 ^* ^, A& R
                        if @.Destination = void: m  j, P% a& q" C, |' F5 m3 Y; P  M
                        then -- no transport order for vehicle @
- W6 D9 K0 Q! J: n                                @.Destination :=
9 i. G  I$ O+ ~3 V                                rgManager.nearestFreeStation(@,track.~);, E2 ]3 Q7 r$ [- z* j
                                newDirection(@);   ! F, x' Z# [' q% Z! i. q7 _
                                if @.Destination /= void then5 _1 `, E% ]0 q5 Z1 K! w6 E
                                        @.Destination.NumReservation :=
" F8 v  E  F& Y; j                                        @.Destination.NumReservation + 1;
9 p1 n- U7 f0 s7 y" Y8 o                                end;
1 v" b/ l9 F) l' l) [% ^4 B9 M                                @.CurrIcon := "drivingHome";
- n5 C0 R# Y; L5 Y                                @.DrivingHome := true;
+ M$ c# `! C# k7 E- V* V8 Y7 W                        end;! c9 V4 [+ ^7 B9 K. U5 l4 W
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 W1 K: D4 i; R0 l: Q
                        part := @.transpOrder;5 Y5 t2 n9 o3 |+ [" u+ X% A
                        part.move(@);-- load part
% v; U& ^+ G( F& ^: \- n                        @.CurrIcon := "load";8 l9 M0 S4 u' g3 Y# X2 h2 c6 K  R4 e- `
                        GlobalDistObj := part.globDestination;
1 v/ C% w3 {; g5 t  q3 C" f                        assignLObj := rgmanager.rgAssignL;
! o: l) R; }2 x2 m3 ^1 L* P                        row := assignLObj.getRowNo(GlobalDistObj);' Z$ p8 G/ u! R% ]( p
                        if Row = -1 then -- since 70
8 P; B6 q& ~; y- B8 F                                if lan=1 then
+ S& }1 n, L3 f8 h: ~( m6 l- ], P                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% P" u- {8 }, D5 Z. P* d                                                to_str("in der Andockstation: \"",?.~.name,"\""));
- I7 ^7 e: @1 f4 v( I  n& z                                else2 C7 Z% A; h- N6 N" c7 ^
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) y9 i+ R: T3 }$ N: I4 }2 w
                                                to_str("in docking station: \"",?.~.name,"\""));                               
% G! O4 b1 y- D/ ?) N                                end;1 }( i. A! z' S4 I* [% f
                        else! |& i- D  D: n* w% T4 L
                                @.Destination := assignLObj[1,row];4 ~) z; h* r5 E
                        end;                        1 J! l2 w" y7 L' L) g0 X
                        newDirection(@);" _% }( k. Z* R  K" e
                        @.HasOrder := true;
- ]+ K% c& c, a* e                end;
3 J4 x# o: G" ^/ Z2 I        end;; ]0 ~% b9 k4 l/ N* d( Q( W
end;        -- of the method
  k% q* q; x  p: L2 y, j
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
$ @0 O% O- w; m4 u; j3 b6 U4 @6 k+ E
这是AGV_putin中arrive的method。, W8 t- u- |* a$ @
7 ^- c6 G) P8 f
当到达物料速度越高时,这个报警更多,1 c4 d- i/ R! m6 q5 e7 z
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
5 ^0 p* f- h& f; B程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?( k9 h, I+ k4 Z' ?

" n0 @  A8 t8 V另外一个小建议,就是move,所有的move都可以这样
: H$ Q6 P( _5 V  |if not move() then debug end, F" I$ }$ D; |8 A5 R. ?) o1 d
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。' i' ~* m: W8 V  t
plant simulation中的free libraries有AGV模板,6 O2 f5 [8 i) v! b+ Z
里面也有案例。
$ T* z$ p. s' \) m7 X7 q/ B" ]! j我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
4 x9 V8 [+ n# c1 C1 p- L- |! d4 x! ^) \: c1 i. E# x/ w, y8 f
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ; [: d( k: z0 a
8 N4 _0 M# b! A* [" v7 q! G
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 & a. x$ ]" t' C$ W& K/ O8 T
这是AGV_putin中arrive的method。+ f& ]7 `5 o3 z5 p# I

/ o$ ^/ T" u7 Q( k! V当到达物料速度越高时,这个报警更多,
1 K6 t/ q! e3 n; ]. Q
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|SimulWay 道于仿真   

GMT+8, 2026-5-22 03:52 , Processed in 0.023853 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表