设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6135|回复: 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'  Y" e8 E1 k; Y3 r2 m0 Z% J. h
*/0 r& P# k- S5 m: a; c3 z9 h
is6 P  ~6 E" ?; d" o
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 e" a9 n1 _$ D+ {' k
do( m7 T* L8 f3 N) {$ ~% v3 m
        Lan := rootfolder.Internal.Tools.AOLlanguage;
  B4 K. m9 p# H& f        if current = @.Destination -- else return4 A# t! x0 q0 r2 C+ _/ ^/ u! V
        then
, d" H+ ?) p5 b1 Y+ M                @.Destination := void;+ `' R7 p+ p+ Y  @0 I9 {  V
                if @.occupied then
5 r% y  R. L( n* N3 l+ F0 d, t5 n4 @                        part := @.cont;
5 Q; b$ F  q( ?+ S% w                        @.transpOrder := void;$ Z* P2 O9 C8 n. \
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 h7 w7 H* S1 L$ [3 }
                                @,root.eventcontroller.simTime);
9 ]0 F7 D3 A+ g# }* K1 c                        @.HasOrder := false;2 n6 {; j9 H8 H  \1 T+ u& G! m
                        @.DrivingHome := true;' e" B+ x% G- @8 f% t
                        rgManager.tryToStartTransOrder;
2 R0 S( J$ a" b                        if @.Destination = void
9 n2 s0 Q& u" }2 b( ^0 I0 P                        then -- no transport order for vehicle @
% z& J  c2 L! c6 S: l; ?                                @.Destination :=
5 }6 @9 e. Q* T" [                                rgManager.nearestFreeStation(@,track.~);' `5 J& V: G9 _% K, ]
                                newDirection(@);   4 r! d1 J' J& g* ~' N5 V4 z
                                if @.Destination /= void then
% c; B$ j5 i2 z  `3 G                                        @.Destination.NumReservation :=
: I+ d3 _6 T6 C% c1 a                                        @.Destination.NumReservation + 1;
/ K! c8 G' |" G! M- E                                end;
5 [2 J) y9 w+ F; I& ?0 x4 z1 u# E                                @.CurrIcon := "drivingHome";' w" H$ t9 s3 I2 K5 [- M
                                @.DrivingHome := true;. U8 j6 G- R; `1 u
                        end;0 T) y& q. K- E! o6 o/ R: Z
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" l! F, i0 X. k                        part := @.transpOrder;: H9 I' f6 r3 m4 ?/ O9 n" X
                        part.move(@);-- load part
" x; D/ `/ Q& x+ a                        @.CurrIcon := "load";. ?; T4 q; N# S) J' Y
                        GlobalDistObj := part.globDestination;
0 u7 y1 i! }1 g4 \                        assignLObj := rgmanager.rgAssignL;
3 i" g2 @0 V- n( d, }                        row := assignLObj.getRowNo(GlobalDistObj);
) A9 Z& Z+ m9 P4 ~- n                        if Row = -1 then -- since 70& z. v5 B' ~' D, d8 J% K
                                if lan=1 then
$ P$ f& r7 H2 F                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; W# a* j8 K( A9 d; Q0 }# r                                                to_str("in der Andockstation: \"",?.~.name,"\""));, Q$ F8 ~6 d% M9 u
                                else
" v% o" {4 |7 R* P                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: [2 ~, }  Q6 T6 b( a) h' \                                                to_str("in docking station: \"",?.~.name,"\""));                               
: ^* s! L" N! a5 o+ S/ a$ x                                end;  g( T- T& d. D# R
                        else6 a2 d2 D/ t( \! X2 ]( l
                                @.Destination := assignLObj[1,row];
7 \& A/ _& d+ A: L, q) F                        end;                       
1 y: r- k+ X$ l" h' Y8 q+ x5 x' m                        newDirection(@);. y- [1 L2 K3 j! B- _. n
                        @.HasOrder := true;! B& K3 r, q7 y: n4 u
                end;
3 Z) ~3 k. Y1 Z' G% n* S8 [        end;5 N: m9 W# |& U6 m* c- g: m
end;        -- of the method* H$ f2 p* W# m$ ^' a1 }
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
5 T) x8 Y6 x& V. {6 L
( A4 P" A9 `# D4 F% m0 g# U这是AGV_putin中arrive的method。
$ c  Z  W/ r4 Q; G$ \
; z" H1 d% j7 |( V$ G; M当到达物料速度越高时,这个报警更多,
! B% X% Z$ b& j& m) L& z1 w  M可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
% ]: J9 w: ]( ~4 s1 g2 q2 p程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
, i8 D; A. J1 Z( D
- Y. U  v) W3 v# O另外一个小建议,就是move,所有的move都可以这样
3 v- a6 Q  i3 P9 U* i  iif not move() then debug end
/ a8 L$ j" A1 Z& g这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
; W+ T2 h7 V% Vplant simulation中的free libraries有AGV模板,- ~1 q! J, U2 \( i
里面也有案例。, }% w5 l: Q% |6 }8 ~: o7 f
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
) q" L! [( @  `8 u  L
2 c' L$ C1 u- x; h0 }) f' ], X4 H7 a我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
! `- x* F3 u) j4 C6 K5 W
) t& J, s4 n- F9 Q) ]: K那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 6 ?" l1 [6 J7 J
这是AGV_putin中arrive的method。7 c& I, G7 s3 X. I6 \# b

! B0 y: X# c9 {( X7 N0 j) T/ G当到达物料速度越高时,这个报警更多,

) Y7 a, D/ E8 K' X) }2 K另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-20 15:19 , Processed in 0.027649 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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