设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6478|回复: 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'9 _0 J2 e: E+ e4 P: Z+ C/ M6 |
*/9 ^0 c- d. J7 y3 b
is4 r  A- |" w! V/ p9 m& a
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 a& t0 Q& f( X0 n( A
do
4 B7 p, V3 ~* L8 Q        Lan := rootfolder.Internal.Tools.AOLlanguage;! X& V* U, i# u) V# [2 A
        if current = @.Destination -- else return8 Q7 z0 `) B8 r' G3 [0 X9 Z2 B3 w# y& {
        then3 ^4 D/ Q. ~' O$ }. J
                @.Destination := void;
% H7 R, g2 p( w9 W                if @.occupied then3 [# x  ?( X* Z
                        part := @.cont;
/ }' g! g; L1 {& q9 X                        @.transpOrder := void;8 t0 I; ^. m7 t8 {0 w6 Y: i/ ^7 c; a7 Z
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 C- V. w, i* D) l
                                @,root.eventcontroller.simTime);
5 G0 X% R% [8 Q+ Z0 s                        @.HasOrder := false;! [0 T! R- }: B8 A9 S
                        @.DrivingHome := true;
% E' o- C2 q4 q$ \                        rgManager.tryToStartTransOrder;. R" T. d& i" P7 ~- L* q& Z
                        if @.Destination = void, x2 n% p& \9 V/ @& O1 h
                        then -- no transport order for vehicle @
3 X$ Z/ V' H$ f8 o8 u                                @.Destination :=2 G) m, d/ k9 `5 H- s
                                rgManager.nearestFreeStation(@,track.~);* o& `& ^/ o. t/ H" y2 G2 X
                                newDirection(@);   ; N. B7 N; f0 ^6 @
                                if @.Destination /= void then6 g& H" G9 S* ], z" x* |- Y
                                        @.Destination.NumReservation :=8 K" u; \1 n: Q2 Y+ r2 p7 S
                                        @.Destination.NumReservation + 1;
" ]/ y9 `& i, K. ~7 V/ O4 v                                end;- Z7 Z6 e  K" ^+ r  L9 o
                                @.CurrIcon := "drivingHome";
9 L2 ?/ h9 @& ~                                @.DrivingHome := true;3 I! |: X! {; u! A% ?
                        end;2 ~& N+ |) c  p1 H+ c: q3 r8 i
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) C, h& u  o& @" @  I                        part := @.transpOrder;+ R4 z0 Q. `* w, C+ L
                        part.move(@);-- load part0 ?4 `" D. O* h7 z0 R& q; @3 T
                        @.CurrIcon := "load";# k% j9 J) b% v/ l1 c
                        GlobalDistObj := part.globDestination;( w6 o: h7 v6 i& ~' d
                        assignLObj := rgmanager.rgAssignL;
1 Y3 p  l9 x/ b3 }8 i% U$ _# u                        row := assignLObj.getRowNo(GlobalDistObj);
) R; d4 B4 A9 ?: R5 k4 ], j/ D                        if Row = -1 then -- since 70
2 Y6 J4 r+ S/ N3 p+ T6 I$ P( k- {! C                                if lan=1 then* P1 b1 E, }* W& l2 k# y
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# m/ u: p8 }( ?                                                to_str("in der Andockstation: \"",?.~.name,"\""));! f9 Q* f4 R: \! e& y
                                else
" m  \  y6 E: e/ g                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# ?# D2 H: Z6 d$ }                                                to_str("in docking station: \"",?.~.name,"\""));                               
: ]! \- B0 o: X                                end;
' `! j8 L6 h  ]                        else
7 s1 {# c+ t' t& r) c                                @.Destination := assignLObj[1,row];
' Y& Q# f% [! j8 f; x6 _* S                        end;                        - f! ?( [; X- k" a# y* L7 j0 c& C8 G
                        newDirection(@);8 [' Z' T7 s% G6 ?1 O/ e" C
                        @.HasOrder := true;
# }* L# [8 S0 S9 }                end;
, L' @+ }6 Q0 f. m; J0 S8 z        end;
6 z9 e- N' T8 l5 d% Z  lend;        -- of the method
7 B) b* e# A. @- o
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 . D7 N% Z% H. [

# v; y& a  l9 w; H- l) a4 h这是AGV_putin中arrive的method。. h  o9 d* D( k/ |. x: v/ m. q2 D9 U5 K

- n$ {" I9 }0 b  K9 x' D% `; b1 A当到达物料速度越高时,这个报警更多,
. b. t0 u* d, [- {- G3 O可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。/ h/ ]5 R5 I5 f4 A" U- @
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?7 B' C. H  h; F3 f. f& f
2 D) z- w3 u, Y; Q* r+ |3 z
另外一个小建议,就是move,所有的move都可以这样
! A. M9 \% o# j8 F" ]  z- Z& l7 q0 _if not move() then debug end
$ S( m5 O0 b+ C0 |( o+ P2 \这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
1 _/ i& w( D5 i# t% q2 K7 _! cplant simulation中的free libraries有AGV模板,
. I: D& S" {9 |1 C: o& I: t* e: K里面也有案例。1 \* s* k; w- U: s
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。' F8 u1 C  I: `) w; n2 F- P* n
& @4 ~7 d1 B+ t- k: V
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 + s, v! a) K! q2 a1 U) h5 x
9 O# G3 h' g, p9 \6 Y2 B8 E- G- C" G
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 8 y& {; e5 ]7 |4 w6 ]6 z; K" R
这是AGV_putin中arrive的method。
" Z! c; k/ G  t( y, N' B! E2 g8 |7 l" Y# B( @, U2 A
当到达物料速度越高时,这个报警更多,
0 X% i! j, V) e7 }+ E
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-9 01:38 , Processed in 0.019525 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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