设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6886|回复: 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': w: p& ~% z. \7 q& p6 B: h" M9 Y
*/" n- j8 {' J1 j  D+ n6 o& o, Z
is; d+ ?, `" N/ m+ Z0 x, q7 x
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;; I) [! L& {. y5 p3 }
do1 B! G2 ~2 H5 s; F
        Lan := rootfolder.Internal.Tools.AOLlanguage;; i* K3 m1 Z9 e* U
        if current = @.Destination -- else return
) e6 D; Q' P) N* O& V, e( e        then3 W1 w3 t6 P  N/ i2 c" k4 s) N
                @.Destination := void;
) ^/ V( d# Q+ p6 K                if @.occupied then5 h$ J# o$ {( Q- {; |$ B
                        part := @.cont;
3 F: T* ?; B5 \2 F6 \& b                        @.transpOrder := void;4 \3 j4 X/ [! `* }+ X( e% y
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" O# F! z& m' a                                @,root.eventcontroller.simTime);7 _! Y6 N* B# _( i! w% q* q
                        @.HasOrder := false;8 K3 V2 D) E. Z0 Y1 Q
                        @.DrivingHome := true;- C. y: ~' {9 F# Y+ |. W
                        rgManager.tryToStartTransOrder;# }2 d2 R4 x! c% Z, B/ T0 t
                        if @.Destination = void$ a- Y  j# l$ x  h) S
                        then -- no transport order for vehicle @
8 D% I8 i, e6 k% R0 Q                                @.Destination :=
" L& e7 G; m' D                                rgManager.nearestFreeStation(@,track.~);
1 K8 h9 H# k* Q4 [7 P                                newDirection(@);   
9 S/ E$ x; f' ~( ~                                if @.Destination /= void then
3 S* O, C# p1 ~- H                                        @.Destination.NumReservation :=
" p8 ]. F- B/ G, f  f3 L                                        @.Destination.NumReservation + 1;
" j3 W' g4 j, _; h, T5 N  j                                end;
0 D9 }* U& n/ T0 g; h' U) g: N                                @.CurrIcon := "drivingHome";
- O/ _1 O* N: J; L% m* {, H                                @.DrivingHome := true;
) ]3 f* B' }7 X* Z5 _5 a+ ^1 |                        end;
( j2 g  @& y1 t+ e+ F+ K! o3 L                else -- the vehicle @ is empty, both vehicle and part are in the same dock station" J! W' X  d; N4 Z1 c3 E6 D0 `
                        part := @.transpOrder;
5 m- r6 q/ T' z                        part.move(@);-- load part
7 q& T6 A0 Z7 H; g/ v+ U9 H: V                        @.CurrIcon := "load";6 j* Q  S$ e, r3 c
                        GlobalDistObj := part.globDestination;3 Q0 @4 x( G1 w% B! A. _- u
                        assignLObj := rgmanager.rgAssignL;, M8 x1 @3 E' {& c  L7 d" o
                        row := assignLObj.getRowNo(GlobalDistObj);
5 }$ D/ [( [( B3 Q; s+ U- m" ^                        if Row = -1 then -- since 70* k$ A: z  z8 @, f
                                if lan=1 then- W$ m2 O1 f4 V, V; j9 ^" g
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
  E8 c3 H' N. `                                                to_str("in der Andockstation: \"",?.~.name,"\""));' I8 C) u, g; D( X, F9 W( p4 _2 l
                                else
+ |5 z7 q  n/ D. g# \0 D: f                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, \2 w  G) m" _# C' s0 h                                                to_str("in docking station: \"",?.~.name,"\""));                                ( F4 X, O. N5 Z/ f, J
                                end;0 W* z8 g" h9 T: B6 c) x
                        else7 k6 u  A0 b/ x# O
                                @.Destination := assignLObj[1,row];
3 I  j) ]1 {6 C" v( G7 M8 q                        end;                       
3 R2 P) b) m; y; \- z4 ]                        newDirection(@);
; W; E* O2 P9 z" z; P' p/ Z3 N                        @.HasOrder := true;! O$ e! Y- e% G* \: J
                end;3 V- }1 E7 t' {4 \1 I( n  d7 ^9 P
        end;
1 c3 {! h8 ?, j$ rend;        -- of the method
7 n, \) `! h8 m' X" ]* ~
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 1 ~. K, H6 X/ n: @4 ]

+ r! F* D; E/ J4 N这是AGV_putin中arrive的method。
/ e* u+ d5 ?. \$ R6 r6 Z% Q% Z) X% N9 @1 a5 T( e; z( W
当到达物料速度越高时,这个报警更多,* ~1 M" e2 E( m( Y2 y
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。4 ]- {+ E5 {. `& W9 `( A* ^
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
. z1 ^. Y( B9 k0 D& h& U: H5 ?# j; S) ~. R6 M  T6 u& k& j
另外一个小建议,就是move,所有的move都可以这样. I. p- [1 r0 S# m9 l
if not move() then debug end
+ z) M+ v% m/ e+ u这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
" G, X/ ~: }' ~- R$ {# mplant simulation中的free libraries有AGV模板,: _6 k. b! `" U) n% Y: \
里面也有案例。
6 f& S7 b$ f" n我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
5 j& J( W. a0 a1 ~- i. G0 y2 y- t, s
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 & k8 ]" |+ v& k4 o1 k

# L: B. S2 ?$ M* q* Z3 `那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
. A: {0 C; Z1 Z; H% A/ b6 G2 b这是AGV_putin中arrive的method。
2 _, n7 M: o) o" B1 v7 [5 Z( x4 {  a  Y6 O4 A" S: \
当到达物料速度越高时,这个报警更多,
8 J% f, J+ g: @0 C/ J
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-4 18:44 , Processed in 0.025562 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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