设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7918|回复: 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'
+ M$ k* A' ]7 Y$ A) V*/
" M" Z; w$ I5 @" Mis) p7 j- v) x5 M% A
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' B$ e! J  q7 ?3 m$ r( m5 p3 w% |do; u8 ^! t6 J# |* N1 l: f
        Lan := rootfolder.Internal.Tools.AOLlanguage;' j% e+ C$ S7 E
        if current = @.Destination -- else return$ [5 B& r: f% x6 \9 C4 C' h
        then
; \$ u: o) O* r9 Z2 H8 Q: a. m$ ~( Q                @.Destination := void;
* q9 X* @2 x6 ~# e& f& U                if @.occupied then
& m1 e6 F% k, `& ]7 j* ~2 C1 W6 o                        part := @.cont;
+ b7 N, }( C: g; n                        @.transpOrder := void;4 h: ?/ [/ X- {! V" V
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 h9 l7 C7 h2 C. \) g+ V! u                                @,root.eventcontroller.simTime);  ~! h  {9 `8 q$ d! n6 h
                        @.HasOrder := false;
: z4 R" R% w) |, D                        @.DrivingHome := true;
% N& u( b1 `8 ~- J                        rgManager.tryToStartTransOrder;( J3 B6 B& q( k8 T5 p: A1 s1 x& h
                        if @.Destination = void) v9 G/ B: Y  G8 ^, h
                        then -- no transport order for vehicle @; o  d, w$ O- u2 B- t1 ]
                                @.Destination :=+ V0 |% ^' `' ^& _% n& i' U
                                rgManager.nearestFreeStation(@,track.~);
, U  ?. C. i; D                                newDirection(@);   ) Q" \8 y6 s3 v3 f: T; t, h
                                if @.Destination /= void then' Q& _: _5 q* E# p7 E2 m
                                        @.Destination.NumReservation :=7 h: N% P6 @' d
                                        @.Destination.NumReservation + 1;  E, O3 \2 @. q* y; s6 S# N) @
                                end;
- h* w: _- i9 H7 E) ~/ R                                @.CurrIcon := "drivingHome";4 w, `( @% Q  n% z
                                @.DrivingHome := true;6 Q! ~: @& t( p: a/ k
                        end;
, A2 d# j) x# H* O" D3 L2 @                else -- the vehicle @ is empty, both vehicle and part are in the same dock station% H; A7 K" R5 ]9 c0 K* m" [
                        part := @.transpOrder;7 z" T4 s4 O: s, t9 q' O0 X
                        part.move(@);-- load part
2 F7 D8 {0 M6 K; \                        @.CurrIcon := "load";
) }' i9 l" _! s7 J  X3 s                        GlobalDistObj := part.globDestination;
3 A: T0 ^  @0 S4 u" ]2 h                        assignLObj := rgmanager.rgAssignL;+ u. g7 i4 s$ N/ ]
                        row := assignLObj.getRowNo(GlobalDistObj);
; Q5 ]& ]2 f5 I, y: X                        if Row = -1 then -- since 709 N+ I" l+ T3 e7 q9 |$ {( b" n6 g7 d
                                if lan=1 then7 [0 [5 }& j) M/ y) B$ m  t5 l8 v
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* q( a6 @; s: ^$ _9 u                                                to_str("in der Andockstation: \"",?.~.name,"\""));% R1 v1 O3 D* k( ?& u
                                else
' N0 [6 H  m% L# u                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. _5 C% \6 x- p* M7 V: D
                                                to_str("in docking station: \"",?.~.name,"\""));                                ) L+ X: H) P9 ^2 \
                                end;
& W7 c8 V- h( ?' e0 _                        else" Q2 i, x1 @) j7 t( {9 Q
                                @.Destination := assignLObj[1,row];
$ u9 S0 M1 t8 M                        end;                        * K( \& p+ x, i$ t) |' g
                        newDirection(@);1 J7 S7 p) r) R
                        @.HasOrder := true;5 C. m9 Q) m4 n$ Z7 m& Q0 N
                end;) I: p. _7 o% U4 ?: o8 ^
        end;
( P; F# [: @2 H  X$ O) mend;        -- of the method
2 P; N( \' d" u. ^/ g- I
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
  y+ b, S- B7 b; o/ N5 i5 N; x* [8 a! {% Y
这是AGV_putin中arrive的method。
) Q, @7 R3 Q/ X6 I) F# F9 P* P7 s- s5 u
当到达物料速度越高时,这个报警更多,
" c3 P( ]7 N, V可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。- ]% j3 ^- |) t% w% H# o
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
! c- R6 ]0 S4 [
3 ^; d* v6 L2 i9 W. v! w" r另外一个小建议,就是move,所有的move都可以这样% o0 ]- `8 J2 s: K" G" ~6 X% i3 I% c
if not move() then debug end3 W) W8 o% c& H% |$ o0 U4 H  G' N
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
% @4 J" X% G0 q% f$ |* Xplant simulation中的free libraries有AGV模板,
5 ^/ x$ o: ^% W8 f0 w3 m里面也有案例。
& y5 T; w5 L/ r" \我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。: s% g  f* F0 m8 l$ U2 }5 k+ A  f' ~

7 ]5 Z' f! w& `2 v9 B) J9 H$ H我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑   g. B2 K7 o, W: I) X3 D
# N0 K1 X: }7 ?$ G& B3 y
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
9 W8 e4 x( n, U. X7 f; b这是AGV_putin中arrive的method。
) `. X/ U  t" \) t/ p
. l5 j- U/ _! ^0 I当到达物料速度越高时,这个报警更多,
" M0 A/ v6 N, h/ c" [
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-5 16:27 , Processed in 0.021182 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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