设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7971|回复: 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'
* J, u+ k/ F. ^4 Z*/
+ l2 F  y+ L' H" q2 cis
! l6 i# B- ^9 L        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! |( l2 g- X6 W4 d! J6 v8 ~, Pdo) w# h: o9 l7 W4 V; L+ b
        Lan := rootfolder.Internal.Tools.AOLlanguage;
5 v5 L  [3 X) X) j8 ]( i5 r        if current = @.Destination -- else return3 F7 a5 b) F$ _2 Y$ @+ R! k
        then6 k4 X! w/ Q' e5 A& i
                @.Destination := void;2 A& b( z& I5 g. B5 d* e
                if @.occupied then+ a! `, }" F9 p! D- G- f5 y
                        part := @.cont;
! k- n4 L; |/ T6 T/ v                        @.transpOrder := void;9 r0 o9 b. d" t5 U1 G# v
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 N  p0 K/ f% X; ]7 e/ r                                @,root.eventcontroller.simTime);
/ ]/ K5 t* I3 d# ]* G& @% V- @                        @.HasOrder := false;, H# L) {; r! z$ ^- ]" X
                        @.DrivingHome := true;
- A4 O. }4 x' }( t6 w" M8 R                        rgManager.tryToStartTransOrder;" \- ]: B0 G/ @9 {$ P3 D
                        if @.Destination = void
" y# t3 Z2 P# j; M" R                        then -- no transport order for vehicle @  A7 Q$ O! l4 J8 Y0 n0 _& m
                                @.Destination :=
! D8 ]: A7 T0 X1 e. Q  x5 G) H5 {8 z                                rgManager.nearestFreeStation(@,track.~);
5 q+ W- W& B7 w# w( x                                newDirection(@);   
3 P% O* n& c4 [! \& R                                if @.Destination /= void then- B+ }7 l! K6 H) M
                                        @.Destination.NumReservation :=
7 q5 C1 |5 y( Y% ?! s+ U; R8 Q, z8 N                                        @.Destination.NumReservation + 1;
6 [3 h, Q, \) o" |1 {                                end;/ R( P% V  `9 u! t
                                @.CurrIcon := "drivingHome";, K" t$ G5 W+ A. \6 j7 b
                                @.DrivingHome := true;
$ U2 h% y4 |  W3 Y) B$ A                        end;
2 ?8 L9 N) h: @6 a                else -- the vehicle @ is empty, both vehicle and part are in the same dock station) z: m: ^( v4 z
                        part := @.transpOrder;! a( j0 s2 [2 f+ c+ N
                        part.move(@);-- load part; C  ]# \+ u; x/ M
                        @.CurrIcon := "load";
$ }- f3 w, a* k) D                        GlobalDistObj := part.globDestination;
7 h: a6 c* x1 ~" b                        assignLObj := rgmanager.rgAssignL;
$ D3 t4 t0 i8 n4 B/ n) k% X9 D                        row := assignLObj.getRowNo(GlobalDistObj);: G8 D$ k* F0 X/ `4 K" B( f
                        if Row = -1 then -- since 70
) h( T# B& l/ e' Y0 ~, d- s# ~                                if lan=1 then( n" I: d9 \& m, l3 L* N
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# F% [" \/ U; G5 @& a                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ k+ A* I/ y2 r3 z, a: p4 l/ S
                                else) ^/ v5 s. r& P$ F; G$ s2 L
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! C5 l" l1 O1 o- U6 E: n1 J5 c                                                to_str("in docking station: \"",?.~.name,"\""));                                : w5 O0 t9 n; G8 X% P8 c6 Y6 X3 H
                                end;1 K8 n* k3 S2 Y$ S
                        else- M1 O- |7 Z0 ]  X. F5 n# l* C
                                @.Destination := assignLObj[1,row];, U8 ?& k! G" l( x
                        end;                        / X- n% H0 t+ U
                        newDirection(@);
- A! k; p  @1 f1 v                        @.HasOrder := true;
8 N  N( S) f. o; R                end;5 l9 B3 q* X! \4 C$ a4 F
        end;5 `0 j. R$ \' `! M0 v, i
end;        -- of the method
2 L( @$ y0 `- u9 G8 q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ( g7 R4 C2 D+ c0 E# d8 t
' [/ s; w+ ~" }8 f
这是AGV_putin中arrive的method。: X+ g; o2 v! H# l

7 ~& ^$ s& G! Y& h0 e当到达物料速度越高时,这个报警更多,
$ |+ M% I* k$ u) k% ^* o可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
1 Z9 b+ l0 b$ A/ y程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
& }7 A4 |+ E& G5 G, Q7 p
1 s4 |. }6 A' L5 k* v另外一个小建议,就是move,所有的move都可以这样
. N5 d6 _* l# @, q5 e' E& kif not move() then debug end
5 }& x  X+ e: V" v4 C9 y% s6 Y% Q这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。5 x, |# P1 w7 z
plant simulation中的free libraries有AGV模板,
% V' S. W6 J) ?$ l$ f: P里面也有案例。8 x* p1 a6 y: q
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
- a5 ~0 Y" }+ b  G3 q2 Y- a
- m, ]9 X& X* A, }3 O1 a我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 9 C" m/ A! [  g% r

# G, q1 m; {5 \4 o. {那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
  o& U$ ^+ M2 [* F- A这是AGV_putin中arrive的method。
9 @) O% G; C! d. L+ k# ^4 P) M9 j
+ Q' j# i( V* c当到达物料速度越高时,这个报警更多,
, r! |* ~0 X' M' t
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-8 10:17 , Processed in 0.020480 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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