设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6239|回复: 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': H1 X' ~" |3 {4 ]' u
*/
! d% G$ s4 ~8 W% S: l) U2 |* jis
. A6 O. R0 I6 Y1 x        part, GlobalDistObj, assignLObj:object;row,Lan:integer;# N& t3 L: }, C3 n. b0 V
do3 t, q& l7 O4 X0 p" F5 }8 F" ^
        Lan := rootfolder.Internal.Tools.AOLlanguage;
. k3 t4 `# n! P. ^( u        if current = @.Destination -- else return0 w0 z" g$ a, {3 w' q5 X& ]
        then" F8 ]$ P. t  q; R
                @.Destination := void;
+ ]' |3 K( D+ j- f: T5 J) M7 ]                if @.occupied then& \8 C5 S# X- T. A) M
                        part := @.cont;
+ ?; c2 f& b$ `% M; n                        @.transpOrder := void;
0 k0 ^* p0 {3 }0 R+ H) Y* E+ ^                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 _  X4 {# k# y, w" W- @
                                @,root.eventcontroller.simTime);
7 B) u4 @  C0 a0 z  O3 H) {" L                        @.HasOrder := false;0 G" u5 F' M/ b0 O* U/ C
                        @.DrivingHome := true;/ V5 G( h+ J0 Q# A4 N
                        rgManager.tryToStartTransOrder;( S' h3 ^, Q% k. r
                        if @.Destination = void+ ^' _4 K- h4 U2 G
                        then -- no transport order for vehicle @
3 l1 k+ j' }3 C/ e  k                                @.Destination :=  R8 B! a; x* _1 n. S6 D
                                rgManager.nearestFreeStation(@,track.~);
; a, N) n$ x' t                                newDirection(@);   
2 C) e4 D0 k8 P% L' G# h) @                                if @.Destination /= void then4 E6 y5 p8 r' p2 t% Z1 I( \
                                        @.Destination.NumReservation :=2 \7 z( z" L! N, ?* c" v& q1 r( V
                                        @.Destination.NumReservation + 1;
- ~% f0 R# H" D. q+ j7 _                                end;3 @/ q2 i. `1 H
                                @.CurrIcon := "drivingHome";- j3 g; i; {  K' M/ v
                                @.DrivingHome := true;
+ h* {* E! g; F7 n2 [                        end;
2 s: S  s1 d! n; x2 y                else -- the vehicle @ is empty, both vehicle and part are in the same dock station& [* w! S8 |) f( z6 I- L0 {/ I
                        part := @.transpOrder;6 Q& E0 @4 k# q, F
                        part.move(@);-- load part8 L% w3 [: K5 @3 b, c9 P
                        @.CurrIcon := "load";
% K0 P/ A. e) ]. C3 o                        GlobalDistObj := part.globDestination;  O4 f) j; l  |& I: A3 o- L# w5 i. n
                        assignLObj := rgmanager.rgAssignL;; ~6 J, C( J7 h
                        row := assignLObj.getRowNo(GlobalDistObj);
/ N. q+ v6 K( r% o. v* J                        if Row = -1 then -- since 701 o7 w& q: ^3 q1 e7 t, t& S
                                if lan=1 then
4 _) w: Y/ Q0 l5 h9 q2 k$ \                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' d" m8 g7 y1 j# U                                                to_str("in der Andockstation: \"",?.~.name,"\""));
  L+ v, m- ~2 x7 g+ z; n% N% E& P                                else2 ?& J; w) x- W: Y" f/ P1 E
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* O+ o0 i. p6 r                                                to_str("in docking station: \"",?.~.name,"\""));                                5 h, V0 m! x: ~+ {4 T7 @
                                end;
3 @+ O# L* i5 K                        else+ q& m# u' ]- Z6 G* w
                                @.Destination := assignLObj[1,row];& r4 v& ]$ S$ `: B
                        end;                       
7 O4 M0 f2 u9 k, w7 Y$ S                        newDirection(@);
' t2 ~3 f+ V2 B5 o; h                        @.HasOrder := true;7 [+ F6 V& @5 v+ o8 h5 h
                end;
8 T, s+ }% _  B/ d1 V6 N5 R        end;
4 [9 j/ {2 j. N( ?* J; zend;        -- of the method
# y% h% L) b$ @
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
' v3 a% U. r9 i9 @: I1 C4 A% f  w; T6 D( `
这是AGV_putin中arrive的method。
2 U3 r8 U8 L, _% b! n) }5 b6 t+ N$ C( b  |: f
当到达物料速度越高时,这个报警更多,
+ _0 J& @6 E+ J. g$ G可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。- R- z. B7 R+ c& }
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?" c; v$ C5 B% _5 j

8 ]6 N/ T( T; d& C4 F) `1 X& {另外一个小建议,就是move,所有的move都可以这样* M! I% p: q3 N# ~4 k
if not move() then debug end
0 Q; g( Y0 H% q这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。) b' {5 m' w. t) b( l* @* m( C
plant simulation中的free libraries有AGV模板," L8 z3 @; I8 n
里面也有案例。6 m% G& F% d/ O0 d& i. o
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
) W. w4 ~6 s5 R* h! p4 `- h, E1 S( ?+ {$ P. e2 D
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 N( D) o# e: t8 y& l7 c9 s. O& P: ?
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 + [2 _8 ~6 x7 x6 t+ h; ^0 H% O
这是AGV_putin中arrive的method。2 L9 [  I8 k3 Y4 ~& U* p0 v5 i$ \

8 ]2 K8 l% x1 X当到达物料速度越高时,这个报警更多,
1 t2 |' R9 X2 u
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-26 15:54 , Processed in 0.031115 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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