设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5597|回复: 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 O4 Z* W2 b6 ^4 b5 c5 U
*/
" x6 E9 S0 l6 ^/ e- J3 Yis
  T2 ^% s3 l& @* e& c2 f        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
  S7 H/ l! R. H8 B( N  Q- Xdo# A& `: i, `- R; b& J. B" p
        Lan := rootfolder.Internal.Tools.AOLlanguage;
2 }( ]' G4 @, N* p        if current = @.Destination -- else return
" L" M" _# f) m- \. o; k- ]5 [7 O        then
7 j( r( l7 C# V2 Z5 u                @.Destination := void;4 o0 [0 \3 [2 b7 |$ V; L
                if @.occupied then1 n/ P5 l) w8 @; [3 {+ J% a) ?
                        part := @.cont;
: K$ y4 H9 s. U  [/ u. Y                        @.transpOrder := void;
. v: R) t( y5 v7 C8 E3 M/ h, }: Q                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 P+ Y2 T! t" q1 f) L" C, l1 d  I0 r                                @,root.eventcontroller.simTime);
* k% r' w0 w5 d4 q  \- k' e. ^% K                        @.HasOrder := false;+ G6 f$ q$ L. e6 X; L, S6 U
                        @.DrivingHome := true;3 Q  q  b4 s: g5 N. |) w; A" K  V
                        rgManager.tryToStartTransOrder;
$ A0 ?' g! Y5 {0 e: V; O                        if @.Destination = void6 j3 ^1 ^& {( |/ @
                        then -- no transport order for vehicle @9 H8 Y2 W9 S- {
                                @.Destination :=. g- c) a4 k( ?2 }* |
                                rgManager.nearestFreeStation(@,track.~);
, E$ |; Q; a- C2 i% D' u                                newDirection(@);   5 h' y1 h6 }. k* \* F/ |+ r1 t) v
                                if @.Destination /= void then
7 s  P5 J7 o/ S) _. R  g' |" A4 X                                        @.Destination.NumReservation :=, g+ l# N0 ^0 }) N& d
                                        @.Destination.NumReservation + 1;9 g. W4 Y6 `0 e0 m6 Y
                                end;* i# \* N  l* B' N& J. x7 i
                                @.CurrIcon := "drivingHome";- P/ x$ F) k6 {, J: \4 h
                                @.DrivingHome := true;  u0 j8 ~3 G2 s& B% [- Q
                        end;7 Q- M; l: o5 x  P9 G, v
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ _2 s( N' A1 V% T6 Q/ x                        part := @.transpOrder;8 U- ~8 V: i' n4 I" b; X; K
                        part.move(@);-- load part
$ }) ~7 z, }4 X                        @.CurrIcon := "load";
" D9 H2 H" Y% `) d                        GlobalDistObj := part.globDestination;
* A3 u) |# ^6 S, O5 F* A  B                        assignLObj := rgmanager.rgAssignL;- V# U0 X. x# d) t: H: a  P
                        row := assignLObj.getRowNo(GlobalDistObj);
/ V- u& P: z6 y) _/ R# @5 s: M5 J                        if Row = -1 then -- since 70: C; c2 g( v5 K/ Z8 l/ @
                                if lan=1 then
" t! y0 t3 m8 {4 |                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" E2 J/ b+ q6 C' `                                                to_str("in der Andockstation: \"",?.~.name,"\""));
1 Y2 d* e: D0 u4 W                                else
4 ?. F" N- C) g) L+ S7 O- f                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# m2 q9 n% M$ e, c% {5 `- r& Y: S                                                to_str("in docking station: \"",?.~.name,"\""));                                - }; p4 I2 f; }; W$ v
                                end;$ `& _" Z+ y( Y! q
                        else
* C4 ?: I3 q0 |0 e& d1 D1 w( @                                @.Destination := assignLObj[1,row];# }9 j3 g+ B* l3 L7 c1 r
                        end;                        & ]$ B' z9 d% V, p& [( [6 A, r
                        newDirection(@);
0 ?. t2 ^& G# a: g* w9 H" j                        @.HasOrder := true;0 }( d4 s1 H0 t0 y/ m7 z
                end;
, B  F8 T2 u. @2 J2 Q* o        end;5 m$ p4 _& W' f  C7 P
end;        -- of the method' I+ j8 M/ w% P! J1 S9 p5 S+ W
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 4 d2 }+ P- C# s% B0 i8 l
( U* w  z, P. b7 ^
这是AGV_putin中arrive的method。) I1 z3 g+ K) X6 S' I2 p5 a. M

- K3 F! i: T7 H5 e8 H  q当到达物料速度越高时,这个报警更多,
  Y3 f5 J8 F# I1 R可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
- S3 T6 N& t3 |7 e4 v1 ~, l程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?8 A9 I8 g9 o4 o1 B3 f9 T( A
7 D! U2 H/ x/ Q) z6 {
另外一个小建议,就是move,所有的move都可以这样( Z/ s2 Q' H# ~# n: W
if not move() then debug end
9 R0 D7 o( H: X) Q) D4 i这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。/ o- k4 B; I( [
plant simulation中的free libraries有AGV模板,
$ T: n0 `  \# g2 N$ ?, E里面也有案例。
) D0 A% f1 L3 e我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。1 Q' E/ M) Z: t2 M8 w' I8 ~

- t; k. X' o1 @$ a  K我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
5 g* {. }" Y7 l
9 T5 O4 N" y  N0 R8 r3 M那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 & r% J! b6 T5 G8 b) m- T1 W
这是AGV_putin中arrive的method。$ I8 [7 R1 U7 {1 v/ \: P/ e
9 p9 O* j6 b& t5 z) h
当到达物料速度越高时,这个报警更多,

6 L2 a% f3 U, T- H* F! U另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-8 01:16 , Processed in 0.019461 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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