设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8201|回复: 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 B  Q* M' {+ `  A- g3 k*/
/ U  `- I/ Y+ ?0 a3 a& ois
1 g! q$ N; ?* g$ Z9 @1 d        part, GlobalDistObj, assignLObj:object;row,Lan:integer;; m/ `% R/ O5 P  X, H0 j2 x
do7 B. s8 q+ y4 n' d* B" k9 P
        Lan := rootfolder.Internal.Tools.AOLlanguage;
! N8 C# k% G# \! q8 i        if current = @.Destination -- else return
/ `$ R' L6 M% R' g2 s        then
& G5 E- C' i0 d) R! D6 v+ @                @.Destination := void;9 O$ R0 g  @, K+ k
                if @.occupied then2 S( ?4 ]5 b: V5 K7 g- E
                        part := @.cont;
2 M9 l+ h7 s# K/ t, k                        @.transpOrder := void;5 e/ v; q! C9 L4 }6 j! `) b
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 j& N' H9 T7 q/ g7 K4 f% M                                @,root.eventcontroller.simTime);
4 C5 z2 \( [+ M) w0 J3 @                        @.HasOrder := false;9 L  Z; U# j1 `7 ?. G/ R
                        @.DrivingHome := true;
, l1 D$ {/ Q# `# G                        rgManager.tryToStartTransOrder;
1 V: \. f$ Q+ D  _                        if @.Destination = void+ O4 ?+ M4 T6 M
                        then -- no transport order for vehicle @  i) J) s( {* ?7 }
                                @.Destination :=% r* \2 ~5 x8 \
                                rgManager.nearestFreeStation(@,track.~);
7 ]; V0 T3 }  g) v, I                                newDirection(@);   % [. u% z; W' r$ n* I
                                if @.Destination /= void then
' I6 F- J; R4 a: C) h; B                                        @.Destination.NumReservation :=
! L& z+ d; r# z: b# t* K                                        @.Destination.NumReservation + 1;& s5 s9 c7 u0 u6 q3 b$ J
                                end;
: `& k/ M7 b& x% U4 |                                @.CurrIcon := "drivingHome";- X/ N. D! \6 R8 B
                                @.DrivingHome := true;
- C) R! N2 y% p! S                        end;, s6 Z8 `, Q# q* V$ p! b/ m' \
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( Z$ F1 U% S! L4 V" j" |! P                        part := @.transpOrder;
; |9 I* }$ }2 n$ f                        part.move(@);-- load part" t7 H1 m+ I- |
                        @.CurrIcon := "load";
3 n# p& h1 g' p1 R! O' V- Q                        GlobalDistObj := part.globDestination;
( l; g1 I% m" D  f. }5 A& T                        assignLObj := rgmanager.rgAssignL;
! ^9 k5 L, e7 b+ n1 ]! B: ~& z4 X  E3 F5 @                        row := assignLObj.getRowNo(GlobalDistObj);; [6 M, F7 I3 ~: v) E9 g7 ^5 g
                        if Row = -1 then -- since 70
# T5 f9 R' c1 x% k8 J4 z1 I                                if lan=1 then
; K( s% J/ o0 d: d4 s8 S                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 }& l: Y, X1 {% q2 V/ o                                                to_str("in der Andockstation: \"",?.~.name,"\""));* B2 _, K/ l. t, K
                                else# m0 b, X! F: W2 q7 L. V
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, G" j6 p* ?6 C/ @
                                                to_str("in docking station: \"",?.~.name,"\""));                               
% q$ V" O6 X- ]# z2 M. u, \, m$ Z, V                                end;2 ~% F# q  R. Q3 ~" q0 R* _1 N
                        else
8 E, P( U' v, C6 v, |# f                                @.Destination := assignLObj[1,row];& b9 x. r, q5 q3 v$ L( i8 \: j7 X) j
                        end;                       
7 V3 J* Y- N$ j                        newDirection(@);  Z$ Y% z; q; S4 G$ `
                        @.HasOrder := true;
. l% H6 }3 X7 L. G6 G* c                end;
6 D% n: Q7 B- D: h        end;/ e3 G: a5 o* }; s' F) C
end;        -- of the method
, t- M( s, L* |0 W* u
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
* A' w- d; l+ W( @2 B' n* J; m# d' W# `4 M$ N
这是AGV_putin中arrive的method。
" k% b  `  }* Y
! f" g2 u5 J! i% B3 A$ Q当到达物料速度越高时,这个报警更多,$ z" A5 o. X& ^; |% o
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。/ N4 r, R# `) K$ X
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?, {/ Z+ z9 l3 j( u" p+ }

9 M5 I' E1 K0 _另外一个小建议,就是move,所有的move都可以这样
: Z% |0 K) G# S( C' u3 Q% k$ cif not move() then debug end
$ M" W" X) [3 M/ `6 ]9 M2 n这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。% j. I; Z4 _( S1 b! N
plant simulation中的free libraries有AGV模板,
# B/ O6 v+ W0 `; ^里面也有案例。, t9 }  j, }. H+ n
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。8 F: u5 |) n9 F" N  v8 b, F& D
6 ^( h/ j, t+ N5 `: o- B
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
) S, G5 O* h, t3 r( b! T
& z" U4 I! v2 b1 t9 L那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
! g2 w! A8 |' P$ h这是AGV_putin中arrive的method。
) M' W% d, S. R2 j
3 ^4 J6 _! `9 I当到达物料速度越高时,这个报警更多,
; L1 [7 P6 s, d. D  H
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-20 12:29 , Processed in 0.021826 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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