设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10174|回复: 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'7 s# D* T! J# f6 C* Y
*/9 o9 g6 t' r% F; O0 u* a- a
is  Z. L* G* V$ b; d$ K( ^
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;  z, C1 I: Y2 z) e$ m9 \/ Q
do7 S: n& ]! T7 Y/ U/ D. i9 ~
        Lan := rootfolder.Internal.Tools.AOLlanguage;
' K# T. m) Z3 U' G        if current = @.Destination -- else return
8 Z3 s/ @) d! Q" p        then* S8 w6 z; M" k9 @$ O
                @.Destination := void;2 x) [% Z# R( z2 h- D- \
                if @.occupied then4 f. ?5 c8 [( n, m1 K
                        part := @.cont;
; N& `& Z( D+ Y* ?/ g/ D% H                        @.transpOrder := void;
3 k) y: t. u# X: Y  D  u2 c  {: L                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ x) \: g! d- J' D: s  ]% o. D% d                                @,root.eventcontroller.simTime);, }3 V" R% _3 e- m# s
                        @.HasOrder := false;
& q0 }2 \  q6 R- |: B* L# Y2 [: ~                        @.DrivingHome := true;, Q2 X) e1 _7 H% v3 U
                        rgManager.tryToStartTransOrder;
# k" z3 o  [# M9 l$ k. ?" M                        if @.Destination = void! ~0 `# \. t1 L9 u9 n" l
                        then -- no transport order for vehicle @) M! M8 a# N6 D, V' y6 l
                                @.Destination :=+ O0 Z. L2 p$ ]. ?! ]4 @/ L" f
                                rgManager.nearestFreeStation(@,track.~);
) R) d  l3 [' S% Q4 F* z  y                                newDirection(@);   $ W( P. h  }1 H8 K) }$ `
                                if @.Destination /= void then
% T4 T8 j7 b+ \8 O  V$ a2 C: T                                        @.Destination.NumReservation :=
: o8 L, J7 Y0 ]) f# _) Z! j4 U                                        @.Destination.NumReservation + 1;
, B4 W' n" Y1 {1 w                                end;) A0 m4 S/ W+ d  X6 R2 J
                                @.CurrIcon := "drivingHome";5 m! z; c' s" M  E; o5 \
                                @.DrivingHome := true;8 [# v! q- x2 I# @0 ?1 A# D0 i
                        end;
! D! i* O3 z4 F. F* _# G; p                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 v9 M. Q+ ~4 u                        part := @.transpOrder;# J  x8 E/ E/ }! E9 s* e# |# r6 [
                        part.move(@);-- load part
+ l, _, `5 S# K9 j5 ~6 U                        @.CurrIcon := "load";  o7 x$ C$ \6 n8 y+ s0 i
                        GlobalDistObj := part.globDestination;: _3 @1 E8 t. Y/ b' R
                        assignLObj := rgmanager.rgAssignL;2 ~5 |0 T/ U7 }/ d
                        row := assignLObj.getRowNo(GlobalDistObj);
+ Z1 \4 O4 r; L* @9 t9 ]3 C8 i8 }                        if Row = -1 then -- since 70/ {. L$ X0 \: v; s8 \
                                if lan=1 then' H# Q4 J) G" q
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 n5 L3 u0 |9 N7 j. K- N                                                to_str("in der Andockstation: \"",?.~.name,"\""));
' a) ?, V# h0 |& w* Q' i8 f. Y                                else
! s$ g) m9 c) b2 |  P# }                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. i% v% M* e( j( P' `8 W0 p                                                to_str("in docking station: \"",?.~.name,"\""));                               
$ y! S2 X8 d. P7 K4 ?                                end;
0 _2 p( S# j  t. G/ x* U                        else2 M2 O3 [- V% l; v1 S2 w
                                @.Destination := assignLObj[1,row];- ~  r6 R* r' M' L6 ~; V- H
                        end;                       
8 ?7 M1 g3 _3 ?/ E' J/ v* V; h                        newDirection(@);# ^) J3 U& ]7 F1 a2 Q' E* Q5 o9 F7 Z
                        @.HasOrder := true;
8 u! E# ^, }  j3 o                end;, o$ H5 }# L9 A+ y5 w# r8 y
        end;
2 `& L) ?9 N6 b; d/ Z' L4 O: Send;        -- of the method
1 d/ b9 F) G' i' g
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
+ U' v% C% Y0 ^
4 V1 m: r0 G. R# o- L; L这是AGV_putin中arrive的method。' u4 C- M. c" v- c' n, T& q( U
  e7 A; }4 f* T( h5 r4 D* `
当到达物料速度越高时,这个报警更多,
, ]1 z5 f( ~+ y" b9 C) _# |9 J可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
- j% W: O& {% x# z程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?2 ~- h  i: }) w/ M

- M3 T& {8 u, m/ z' z另外一个小建议,就是move,所有的move都可以这样
: L* ?+ W6 H- f: Jif not move() then debug end0 U) M. _  c+ B* ]3 I0 a$ B! w
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
. V- x! X! D1 aplant simulation中的free libraries有AGV模板,
1 Y: i0 w6 w6 l; L: v* N( u9 K里面也有案例。
' u* x& o5 ], k0 w我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。8 _, {! x6 E! W# Q
' G* T. C) f- T3 p
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
8 W# `$ C: {7 `+ y/ o' [7 g1 V: J  {4 [5 c  I& f$ j8 ]
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 2 |" W9 d$ n  x% X
这是AGV_putin中arrive的method。5 s3 k: T' X" s( Z$ M* Q8 ]$ f$ F
0 S7 ~+ [' n0 v2 y% {- j  H
当到达物料速度越高时,这个报警更多,

8 I# B/ o, [1 }/ J另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-18 03:37 , Processed in 0.016035 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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