设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9096|回复: 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 s. G0 r$ m1 c: S& i( W*/
0 s: k- Y, N9 L) m% Xis; ^( q" A) l+ Y8 u
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 A; i. Y' h/ ~1 Z- T" j9 |$ @  E  S+ W
do
( s) w% D" o" F2 c        Lan := rootfolder.Internal.Tools.AOLlanguage;
! O8 u/ N4 O) u9 W+ A        if current = @.Destination -- else return
1 J- ~) {! Z. R( Y8 ~        then5 u" b1 f7 d, ]9 H) [
                @.Destination := void;% m5 N  Z8 C: K- X
                if @.occupied then
# w2 {6 {9 z& A' c; U! }                        part := @.cont;7 t- d: t; N; W2 a9 }. w2 V
                        @.transpOrder := void;
+ B; D/ A: W" Q" V( }                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* Z* y" a  A4 r! @# @
                                @,root.eventcontroller.simTime);
, e6 g, _4 W% I8 u; }2 x                        @.HasOrder := false;
- P3 A& O: q' x) z, @# Y+ \                        @.DrivingHome := true;
7 e: A) h0 X! E4 z5 N4 o7 U" M( d* T                        rgManager.tryToStartTransOrder;
1 ~, t' e+ Y) D) Q4 z& [5 Z                        if @.Destination = void
: k+ @# P( H  G) ~6 w                        then -- no transport order for vehicle @/ ?; i9 C9 x# P: v7 J
                                @.Destination :=$ k3 L; r5 G  ^9 J/ ?
                                rgManager.nearestFreeStation(@,track.~);
) J6 c4 r, ^( I: b: _: @  u& T                                newDirection(@);   $ N% F1 G1 M! L. Z3 @! `5 t8 N
                                if @.Destination /= void then
! I  y' [9 W) X  k; O                                        @.Destination.NumReservation :=
& l2 `0 o# U" K9 W                                        @.Destination.NumReservation + 1;8 T7 S6 h- E. e6 |# y8 G& |, r
                                end;5 m: O$ G9 G$ L+ }; Q1 t
                                @.CurrIcon := "drivingHome";
" K5 \4 c1 t+ b, d% d3 P9 m0 U% S  I' _% o                                @.DrivingHome := true;
/ H. h# e1 S5 D# J. ?7 a' g                        end;# p7 x) M. h8 Z0 f% N
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- W& U$ P& T' K0 W                        part := @.transpOrder;% _4 L. o6 I. `# C2 N" c) m/ j& U
                        part.move(@);-- load part
& q2 {6 x, [: y: L3 C7 P                        @.CurrIcon := "load";3 [( ?* ?. B  [0 g. k( `
                        GlobalDistObj := part.globDestination;3 {2 ?9 E. V1 t4 m1 L0 [& k
                        assignLObj := rgmanager.rgAssignL;, R4 m; Z% \- B6 Q) F
                        row := assignLObj.getRowNo(GlobalDistObj);$ a- O* ?3 {! G, e% _0 K; @" p3 O7 C2 ]
                        if Row = -1 then -- since 700 J! S" t/ {# _0 j/ G# f, j8 m
                                if lan=1 then
5 k& C4 g) `  X- Y% A, p. i$ ?9 q                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; d6 x/ k* L' E7 U# {
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
) B" [! a( ^6 _. M7 ]                                else
3 U1 W% {: P' _8 f) E                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! [" t( B3 t, W2 y2 H7 |: A
                                                to_str("in docking station: \"",?.~.name,"\""));                               
- n6 V$ P' k5 ^                                end;
9 E% Z* P$ q# P! Q  ~! I                        else; B. j9 l8 n1 e# h4 y
                                @.Destination := assignLObj[1,row];9 B: z) o: J8 b9 R
                        end;                       
/ Y% N. a" S8 b6 o: u, p3 l                        newDirection(@);5 R* L) f) G* ?% X; G! P) E* u3 L1 D
                        @.HasOrder := true;/ m! K/ Q8 `: C
                end;) E# O% b8 Z; P5 n- D# ?0 n
        end;
: Q( i0 l( N. m8 g/ M3 a7 x+ r9 mend;        -- of the method7 c# K; Q" Q' r; Y" E) w1 |' G  V
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 4 V* M- B! V5 |: }1 N5 \* n

" J( Q7 o7 }' Z5 g* R" x  i这是AGV_putin中arrive的method。9 i5 r8 u) F3 }; y  |
: N# n" c+ b) Z
当到达物料速度越高时,这个报警更多,
" I9 W, h: E- x; P/ |8 J可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。( ^% ]# v/ s- _, W) V
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?+ Z* |- B6 \" R2 G* T/ b7 c

0 n8 o. Y2 c, b1 l5 m1 o( j5 w+ x0 x3 }另外一个小建议,就是move,所有的move都可以这样! K2 t! N0 ^3 i5 D3 W
if not move() then debug end& l5 T) P! }* E) b) H1 R# f
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
3 x6 ?3 k& n2 k- Z4 e& f. ^; M  Dplant simulation中的free libraries有AGV模板,
& B7 B7 _( P9 T4 K  t- w6 n9 p里面也有案例。: V6 k9 [5 X& y' i# ]
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。; _: V0 X, D. y! N+ y$ t) C6 g

. @& H2 |! ], p5 V我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
5 D% s1 X; _1 F; H
" u" [+ e8 X3 j# R那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 : e- p* U: ]( p( F% F) t
这是AGV_putin中arrive的method。
/ |; N3 \  s  ^8 A3 l3 T! B. z( l4 J5 n7 S
当到达物料速度越高时,这个报警更多,
# I" g) }5 U4 z' o
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-13 13:55 , Processed in 0.026200 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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