设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6508|回复: 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'* [1 d( Z8 [3 o2 U) L9 M, E( X3 a
*/
0 g) j  M6 R. C$ G$ his5 e% x9 z+ |0 v8 J9 v3 f8 z
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 ?% U5 ]( j5 @$ t) e' Ydo
9 w8 A! N5 ]" n) k$ x        Lan := rootfolder.Internal.Tools.AOLlanguage;  X6 A! H% C: V
        if current = @.Destination -- else return
. D& k' B& c6 {* m; p) K        then
  w) a3 R% D+ E$ b# |                @.Destination := void;1 l+ b) w4 m- y5 y
                if @.occupied then
; ~& k: n4 X) w( l" p9 u8 @) P                        part := @.cont;
/ b$ D- V% O0 d                        @.transpOrder := void;1 i* S8 K* ?: x) \9 G; B
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 o/ S( C! g" q# T! ]8 n: j: S$ s
                                @,root.eventcontroller.simTime);
6 e" v/ R/ D3 k0 Q8 P" r                        @.HasOrder := false;9 v& l( ?- K+ b
                        @.DrivingHome := true;
# ^) v+ F) t3 \3 S+ C6 ^                        rgManager.tryToStartTransOrder;% M, l% T" U: D: o) P6 j8 c
                        if @.Destination = void( i3 D! _" V, n) K9 s3 w, w
                        then -- no transport order for vehicle @( Y8 |1 T+ J* y/ K+ e) R
                                @.Destination :=/ r! f9 R. L  e8 ~; l$ P5 }  d+ n  V
                                rgManager.nearestFreeStation(@,track.~);
* \7 T9 n; F% I' I                                newDirection(@);   # q4 X! i8 a* h$ y. Y8 w7 B
                                if @.Destination /= void then
& i* Z6 L# I" j0 I& I& _8 x                                        @.Destination.NumReservation :=; i# T% ^* y7 m/ @9 T* i
                                        @.Destination.NumReservation + 1;1 M6 f; [# a4 @0 }
                                end;4 U4 H  @& ]" T7 }- p: n
                                @.CurrIcon := "drivingHome";
$ F" C) Y- N+ Z9 r8 [% l                                @.DrivingHome := true;
5 C9 L% T+ P! V0 C  o  c; E                        end;
! J) @- ?; J! }+ Y% v" I                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; \, L5 @0 _0 S" V, X8 h" A* I                        part := @.transpOrder;
7 K( f: n& j. |6 M) e) I2 K                        part.move(@);-- load part2 m" k# o5 x- H1 v
                        @.CurrIcon := "load";  p1 w; p! V( s1 M1 ]
                        GlobalDistObj := part.globDestination;8 ]% g4 @; j3 T! s7 k
                        assignLObj := rgmanager.rgAssignL;! @0 |5 o( E. e# Y% R5 A' E8 b
                        row := assignLObj.getRowNo(GlobalDistObj);2 a) A* l% v0 V8 b- J: c1 M
                        if Row = -1 then -- since 70
( t& E' \3 t9 I# c- Y5 L3 G/ U                                if lan=1 then+ Y% ^% a; ]7 ]$ E0 s  g
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& M( t; x) l. x' i9 O; x2 a/ E' `* f0 Z                                                to_str("in der Andockstation: \"",?.~.name,"\""));0 B* y9 D" O& |, p
                                else
2 J6 |. g6 i4 i: ]! G; f                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& m+ T& {9 M; ^0 W7 K' X( }                                                to_str("in docking station: \"",?.~.name,"\""));                               
6 ^2 a/ y0 _$ M0 v0 u                                end;& e, A' Y4 |; j' ]  f
                        else
; A  g0 P4 |8 N) I. y3 R! t) I+ b1 Y; }                                @.Destination := assignLObj[1,row];) K* r4 w8 b& Y. |! T+ D$ X
                        end;                       
% ^' i  {+ U: L- ^1 b5 |1 C, s5 m                        newDirection(@);
5 |+ o$ Z8 T. y8 p  Z" j5 c! e6 Z5 }                        @.HasOrder := true;
' `' p, t0 ]( |$ C3 [- n9 _                end;% [! r, z+ ]! @
        end;
6 g9 t6 g! Z: n7 Cend;        -- of the method( Z, I/ {1 ^# R% ~" Q' P, U/ b. T
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
8 e+ t# q) @3 ^* G% S+ H  I5 z% _& Q$ _) {6 \/ d7 e
这是AGV_putin中arrive的method。
8 N( y# Z+ o4 X! R; E$ ]7 c+ ^9 [% c6 q$ [( w
当到达物料速度越高时,这个报警更多,
, `* S( C+ x8 P* D: n可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。* \5 d5 _) x' Y
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?3 A6 h4 e& R# r/ @; m

# ?( I- p, ~8 e; l2 U另外一个小建议,就是move,所有的move都可以这样8 N5 J1 _: S' w  ~$ A6 p2 W
if not move() then debug end
) O! _" \/ {; A5 l* N这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
: q! D/ H% X( P7 m7 Y& [4 yplant simulation中的free libraries有AGV模板,, Q" \/ @  j4 g( F, k  Q; @, T
里面也有案例。( e: N6 ?6 j, a+ q4 s/ h5 k
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
. L+ W" }; S+ K/ y) y0 C" g  @" ^2 A! l$ L. \
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
& o! U& b, n; {& e+ p7 O$ X$ w# g0 F% H4 h+ a- Q/ v
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 3 I$ C& v$ u3 J6 h) p
这是AGV_putin中arrive的method。8 x' h" J9 t7 h% I5 u

" ?" c& p6 F# ~5 N. z$ Z  R当到达物料速度越高时,这个报警更多,
' K( T2 u! {. Z/ r" a; s
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-10 03:37 , Processed in 0.015804 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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