设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6002|回复: 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'7 y0 F1 s$ a9 |$ O0 {
*/
, j, V3 p" Z0 Nis
# A- B3 B2 G7 W8 G" p8 V8 D+ J9 n2 v        part, GlobalDistObj, assignLObj:object;row,Lan:integer;, M: r! V- ?% S5 [% ~. U4 a3 r7 g
do3 ^( M$ m' b7 E6 F. b
        Lan := rootfolder.Internal.Tools.AOLlanguage;
/ H: o3 W/ R  q7 l2 r        if current = @.Destination -- else return
. Q2 z# A/ [7 F0 t' ?6 C1 ?# c; w. d        then( r7 o) O2 e+ w# @8 N" A! R
                @.Destination := void;% _( q$ Y% Q+ Y) u7 Q1 p9 T
                if @.occupied then
% Z, o- K1 D$ B- q( t1 i2 S, h) k                        part := @.cont;
9 y5 c9 A/ `. A  B: K                        @.transpOrder := void;
9 w1 ^1 f! O7 x7 k( ~                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 x5 P) c% R9 K$ i& x                                @,root.eventcontroller.simTime);
6 t1 f, S7 F/ U                        @.HasOrder := false;6 }/ h( r4 ~+ _% _( q& c
                        @.DrivingHome := true;
5 ?3 \1 L; p0 Q* x                        rgManager.tryToStartTransOrder;
9 u- \1 R; {% J# i- l, V                        if @.Destination = void0 H0 q/ R- D  b7 W& u# _6 J
                        then -- no transport order for vehicle @/ D6 D4 z7 g# ~) M
                                @.Destination :=! p7 N) c* L7 @0 v% H
                                rgManager.nearestFreeStation(@,track.~);
8 h5 R* m, [" k. [2 g                                newDirection(@);   
9 R, N* k5 y1 R6 x9 `2 Z. |                                if @.Destination /= void then
7 l* C1 A+ l5 ]% b* c4 s2 e* Q8 s                                        @.Destination.NumReservation :=
# X6 B! x' z" L3 G                                        @.Destination.NumReservation + 1;
3 ]; C* o" V0 X! s- C: n+ `0 q* a                                end;
  w( P9 P5 z3 Q3 C9 G% x                                @.CurrIcon := "drivingHome";+ P1 c5 ]8 b/ z( `
                                @.DrivingHome := true;
( U3 v2 {& h2 d+ U+ U' Y% X$ ^+ o# I1 ?                        end;7 ~$ I8 ]+ h3 a7 R) ?% v- c
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station  V0 h( \5 j$ w
                        part := @.transpOrder;
  d; I! e' ^, P                        part.move(@);-- load part: h. x+ K! |1 M! W3 f  l) L
                        @.CurrIcon := "load";
2 Q) L- w$ P: Y1 Z. p0 c                        GlobalDistObj := part.globDestination;1 `2 L0 c: u- v# l! x
                        assignLObj := rgmanager.rgAssignL;: f9 e; W% `" o
                        row := assignLObj.getRowNo(GlobalDistObj);
% C* s# Q! g9 [                        if Row = -1 then -- since 70! b5 [8 d% _. a/ m( ?4 i, g+ ^
                                if lan=1 then5 ~% ?4 t+ f) e- q4 a6 V( w
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ |% k% h7 v( `2 z+ L; t9 s
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
( `, \/ I- y+ {  t5 a3 s                                else5 L$ B) J6 b$ R" F0 `& H0 c
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! M; r# h, k/ \- e2 y0 e3 m                                                to_str("in docking station: \"",?.~.name,"\""));                                # A1 b7 Z+ r" E, Y$ Q+ s  S2 Y" }
                                end;
) n2 r* O- m  u% y' z1 P# V* `+ ]4 t                        else
9 E" c3 N: z0 Z9 C+ Z) V# y                                @.Destination := assignLObj[1,row];
- i9 ~6 d5 u, Z9 L" B                        end;                       
, l6 Q2 P8 b4 G2 d& g1 `                        newDirection(@);
' b$ ]% _! P9 k3 Y' B' C8 B9 l( y3 P                        @.HasOrder := true;% r9 \) x; ~, u' P6 W/ D
                end;$ A3 l  |" f2 I$ n
        end;
) p2 @( M4 j0 x. lend;        -- of the method9 J2 E# D( _+ G9 M
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
2 ]  }0 U! a0 V- S$ X0 {8 I* J- x4 y
$ t. @. p' \6 t& T( {这是AGV_putin中arrive的method。( |& ]8 s* g* s- a# o- a6 E

$ }' D$ d# I- a  M3 W0 }当到达物料速度越高时,这个报警更多,
' B2 w. n) F+ x3 b% C+ x可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。2 D+ r' g- w' d  d* S
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?- W- _- E/ W* _! N
! y- c/ W. F8 s4 q8 S9 C* c% G
另外一个小建议,就是move,所有的move都可以这样% _  f: k! w) ]3 ^
if not move() then debug end1 j8 ?- k5 a& W' D# g
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
4 e5 e* y- B  \% Dplant simulation中的free libraries有AGV模板,& O4 _+ s/ {; C+ U- s% b0 b" }
里面也有案例。
, s0 Z* k" Z( [) Q- u我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
4 H: [5 h  c. Q4 }( k
2 v2 {0 L! o8 S9 h2 n+ q我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ( F" `! }4 r* x5 N; r/ Y

; [9 w6 o2 F5 W; d, u( C那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
) _3 P( v) j8 Q$ ~" n这是AGV_putin中arrive的method。" R9 D7 z& T0 Z8 G: d/ T

$ J. u. s- e! p5 X! V8 u当到达物料速度越高时,这个报警更多,
! p3 f* j+ p! ]
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-12 10:22 , Processed in 0.023901 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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