设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7342|回复: 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'; G& I# {% \. D, z) I! k$ w3 L
*/
, v! r% q' h! qis
) t% C' M) x9 r8 v# z2 y) m0 H        part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 X0 g& L% I( ]2 p2 E! y
do
9 G1 A2 C0 g8 d2 w/ B1 s8 s  a4 u        Lan := rootfolder.Internal.Tools.AOLlanguage;
; H; K3 ]. R, k( Z        if current = @.Destination -- else return1 ?4 n) s9 m$ i: ~( P$ r' G$ h
        then; V6 p' |" H1 F. h: A
                @.Destination := void;; R, R* W: m0 N/ }! [4 v
                if @.occupied then( U% e. n% _! N. t. J
                        part := @.cont;
+ S" p: F0 a/ O5 i$ A% ~                        @.transpOrder := void;" H% z$ C+ O' w, `; H8 f
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" p& l5 S$ J6 z! }, X                                @,root.eventcontroller.simTime);1 ?/ s' L% \. G2 U" {: J6 n0 o
                        @.HasOrder := false;
1 ?8 u. C8 A+ v; C                        @.DrivingHome := true;
% m8 e5 h  t0 p2 _% C                        rgManager.tryToStartTransOrder;
( q2 Z( H8 O0 b5 G  A                        if @.Destination = void& q  W6 V" U; m) F% }* y
                        then -- no transport order for vehicle @( G6 Z! O* t8 o$ j, }+ `
                                @.Destination :=
* }( |, p. n) G/ |0 S6 B: \                                rgManager.nearestFreeStation(@,track.~);
/ o1 |5 r; e# f                                newDirection(@);   
4 v% a) t6 n! j9 K* `                                if @.Destination /= void then
( q5 n! U+ T. X) c# l% z# d! \! k                                        @.Destination.NumReservation :=0 x. C- z3 v8 p2 A
                                        @.Destination.NumReservation + 1;
, f3 L' k6 u3 D8 v7 Y                                end;. T! [! @, E+ {. Q
                                @.CurrIcon := "drivingHome";
# Y/ e% a, o/ ?& [! i% s( a                                @.DrivingHome := true;9 y+ H+ }) V- q; I' m2 B
                        end;& F. r  {8 V+ G& f! Q
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 D( k5 S: j- L: F                        part := @.transpOrder;
8 Y' b3 k6 N. W4 H! q' P                        part.move(@);-- load part9 I6 G/ h8 v! f6 w9 Z8 c/ X
                        @.CurrIcon := "load";+ ?1 C7 L" q5 V3 s
                        GlobalDistObj := part.globDestination;
+ i+ p6 @& A' v: u8 d5 H                        assignLObj := rgmanager.rgAssignL;) I  A2 `& B0 B7 V. Q
                        row := assignLObj.getRowNo(GlobalDistObj);' x  q  e1 S; J. _5 O
                        if Row = -1 then -- since 70
. Z( |5 u, V3 J                                if lan=1 then" G$ g8 C4 q6 F9 @
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( A' g2 a9 b( S" d                                                to_str("in der Andockstation: \"",?.~.name,"\""));
$ e" T- p& ^+ }: v                                else
+ v& P, c" b4 A                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; T2 h# R3 N4 C- @8 g/ {7 Q. _                                                to_str("in docking station: \"",?.~.name,"\""));                               
' ]& O+ M" H! U' P- C                                end;0 [, p8 e. u/ _, L
                        else
. F( d- N, A6 D8 h3 C                                @.Destination := assignLObj[1,row];
  y5 p) l* {) O5 z* `                        end;                       
5 Z" f# s. Y& A$ \& O                        newDirection(@);
0 ?( t4 j3 g5 G1 y9 U: |                        @.HasOrder := true;
  O; J6 x8 h& s) O0 [+ f                end;1 a( ?9 a$ `# L( |1 e
        end;3 K4 A6 a# l- M! H
end;        -- of the method
% Y& i9 L% m! i. Y: i. F
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
" Z! z3 M' K) M$ Z' a8 g9 {5 ~/ S0 t3 Z+ \0 L
这是AGV_putin中arrive的method。
( Y% ], u, }* R7 X# p
5 b+ e( z. R  ~* v4 I( G, L2 o+ F! i当到达物料速度越高时,这个报警更多,
1 B4 R/ E6 {/ d1 J; V+ y" [可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
/ p* q/ M7 }3 s/ m# i程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
3 w' e4 i. z( r# @$ d* p# y# S' J! ]  v! C( s
另外一个小建议,就是move,所有的move都可以这样
# B  D! _* A  I5 V" n$ V* {if not move() then debug end3 Y( W) a" c  G' }* f& Q
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
6 T: [- h! K0 x4 zplant simulation中的free libraries有AGV模板,3 }4 ?$ }  b+ [& W/ h! y3 N& {( {  `
里面也有案例。
" y8 p. Q' c& s6 o) V! B; A我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。* B+ \; L2 ?/ x2 Y
  P/ R% X& |. Z9 x# u
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 % Y1 `8 y7 g  l; b5 Z* I
) P# n3 r& {& I/ ?9 x, H
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
$ S$ k  B7 x: S: ?这是AGV_putin中arrive的method。1 Q* X2 q: G* B. D
0 g; J2 M% |2 A7 P7 }: Y0 u( x: N$ P
当到达物料速度越高时,这个报警更多,
+ R( N/ B8 ]0 h0 l7 l2 Q& f" b
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-5 07:43 , Processed in 0.020987 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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