设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10161|回复: 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'
9 L* C6 V, {- i9 f*/7 B! v+ U, ?8 c* {( ~6 y4 Z
is2 R7 X8 l0 P2 u) p& W+ R* \
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 [" b. C& l& B1 g9 q  s0 [; Mdo, z6 {# @& S  P7 V% z
        Lan := rootfolder.Internal.Tools.AOLlanguage;6 |4 T& T5 n; `% A
        if current = @.Destination -- else return6 j- m7 q0 J$ }3 A2 o1 [* V( l
        then
& I: M, s( ^! x. E# }& {                @.Destination := void;
# o& n  ~8 a) c" g- m                if @.occupied then) S4 E2 A3 [0 @" Q4 e" _
                        part := @.cont;
4 `6 Q3 ]' n2 @6 V& E                        @.transpOrder := void;) P" X2 B0 [: ?7 ^
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 H( u0 f) a$ s                                @,root.eventcontroller.simTime);
$ c9 k6 w0 Q2 q6 m' p                        @.HasOrder := false;
8 s2 w5 u/ S" H) \2 D6 |                        @.DrivingHome := true;
: o' v; O- i& l# i; |4 G3 U                        rgManager.tryToStartTransOrder;8 G% u" ?7 e# c5 d3 P. `4 c6 N
                        if @.Destination = void- i- t$ |  c! g
                        then -- no transport order for vehicle @& D* |- |, `2 L+ ^
                                @.Destination :=* b$ Z3 ~5 g& x  y
                                rgManager.nearestFreeStation(@,track.~);
' ^1 Z4 f/ \  E" n" Z                                newDirection(@);   
. t4 x# i/ C$ a7 ~4 t! C  s                                if @.Destination /= void then
6 z) h1 p" x4 j2 |9 A5 M                                        @.Destination.NumReservation :=+ V9 `) m' _3 [5 i- |% Y/ g# D, s' Y
                                        @.Destination.NumReservation + 1;6 d% S$ @% M0 ]2 v
                                end;) Q, G. t/ p/ H
                                @.CurrIcon := "drivingHome";' a& p) x$ B) K8 p2 g9 K
                                @.DrivingHome := true;
- V" y9 B5 o) J2 W- Z  G                        end;
4 ~; |( e& P9 q2 h/ N9 ~) F                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; s# v; Z9 A, K  B& w+ R$ b                        part := @.transpOrder;
1 T  @8 m3 T9 O9 k/ O& \                        part.move(@);-- load part
% y% [9 }/ t; }: b. x                        @.CurrIcon := "load";; R  d- X9 C4 Z3 b
                        GlobalDistObj := part.globDestination;) y8 M* c& d5 R5 K- _; C" h0 r
                        assignLObj := rgmanager.rgAssignL;8 x% r# [" `1 f7 U" t
                        row := assignLObj.getRowNo(GlobalDistObj);. a; l3 c& C6 t* ?. {
                        if Row = -1 then -- since 70
' j: E- o8 ^6 x- G; c. _                                if lan=1 then. q& X( C- K4 }! f  S
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, u8 s2 ^3 y% m                                                to_str("in der Andockstation: \"",?.~.name,"\""));3 a! Y+ u* E/ p; r% J
                                else
2 p0 q5 ]6 c8 w/ E; ?4 p                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," h' x$ p6 y3 p0 U4 _! z
                                                to_str("in docking station: \"",?.~.name,"\""));                                9 F4 j% r! L- b* x; t
                                end;
& G5 w9 w* ?% Q, u                        else
. [* }7 h# _8 O# N; a7 e- Y) A6 N                                @.Destination := assignLObj[1,row];0 T# e5 @  Z% q, V) u8 f
                        end;                        " B" B5 s* B2 S7 N  t( w
                        newDirection(@);- c) z) F  q$ `' a  S
                        @.HasOrder := true;
7 H, }9 v. ^' F  {1 A/ [                end;
, r0 d+ s3 e, l2 p% V- k        end;
+ k; A, j1 L! Eend;        -- of the method8 H' [  r; S2 z( `' i
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
- f1 o% `" W. ]4 S, ]6 Q$ V9 q) P$ C7 z0 S
这是AGV_putin中arrive的method。
; m* U  ~$ M$ o. b& j5 Q0 I& N: `
3 h0 Y  [& f2 N. K7 U当到达物料速度越高时,这个报警更多,
% `/ J' H4 I0 Z6 P% [可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。6 O7 `+ i% i  }1 H" Z' X2 h! G
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
* x/ v- Z! g+ Y6 Y; {
2 W# V3 c0 ~2 W* w5 r另外一个小建议,就是move,所有的move都可以这样% m, X- z5 ]) M1 R: @+ e! H4 l6 D6 t
if not move() then debug end  q% t% @% t1 l: a
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
, \  t4 t3 q& i& a1 r4 [plant simulation中的free libraries有AGV模板,
* r5 Y/ O7 V0 T- j5 T  D  w, e里面也有案例。8 l% y7 K7 ~9 J/ V6 p+ `- E
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。6 J5 k. E( Q& C& L$ C

5 G; l$ K6 K6 X- I! z8 w我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 {, h" R  d/ q) W6 n- g
) J, N- }" Y7 E6 s! s- }那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 9 b& m1 O) I1 h  c# Z
这是AGV_putin中arrive的method。
5 G( {9 d# {. F/ T7 n1 j
( i& O( f1 V# s1 n, @  p当到达物料速度越高时,这个报警更多,
; q* c( A- I; Q8 k% J$ }* A
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-17 11:32 , Processed in 0.019184 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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