设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8334|回复: 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'& R4 l9 B6 P5 k2 q! n
*/4 T5 ], h8 {6 ^2 [0 Y$ W% [- x3 O: @
is* d- B0 n7 h0 C7 d+ K
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;  i, [6 L* I! V. j
do1 h% a9 u* v& |$ B
        Lan := rootfolder.Internal.Tools.AOLlanguage;3 T! ]; }: m4 o" ^9 o! |7 J
        if current = @.Destination -- else return
+ ]6 N) I1 q. |$ \/ D  [# o6 @        then' u, K3 e# C1 {) r
                @.Destination := void;
. |9 S# z6 `' D0 Z% m0 F- w                if @.occupied then/ R8 r2 q6 z/ U) F; A
                        part := @.cont;
! e/ |% k  B3 ^                        @.transpOrder := void;9 I, X( ?9 z% z1 U3 ?# D  `5 r3 e
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* [# z2 ~' Y% g/ b
                                @,root.eventcontroller.simTime);; R! t6 Q% p3 ~
                        @.HasOrder := false;
* n( _0 d1 w1 i+ B0 _/ @                        @.DrivingHome := true;
7 j* P. o  |, {8 B, O0 C3 A# a                        rgManager.tryToStartTransOrder;
2 \0 H6 q7 t6 T% v; }; D3 E/ ]                        if @.Destination = void
3 S' J! K& A$ {) l                        then -- no transport order for vehicle @
' M1 o- W* Q, M                                @.Destination :=
. `. {; X2 m3 F% _, ?& C  B) f                                rgManager.nearestFreeStation(@,track.~);
9 c; h/ S% @  p" H5 F                                newDirection(@);   
" f8 l$ C' ?' P- F, }3 Q* O! R$ ]                                if @.Destination /= void then( x) @& R* B* L3 W
                                        @.Destination.NumReservation :=
$ `% a8 Q, k# k8 e, E% W/ P                                        @.Destination.NumReservation + 1;
/ z  J  y6 q$ ?/ \                                end;  }7 V: g7 ]$ o1 p5 X4 |3 W
                                @.CurrIcon := "drivingHome";
, a9 G$ F/ p6 p8 n7 W5 V4 m$ |                                @.DrivingHome := true;7 _/ t" T) C: R
                        end;9 y* B9 l2 t' W" @
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 k) ?% [4 `; z  d  f0 }                        part := @.transpOrder;
/ g0 ^1 t+ p  U6 U+ b  ~( V                        part.move(@);-- load part( f' h) M: C- r% m4 F( O- a4 a
                        @.CurrIcon := "load";1 p9 T9 X) O0 T$ `( R
                        GlobalDistObj := part.globDestination;
# `+ E' o/ f6 y! v0 H6 {2 P                        assignLObj := rgmanager.rgAssignL;* I( w8 Z# `) V0 U9 C; `1 N
                        row := assignLObj.getRowNo(GlobalDistObj);
9 f5 x$ U' l* h/ i0 x$ T$ o                        if Row = -1 then -- since 70. R3 K2 v4 r# i/ l7 b
                                if lan=1 then$ l5 |" m  f6 N. C- S' ~+ }
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* k; x, X; W* m8 k, u6 J; G! ~
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
. i& w* N; _$ Z) y& K                                else6 D& j' Q0 S+ a, }4 G, x$ k
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 d) P8 o, P3 L1 n
                                                to_str("in docking station: \"",?.~.name,"\""));                                9 Y7 s# E# a" {$ y
                                end;. f( S2 d9 p6 ^4 M5 Y
                        else
! l: H0 C4 e' g' c3 Z0 Z# i                                @.Destination := assignLObj[1,row];, @$ u1 N% g: N3 D
                        end;                       
: b3 `* \: p: q$ u% F5 K4 q. n                        newDirection(@);
# A* Y5 R6 v( A& Y8 S' \                        @.HasOrder := true;
, i6 `6 f( ~: L1 {3 v( w( R. k                end;1 y+ r% m0 i) f8 \" M) c
        end;; Z3 |! l8 |) v0 ~! q
end;        -- of the method
6 @! N. ]2 g, Q  P# K
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 3 Z! T0 X9 n; w- Y
6 U5 M1 L; f& d/ t! x, _* Z5 N
这是AGV_putin中arrive的method。7 @+ b- @# P5 S9 a
( n8 H0 Y7 q( ?
当到达物料速度越高时,这个报警更多,4 ?, S8 i& O: R0 L
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
8 }& `' ^8 t1 P程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
. Z) i: j0 j3 Y" A9 Z
4 Y2 v& v7 B& X* g. I, }  O另外一个小建议,就是move,所有的move都可以这样9 W" u/ x& d" r' v1 n% h
if not move() then debug end. H9 S0 L8 K0 O* s6 Y
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。0 t: x: c: n7 S
plant simulation中的free libraries有AGV模板,& y2 O! J6 k. Q
里面也有案例。3 w' T1 M6 c- d5 u3 p% F" _4 z
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
1 X/ X- B' ]2 j3 z+ t8 B8 g
, R3 \3 p: @- Q  t1 {1 z我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
5 P: ]/ G; d) m) l
/ l. w9 I. @# P  Z, l; R# ?9 A那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
0 [4 h3 J% f3 p$ K这是AGV_putin中arrive的method。7 r' a2 i  w3 X  H6 ^: `$ Z: m

6 A9 c, \! f* o& y' ?当到达物料速度越高时,这个报警更多,

) }/ e5 P/ \4 c6 L6 q: `$ R另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-28 11:06 , Processed in 0.017984 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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