设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9382|回复: 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'2 p) b! a, }0 `% }+ Z+ H
*/
6 K/ T2 u8 N# G) j5 q$ C" A; {* u$ E4 Pis7 U  j4 A) q/ T7 g& p0 e3 U, w& ~
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 @/ b+ k+ g( s; ~  Fdo  x. Z+ x' m: S0 o& E% S& o
        Lan := rootfolder.Internal.Tools.AOLlanguage;2 r" d% Y% c" }( j% a8 N" g
        if current = @.Destination -- else return
8 Y8 ]0 ?) Z6 T+ f+ R9 i        then
7 |# s5 F+ m. w0 ^                @.Destination := void;
# _* V9 C  `% f6 H# F. h6 a                if @.occupied then
) Y" h% Y& }1 i                        part := @.cont;
1 U9 _+ E4 f! A2 ^+ z                        @.transpOrder := void;
# E+ a- L8 z1 N. k                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 E- J2 q3 h5 F# Y3 T5 X8 k3 g
                                @,root.eventcontroller.simTime);7 }/ J; F9 f, f' j4 I
                        @.HasOrder := false;& Z- E" I1 W4 N% p
                        @.DrivingHome := true;
. ?! p  ~! U& C9 x: z' ~                        rgManager.tryToStartTransOrder;
7 u4 H8 j- z! N) g4 d. u- k* \                        if @.Destination = void8 _- Z2 V$ f8 V4 M% ^+ o5 w* K. G
                        then -- no transport order for vehicle @* R" @) `! R2 ^
                                @.Destination :=
, F3 _$ M% Z1 j3 _                                rgManager.nearestFreeStation(@,track.~);2 {! n( n/ p( n2 j" J) z
                                newDirection(@);   
( o- ]4 r/ l! P" r# b+ b                                if @.Destination /= void then2 L! m& b4 I- J9 @4 @* ]7 n
                                        @.Destination.NumReservation :=& b# k' B1 Z- n
                                        @.Destination.NumReservation + 1;
$ M' A" ~0 B( j7 T6 y' P                                end;( J! X) B0 _' X, v1 T+ ^
                                @.CurrIcon := "drivingHome";
  o! C1 N, c# n3 L, d                                @.DrivingHome := true;' f$ ^" g: b3 S2 C
                        end;. U  d1 M3 L" S3 y7 w* l
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station- J" T: [2 p( E" e" S
                        part := @.transpOrder;
/ X# r+ n4 t7 O0 {; ]. D1 M                        part.move(@);-- load part0 g$ i8 Y1 b) C$ k
                        @.CurrIcon := "load";2 \9 {: e( J6 b6 S9 y! E  u  S& i
                        GlobalDistObj := part.globDestination;
  K/ T4 _% Y: @! B                        assignLObj := rgmanager.rgAssignL;
- s' y) i) [- G* D# o7 g                        row := assignLObj.getRowNo(GlobalDistObj);
2 U% s' J& L2 u& {                        if Row = -1 then -- since 70; d0 I& u0 [% R% k  V2 ^
                                if lan=1 then" z8 F! d. w$ a4 f) _9 ]. b4 S; W
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 ^5 ~" O& d* w9 b7 p                                                to_str("in der Andockstation: \"",?.~.name,"\""));  h+ s6 T2 Y, ?1 O
                                else8 V0 Y, R6 t  M# h. Y  I
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' R3 h" h2 w0 }: e5 b6 W+ h' v
                                                to_str("in docking station: \"",?.~.name,"\""));                               
5 \) C% g2 F( p( D2 }  Z                                end;/ Q% x& D8 F$ F6 J8 M
                        else1 O1 z7 I$ y7 e
                                @.Destination := assignLObj[1,row];3 H) P+ Z* c% S0 p7 n. t
                        end;                        % o; G/ ~2 q1 A1 x8 j
                        newDirection(@);
! ]5 w1 Z# A. b: r& H                        @.HasOrder := true;
! @" V0 K1 l1 O' b% t+ D  e                end;9 j& e, S9 G( _( P
        end;  V; @$ `( X/ l$ R/ O; v$ f
end;        -- of the method
2 y- s- a/ w  W  ]$ A0 t2 x
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 * ^% H- u% t. }7 L

, M3 n; p9 H' h: `4 L2 P这是AGV_putin中arrive的method。, V, [: x: T% X5 ]8 S
2 f) Z2 `1 A, }! y, P: g7 a" h
当到达物料速度越高时,这个报警更多,
  }& ?0 \9 `# q# w4 R3 N可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。# L% D; g8 P& [" X3 `9 h' [
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?  G- N( u+ v; v' B$ H! \5 c
( l' [+ [% W. o# w0 Y
另外一个小建议,就是move,所有的move都可以这样! m, _) w3 i5 |- W; W
if not move() then debug end
5 l1 y( m: f( Q% a4 \这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
; S7 V" W- l( M# \$ v  Qplant simulation中的free libraries有AGV模板,) v/ ^1 R) A) ~5 X& `3 {: E5 c
里面也有案例。1 _5 A) L6 Z2 S9 {) U& a
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。. y3 H4 [, P2 r
6 {3 B1 m5 F' d9 g9 L
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
. n/ P3 D8 J, j6 `6 W! s( l) s% N; y. a% B( E
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
7 R8 V7 q5 X5 e1 c这是AGV_putin中arrive的method。
* b% D) b" O4 U3 B9 {' V1 Z
2 Z: m% R0 S$ L7 h! ]7 N当到达物料速度越高时,这个报警更多,
8 T# _, @+ V" F8 N( \
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-29 05:27 , Processed in 0.019204 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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