设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8731|回复: 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', Z( \: S6 l9 R- R5 d
*/, s& I8 {8 o5 _6 ~0 D4 O
is+ ^8 F+ X! R) B
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- |7 Y  U7 T$ _" Fdo- K0 N/ ~8 F- u
        Lan := rootfolder.Internal.Tools.AOLlanguage;* u$ G! k, ^, u7 e
        if current = @.Destination -- else return$ ^) O- i) E% f
        then- F; V/ Y% K; Z" }! D& y& @* a; @2 v
                @.Destination := void;) X6 _+ }( y$ C, b+ Y0 ^! u' d/ E1 u
                if @.occupied then$ H+ L( L# i, `0 s
                        part := @.cont;
9 D) M/ o! D6 |+ ?* X                        @.transpOrder := void;( R' T* {* \; |4 R0 M
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ b) }& c0 M, m5 P7 S+ c0 p
                                @,root.eventcontroller.simTime);: J3 T" J5 h  n0 ~$ B% i
                        @.HasOrder := false;
( n1 t  l! r  z' ]' E9 M# o                        @.DrivingHome := true;
9 S% H) N7 p1 }7 q; a                        rgManager.tryToStartTransOrder;
0 N; I8 K* C9 `                        if @.Destination = void
7 |2 e) }& \9 f% W- P  B                        then -- no transport order for vehicle @( ]5 Y* j$ V. r/ C4 `  g( O* G6 k
                                @.Destination :=) a* @& t1 M0 y' [+ l* A, P
                                rgManager.nearestFreeStation(@,track.~);& n* G, @2 B/ \1 ^$ r' |9 t
                                newDirection(@);   & U( u$ `7 ~' t- p; g. I
                                if @.Destination /= void then
- ?3 a( I* Q2 w  A- V" ]                                        @.Destination.NumReservation :=
2 d' ^8 s$ z4 E8 B' W                                        @.Destination.NumReservation + 1;( W. {- t; k3 O, ~: Z) n- a
                                end;+ ~) h% K* y1 ~  a# E' p+ h
                                @.CurrIcon := "drivingHome";
$ ^! T; Z; j. R                                @.DrivingHome := true;
5 l. X+ f7 B: q$ s- i  y                        end;7 T9 L) K+ {  O) ?! q2 ~
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: t8 C: U1 ?% s- M) x4 v                        part := @.transpOrder;
+ p/ U$ U' ~# W6 _) M+ v                        part.move(@);-- load part; v/ t+ V5 b+ ?
                        @.CurrIcon := "load";
% M. w4 y* u+ O1 {! a5 y" f7 H                        GlobalDistObj := part.globDestination;
8 H0 F+ r2 c1 [: x                        assignLObj := rgmanager.rgAssignL;
0 X+ G/ y# o) M# Y                        row := assignLObj.getRowNo(GlobalDistObj);
4 Y5 |# j$ W- n8 a0 U                        if Row = -1 then -- since 70
4 w( N* h/ C+ Q+ X& Z                                if lan=1 then
( w0 Y( b! X: J: W: j# i' Q, B                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 V1 `8 T" e6 f" ^! E( B                                                to_str("in der Andockstation: \"",?.~.name,"\""));
+ q* I  u1 t) g( N4 l                                else  ~1 J* G) }( A$ P9 k) ~. `
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 o0 ~8 B9 S+ q8 ^8 P2 s
                                                to_str("in docking station: \"",?.~.name,"\""));                                3 r* y) v! N# Q* ^4 ]0 o4 W  s$ E
                                end;
3 W9 M- f: o/ e7 L9 ~% u                        else, Y: |3 }% a! h
                                @.Destination := assignLObj[1,row];
7 i0 n0 T, E% W4 }. Q" d                        end;                       
. d2 w, C( V: ]# W) y" b- e                        newDirection(@);
& g) N- H$ h" F) w8 y1 c( O                        @.HasOrder := true;9 e* c2 i% t1 ~# e/ }
                end;3 T! I  n: w( _
        end;9 F) e% n1 h1 M! {' @' ?  }* R
end;        -- of the method3 r' [4 ?9 T4 s) G
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
* D: M7 J. m- t$ _) k6 Z) `
; b  d) u+ Y8 _5 u这是AGV_putin中arrive的method。
0 _9 y* P# e; D9 S$ o! d% R5 i; F5 Z; \  {/ x7 X) l
当到达物料速度越高时,这个报警更多,: H% f; ~! ]- [, j
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
- E8 H* t' A$ I程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
7 A; C: ]$ m: s8 k! |
5 m+ W; g% _6 V; W0 v另外一个小建议,就是move,所有的move都可以这样
* C4 s2 L. D: _- G, ^+ _if not move() then debug end- p+ x; X3 m" l: C
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
! _# y' \7 m% Y6 R. g5 Rplant simulation中的free libraries有AGV模板,9 R7 v( @- M& x. ^+ q3 r4 L3 x  y
里面也有案例。
. G6 a2 M% z) }0 u我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
+ k( p- x5 E+ t5 a1 B) y2 X3 r$ g! |2 G+ G: q
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 " G+ ~3 A" t5 {2 N  ?6 M9 M

% N4 W. Y4 _$ B* `那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 # H; G7 I$ l5 c% k8 p% A, t
这是AGV_putin中arrive的method。9 J  N+ j7 B( |9 O$ }
# S* [+ j  S$ Y' P
当到达物料速度越高时,这个报警更多,
/ j( m% X' R3 c8 F& G, u
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-23 01:37 , Processed in 0.015816 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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