设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7246|回复: 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'
/ r7 Q' N" |' V" G; i*/. a5 X  j" X! F" [: b
is
* v1 o0 j! x( V5 L" \% [        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 u/ Y; P  t8 ~2 q7 C* udo( O0 ^4 A) O6 [* `
        Lan := rootfolder.Internal.Tools.AOLlanguage;
. s* b( k  d5 |% K3 R7 r' U        if current = @.Destination -- else return& \, M6 \1 F! O( {
        then
7 |2 z" A) P) y1 a                @.Destination := void;8 ~9 Z( x1 F& j4 J/ {
                if @.occupied then
) d, h) m( F" O* J  j                        part := @.cont;
) q/ k0 c1 h  {3 R8 Q4 ^( `6 O                        @.transpOrder := void;0 T6 Q: _( l! L
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) Y( ?- u$ G1 Z
                                @,root.eventcontroller.simTime);
/ L+ D; _5 E- e                        @.HasOrder := false;
1 {6 {" w3 c/ ]$ L& \2 e# X' w! s                        @.DrivingHome := true;
1 D. f+ }4 q+ `+ v, g" D: ~5 [                        rgManager.tryToStartTransOrder;5 `. J: C7 @! i0 z
                        if @.Destination = void, F' f- X/ O9 C
                        then -- no transport order for vehicle @) y, z8 d2 [9 Y9 k& O% c
                                @.Destination :=
/ Q0 t6 Z8 U4 M& J                                rgManager.nearestFreeStation(@,track.~);
# N; |0 Z1 h4 U- H! l" v                                newDirection(@);   
: Z% q, L. V6 f                                if @.Destination /= void then
9 T/ U5 t. j% \; P! j$ B, B6 g; A                                        @.Destination.NumReservation :=) a8 p7 c- P# m
                                        @.Destination.NumReservation + 1;
4 S8 X4 {/ G& g: Y: V* O                                end;: \0 _/ ^8 F* l, [
                                @.CurrIcon := "drivingHome";
) P6 g$ n/ I' n                                @.DrivingHome := true;& f" ^0 r% u5 Q* B7 s/ a
                        end;% F& `8 L# i5 p) K+ y
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ s3 z. y$ ]) y  H0 L
                        part := @.transpOrder;6 w# B- {7 G! y/ T/ m( K' \
                        part.move(@);-- load part
# |3 W0 a# o1 E! f* a4 ~9 ?& n/ R                        @.CurrIcon := "load";3 A2 f! i& y. h+ `/ l
                        GlobalDistObj := part.globDestination;5 o, a: Z* U' x4 u5 l9 M
                        assignLObj := rgmanager.rgAssignL;, O. t) K- W1 k' Z
                        row := assignLObj.getRowNo(GlobalDistObj);
9 N6 g, c1 c$ W4 m! u                        if Row = -1 then -- since 70
2 U( m& l, U! I3 b" h8 M                                if lan=1 then, A, T' L- V8 }0 P( U9 X
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 m* Q: h! s" Y  x                                                to_str("in der Andockstation: \"",?.~.name,"\""));
! B" `1 u9 a( T: z/ c) g+ L% q                                else" V/ N1 c( G7 c7 B# ~& T8 ^
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% B4 s1 S7 \: W3 e  C                                                to_str("in docking station: \"",?.~.name,"\""));                               
9 K7 f6 a# L* ]& a: E, H! d0 m                                end;
" j' n2 Z$ L1 P7 \3 [+ z' f! L                        else
* s8 {; d5 q; o6 @: m# |                                @.Destination := assignLObj[1,row];
$ U4 c5 e& r2 ^0 n& b% b* m! W                        end;                          z; T0 _, D. u5 ?3 n- {6 Q1 Q
                        newDirection(@);
- C6 W7 ~  g2 S+ }. y7 i                        @.HasOrder := true;
/ H4 V: ?9 u) i. D                end;3 c& z+ o) W% Y9 K* r* \5 e
        end;
. j! N' b6 K$ F! N2 F- k4 m1 Tend;        -- of the method
. |$ i. u8 ^  A" t( f5 B4 D' }# \
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 : ?! L9 Q, Q5 r. C
9 O+ C( d& E# u% L
这是AGV_putin中arrive的method。
& \; X" c* d! e+ N) P: Q( ]! q
. \/ s5 ~, _1 g3 ]当到达物料速度越高时,这个报警更多,
  K1 ~( k( S1 Q2 b8 }+ \可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
% }) ]8 s: v: ?8 n+ q. c程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
' i9 Y4 F5 K3 P8 x" N9 u7 u, P. z  h, i- i! [
另外一个小建议,就是move,所有的move都可以这样
; n; Q$ h) [# \" t  w; jif not move() then debug end8 k' J. ?8 Y) U2 N
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
" v5 h6 O: J+ Kplant simulation中的free libraries有AGV模板,) X: b. K* S( j2 x: k1 O7 H6 Y
里面也有案例。/ E$ [$ e/ ~) z7 [! a
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。, C5 K, E- K( k2 d- U. q

0 l& `  r) O/ Z, M4 h我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
5 c8 U4 F6 \8 o' ^  V
9 Q( p( g9 q2 i7 E! ~那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
: j  \- y5 W' ]+ Y3 ^) c1 k这是AGV_putin中arrive的method。0 J0 F2 `/ c! _
4 [  E9 `0 E4 X" y
当到达物料速度越高时,这个报警更多,
: u0 T7 J6 l: {# q2 o$ ]- t* H
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-30 08:36 , Processed in 0.027664 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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