设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8318|回复: 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'+ v0 F3 i$ F' M% ~9 C7 q
*/
$ @3 t+ d% A" Z. }0 X* {! wis
5 U5 ]5 _6 ?& J# t. K        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. A, x. Z7 ^- F! w7 O* udo! k" {0 i  a  |
        Lan := rootfolder.Internal.Tools.AOLlanguage;
4 A& ]4 a- h, x1 o$ i8 D1 `! T0 T/ D        if current = @.Destination -- else return' X( ]- |5 k1 @" Q4 l+ A
        then. j( Y! `( X6 K" J& v9 {1 x5 z
                @.Destination := void;
- L9 w  Y9 |. I9 k4 A4 `) t3 H1 i7 M                if @.occupied then
1 {; @7 `$ c' {( {* v* Y                        part := @.cont;. ^- }) Q7 P. N8 e& `  z
                        @.transpOrder := void;+ k2 Y* |# x4 |0 L% i
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( G0 ~7 [- e( E4 I
                                @,root.eventcontroller.simTime);6 |; f/ o4 \: Y  e
                        @.HasOrder := false;
# E- a! y7 d- J                        @.DrivingHome := true;9 S) }/ X+ q9 y" T5 d) C" x
                        rgManager.tryToStartTransOrder;
% s1 q/ C  l9 B  D# V3 R# ~$ Z. L                        if @.Destination = void
9 f$ b$ J9 Y2 b/ p& j: ^                        then -- no transport order for vehicle @
# }* ~2 Y& z* Y9 C3 p9 G                                @.Destination :=7 B0 T# b/ F' n4 [
                                rgManager.nearestFreeStation(@,track.~);
: K3 ]6 G( n! v                                newDirection(@);   
! \* Q7 l1 r, R; E                                if @.Destination /= void then0 _  y: `$ g, |7 [1 p6 @
                                        @.Destination.NumReservation :=
- O1 ~% C" u0 L) Y                                        @.Destination.NumReservation + 1;
% r1 x, v6 h9 O+ K: L* t/ G/ ^                                end;
7 d+ H: C, u" g                                @.CurrIcon := "drivingHome";
2 ?- p& h. V. k4 l! U                                @.DrivingHome := true;8 X* V3 F6 P! `4 W& L
                        end;3 u2 U: m4 y, @' L$ r1 C& G
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station, {# A9 L. u( Z5 z; l* P. J
                        part := @.transpOrder;, ?' f8 B- q. }8 ]
                        part.move(@);-- load part* G3 i& `* k# r" A" g
                        @.CurrIcon := "load";5 d) u' j1 d4 I8 q3 b. f; h3 h
                        GlobalDistObj := part.globDestination;
6 t+ W. {3 k7 b5 k                        assignLObj := rgmanager.rgAssignL;
; m7 u* L! C+ r5 l; C' i7 @( J                        row := assignLObj.getRowNo(GlobalDistObj);
  s' m  Y* Y' ^" Q' E7 c                        if Row = -1 then -- since 70% q9 e6 p* Q& q8 t& ]- Z2 I
                                if lan=1 then! ~) `6 Q, O+ H' U9 b: J
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% [/ R# \2 h- a2 V  t! W                                                to_str("in der Andockstation: \"",?.~.name,"\""));
% u5 \2 R9 T" ~; H- Q                                else
$ D" R! P! K3 T1 B. e                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ o; M$ i; _) i4 B3 u$ h                                                to_str("in docking station: \"",?.~.name,"\""));                                " F" c% y4 R) {, |3 o
                                end;
% }) v' b  B4 n                        else# i7 Z1 z( }# W; }8 d% Y) C! w& D
                                @.Destination := assignLObj[1,row];
4 y+ U+ J1 F& Y4 G1 G* t  v                        end;                        ) D% z3 z6 a9 Z) }* d4 s* c( A% A
                        newDirection(@);  f, \7 ~+ Q4 u/ `9 ^
                        @.HasOrder := true;
; }  u; H9 |6 ?2 t. f0 c                end;$ t; X1 \$ w4 D8 W- X% y* h
        end;
3 J; ^, u4 B7 q* @end;        -- of the method
9 t" F, b, Q. a- B* d, F
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 " g! l% k% ?& s2 i. a: M) A
9 r# f# ?9 u  }  p) E  [# B% h9 |' V
这是AGV_putin中arrive的method。6 i+ G! z/ E. a! i2 k. I" l

5 B+ @8 F- U* e) q当到达物料速度越高时,这个报警更多,* ^% Q- B9 \; m2 Z
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。4 \, n3 s2 \" \- O
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
7 O+ B5 Q0 U5 `/ T$ P/ t' {* n! }5 Q  q3 T  M2 y2 w
另外一个小建议,就是move,所有的move都可以这样. e2 }" l, L1 ?2 M, _" m
if not move() then debug end5 K2 J" U/ l7 P8 S5 z5 Z: t* Z
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
8 @' {8 I7 ?$ w$ Aplant simulation中的free libraries有AGV模板,
$ @4 V9 T7 }; j里面也有案例。
; }" R8 G+ w! g8 g我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。% p! w. a6 c* f4 y5 C% L

8 u/ _1 J1 m) b我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ) y$ K- D: o: o. ^2 ?- }
6 _+ r+ ~  K7 u: C2 H
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 9 V; n7 J/ y; d& D% \, a
这是AGV_putin中arrive的method。2 d' `+ v! e. g( A
3 u+ @* @* w9 S2 f6 }$ A
当到达物料速度越高时,这个报警更多,
0 X3 s' N$ y  s5 j8 F" D$ l
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-27 14:30 , Processed in 0.018374 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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