设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6053|回复: 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'  a& G/ \. a" I" F, i' C( M8 i9 M
*/9 E1 `) d$ h0 ^3 Q; J9 N
is- D% o0 I1 i+ M" R' K* `
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 H6 e1 m: D1 d
do& c4 E7 H6 F" t; v5 S) r
        Lan := rootfolder.Internal.Tools.AOLlanguage;8 u' ^: \6 p- A
        if current = @.Destination -- else return$ W- [: S9 E/ A( g. o/ f' |. |7 x
        then7 U6 s# j/ A+ a- Z; b
                @.Destination := void;
) H! i6 ]. o7 U                if @.occupied then
" H- G/ s0 v  R! O; l                        part := @.cont;; X- Z: m* C6 t+ [$ t
                        @.transpOrder := void;8 w9 B6 I6 I& A
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; w: q% j" j! o; P: b7 Y
                                @,root.eventcontroller.simTime);
9 R$ V/ E! {* h                        @.HasOrder := false;3 h: U) ?2 F6 k) t! \2 v7 e
                        @.DrivingHome := true;7 Z( g. M: @& p# {9 `/ I9 i
                        rgManager.tryToStartTransOrder;$ _! E. C2 y# G5 G  A: l- q5 y
                        if @.Destination = void7 G& k9 n/ K' N, D; s
                        then -- no transport order for vehicle @
, Z+ }& L# t! O9 R; y, R8 g                                @.Destination :=
8 t0 D# Z; N8 y8 X. _                                rgManager.nearestFreeStation(@,track.~);
( C- c- |' @1 c/ T( K' ^" }7 D                                newDirection(@);   
+ Z( ~2 o+ H! I; m& ?                                if @.Destination /= void then
4 v) P% }* E$ Y0 f* i  O                                        @.Destination.NumReservation :=
8 S0 t3 N+ K/ L                                        @.Destination.NumReservation + 1;2 r: |" ~7 n- T/ A0 I# B! Z* e6 }
                                end;2 R% j+ V$ E  ^4 w/ C
                                @.CurrIcon := "drivingHome";. ]1 i3 I# ]; ]0 p! f# Z6 p
                                @.DrivingHome := true;
1 S: n- U8 Z6 @  ^; @+ z0 _                        end;5 I3 G( _+ l4 `$ ~: G7 [
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 S& P- }  O" p; P- r
                        part := @.transpOrder;, X9 @5 Q+ T$ D: W. u
                        part.move(@);-- load part
3 @, Z: p4 K/ f* J* S3 o# v                        @.CurrIcon := "load";
( K- O5 R. U. _' A/ C8 `                        GlobalDistObj := part.globDestination;: `: \, {' e$ \
                        assignLObj := rgmanager.rgAssignL;
5 A$ ~9 p* R, l0 V& K# E                        row := assignLObj.getRowNo(GlobalDistObj);* K) f( _& M4 l8 c
                        if Row = -1 then -- since 70% ?( q" \  ]4 d% j
                                if lan=1 then2 o9 i& D8 ^0 q8 j" A  e2 V/ n/ k0 Z
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. `+ c% }  A9 p
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
' i8 C( u7 x# M. n# T9 @                                else9 F5 Z4 D7 S- I& c8 X5 m
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 }& I. v, t8 v# c( E& T
                                                to_str("in docking station: \"",?.~.name,"\""));                               
2 G, s" ]1 R( f- L                                end;6 O. ]% A6 Z1 ~! }3 B3 z  e5 @5 Z
                        else+ s7 t" I2 S2 L2 T* A- f# C  p
                                @.Destination := assignLObj[1,row];/ B  @8 v; J/ Y( D% I
                        end;                        ; a. ^& |3 m0 a1 T" p
                        newDirection(@);* i" {8 {1 i$ M* a1 t0 u' U# @5 j. v
                        @.HasOrder := true;
: M5 R/ e% y7 g; @' P                end;! y. u8 c: M0 F1 `) `, W; Z
        end;5 B6 b; w4 Q* [% ?
end;        -- of the method
: B- s0 a3 i& z+ ]- E
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
* \, X+ }4 ~' l8 H9 ?
2 S; P5 t$ H. e, ^- f( q( h  V这是AGV_putin中arrive的method。$ b0 R: e$ l# k  z0 j" W

  I9 V$ g6 N. I. {) Z& V当到达物料速度越高时,这个报警更多,
8 E4 G; a0 y3 W. u, j0 H可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。( N. O, c1 h1 Z- ]+ k; d% z
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
0 u) X% y$ z: @+ S- s  L
, H+ T" N) y) I, c  Z另外一个小建议,就是move,所有的move都可以这样( u% l4 ~+ t5 e6 |. k4 I& t
if not move() then debug end9 X. {7 R% ]/ U* k- d
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。7 A- m( b4 C+ [) ~3 B/ M
plant simulation中的free libraries有AGV模板,
) l+ E, I/ \7 |) B9 _里面也有案例。; r5 a0 P( H1 p) z) x' p
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。* w5 T5 E+ L+ t# J3 W& ~
0 t4 K. R: e3 y& v3 b5 ~6 o8 v4 v
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
  Y9 j3 l& d7 o$ U* D+ P3 S) n" O* x! P& k4 T! Q: }
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 " ~8 R7 g% b7 Z. X
这是AGV_putin中arrive的method。
4 {8 J" r  c" q* T, {+ t0 _; v) E, @, G0 a2 h" b# k+ T5 f2 s. N+ D
当到达物料速度越高时,这个报警更多,
' w7 X: N( w; q1 H# C" O& }
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-14 20:57 , Processed in 0.022435 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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