设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7143|回复: 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'- h4 D( {  }( W1 F
*/+ h- ~. p: ?8 e* Q4 [1 q0 ^$ \
is
. U6 |0 C3 ^7 Z& \' Q. o* F5 ?) a# p  K        part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ U7 G2 o) |7 M. \
do
2 S5 G- {& P/ z+ m% C2 h6 U        Lan := rootfolder.Internal.Tools.AOLlanguage;
( i; W' X' o" c# ]9 C0 `2 s8 N0 S/ [' R        if current = @.Destination -- else return
! K: l) X2 T  f1 S        then
; f: [5 v5 x7 H- Z" L9 K( s                @.Destination := void;
, d/ y+ C% y2 E# P" |" L                if @.occupied then+ r5 |; n0 F& m) h
                        part := @.cont;, Y$ E# z6 o  X! i) O
                        @.transpOrder := void;. Q9 D7 ~' Q5 Z/ V
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. q& w: B" [8 Y4 W3 t2 i0 ?  n4 s$ W                                @,root.eventcontroller.simTime);$ P+ `9 U4 Q0 \5 z: b/ q  `0 m! h4 x1 z' @
                        @.HasOrder := false;
2 P7 w% \: b4 A# ^! J                        @.DrivingHome := true;0 i+ |' w8 ^* d9 Y3 S
                        rgManager.tryToStartTransOrder;' W) M! a1 ?  h
                        if @.Destination = void
+ I6 D, `1 {/ v  ?' q                        then -- no transport order for vehicle @
& u1 |# }; h" G                                @.Destination :=, A# k9 d' l+ g1 i4 R
                                rgManager.nearestFreeStation(@,track.~);% m- r$ ~! A! \1 P2 J
                                newDirection(@);   
( K" i' c  a  u# X, H; w                                if @.Destination /= void then% u8 e  R4 x* T' i, I
                                        @.Destination.NumReservation :=
+ |" o) N; W' W! B9 B/ o                                        @.Destination.NumReservation + 1;
. Q% {$ E* m- w1 {. R                                end;5 c/ j# ]- Z+ G7 u- G5 E
                                @.CurrIcon := "drivingHome";
) W4 i7 T* B* p6 o: e; F                                @.DrivingHome := true;3 i6 ?" G& b  `- w  H
                        end;% N# {$ [/ I4 }, w- G, a
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! t- T5 }" f9 s0 q                        part := @.transpOrder;
  E1 w7 R# n" u  ?& ?$ N+ _$ k                        part.move(@);-- load part
9 @, t' F& C2 Q# }0 x                        @.CurrIcon := "load";' h. Z9 B: B( p4 o0 r+ m* e
                        GlobalDistObj := part.globDestination;& K# n% @0 _& `$ k: a# X
                        assignLObj := rgmanager.rgAssignL;* Z6 s; u: k+ J4 Z
                        row := assignLObj.getRowNo(GlobalDistObj);# V( {% h1 |- V1 M; r5 W5 f
                        if Row = -1 then -- since 70
2 g; d' v( {5 v& j  E                                if lan=1 then: a0 [  p$ p9 u  ~
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% }  ]: o; H$ d
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
8 Z9 e3 P" f( E5 V. a% C$ H                                else
; a; a) v! o* F9 e                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) f6 s6 G% v+ N2 _3 q  [3 ~+ B
                                                to_str("in docking station: \"",?.~.name,"\""));                               
7 {+ M2 {, q9 j                                end;
) b$ b, t/ C, f3 y6 m. x" y                        else, S1 u& V) e. ^) W
                                @.Destination := assignLObj[1,row];: _* I5 u0 w, K! f9 A  U& A
                        end;                       
7 e$ R# Q* y* M                        newDirection(@);
. W6 `8 p& L2 c! m6 t3 b' V4 f6 L! G                        @.HasOrder := true;
7 A+ ~0 f4 \/ T- D, a# l0 B7 N                end;
- f) o6 U; H6 Q" @* i; H) P7 ^/ l        end;
8 n8 I1 Q" c6 h3 P8 mend;        -- of the method- y9 g5 O# t- F, s
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 2 A6 Q: |& M9 [; E1 x7 B9 c
4 d5 W* M2 q, v  |, ^
这是AGV_putin中arrive的method。! E/ h% @& d7 ~$ m/ [& F
0 O3 \2 A1 f  W
当到达物料速度越高时,这个报警更多,
2 C2 c( J! A6 p% r# l0 g可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
% j3 x" G' Z0 \程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
( X5 E( p- ?. \
& |3 a( o2 f+ j# B另外一个小建议,就是move,所有的move都可以这样
8 v4 {  v* g/ y6 Q+ V7 O/ xif not move() then debug end
  ]3 @2 S" l+ i+ l这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
1 R3 h3 ]6 d; }% v$ Xplant simulation中的free libraries有AGV模板,
- z1 ~$ c. W  U2 g% }% C0 H里面也有案例。
# @* t8 Y, q/ }4 h2 m3 k& z% E我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。$ a6 s/ U. j9 N% C5 q
* L* ^8 \/ R  E3 W  D* a* h
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 Z- s( U) v4 Y0 U; ?- ^1 Y% H5 K0 J* j) ^" C$ A3 c7 h
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 " t2 J" \7 P6 ^" G# |3 i" R
这是AGV_putin中arrive的method。
) _) {0 ^3 u' [, T0 }
: ^4 ]1 n5 i; E9 V; [* F9 k3 j当到达物料速度越高时,这个报警更多,
6 N9 F" T+ |8 M' h+ K' U1 ^5 K
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-21 12:54 , Processed in 0.018619 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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