设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8713|回复: 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'* C% f+ f# S; f1 V$ ]
*/
) \8 v5 V% n$ ^; o" a9 R* n4 O# his
/ V7 I: Z1 X9 M        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ ~) A6 j7 K7 d3 l) [do
# o. v; }7 I8 P; r# {1 v. T        Lan := rootfolder.Internal.Tools.AOLlanguage;
2 G/ e  s3 L# p9 F( c        if current = @.Destination -- else return8 a% u2 D  e3 D* q% u0 t: ?. X
        then
+ G! D3 G( `) |. A                @.Destination := void;: b' z) x+ R- X5 }
                if @.occupied then6 M- e* \% l# W/ E6 j
                        part := @.cont;
5 w+ n* t% ^$ @                        @.transpOrder := void;
8 E! B" Y, R9 X1 g2 ^: Q                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! a& D% F8 w7 r                                @,root.eventcontroller.simTime);
" c! P  p9 w6 j1 A# q                        @.HasOrder := false;
# l4 a, ~) z2 S2 _, [! I                        @.DrivingHome := true;% H2 m% s$ }5 \+ g8 h2 k
                        rgManager.tryToStartTransOrder;, n% a1 l1 D( s4 A
                        if @.Destination = void
, c( O/ w, I" L' d2 O" L/ a0 i                        then -- no transport order for vehicle @
/ [. e5 k. [7 T' f: x, F                                @.Destination :=
+ C# V; L. |) ^) e% a$ S                                rgManager.nearestFreeStation(@,track.~);
6 s  S2 [( m, I& i4 q                                newDirection(@);   + S8 n7 X' V4 k4 p5 \( I0 O
                                if @.Destination /= void then' ~- w/ ^+ {6 O9 z5 e9 O* d; S
                                        @.Destination.NumReservation :=2 s; {' Q6 \0 v+ d( Y4 a1 N! O
                                        @.Destination.NumReservation + 1;* M) ?' u; d2 z) s
                                end;
0 r8 K9 S/ ]: O7 F                                @.CurrIcon := "drivingHome";
* Z% y& C/ d- w0 w' |                                @.DrivingHome := true;
3 T0 Y) H+ h/ c6 D! Q/ y                        end;" c4 Y  [# t( |, N, M/ h% C
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 a" \* J) M$ \0 k' C8 N
                        part := @.transpOrder;
; j$ v5 C8 E0 w5 A8 q8 Y- t: r                        part.move(@);-- load part" S1 L7 g" X, S* q$ ~) q
                        @.CurrIcon := "load";7 k# k1 l2 O7 N! i. |
                        GlobalDistObj := part.globDestination;
) J" S3 t7 n9 S: R; Q) b: I                        assignLObj := rgmanager.rgAssignL;
  |2 O8 e! U! x) x! T- h                        row := assignLObj.getRowNo(GlobalDistObj);
, Q. ~. Q+ ?* a; B4 R# z& j                        if Row = -1 then -- since 707 ]8 \) L* L8 M* Q& d
                                if lan=1 then5 O; Q( ^: C, R8 u  `
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! z" C$ M& q+ ]                                                to_str("in der Andockstation: \"",?.~.name,"\""));- n. p$ \3 f4 v
                                else( X& Y  q5 k! a) ^
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 j" N5 f1 H! r3 I5 Q! k8 n4 U                                                to_str("in docking station: \"",?.~.name,"\""));                                ! u, f8 y4 |( o) e
                                end;
  y+ y3 [  f" }" `5 [' F* O                        else2 m6 W7 o9 {6 `7 U2 ?& i- a
                                @.Destination := assignLObj[1,row];
; f& p! \6 k2 E& ~* s                        end;                       
- |1 M. w4 Q! Z9 ^% C1 d                        newDirection(@);8 E0 [! ?! z2 m  {8 E' t" Z
                        @.HasOrder := true;
9 \4 Y0 x, c/ [. [- ^& Z: J( @                end;
; @% N# a: p% g& [; |6 \        end;
; S$ w$ ]  C1 Rend;        -- of the method
' s* @5 N) r* q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ; y" {+ E9 n- ~) o& U

( Y/ }7 L$ W8 i; t: J这是AGV_putin中arrive的method。) U# p( G- Y" y5 ~6 x# H2 K
$ K5 w3 J- M5 p9 p
当到达物料速度越高时,这个报警更多,
( H, t5 I5 `5 v+ u: a可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。/ Z/ q7 \8 ~' m1 T
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?% G1 M# g' @: `6 C0 q# P% V' u

) D* ^5 X( G. Z: E$ B另外一个小建议,就是move,所有的move都可以这样
, ?7 d! |/ h) B6 y* d3 Lif not move() then debug end1 _/ Z7 q' M# n( }6 T. |
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
4 L4 T3 _; _7 O9 L1 O, N5 uplant simulation中的free libraries有AGV模板,
7 C* ?; e8 M5 U3 N3 f# T里面也有案例。$ N9 I, k0 B7 S$ W6 a0 a5 V) Q
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
$ R# W4 y3 v* x! d+ J( r4 S
/ \5 d7 @( o2 s2 }& c6 q我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
( Y# R( l+ S8 g9 {; e1 Y. h- ^% }5 e1 |  D
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 0 G- l+ T3 i; \4 e7 X" S
这是AGV_putin中arrive的method。" a2 P; |" x2 d
, ~3 J& E* ^1 z% e3 |
当到达物料速度越高时,这个报警更多,

3 E7 y  _; Y1 d! l" |6 b  a另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-21 21:45 , Processed in 0.013186 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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