设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8948|回复: 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'
, _: B1 r" S$ e5 F0 r! `- @*/
- }" r3 ^3 v  j1 {" e- B3 ois0 U7 E7 b& V% m: g. n5 q8 U- C) n
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;  K! f0 g6 J6 X$ Q5 Z6 |7 p8 A
do
/ g: A: e; [0 ~2 s& D( j        Lan := rootfolder.Internal.Tools.AOLlanguage;" P8 U# T2 d: [$ n
        if current = @.Destination -- else return
: b  `7 h; h# ~/ d        then
+ j& N4 k: |) G1 \" h                @.Destination := void;
9 a7 @& m+ c: \; [' B                if @.occupied then; `1 x' c+ y1 X, d
                        part := @.cont;
/ _1 |3 Z2 u- n# q7 h- C                        @.transpOrder := void;7 j! V* Y* t) y, t! E! s3 e
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& H* g: ]* V+ \5 j# H                                @,root.eventcontroller.simTime);
7 `! b- B3 C1 U$ |; e                        @.HasOrder := false;, b6 o2 y' c( V/ ^' u6 l
                        @.DrivingHome := true;
5 `1 k, c' @: ]8 n5 r) b- p! H                        rgManager.tryToStartTransOrder;' h9 H( y6 U5 O7 ]$ e6 e
                        if @.Destination = void
- p# }- d0 h. v  s/ W: s5 v                        then -- no transport order for vehicle @
% U# h1 }/ J1 O* R$ F, R                                @.Destination :=/ j& e% i8 X% x" I
                                rgManager.nearestFreeStation(@,track.~);% o, b4 r; ]( z0 a4 n- Y
                                newDirection(@);   * G$ c) Q9 J& Y5 x8 P: F
                                if @.Destination /= void then
( |7 H+ ?0 r8 O! n1 ^# l; c                                        @.Destination.NumReservation :=# e- h4 }+ j2 j7 M: @* p
                                        @.Destination.NumReservation + 1;
" i, C6 x9 [$ |! K                                end;
! B) ~- W: o! ]" N                                @.CurrIcon := "drivingHome";: H% ]4 p- X2 J& F+ V% b9 ?
                                @.DrivingHome := true;  R" I! `3 G: q0 I0 E
                        end;
2 q% ~2 T: n% [( c. X% Y2 w+ [                else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 q/ A6 m, k" |, `& T; _1 e
                        part := @.transpOrder;
) }, {6 K& G; k, R, ^9 w                        part.move(@);-- load part
, X; G! A+ k/ u' L( y$ V; a* r3 w) Y                        @.CurrIcon := "load";
- [5 Y1 P8 X3 L                        GlobalDistObj := part.globDestination;
6 \" h  d' c* k5 U! S                        assignLObj := rgmanager.rgAssignL;
; a& B5 V* ^" |7 O                        row := assignLObj.getRowNo(GlobalDistObj);
8 P4 s5 N6 S$ i                        if Row = -1 then -- since 70( N9 V; Q0 x. j' u" [' j
                                if lan=1 then+ g$ f4 X; P# ^
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
  e5 H/ H( ^$ \* r                                                to_str("in der Andockstation: \"",?.~.name,"\""));
0 j6 \# z  @1 |) Q. I7 h6 E                                else
# z) E3 U$ e' v+ e                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," Y: }/ A7 {* B" v$ ^( P# B& n0 X
                                                to_str("in docking station: \"",?.~.name,"\""));                                ; F0 R4 J4 x1 E8 }
                                end;
9 r% [# o6 \$ i                        else$ h5 r/ e6 E. {1 _% V( Q
                                @.Destination := assignLObj[1,row];' }, t+ x# t- k
                        end;                       
4 B5 I7 n4 y( M                        newDirection(@);
$ f- t. M$ C+ t: T9 G                        @.HasOrder := true;" v$ h, t" q; Z7 y$ l
                end;  f: I. B- H" N$ n% P
        end;
4 i0 L- g; l0 q" fend;        -- of the method
* o: |3 A. V3 C" j  A
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
- q% M. V8 V( `4 P/ L! _
/ d! V7 U4 w2 D) @8 `1 h% F这是AGV_putin中arrive的method。
7 G: ^% W) x. A2 y% k+ k# G: h9 b
* O% o+ @( o' v4 c当到达物料速度越高时,这个报警更多,* J0 B! P: @( L( a/ V
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
1 o$ }  G, X, o' @0 i' f) K程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
) b& p' L3 `* B# @, ?# X: |9 X
8 y2 ^" y) U, }8 K% R/ [/ @2 o另外一个小建议,就是move,所有的move都可以这样5 h5 y2 K# `" \7 z
if not move() then debug end9 u7 w: i  U1 X' L3 c+ w9 W
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。6 N- k/ N9 W4 O" M
plant simulation中的free libraries有AGV模板,' e# p9 M$ _. u" S! ~+ [3 L/ B/ e1 \
里面也有案例。
8 x, s  z; g, B0 s% i% h1 `我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。0 _+ l$ K' x1 Q7 s- [2 M& t

+ @) a2 l! I, Z4 @( |我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
( {: q# _1 E0 `/ w: _& u
0 z1 r' ]& P# M3 X% N那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
4 m6 Z* F0 `2 _. W- }1 `3 }* s8 e这是AGV_putin中arrive的method。* o! [, ?( @) ?9 b3 P+ W: h7 V' [

# h! O& O* u3 ?% R" c: a当到达物料速度越高时,这个报警更多,
$ h2 Y& V3 z0 R, P1 B
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-5 20:08 , Processed in 0.016610 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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