设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7314|回复: 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'# x# G; |6 y+ h0 p
*// P" t. ?" f# J; A9 i
is+ Q6 s2 ?. G6 P. o6 D/ p
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 D; S. L8 L% [" K: C
do/ H$ w. u: l6 g6 Y
        Lan := rootfolder.Internal.Tools.AOLlanguage;
/ g! h6 g) x( {1 q9 l        if current = @.Destination -- else return
! @% M9 c  V) ~# R        then, K" Q& H8 m0 {- ]0 ~. U
                @.Destination := void;9 p! @0 N9 ~6 h' q8 |( M% f/ ]/ I
                if @.occupied then
$ [4 ^% i; c( z& o. N0 C                        part := @.cont;7 }1 }% o- l1 R1 s" y
                        @.transpOrder := void;/ t9 T7 s- e: j
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# f- c* y4 g7 G  U+ `7 |
                                @,root.eventcontroller.simTime);# J$ H8 a' m1 l6 E8 _- s, x6 h: M
                        @.HasOrder := false;
4 l; f& e' B+ B  B# G                        @.DrivingHome := true;
* k. q) p# L; Z; @) _" D                        rgManager.tryToStartTransOrder;% a; b4 q; f) N
                        if @.Destination = void
! E; D' Z7 s/ v7 H                        then -- no transport order for vehicle @9 L: [3 Y# r( J4 @2 ]
                                @.Destination :=
; b4 ?8 I2 R' I/ O3 h& G                                rgManager.nearestFreeStation(@,track.~);" i/ Y- q( F9 k
                                newDirection(@);   9 M1 w, Q' R+ N6 S1 A( y9 I
                                if @.Destination /= void then& E# `  K( c" c: u; g- h
                                        @.Destination.NumReservation :=" }5 ?% ]$ _* e% F* m
                                        @.Destination.NumReservation + 1;& f2 f4 t5 j5 ?5 y
                                end;$ D, F6 N5 V7 f
                                @.CurrIcon := "drivingHome";
. K. W/ m, ]- w3 G7 t0 y                                @.DrivingHome := true;% ^4 r' A5 S/ ?, ^" s) K& K
                        end;
8 u# D$ i+ P, a6 n* n# g5 R, A                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- p/ D0 v0 T9 t3 Z                        part := @.transpOrder;  y- e; S9 `# T' c4 G
                        part.move(@);-- load part
3 t4 c2 q1 o& F& G/ m2 G& w                        @.CurrIcon := "load";
/ O" Y8 `. \0 g3 [2 W                        GlobalDistObj := part.globDestination;
  g+ t% e% z6 b6 D' V                        assignLObj := rgmanager.rgAssignL;, i6 ^$ i9 `- g% w8 J
                        row := assignLObj.getRowNo(GlobalDistObj);
) A- j! q' C1 d2 u! [! w                        if Row = -1 then -- since 703 X8 @6 k  Y) G: k1 S2 n1 c
                                if lan=1 then  ~  ~* [+ P; [, F5 g7 W; }
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% S2 t$ l# f6 W
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
* }. \$ S# ]5 O# n3 g8 I                                else
# c- O* j) @+ `& q                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. g% W/ u1 C% R/ G) K. |
                                                to_str("in docking station: \"",?.~.name,"\""));                                9 w  I6 L! l) T: o% R
                                end;
" M% O# i# j/ m1 m' `- x$ R7 Q                        else
# o! g" [- t- E                                @.Destination := assignLObj[1,row];/ p8 \, p. J+ Q
                        end;                        9 a- B/ w; N( M) N% |3 a/ }
                        newDirection(@);! `8 }$ s/ {! D6 z
                        @.HasOrder := true;
! m: V) r, H$ `8 q, w                end;
' p8 O2 S6 [3 J! G( B; o2 ^+ U        end;" ~" h1 l  x, Y: F5 x4 B" P# I
end;        -- of the method. g4 z' S6 y1 Q4 J- r4 i
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
4 l3 Q+ f/ b: l, f% }: ~* d
! f4 O6 W' Z' V& o9 ]- P这是AGV_putin中arrive的method。4 u5 O3 C# X3 F4 G

6 c$ N" y% k: ^9 D, a5 H, b当到达物料速度越高时,这个报警更多,
4 u5 C) h1 Q: W可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。8 @8 S5 s9 l  s+ N8 C9 {0 p
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
  A  P" Q2 y: ?4 B' _$ N' J
. a1 G# f1 |! q8 B4 P另外一个小建议,就是move,所有的move都可以这样. @# f( M/ {3 C: l" {5 s- V; f% g2 ^
if not move() then debug end8 c5 K; }! ]8 t4 }# j
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
) }% K  c7 D3 z7 p! Nplant simulation中的free libraries有AGV模板,; T3 W: ?0 L, u1 v7 N
里面也有案例。+ v$ F" ], g7 @
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
" q" s, n2 [8 x2 ^
3 }% i0 \0 p$ t/ k& ]! n# {/ }我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
: d& w+ H+ T3 X; h' E, W
, `2 j* o+ m  y那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 # N8 A) j+ v3 S# O( A
这是AGV_putin中arrive的method。- z1 F; p$ T4 P
# `$ O1 q6 c" ]. A  Q
当到达物料速度越高时,这个报警更多,
* h( H; @0 F2 E
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-3 14:12 , Processed in 0.017277 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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