设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8875|回复: 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'
( y$ h$ x, }, K* p4 S*/( A, u' _! B, X
is) t* v2 z9 M7 `! ]6 c1 D
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# b' Z! m2 e4 z4 jdo
; s1 b+ [% Q6 q3 U! A' h        Lan := rootfolder.Internal.Tools.AOLlanguage;. _/ O" z/ A" B  y  ~
        if current = @.Destination -- else return) y! L4 q; B9 P2 G2 ]2 q
        then' r& ]! f7 I1 I& z" x: y0 L
                @.Destination := void;6 G9 b6 z* R9 _. x! ]- E
                if @.occupied then* p+ `) H$ |9 s/ w5 T2 i
                        part := @.cont;
0 D. _* N$ n  H6 T' w) Z                        @.transpOrder := void;* r/ n  n; i& m+ _# q
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- t* Y% L# h5 d: ^' n- A% w& n                                @,root.eventcontroller.simTime);% e0 K3 w: x! b# }
                        @.HasOrder := false;
$ H' j  k+ f1 j/ V/ j                        @.DrivingHome := true;
9 [6 U$ W. O4 d/ k. k7 C                        rgManager.tryToStartTransOrder;4 W1 A5 }/ l* m' I2 t
                        if @.Destination = void5 l. g3 H- ~/ l" [& w4 _1 i
                        then -- no transport order for vehicle @
" C1 N" t- ~( C3 G: s7 e  T                                @.Destination :=
0 o! I# O  D" ~$ o; t+ W& o0 O                                rgManager.nearestFreeStation(@,track.~);
- [9 T# D: z# \0 r                                newDirection(@);   
# Z9 w8 c0 r9 `# G$ G  K                                if @.Destination /= void then: R) e% G  |3 w1 d* U
                                        @.Destination.NumReservation :=
+ X" [4 a6 H; X/ p% ?                                        @.Destination.NumReservation + 1;# s1 p% T3 _- ^5 o4 J
                                end;
4 k3 M: J5 ?8 T  {* G+ W                                @.CurrIcon := "drivingHome";6 W' N/ S- f8 E/ Q& I+ K
                                @.DrivingHome := true;) r$ R4 G( D/ I: a* ]
                        end;( f. W6 T$ L) Z6 F- M, d% }
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station' ~: B, H( `; j: b2 x: O! D
                        part := @.transpOrder;) r$ T- b( T- ~4 I; v' G$ h5 n
                        part.move(@);-- load part3 w  }9 `: }+ D
                        @.CurrIcon := "load";
; V6 E3 I' D& n+ K( P* P                        GlobalDistObj := part.globDestination;
  k6 c$ v+ r0 ^6 Q' t# Q" T! q% c                        assignLObj := rgmanager.rgAssignL;9 }4 ]- O3 Z" ?4 m1 v9 J
                        row := assignLObj.getRowNo(GlobalDistObj);6 ~6 O5 Y8 \3 `' H  m) A
                        if Row = -1 then -- since 70
7 h4 B: }4 f3 A$ ~6 |                                if lan=1 then" p* G$ Y/ U/ z; R( b4 k6 M
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' [% |8 o5 N% ]
                                                to_str("in der Andockstation: \"",?.~.name,"\""));9 Q0 s0 v# n1 j- D6 k
                                else
$ J# n; J* [# z! f& U2 t4 e3 ]5 T                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 x4 K4 E9 n5 B0 A. f/ ]                                                to_str("in docking station: \"",?.~.name,"\""));                               
6 a  b4 C( Q7 T& p! f! k+ [" ?# C                                end;
, n4 T1 L% v. v" n                        else
/ z8 I; q; I$ }5 `; H( S, v& n0 u" s                                @.Destination := assignLObj[1,row];
  k; t0 `1 D: K2 c% b/ w2 i  r+ \                        end;                        $ K- d% f( t8 @: d% [4 \
                        newDirection(@);2 K5 C1 S" \2 @6 N9 K5 E& n
                        @.HasOrder := true;0 g, [! k, b$ e) C
                end;
( ~2 n, E$ s' x2 S' a        end;
  ?8 w' a; H7 p+ ^1 ?; Kend;        -- of the method$ \+ ^" {8 j; c4 @2 t
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
- R9 n6 z6 d/ W8 G8 o) l) c4 c1 j# X# p. ~
这是AGV_putin中arrive的method。
, f6 B2 E$ G. r. A& |
' F! I' W7 S4 x2 K% ?+ B6 C当到达物料速度越高时,这个报警更多,
% F' R5 K' G8 D% B8 B7 {可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。9 B: x' V; R+ s$ y' b
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
% x6 ^" d8 s* h2 d
; ?' ~; I4 x# T: N另外一个小建议,就是move,所有的move都可以这样- }; }- }! g( b) b$ L
if not move() then debug end7 V# P8 ~6 q% S5 W$ a
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
! E# I- V- U- c3 i" B  w2 jplant simulation中的free libraries有AGV模板," v% \- ~0 p; z6 k3 {6 r
里面也有案例。5 x+ V( y- m# T2 o: F
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
, E8 U  g$ O/ ]: z- p$ `$ e
" \! P6 F9 _, E3 q我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 7 R0 v8 d' p7 w2 _% n

* j6 c! [; r* w( ?; F* {7 ^" P  b那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 4 l4 d0 u- L6 F3 e  k& h& c2 a5 O' Q
这是AGV_putin中arrive的method。
% E. G' t! p0 B$ K5 A5 ^& f2 V
' x3 h7 o4 R6 r" q: x: `9 P当到达物料速度越高时,这个报警更多,

' P: L- I+ R7 J* L  j另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-1 18:51 , Processed in 0.016151 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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