设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9905|回复: 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'+ r  E/ h# H% m' q7 c) K7 s
*/
" m! R% k1 ]- }9 Y! J% L; I* f  kis
+ ?5 n4 X9 p& j: b3 B        part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 i; r) j4 n' t/ ^) _
do
, O& t' u: W# C5 u5 s) \$ w) K$ p        Lan := rootfolder.Internal.Tools.AOLlanguage;
, E: T* n& r+ i5 e: k/ o        if current = @.Destination -- else return6 v' a3 O' q0 Q( o8 w" H- M1 {
        then
2 k1 V& n/ x4 v) K, Z                @.Destination := void;
: K8 b  W' l' Z  h                if @.occupied then
' e, ~- n6 P" E, w                        part := @.cont;. ^$ P6 x/ B& L& t
                        @.transpOrder := void;
, p) v7 ]* @8 ~                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: B/ j% k. \2 v( {. f
                                @,root.eventcontroller.simTime);
1 u( b5 ?0 l+ Z                        @.HasOrder := false;) c+ ~$ i' J) C# C0 A) L
                        @.DrivingHome := true;+ X4 y; u% E  t$ s  j
                        rgManager.tryToStartTransOrder;
5 d( _+ k6 l7 r- E3 q                        if @.Destination = void
' o7 f8 e4 L5 D+ K* ~                        then -- no transport order for vehicle @# m& B2 V0 Y6 E4 A" G
                                @.Destination :=% D9 S5 b/ \/ |
                                rgManager.nearestFreeStation(@,track.~);
3 R, w% A" ~+ J( ^                                newDirection(@);   $ x6 F8 t& Z" l! h" l0 [
                                if @.Destination /= void then8 k5 Q  R( o# [8 K! ~
                                        @.Destination.NumReservation :=
4 b1 w; ]8 o' f: f8 m4 L$ r6 X                                        @.Destination.NumReservation + 1;  v2 _7 {3 N( g7 u" Z
                                end;& G3 Q: r$ x9 ~) ^* u
                                @.CurrIcon := "drivingHome";: N+ ~4 T% |7 T+ P3 h& B8 o
                                @.DrivingHome := true;9 v* _* J! j: G1 u4 u' h. W3 T: M
                        end;% ?2 ]9 p% ?7 y9 o
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 Y% H) A: Y1 X                        part := @.transpOrder;. f* }: ]" L6 U; U: @, I( w
                        part.move(@);-- load part
6 B. r4 h* S: o2 _# G6 d                        @.CurrIcon := "load";
* a5 G! B' B+ K; \                        GlobalDistObj := part.globDestination;2 T$ i3 T3 {7 y  I
                        assignLObj := rgmanager.rgAssignL;
- V7 b8 M+ K1 e                        row := assignLObj.getRowNo(GlobalDistObj);
  z+ e1 c: @  f) M8 E                        if Row = -1 then -- since 70
* |1 b7 W0 a2 f, f6 `                                if lan=1 then) T# [: u: H2 v9 c: ]
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' T* H) J; R% o) w! [' `$ U+ J8 ^. R  R                                                to_str("in der Andockstation: \"",?.~.name,"\""));
; p- A$ D1 W8 y) n* a1 O; A6 L                                else2 t6 D2 T+ i' t$ L
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 r+ ^3 j8 [. N2 R$ q3 c2 S' a
                                                to_str("in docking station: \"",?.~.name,"\""));                               
3 p/ v3 q7 A' m/ ?' J. q# N% G2 P- o                                end;
8 J# E5 n. P3 s; @. G                        else8 v! V3 x. I8 p9 J6 P+ K/ I
                                @.Destination := assignLObj[1,row];) f, F( ]5 B% ^$ u
                        end;                       
: M0 Q* [% L# E3 s                        newDirection(@);
4 S" p, N8 c; n  K9 n8 ^" h                        @.HasOrder := true;) q8 N+ L1 M" O& {& {7 n* k
                end;# N+ z( `; Q+ q( Q4 [" D  s" d" k
        end;
& L! y# w- m0 R: v  m6 pend;        -- of the method
1 l" \  B& U0 t
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ' @$ G! o) N. O9 l/ ~

' k+ t- t/ _" b% y" m这是AGV_putin中arrive的method。
- T/ }$ a3 y( ], N5 J' ]+ I7 Z! V# S3 F" d2 v3 n: H) q/ ^$ r. J
当到达物料速度越高时,这个报警更多,
. P8 V. `7 {! ~可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。; t2 C8 \. U( T6 d& }( C
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
6 Y) X- c4 L8 s2 N5 G, c
/ U! M; n& K1 f; A另外一个小建议,就是move,所有的move都可以这样
' k$ i! u+ |) zif not move() then debug end- x* Y" X: z, O- e( m, H
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
& i, r, [  `, P. L5 n( cplant simulation中的free libraries有AGV模板,
  N6 g; o! `8 b' V- s$ @5 c) n里面也有案例。! W+ a! k: ~, s9 s3 j
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
1 x/ j8 m& E( O9 s1 D6 M$ z$ t+ R
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ( H, R& K  @" ^4 P7 N
/ ^7 k. E% _2 M+ ~7 w, @
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
) O5 _$ ~  w* w+ F6 o/ ]( z这是AGV_putin中arrive的method。7 z+ Q! w2 g  ~% G+ `+ {; E6 `8 E

! I, D& I4 S4 i当到达物料速度越高时,这个报警更多,
1 @% b; m. v$ X# _4 L2 y
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-1 21:35 , Processed in 0.019415 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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