设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10011|回复: 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'
) @+ l( W$ z  A7 }*/5 r# t$ |1 Z  o& u0 |0 G0 U
is# g7 U) C( i" F% M, A5 U8 Z
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 `9 H" z- a- t1 T2 Z
do
' Z  E3 f) t/ R% q, f        Lan := rootfolder.Internal.Tools.AOLlanguage;1 \" |9 \5 `4 S, u9 H2 q7 v- J
        if current = @.Destination -- else return
7 L. U7 ?% v$ s        then* |" u/ R0 {( c# K' X% d1 ~
                @.Destination := void;# E* F( R  d  q6 m
                if @.occupied then9 u' I4 q4 x. V
                        part := @.cont;" \* \) Q- H& T5 L7 F
                        @.transpOrder := void;
% T% ]' p, \4 C+ d6 S' ]7 b$ U                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 y# V# I) j2 J) a# {- t" D                                @,root.eventcontroller.simTime);
! Z- V4 k9 |8 k; C/ q4 z                        @.HasOrder := false;
# i" V. {/ z3 Y6 @5 Q                        @.DrivingHome := true;: R3 X" k' d1 E& X+ d5 z; _
                        rgManager.tryToStartTransOrder;" C0 W) d( i6 d( g# j; W8 O( N
                        if @.Destination = void
/ f. k6 f5 p4 a3 {* R1 @                        then -- no transport order for vehicle @6 X: u' [7 A$ w. R+ j
                                @.Destination :=
" S' h7 R  {7 k$ c! f5 b                                rgManager.nearestFreeStation(@,track.~);
' r9 M8 _3 @1 n1 h( b' r; `7 |/ o                                newDirection(@);   
( L) C. {* H) f2 q/ Z                                if @.Destination /= void then
6 w4 O+ M7 ?, F! H# O1 u                                        @.Destination.NumReservation :=
" t0 {2 P' \; p: R9 j! J                                        @.Destination.NumReservation + 1;7 e7 a9 y' a! ^8 f3 \  {+ B: s. {7 n
                                end;
8 O" E* l( v% d                                @.CurrIcon := "drivingHome";
  Z  d3 @; Q& S& r( V" X0 E, L                                @.DrivingHome := true;
  @( ]: }- A: H7 X                        end;  r5 ]- h" ~# n0 u; _
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station. I! f7 E2 T. ~! _5 Z* F
                        part := @.transpOrder;
2 r# f4 m, }' N- Y0 i                        part.move(@);-- load part
: U# f; w: L- j: u" g6 t                        @.CurrIcon := "load";
' S5 C5 w1 N: O# g" q                        GlobalDistObj := part.globDestination;
4 c, R$ N( C( i% ?2 E                        assignLObj := rgmanager.rgAssignL;2 n& E- p$ `( C) N
                        row := assignLObj.getRowNo(GlobalDistObj);& z' X: |- X/ v  H# y( Q6 ^
                        if Row = -1 then -- since 70
; n- ^7 I8 H# c* n2 l' x1 [( G                                if lan=1 then
, [; p7 L: i1 X% X* S7 ~                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ U% z9 o  O! O( V: T
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
( Z- ]5 {4 M% y5 C0 y' |1 f                                else! V2 r. s) x& o" b) R
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 ~2 _( s; o  o; {                                                to_str("in docking station: \"",?.~.name,"\""));                                1 Q: N# S" z8 F6 f
                                end;7 ~/ D9 |; X/ H; h
                        else
% R1 s* k  E: ^  z                                @.Destination := assignLObj[1,row];8 B2 [$ [$ q0 d$ n/ L. H& Z4 S
                        end;                       
1 B$ q/ u& X( M% d                        newDirection(@);
3 R5 b- a7 q+ x6 J. B3 y                        @.HasOrder := true;
- e2 M' u) }6 `1 B5 R' b7 t' ^                end;3 g! O; c5 y# I, r8 t
        end;
. ?' c  s" e+ _end;        -- of the method
2 p$ Q- F9 i6 n, X8 h* A& [. s
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 , s3 @+ B& `, `- J5 R
# F1 g$ ]; K, g* d5 ~6 W; v4 L
这是AGV_putin中arrive的method。
) p8 _/ o- g- Y$ ^( @' w' B' e/ _- [, w
当到达物料速度越高时,这个报警更多,
$ V+ m! [* _" k可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
  L8 t& \/ U& O2 X8 [, ~% v: N5 b程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?9 h" Q% W3 z: ?$ c$ [" S8 H* }

6 ?( P% q+ y3 R8 j3 U  B另外一个小建议,就是move,所有的move都可以这样$ E, I5 D, e" q1 [! k0 z6 s
if not move() then debug end9 o! t9 J) y) n
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
: Z9 `' ]2 X2 d; G5 \' h1 w. qplant simulation中的free libraries有AGV模板,! n1 W* h$ Z3 x$ z- p6 W
里面也有案例。
" J9 m; o4 c/ A: x0 M$ V我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。) x9 F: q/ A9 e- v' M$ t# [
. K- ^7 {( u3 Y, r. e1 H0 F& t
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 , e5 e4 w1 M) s5 H; i& R: j$ G  i
' |6 |' P$ h% l9 R
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
0 I$ F6 y* u* G* A3 l& e" f7 |这是AGV_putin中arrive的method。  J5 w- x9 O$ x7 G+ A

  }; B; W1 n* V当到达物料速度越高时,这个报警更多,
: M& u* _6 y( c7 G, n& b; e
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-7 09:18 , Processed in 0.021400 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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