设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6130|回复: 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'
5 H$ ]$ O3 p& U* v* D) i  O*/
: u/ P3 e  p/ N& }. m/ _, Dis7 o- j$ E' P6 x9 u0 g$ p
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;% u" E4 ~; T' f; Z/ |- o
do
1 D4 g9 ~$ b1 X: l: h5 s4 R        Lan := rootfolder.Internal.Tools.AOLlanguage;$ ?' s$ U& r  i3 v1 Q
        if current = @.Destination -- else return
+ l# q0 Y1 ~% q& ~" @' _; K0 w        then
8 C: L9 A& t8 t1 P; p5 x                @.Destination := void;. q* j/ U# f( Q/ l* d  j7 j' b* c
                if @.occupied then! \5 E, R9 v" ~7 @- g* o9 @4 y
                        part := @.cont;% `9 o" o/ t- Y. `9 n
                        @.transpOrder := void;
5 }  N5 {7 ^9 m% v4 \5 @  [; Q                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 R9 |: \5 f2 L$ o                                @,root.eventcontroller.simTime);$ v+ N' J" `! h% S  a% \) G
                        @.HasOrder := false;- C  {1 D6 B. G: d* i0 ]
                        @.DrivingHome := true;( c0 |( i; K  J4 v' t7 w/ c
                        rgManager.tryToStartTransOrder;
' H$ @$ r# ]2 a2 e% F                        if @.Destination = void9 p8 w% W5 J8 s& E
                        then -- no transport order for vehicle @" H% \; h9 [- t
                                @.Destination :=
" x$ A4 i& Z/ U: h                                rgManager.nearestFreeStation(@,track.~);3 ^1 W4 f' v1 T: T5 G2 z
                                newDirection(@);   
, ~  v: @+ B9 l* \4 l1 M6 ^: Q  E                                if @.Destination /= void then6 C8 v+ d. F- b9 V  A
                                        @.Destination.NumReservation :=
2 g4 c! u9 T9 I8 X                                        @.Destination.NumReservation + 1;: s: b7 d2 t: \+ C7 r$ ?# v* Y* Q
                                end;, X7 W9 Y+ M  R4 f( N; x$ w! v
                                @.CurrIcon := "drivingHome";4 W( h# g/ |0 [( i
                                @.DrivingHome := true;" P. G# W) y& A0 N. S% J
                        end;: d( L) P1 N3 l5 a- H3 f7 }
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# {# I: C% U7 s8 a( C+ h9 C2 p                        part := @.transpOrder;+ v% j: f+ r! d9 ]2 y/ ?, W
                        part.move(@);-- load part' J+ {. k4 o: V1 R  s
                        @.CurrIcon := "load";
5 _% S/ @$ c+ x. Q                        GlobalDistObj := part.globDestination;/ r8 Z  a$ |4 j- n
                        assignLObj := rgmanager.rgAssignL;0 H* }" b( c' x
                        row := assignLObj.getRowNo(GlobalDistObj);# ?$ O4 `$ {/ @! f% \* v( v8 u
                        if Row = -1 then -- since 70% f, E+ E6 L& N/ P1 [' H: x
                                if lan=1 then1 l4 ^3 B/ F4 g, ~
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; o1 ^$ F+ }# Z" `- p6 \                                                to_str("in der Andockstation: \"",?.~.name,"\""));
: n. M: Z5 g8 k7 i1 {                                else0 i( r7 E: B+ D$ |. }( V
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" U* T! W, R/ X0 l3 M                                                to_str("in docking station: \"",?.~.name,"\""));                               
. `2 b# B( ]2 H5 s, d                                end;
  ?$ c: I( e# w: f$ M# E& h$ Y                        else3 a4 A5 \& \. L* y: c& F. P( R& C
                                @.Destination := assignLObj[1,row];
) R! J3 d: c" L3 S" o- A                        end;                       
8 I6 p* {6 i) G                        newDirection(@);
+ r) z0 }& p3 P                        @.HasOrder := true;
* k1 C2 L* B1 V) H( C- H                end;
) B8 Z" p- u1 [+ `4 W        end;, }: N% b* f: X$ U
end;        -- of the method
/ |# W0 G- M5 ?4 y  p" ?' w/ O
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 8 ^- C8 O$ t  S# a# m- e5 K

# a; G1 Y* d, v& E, d这是AGV_putin中arrive的method。
4 s2 S+ _. @; l1 H8 @- b0 y# I- s; y2 P) L# P
当到达物料速度越高时,这个报警更多,
( s4 a; h# F4 ]; M! U+ b' P可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。# U! p- Y3 ?4 E5 D* A5 B
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
( G) u5 k/ n/ S9 y! H- _! i# f4 L# C/ U$ D0 p! _$ e
另外一个小建议,就是move,所有的move都可以这样0 B' H1 h. w6 ^
if not move() then debug end) k% ]4 r3 @9 {1 _4 g! X
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
! M; R; v7 e9 x7 D; gplant simulation中的free libraries有AGV模板,3 q1 A5 m0 C6 V
里面也有案例。8 V+ O4 n0 H$ \" E% D
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
( T$ Z6 \1 V* V
; [, {  m9 H7 c* {- j! t我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
2 P, m* L9 y" g1 q( T$ i  @
9 P$ ~, p# z5 P8 ]9 [那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 + E4 b; {- D; m/ N/ p' Y
这是AGV_putin中arrive的method。
: ^9 j8 f4 f7 \2 U9 }$ e# y) b9 _5 k: P
当到达物料速度越高时,这个报警更多,

- v7 Y% Y* G0 y; \- m+ A! e' e另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-20 05:30 , Processed in 0.018662 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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