设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9986|回复: 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'8 v: S0 B! }; W" E" ]6 C" T* f
*/
9 Q% \! ~" a9 @8 ~( R2 tis
5 \5 z4 Z* p, M) m  G1 A        part, GlobalDistObj, assignLObj:object;row,Lan:integer;; f/ \( v1 R; p5 x
do4 I, [% i: s7 A, H( f3 u% u, i
        Lan := rootfolder.Internal.Tools.AOLlanguage;' j& J- |, S1 e4 @
        if current = @.Destination -- else return
8 |5 r; _" d+ u        then
, S4 `4 S4 h& y9 \& O                @.Destination := void;$ v9 R- \) c9 ]! {% a* J: N
                if @.occupied then
& S7 g% c1 h) ^4 X* b# p3 J                        part := @.cont;
! D7 v2 F4 u. x4 t" D" B* z                        @.transpOrder := void;
! s0 o+ f" Y. {8 R* [                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; z3 {; a3 n& t9 Z* v- F                                @,root.eventcontroller.simTime);
8 H( `: h2 \, q. v                        @.HasOrder := false;" X2 a  j5 a" C% f" ?+ E8 x
                        @.DrivingHome := true;
, Z( i! p$ }( Z6 @/ p! [4 s& Q# `                        rgManager.tryToStartTransOrder;
; Z. \5 y. w2 }# B) z9 M                        if @.Destination = void5 `* O4 |' B' [1 r
                        then -- no transport order for vehicle @
( ?/ s+ n& t1 X7 ?! L                                @.Destination :=
7 |! q: ~# `7 O- `$ R1 f6 Z                                rgManager.nearestFreeStation(@,track.~);, l! M/ u* O/ _5 W+ V
                                newDirection(@);   5 Y0 y( U4 K  x, \" T5 x& j# U
                                if @.Destination /= void then
% Y# A8 ^/ \; L, D                                        @.Destination.NumReservation :=6 x& r8 o! Y7 h/ @
                                        @.Destination.NumReservation + 1;  Y% _; e; `" q( k6 J! \# ~
                                end;
% R3 H3 m; a6 Q. a$ M; A                                @.CurrIcon := "drivingHome";
. @& g/ e% D8 l                                @.DrivingHome := true;
6 E. [8 R: t$ h# a/ P% e8 V                        end;. D4 }% {7 m! i/ t& K& `
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station) [3 r3 |- x) O& ]( F. t: i4 N1 O
                        part := @.transpOrder;
; ]8 k, y5 |$ i2 K2 ]                        part.move(@);-- load part0 t& |6 A4 l+ O8 O) C( O% B, g' S, k
                        @.CurrIcon := "load";
" u9 u* Y3 ^. V7 R  O                        GlobalDistObj := part.globDestination;
6 W/ n6 s' e4 U8 t                        assignLObj := rgmanager.rgAssignL;
& N+ g# d0 f2 f$ q                        row := assignLObj.getRowNo(GlobalDistObj);+ V8 z; T  o% ?& F% Q0 x
                        if Row = -1 then -- since 70* H' Y) m7 t, P, u/ B+ k8 t
                                if lan=1 then
8 |( i% n# P3 w* G+ I                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& ?/ o8 O% k0 Z8 J
                                                to_str("in der Andockstation: \"",?.~.name,"\""));' V% E1 T/ e; w* x
                                else
: w3 e2 }/ ^8 z                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
  s( a5 i4 q! p5 v% `: z                                                to_str("in docking station: \"",?.~.name,"\""));                                $ S* R5 @. \7 `
                                end;0 h, u4 D9 j) l# ~. O7 `
                        else& p' N2 S3 l7 z$ }* U7 y9 o; N
                                @.Destination := assignLObj[1,row];% C/ }" a4 j0 \7 J3 R
                        end;                       
3 f- d5 n& G2 r- a7 m: y) S                        newDirection(@);: e8 q6 v4 d7 h+ {6 C' z2 m3 T
                        @.HasOrder := true;1 ]6 N0 h) B. ?, v. r" u1 S% Z
                end;
$ e# Z; I. O6 s% e2 v        end;7 d, B8 q6 v$ j1 v( G, }6 A7 K
end;        -- of the method
+ ?# o' v* ^4 y7 ?/ }
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 4 \" [" d" q5 Q, V( r/ T
1 U6 H1 _. ~) [. T- Y% P7 I
这是AGV_putin中arrive的method。
+ Z2 A* Z3 B7 H! T% l  T% s
+ R- `$ n# H/ A' ?# t. J9 Z当到达物料速度越高时,这个报警更多,
8 X: D; t9 _' N) l1 m可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。0 ^8 d! |3 b% u. H8 E4 o. X
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?* C+ T/ L' P% @9 ]- i! Z

7 Q5 p  U% M7 U6 q+ ?另外一个小建议,就是move,所有的move都可以这样" B! \! M, w$ [: R( T0 }3 v
if not move() then debug end
" c0 j% J& f( ~0 b3 P0 b这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
3 v2 K  E) M" c9 Q5 kplant simulation中的free libraries有AGV模板,
& @  ^, T) k; I; `# M: _* g里面也有案例。( F5 @) X6 T0 G! x# K  M; A  O
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。6 J0 P+ w8 ~$ P  F6 k' M

( g; f! k- l0 N我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
8 Q* v7 A% m8 q, ^- `, G  ^
2 [( `) T/ z9 J$ B那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 . x. v; w$ c4 T  `5 @/ C  y
这是AGV_putin中arrive的method。7 e" {, s* F$ ^- z7 i
8 y  N, ~* l) G  B* N0 Y6 q
当到达物料速度越高时,这个报警更多,

% s) J0 d2 |( A3 X* O另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-6 00:54 , Processed in 0.019824 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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