设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7938|回复: 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'
  g0 _! ]; B7 N1 B*/
+ M: Z4 k0 y  f- Y" n7 q3 iis
: h) E  K. E- p: {" G        part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ L2 @' L$ A+ p2 p6 a% Q3 z- o8 {+ H
do# Y3 k! I8 s' U+ ~) ~$ Q' H/ H# x
        Lan := rootfolder.Internal.Tools.AOLlanguage;
' f- v7 Y1 z3 w  L+ p* Q2 Y1 E) F        if current = @.Destination -- else return
7 ^7 j+ O7 l, x; o2 T        then
8 `' g8 M8 X; V& ]                @.Destination := void;
; |! |8 b$ y2 u3 T7 w+ N                if @.occupied then
# a+ V) `+ U7 J: P                        part := @.cont;9 H% D4 g; S1 Y2 w9 R
                        @.transpOrder := void;! Q( K$ [! C! c# K  ^
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 e' u3 }6 N2 g  Q, K0 A- v                                @,root.eventcontroller.simTime);
, D0 @7 @3 ~- A' l' [% v                        @.HasOrder := false;) g5 w8 Q# p, g0 f
                        @.DrivingHome := true;
3 W( a/ |- m1 a4 I! @                        rgManager.tryToStartTransOrder;
9 J3 K' s5 ~$ M( N                        if @.Destination = void
' b7 q0 Y7 b- B                        then -- no transport order for vehicle @* K8 V- I! ^' L% O
                                @.Destination :=; O2 O% H3 k8 J
                                rgManager.nearestFreeStation(@,track.~);: r) Y) ]3 _% R9 P& o
                                newDirection(@);   * n4 j, b1 ^* h  E
                                if @.Destination /= void then! f) g3 U& ~1 Q; T
                                        @.Destination.NumReservation :=
& i) Z8 |8 Q7 R& W$ t' }; a' g8 s                                        @.Destination.NumReservation + 1;# j5 v3 P1 z* T& M5 {
                                end;
" u: j1 l" [# @$ g0 {$ }# h4 k6 ~% ^                                @.CurrIcon := "drivingHome";% h3 u* U; ]" T( G2 B9 s; u! [7 [
                                @.DrivingHome := true;' a& z$ L0 {! v- f6 @& j6 T
                        end;
* g) m; M; H' f7 j: }5 B                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 O  [! L1 m! e& \! z                        part := @.transpOrder;7 H! K9 J4 r6 e- s% E
                        part.move(@);-- load part
0 M. H# f& _! `% L, U& G' V                        @.CurrIcon := "load";
8 G9 L0 {: Q$ o; y3 r+ }' Y                        GlobalDistObj := part.globDestination;$ H1 Y6 t' P1 d2 d+ t' I9 n- g
                        assignLObj := rgmanager.rgAssignL;
" A, I9 d: Z' y! ?; I" M                        row := assignLObj.getRowNo(GlobalDistObj);! N, M. |* i# h% \& ?; \% g
                        if Row = -1 then -- since 70
' T+ D# y5 Z2 P% {  X, @                                if lan=1 then& c3 d* W* v  `
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! w" W% H: Z( s2 m7 j& f                                                to_str("in der Andockstation: \"",?.~.name,"\""));" y* p( [; u. Z/ ^- Q
                                else8 ?4 n+ d- y* q
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 Y  p6 y0 k2 m0 U2 k. J7 t
                                                to_str("in docking station: \"",?.~.name,"\""));                               
% N7 \2 N7 k' c- t$ P: B                                end;
1 z5 c' J- |( e) R                        else
' Q1 g; O+ t! W* X                                @.Destination := assignLObj[1,row];
) ^% I3 G5 P9 C0 \1 w7 Q6 z                        end;                       
, o( P' {& Q9 m8 h                        newDirection(@);
: J, K- f- \! o1 O                        @.HasOrder := true;, r, N# @: w& c- x2 Q: x
                end;
" s: Z2 v, J+ p3 T0 K$ l1 k        end;+ {* W4 u6 u$ O* i9 {
end;        -- of the method
8 d" ~* |4 v2 M& F( k0 p% ?7 ~/ @2 U
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 * G% B/ {! H/ ]. }0 F' F( i  G
8 F- o/ a' x- H- a: z# Z5 K4 o% T
这是AGV_putin中arrive的method。
4 o2 H7 H( H  l# C& c2 t/ d8 I& g* p; e* y! s9 F; P/ W
当到达物料速度越高时,这个报警更多,! V1 G# M+ O: S. y  X
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。( K- R3 A3 Y# ]& Y/ V& w, N5 R* Z& n
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?6 s9 t4 E0 a. y) J$ G+ M% l
4 P. `7 ?+ s4 b. l- e
另外一个小建议,就是move,所有的move都可以这样4 [0 B$ K( a# L+ o0 c6 b
if not move() then debug end: V0 r4 E4 g! V$ F
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
( f( N* W  L* }# \plant simulation中的free libraries有AGV模板,! C1 l6 F% J& T
里面也有案例。9 {, n' y* y3 m2 r, x5 C% a
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
" R$ {( I8 T# V; r- I* d, o7 d" X- Y6 D7 H
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
: S5 Q/ s! F6 O& l: g
. C9 G$ P8 D# `0 x6 d那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08   d! i+ t3 u% z' }1 J8 Z
这是AGV_putin中arrive的method。# m, u8 R" t1 B- I
6 Q1 ^6 r; @' T+ V8 Q9 |1 k
当到达物料速度越高时,这个报警更多,

. O* |: ?" y1 [: r% J* P另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-6 15:40 , Processed in 0.017846 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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