设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8973|回复: 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'! B: o% [$ V3 W3 `4 \
*/
1 C$ A& @% |0 c( l6 ois" p+ Z3 I0 M  C0 |0 W
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;) [+ d$ @; v3 U+ B; [$ @
do* _- z. B3 U; ]) e7 ]
        Lan := rootfolder.Internal.Tools.AOLlanguage;
9 k& _1 x% u$ d, n        if current = @.Destination -- else return
+ R  s2 B) n( f. r+ I9 y1 z7 W- ~        then+ h# D9 M# V" m9 r  d4 N
                @.Destination := void;
# r7 i% g& E5 H% M% @* N                if @.occupied then5 Q5 M; [8 V9 k: ?4 t* k( r7 _
                        part := @.cont;' b6 z* [/ _) U9 c. g+ {# w
                        @.transpOrder := void;
: H% y, F1 @9 H- Q: f1 v" w% Z                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. A2 j7 E- S) H4 X                                @,root.eventcontroller.simTime);
2 |* F& b! D# n  o! |, U                        @.HasOrder := false;
* T& E8 B  F  r6 r" G* Q                        @.DrivingHome := true;# o2 G+ w1 g! B# {1 W3 H, V
                        rgManager.tryToStartTransOrder;
. {& |) g0 b4 b0 n9 x                        if @.Destination = void# B( ]. T: f( R
                        then -- no transport order for vehicle @+ z7 `6 [/ Y/ _$ g, V
                                @.Destination :=
, I1 ~! {  T7 R6 d. b) m( i5 E                                rgManager.nearestFreeStation(@,track.~);
5 s/ N9 z4 I8 h. |( r6 P                                newDirection(@);   " v5 Q- q5 y1 x8 b
                                if @.Destination /= void then" _$ d$ M4 P& ~( c; a' d: k; c) o
                                        @.Destination.NumReservation :=
, Q/ l" E. c; X6 h5 D5 \                                        @.Destination.NumReservation + 1;' k4 {2 z, K3 f
                                end;
. h: y7 h9 A- C: m! Y6 N6 z                                @.CurrIcon := "drivingHome";( j- t: O2 X$ w9 ?( r
                                @.DrivingHome := true;
9 K' ^8 C. P6 w$ ^9 Z0 K4 O5 l                        end;
0 {; F/ ]8 h  [  z* n                else -- the vehicle @ is empty, both vehicle and part are in the same dock station# y/ @4 X. B, s" n+ H0 c
                        part := @.transpOrder;
  J( G0 N' H$ T                        part.move(@);-- load part
) x% ?7 D0 n" h$ |- U                        @.CurrIcon := "load";
# [- Q# |- ]' s8 W                        GlobalDistObj := part.globDestination;; r% \1 T3 J4 Q3 L# ~( T* p
                        assignLObj := rgmanager.rgAssignL;7 l+ h: h8 Q( l
                        row := assignLObj.getRowNo(GlobalDistObj);4 l# l  ^- j+ Q3 Y; B1 g2 `
                        if Row = -1 then -- since 70' A9 o8 q2 A7 Z' M
                                if lan=1 then
4 ]  F- F! l% j7 P                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* O* b/ N5 _2 w( T. N1 D0 E. j                                                to_str("in der Andockstation: \"",?.~.name,"\""));; \% Z% R* ]7 o4 W
                                else
: L3 o& E/ C  ]" ]* D                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* ?5 T, d2 r+ u
                                                to_str("in docking station: \"",?.~.name,"\""));                                & Y# l8 i5 V  `+ m& o2 k
                                end;& u2 ?2 ]# M6 L3 v
                        else# `0 a1 |" C) @$ v% S2 v; l" w
                                @.Destination := assignLObj[1,row];
3 \! T$ k5 V0 H! Z6 g& z                        end;                       
( _. o. u  C" L4 G                        newDirection(@);
$ m& C( W/ P6 H. w9 L                        @.HasOrder := true;4 t" ^+ E1 N+ }5 D: W4 W& N
                end;
+ j3 ]" l; R% H6 F$ _& R" i        end;
) C% C8 `5 i3 R' Q. cend;        -- of the method, b, e8 w2 s3 [9 E4 {8 p
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 , _, p4 m, C$ E; f% Y, |
' I8 O4 [. G3 H3 X( b' X
这是AGV_putin中arrive的method。
* R! Q' J3 W3 p% _8 o- i# Q& A* ~
5 p& j: n) R1 `. ]当到达物料速度越高时,这个报警更多,2 j; Z* A7 V" V5 t
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
- `! N* |  {; v8 e5 k程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?6 O- Y7 X( o3 j) k

( [2 z6 \8 V9 Y9 _+ B& q$ `另外一个小建议,就是move,所有的move都可以这样! s4 j2 z2 W, M8 ]2 ?0 Y5 s/ D/ M
if not move() then debug end. h7 p3 U9 z) l" ]
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
0 O( m4 h% v" w3 `  F6 P# f* Y. Gplant simulation中的free libraries有AGV模板,7 c0 I* i: x9 A
里面也有案例。+ Q0 \  b5 C" b' A" e
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。/ @' s0 j' h: l1 ?' O. a
$ @2 Y; A, d1 c' M) g  S* G
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
% m& K1 A; m, |5 m
' r/ |4 w* v2 S7 X& {/ }5 {7 j那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
) z/ q5 a* M: i4 V5 T# U" |1 _这是AGV_putin中arrive的method。5 T8 m% Z9 J$ W/ Z# J: C
7 Q( p) Y0 T; S% S4 x  _  |
当到达物料速度越高时,这个报警更多,
/ f4 t7 C# c9 T% S4 i
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-6 21:39 , Processed in 0.016612 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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