设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8037|回复: 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'. B3 t- W+ e* R1 N& ?
*/
( A' ]. {& a2 c; f6 Bis
  {( S$ F& L7 B1 J: K        part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 U9 N3 V/ A5 V. ^8 `
do
% A3 L- w4 Y. d7 b7 t; e        Lan := rootfolder.Internal.Tools.AOLlanguage;
9 h1 [% k3 K& Y5 o        if current = @.Destination -- else return- ~. C1 H1 |9 A% t4 W
        then4 x8 c3 T) l) v' s0 f* v) k
                @.Destination := void;1 C! E% P% |2 l- z; j" m- p, l$ n9 t
                if @.occupied then' r( D) K" O$ L" n- r
                        part := @.cont;# ~2 l6 W& e5 W3 Q# e6 ?
                        @.transpOrder := void;
; H' q! o9 J  h                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' ~' E% Q6 x! o; C* S% R
                                @,root.eventcontroller.simTime);1 w, O1 p/ A/ S3 {+ s  U( Y
                        @.HasOrder := false;  `7 z+ m. J1 n' Z* A, r3 B
                        @.DrivingHome := true;1 \( ]0 h: p! W4 Z- [1 b, K
                        rgManager.tryToStartTransOrder;
' U4 x4 R* b$ b$ l7 J3 `2 E, O                        if @.Destination = void1 t& m* Z/ b# p
                        then -- no transport order for vehicle @
; k% g0 p0 A. n: K                                @.Destination :=
/ _, d! {" h6 q" W$ ]  R                                rgManager.nearestFreeStation(@,track.~);0 _+ G" M' V& L
                                newDirection(@);   
( R7 A! ^' q7 y7 K/ m( z) u                                if @.Destination /= void then
# b$ H/ A1 n! u  S- [: B) K8 i  c                                        @.Destination.NumReservation :=
3 P! e" D+ r) p                                        @.Destination.NumReservation + 1;
# K) q5 O0 T" \8 U                                end;% {! U  X' k' m! n0 S, G7 V2 x% V
                                @.CurrIcon := "drivingHome";7 c% [. I! j3 J) I0 n. h
                                @.DrivingHome := true;
& O7 J- f7 X0 D" x# ^9 l, C. E                        end;
1 X7 v1 r8 I+ u8 g6 }) v                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ b: T. H' g; _2 g% o3 h7 b5 \# b( S                        part := @.transpOrder;/ V  K0 O. G. B; _9 w0 F, L0 ]# O& X% O
                        part.move(@);-- load part* k3 ^: I& t& p. n
                        @.CurrIcon := "load";
' Y. k" e% W+ s4 |1 W                        GlobalDistObj := part.globDestination;
! ]% [' ^. H9 a* v6 i                        assignLObj := rgmanager.rgAssignL;0 r' c8 J) ]+ P3 w% k
                        row := assignLObj.getRowNo(GlobalDistObj);/ A( u- M- S' }5 r
                        if Row = -1 then -- since 70
0 Z1 s* e, q* e) ]                                if lan=1 then
- U! a( {6 R+ S1 n) O9 N                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 R- s% _( T4 o, e" W( q                                                to_str("in der Andockstation: \"",?.~.name,"\""));1 [- K8 h5 O! s5 p
                                else( _/ L' B) Q5 c; J: i; q
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# S9 T! |/ w6 Q" h8 n/ @, [6 S
                                                to_str("in docking station: \"",?.~.name,"\""));                                $ x) n+ i, I1 z
                                end;
: m' V5 E2 O/ j7 ^% G' Y                        else
3 R; e) Q) d5 Z: D                                @.Destination := assignLObj[1,row];
2 v" R/ V, ?8 e9 S; n                        end;                        , e' o  Z$ C/ z5 o
                        newDirection(@);1 L2 A4 x4 s2 g/ p; t) |
                        @.HasOrder := true;
& G* }1 W- `$ m5 N6 A; L                end;$ e7 u9 Q! A* b: @- f# f# Y
        end;( R. _  y- e) U" i
end;        -- of the method; b2 ]) ^! _% N8 I) K& B' x
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 " u6 s0 u4 ^1 i5 P# F0 D
) P$ b# g! y" d* ~. W
这是AGV_putin中arrive的method。5 a$ D$ M7 S0 g4 y# X6 V6 r

, Y% k) }- e+ a1 R" @当到达物料速度越高时,这个报警更多,8 A) T# y4 O* R. x8 N: I
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
1 I5 Z) b) ~) K1 D9 g' \5 V程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?7 ^/ U; k2 H" [+ {' L
0 O3 l* |  Q7 Y2 G/ ~, x. |& {
另外一个小建议,就是move,所有的move都可以这样
+ [. R, u/ P4 M. w. ?if not move() then debug end, J' f5 H% n3 c# f( B4 }2 U
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
* X! j( S9 i3 ^- y7 y; t+ `$ B* lplant simulation中的free libraries有AGV模板,
% N% N2 Q7 F7 w里面也有案例。6 t: S8 q8 H  g0 r& Y
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
% z: X; _1 b) h
4 H9 X) F2 Q- |, G) H: g; D我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
6 @/ G- ]* y9 i+ G# T
% S  H* u& p' E: k! o% M5 B, n那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 : C6 E: R! q- w2 w, r
这是AGV_putin中arrive的method。
( U- D  v. b) ?2 X- `# \9 O' y
& C0 j  D; `- B0 Y6 p# c当到达物料速度越高时,这个报警更多,
8 x% i- `: `4 S/ N% E! W
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-12 08:33 , Processed in 0.018827 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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