设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6905|回复: 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'1 A4 X+ u+ \4 A$ Y
*/
# t$ X4 _  {4 u% Zis/ K, ?: [! q  b5 R) s% v% U, x2 L  I
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 B) ~! W6 X1 [% T( X3 tdo3 K/ T: p+ g+ j! `- G/ N8 t
        Lan := rootfolder.Internal.Tools.AOLlanguage;
( l0 y1 v1 [3 T: H+ z        if current = @.Destination -- else return
1 r  w' b; L+ M4 _5 W        then
6 u% v* x* q9 Y3 T& ]+ R8 @                @.Destination := void;
- ~& C5 |: X$ v# ~8 G0 R                if @.occupied then3 d3 I/ g& n& e+ X
                        part := @.cont;0 u7 G0 X$ L; F: T( D
                        @.transpOrder := void;4 D6 [5 D: Q5 S, g8 Z" {
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: H/ y' n: n/ X! S6 U! c; a                                @,root.eventcontroller.simTime);7 }4 j3 Q/ i" A2 B
                        @.HasOrder := false;; K, ?9 T1 H) s2 |
                        @.DrivingHome := true;* V& S, M( Q5 f; m6 ~# a
                        rgManager.tryToStartTransOrder;8 V# u. q) r* K' x, x$ E3 t
                        if @.Destination = void7 O: @* }) L3 n9 H
                        then -- no transport order for vehicle @
5 Y) _% ^8 c# k1 ~; @                                @.Destination :=" E" J7 P- k3 z
                                rgManager.nearestFreeStation(@,track.~);
. L+ @! M2 }# S8 {; R! u' q; h) j                                newDirection(@);   & K  }1 F- P* z. K% B
                                if @.Destination /= void then
$ X  e; q! w' H& n% V                                        @.Destination.NumReservation :=
1 f" f0 }9 N# M) r' e% e4 l1 Z/ t$ a                                        @.Destination.NumReservation + 1;7 f. n( f6 A. p- r
                                end;
5 H! ~1 Z) y8 v6 V0 D  X% E                                @.CurrIcon := "drivingHome";, S5 X2 P" }. \/ P- q
                                @.DrivingHome := true;
1 b) X) q. }. e- P                        end;
: u  A; R7 y/ s" A( Z, i                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ s3 k/ q, f" x$ ^, N4 c$ A                        part := @.transpOrder;
! A. z2 ^' k! R; k  ?  d7 ]                        part.move(@);-- load part
2 Z+ {& g# `4 i' V2 X% t: a                        @.CurrIcon := "load";- c/ G/ s+ W3 ^2 r) N
                        GlobalDistObj := part.globDestination;  E7 ~* z7 T' K
                        assignLObj := rgmanager.rgAssignL;, h) ^" Y8 k5 g5 Y
                        row := assignLObj.getRowNo(GlobalDistObj);. b* @7 V& W+ J: f! Y+ J
                        if Row = -1 then -- since 70
, {2 k& B6 U4 ?. P$ n$ G                                if lan=1 then* f$ g: e9 V: K; B( }' E) }( r
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 N# Q9 p% e" V" I" U( v! Y                                                to_str("in der Andockstation: \"",?.~.name,"\""));
$ [/ H2 h* T' \5 d                                else
, u( j/ F) A5 _3 z                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. N, ~* j& g8 x3 U0 T
                                                to_str("in docking station: \"",?.~.name,"\""));                                7 w" ^# f+ s% d9 Y; S: |
                                end;/ B3 E$ S4 x  J( P9 G8 n
                        else
3 Y) C) c2 e& ^6 N8 ~                                @.Destination := assignLObj[1,row];
) I  b% D; U- F1 s: a                        end;                        5 I5 ]9 q3 L# x6 U3 E  t8 T; o
                        newDirection(@);1 p* A1 P  ~3 o+ ~! E
                        @.HasOrder := true;
9 n( Y( |/ o* a& P5 P2 u) I( S  \                end;0 h) z% @% K# I: k: W
        end;9 _. x1 Z* |" V
end;        -- of the method
9 |. x& @7 M* i! V' Y+ ^, Q# l
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 7 y% _( v  H3 n. Q% \- _" b

# f, i1 y9 K* E3 d这是AGV_putin中arrive的method。0 Z  i5 e+ _. j9 e- t
* I2 s. ~1 J/ R. ?5 J
当到达物料速度越高时,这个报警更多,# J6 \' z/ V* a) v
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。9 Y2 p  p8 t0 Q( ~7 x: ]
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?  v" J# a  [7 ^5 \' I7 C, A* y( f2 y
( @5 \+ u9 s( [# J5 Z- ~
另外一个小建议,就是move,所有的move都可以这样
1 m5 d+ h! {  R+ y1 S0 J9 ^+ m$ t1 oif not move() then debug end9 E4 Z8 V% g0 e6 ~8 n. T
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。  u; ?9 k) Y2 W6 {! {; V7 ~
plant simulation中的free libraries有AGV模板,! N- S4 F; m, T% Y9 e% g% U
里面也有案例。! {* @; E$ u5 a- X; {7 _3 M
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。2 c# U5 P. l& X* }9 ]; U6 _

6 N& b! @' z/ Z" O& i4 F( o( |' v我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
- S3 x- a0 T" a. i7 z. M2 ]- w% S3 E6 s6 F% M8 g' z
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 - T  D( j, u6 O
这是AGV_putin中arrive的method。% x5 m" z4 J. p7 ~+ v5 N
2 Z* i2 D5 T; D5 l  J
当到达物料速度越高时,这个报警更多,
# r8 {9 Y) q4 z5 C3 ^
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-5 23:02 , Processed in 0.017862 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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