设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8554|回复: 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'! t" _/ B* L& G( i, G( W
*/
, F1 y8 t, c2 O! h. W5 ais
. ]% _5 x! `1 j2 ?& M        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 ^* @  U/ Q* s2 p. u+ B5 Fdo* d8 X- r8 e2 {( H$ k! |
        Lan := rootfolder.Internal.Tools.AOLlanguage;$ n( V! _, z8 s
        if current = @.Destination -- else return, I) E) M9 U! E4 [
        then
, s. c; A8 c  C9 i                @.Destination := void;
& v  a2 W. Z, V- d& W                if @.occupied then) l6 k9 m3 j9 T
                        part := @.cont;* F; \! b5 ?2 K7 L$ x/ u( R
                        @.transpOrder := void;
% o* O* o; ~& a                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( ?! u+ H+ L/ ^1 o5 `1 b
                                @,root.eventcontroller.simTime);
  \7 `. r& E, Y! o                        @.HasOrder := false;' y% S' b) h" r/ \
                        @.DrivingHome := true;& c" V. K) S% \7 w7 t
                        rgManager.tryToStartTransOrder;
- Y7 Q. V, V/ z" l, L: A. J/ W                        if @.Destination = void, v9 M! o" E  i) c1 ]! R8 x
                        then -- no transport order for vehicle @
$ x9 j( n9 i, U) ]  q                                @.Destination :=
  B! y2 O! |: D2 \# k$ s3 C                                rgManager.nearestFreeStation(@,track.~);) o. ^) J# W( l+ `2 P/ t
                                newDirection(@);   
  j+ K3 O8 T6 }8 _+ B% ^4 I- I                                if @.Destination /= void then& M8 F" x( P1 D3 t& u- E
                                        @.Destination.NumReservation :=
0 W8 R0 G( F. M9 G8 R                                        @.Destination.NumReservation + 1;- T5 Y1 L. R) D$ Z2 I
                                end;9 Y" k. |- y8 n- B: I5 p9 l0 e9 ]
                                @.CurrIcon := "drivingHome";5 p7 X/ d$ I# U" ~8 m
                                @.DrivingHome := true;
, f1 L' U% [2 z& Y  q" r                        end;
: U( y( g  L. g2 _( {0 u                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. |' |- `) T* ]3 \8 C                        part := @.transpOrder;/ z; f$ |' {4 v" [1 F1 `
                        part.move(@);-- load part
3 ~$ J5 E5 ^4 ~! a7 U1 Y                        @.CurrIcon := "load";
$ k6 s" I4 ^. d* O2 U5 X                        GlobalDistObj := part.globDestination;' k1 c  W- p- y6 p6 N; ^- o5 G0 K
                        assignLObj := rgmanager.rgAssignL;
( t5 s% I( U- ~8 C                        row := assignLObj.getRowNo(GlobalDistObj);
4 j9 r6 a5 ]. {9 ]- }! z                        if Row = -1 then -- since 70* R" S4 d3 ~' s
                                if lan=1 then  o) e2 ]/ @3 k9 Y0 }
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# [9 L2 J; b# t8 @3 U% ]* A* V8 y
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
) [) d( X* d- T, g# d# K0 B; e                                else
5 O2 p7 U. k6 t8 ^) f                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ e5 ?  ]( _: q                                                to_str("in docking station: \"",?.~.name,"\""));                               
5 \' l! u1 `$ I' X                                end;
; {4 I' `9 q/ T  P                        else
8 t; q$ o6 v/ E( x& y/ J, C                                @.Destination := assignLObj[1,row];' H  @6 ?. \) g
                        end;                        7 c! i! {- J/ F# N) y$ C
                        newDirection(@);
, }+ j+ `& Q# W7 n' R6 a8 F                        @.HasOrder := true;) J5 a5 m( s5 L9 S  ^
                end;% q0 k7 g$ I8 M# A" e) x- `* k0 \% o
        end;2 |  f4 l, G# D7 a2 R; d+ G- O( I' ]" N
end;        -- of the method! a  [8 [0 h1 b4 H% ?' t; M
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 7 P. Y# t0 s+ X% Y
, J4 q5 e4 `! d0 v% @
这是AGV_putin中arrive的method。
' j2 n6 ?% C7 u% |# r! D1 }' S7 e/ T9 A8 K* E# H4 y
当到达物料速度越高时,这个报警更多,2 A: P1 X4 a- y; k; s# Q
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。2 E3 ?/ Z7 z% E  _3 T6 {
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?0 f* n6 K+ Y& A7 Q: N3 y
# d* y. O3 M% m5 n6 _" t
另外一个小建议,就是move,所有的move都可以这样
  @# I( s+ x5 Y% b( l# U* sif not move() then debug end7 r3 V' c- T7 p, r( [* e
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。5 J6 m3 J  c; p; w
plant simulation中的free libraries有AGV模板,: O0 O! I  P# [2 \# U
里面也有案例。& W- D9 a' \% i8 z# }7 ]  }$ d
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。! y& g% a' z7 e* A% M9 |3 u
8 v7 g$ G+ q6 i: S
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ( x5 \8 T5 T( c3 T% }

+ o. X- ?9 o  P5 d) f/ r" a! N- X那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
' M! _+ k" a- B7 |: L2 b这是AGV_putin中arrive的method。
; p' l( W; N/ \0 K" n7 \. I0 o) j0 Q; U0 n3 `0 q
当到达物料速度越高时,这个报警更多,

+ E- o% N( U( k; y$ {2 N: d另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-11 08:53 , Processed in 0.017607 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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