设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9828|回复: 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'
4 W" N' u! I: F, e* r*/' b) E( m% K% n- D4 x
is
1 z9 `4 x9 A+ f& h/ n# Y        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
  _4 Z1 N! k$ p) K; odo
% H6 s$ h- N7 Q        Lan := rootfolder.Internal.Tools.AOLlanguage;
: z& h- m! o: E7 V        if current = @.Destination -- else return2 O1 g0 _4 S" N, @% r
        then# L- s( N6 I* c8 C$ L& a* }* Q# R0 T
                @.Destination := void;
: O; x. I; t$ B                if @.occupied then1 r6 v& i% m. D7 e9 i
                        part := @.cont;
7 K8 F% J8 w  n& F3 `, Q                        @.transpOrder := void;. D0 j) S) O) W$ J& D0 r
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ A4 Q8 O- W  b* W2 @1 K. |2 X
                                @,root.eventcontroller.simTime);' N  T3 f7 j8 z3 `) y+ f
                        @.HasOrder := false;9 I1 S5 z# e+ ]
                        @.DrivingHome := true;6 c# P" w+ s& ]# |5 L# h
                        rgManager.tryToStartTransOrder;8 K+ z# m) W2 l  q& C0 v* g9 o
                        if @.Destination = void. C  ~1 d) j2 P% F& d; z  e, t
                        then -- no transport order for vehicle @9 }* n4 z# M; P( J; f. C
                                @.Destination :=
0 D0 |: @# e  @+ P$ d# K- U                                rgManager.nearestFreeStation(@,track.~);# m  H9 ]0 z' t3 T0 k
                                newDirection(@);   # G. A* x+ Y- L+ y4 L+ I9 x$ O% W
                                if @.Destination /= void then6 Y4 P4 T1 u4 b7 W
                                        @.Destination.NumReservation :=- K& T- [2 e& l1 g' {0 O. F
                                        @.Destination.NumReservation + 1;, Q* |9 y) Y4 h+ _5 F
                                end;0 M- z% Z3 h1 l7 m7 b) d
                                @.CurrIcon := "drivingHome";5 V. b( l' T7 s5 R) K: C
                                @.DrivingHome := true;
/ X/ T+ o$ H. M  r                        end;3 b" d0 E% Y. g* V
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 _2 M, K  F; o) h/ r# t4 d3 c
                        part := @.transpOrder;7 d- G* {+ d' j2 \8 `/ W4 C1 u9 R
                        part.move(@);-- load part) o' s/ ?& z" Q/ L7 r# M
                        @.CurrIcon := "load";6 ^$ e2 s8 K/ B0 L9 M
                        GlobalDistObj := part.globDestination;
2 o4 j7 ^( x& h- }3 m                        assignLObj := rgmanager.rgAssignL;
, J* ~2 X% w. }2 A                        row := assignLObj.getRowNo(GlobalDistObj);
% Q# F7 t1 Z! u) G8 U                        if Row = -1 then -- since 70- J- A3 D  o4 f; f" v: ^0 r. c
                                if lan=1 then9 S" z# y& N' |6 d! p  \5 E
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ R! `, `+ c- I: o
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
% ^. M/ V- h6 ]3 W7 D5 f, q                                else- o, i; y6 R( n( H
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 H& I0 a' Y0 |7 A; b  i' Y: w                                                to_str("in docking station: \"",?.~.name,"\""));                               
  x! U& M9 j5 S8 D1 p                                end;: B9 [; a! G) x5 ^% l- |
                        else# o3 X: |% Y) f
                                @.Destination := assignLObj[1,row];
# {. y  p( D/ S" R, ?1 p                        end;                       
; q& \$ B+ G1 F3 M                        newDirection(@);
; |" x! I* B# ^( k! ~                        @.HasOrder := true;
$ n( u: q9 @$ ~  B                end;, z$ U, p) m1 v/ [
        end;
4 x! u1 C  h7 K, a( @end;        -- of the method' g+ v: b9 \3 Q0 D$ F
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 : P  g2 i0 Z7 a) D6 _) l0 m; R

5 K: F8 }( w& G# ~8 F这是AGV_putin中arrive的method。
# w& A/ K$ U$ n
! u- \% l( n+ s  Q+ _6 w当到达物料速度越高时,这个报警更多,1 d, ^2 t" D$ D% H# M) k2 V2 |
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
. ], q. C; C" R* c# B& c) N程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?# r0 L4 }2 @0 [) v0 t5 l+ ]" {9 b

: ~9 p1 [; Q; s另外一个小建议,就是move,所有的move都可以这样/ |- y* b8 U1 Y: X# |
if not move() then debug end$ u1 r$ D2 G4 f9 p$ F) y
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。+ f) N% l' x# \; Q. l$ [7 A
plant simulation中的free libraries有AGV模板,3 v3 _( V7 J! c4 b' d) D: e+ H
里面也有案例。( N2 ^2 G# W; @% C- j1 q
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
* Z3 [: J3 z$ C8 ^* _
  c! S5 v* z% H% d4 ]4 M- N+ ^- C我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 7 H8 u2 Q7 Z* R/ O& W
0 r1 \' F4 @' m, A+ E
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
$ _  r! Y+ N9 G, I. y% V: Y这是AGV_putin中arrive的method。
  W/ g9 b* M! r! i! m4 z  f' }2 \' L; [% G
当到达物料速度越高时,这个报警更多,

* [$ p  [8 T5 m+ G1 T! m另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-27 17:55 , Processed in 0.017216 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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