设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6202|回复: 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'
3 x: {; [/ `) R1 ~4 P*/
0 f9 o! _0 b* s( J( {- sis3 }3 e$ T1 ?1 B3 z) K9 X
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ M$ X3 v4 a/ Ldo
9 i: ?8 t! L7 T2 I; f! W        Lan := rootfolder.Internal.Tools.AOLlanguage;4 c) W! V$ O- R
        if current = @.Destination -- else return
* Y6 [6 X7 `, [0 x        then
. o& f, |1 U0 r% b: i% x) L                @.Destination := void;
+ k2 i2 W8 G: q- Q                if @.occupied then
8 o% w& u2 W! B) B4 E* c                        part := @.cont;4 k0 B- Z! i6 l) K
                        @.transpOrder := void;
3 N( `9 F2 I0 p2 F                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) k0 m& x6 J+ H- d+ a5 O
                                @,root.eventcontroller.simTime);
, ]9 m5 m: J9 J                        @.HasOrder := false;1 g& f7 Q  q" f
                        @.DrivingHome := true;- V  ]( p+ G/ E' c: O& O  Q
                        rgManager.tryToStartTransOrder;
3 C) \+ t$ Y/ D( s& g                        if @.Destination = void
+ A& V+ }) Y. ]9 f" w4 o0 T& E/ S                        then -- no transport order for vehicle @! H: ~8 c4 b0 W2 Q
                                @.Destination :=
$ _0 A2 R7 @8 f+ @6 u- a; V                                rgManager.nearestFreeStation(@,track.~);
9 s9 e! T2 P7 j$ Z, \" r0 ]! R                                newDirection(@);   , Q# s; E2 [+ K2 G' ~
                                if @.Destination /= void then
0 R. u2 @! h5 o! v, o# X2 [7 j                                        @.Destination.NumReservation :=" e; i4 T8 l1 Y% R- W- z) i- s
                                        @.Destination.NumReservation + 1;: p( O8 V3 m5 e: y  P* A- c' B( G" A
                                end;* \5 k8 W" M1 E* Z* t
                                @.CurrIcon := "drivingHome";
) w' j# k% v# D                                @.DrivingHome := true;: S0 K/ ?% u# U
                        end;
0 z8 q6 u# x8 E3 u) }, @4 e) z) p$ v                else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ m  e( q$ Z& `1 i
                        part := @.transpOrder;1 V( G5 y% C% d$ S
                        part.move(@);-- load part
0 z" ^# d( R8 s0 `# b- B                        @.CurrIcon := "load";- h9 T6 j: a. c2 f  n
                        GlobalDistObj := part.globDestination;
2 z. }, j4 o3 U- Z                        assignLObj := rgmanager.rgAssignL;9 c- A& x, Q1 j. C& @9 `( n
                        row := assignLObj.getRowNo(GlobalDistObj);
* Z) ?3 }4 B2 n: i7 u1 Z0 S                        if Row = -1 then -- since 70+ [9 y# J$ E9 H$ L7 k
                                if lan=1 then5 L' J- X9 V: X. V
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ z- M! C8 D+ G7 M1 T8 T                                                to_str("in der Andockstation: \"",?.~.name,"\""));! {" h' n2 E& w
                                else
2 T5 N. w7 y4 n% a% M2 n+ g9 Q                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ `4 s5 m& I( c- {; K( R
                                                to_str("in docking station: \"",?.~.name,"\""));                                % @6 o1 l4 B- I! \1 w
                                end;
- |$ S& Z+ K2 V8 \. h- g5 ?                        else+ D- I# q9 Q' B' v5 E6 i0 [
                                @.Destination := assignLObj[1,row];
8 r5 N2 h0 n+ p# i                        end;                       
) F+ \( J; X% H2 i8 R& U                        newDirection(@);& M; r4 s* e) |
                        @.HasOrder := true;& c4 R9 F3 f2 C) c
                end;
$ Q0 r9 t1 `& n! c3 e' h. p3 ]# g        end;
+ f1 _7 E& d4 z1 Q' F9 kend;        -- of the method! \2 I' P' _& N1 D' r$ \
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
1 \% U9 ]5 ]: E& v) Q6 e  v" U4 _
6 P; q8 Z) }4 ~2 }; n这是AGV_putin中arrive的method。6 u: ?' t* M1 Q. s) m
7 [+ O' y$ \  D" b& V
当到达物料速度越高时,这个报警更多,; `& J0 y. U; G0 f  x7 V
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。; N3 M9 d2 b( Q6 ?
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?& Y0 j; E3 P  g  N0 J. f
( h% B5 W0 _1 e( i- I4 i9 P
另外一个小建议,就是move,所有的move都可以这样+ _3 M# f9 k, a! E" f1 Z* }& {
if not move() then debug end  u5 `3 i1 e2 u% O% G/ g
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。: Y! w5 \1 X- |
plant simulation中的free libraries有AGV模板,- T# f7 I# }: v. U
里面也有案例。
$ ^2 z$ g' ^. X, y: O- q  n/ A我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
  F2 u8 i- M9 l2 F( i. a1 R  Y! H& @& P5 y1 s
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
7 w4 M' `8 I6 L% K6 j7 ~5 B6 T) I* f, @+ x! i
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
* h7 o; g6 g+ @7 w这是AGV_putin中arrive的method。
& V2 b3 J4 p7 P8 x' i2 D/ R0 v3 x2 K  J  m% h
当到达物料速度越高时,这个报警更多,

4 D) a9 g- M( h- Q6 t另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-24 15:12 , Processed in 0.021733 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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