设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8491|回复: 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'
8 x' [" z+ i$ Q7 t8 v  Y6 b*/
) e- m" K6 C( Y1 b2 X. ?' t, Qis
4 P+ H6 o$ F& S, Y0 B& u& `5 |7 t        part, GlobalDistObj, assignLObj:object;row,Lan:integer;" L, a$ M1 J& i) D' Z, Y$ o
do$ _7 W' l& \* O
        Lan := rootfolder.Internal.Tools.AOLlanguage;' f1 y7 j) h# L9 ?. w( S
        if current = @.Destination -- else return
, V" O5 I# U" R* u- A        then* ^$ _$ W+ o- z$ y, h0 i. K
                @.Destination := void;
; x) r  L( R5 c6 N2 E; d                if @.occupied then7 t; }3 ?$ N7 J' r% {
                        part := @.cont;9 v( p2 W& Q1 a" c3 }! n
                        @.transpOrder := void;6 K" H+ v! c& [& T$ S8 }
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( S. ]6 p, L/ |( G, t# s                                @,root.eventcontroller.simTime);
5 h! V, P- U( i- P" M! @3 `  U                        @.HasOrder := false;9 t5 t+ f% K3 n* e
                        @.DrivingHome := true;
+ s3 c: m# G2 K% T- T; o  ]. Z                        rgManager.tryToStartTransOrder;
5 H2 l; |& O+ a. k& Y' u' N6 s                        if @.Destination = void' [0 r8 O) G! o7 c- k
                        then -- no transport order for vehicle @/ _+ s5 p8 b& S2 E
                                @.Destination :=4 H8 D2 W) h3 v) C" h
                                rgManager.nearestFreeStation(@,track.~);
. B( J1 A3 u. [, p0 }' }                                newDirection(@);   % O1 g8 ]5 |( z5 m
                                if @.Destination /= void then
/ R' m$ y4 |6 [- ?6 O                                        @.Destination.NumReservation :=9 z5 N! N0 R, N; A9 U2 a- ~
                                        @.Destination.NumReservation + 1;" p# W% U* d$ V1 W+ U6 H
                                end;' c: e1 X' `" U4 B5 h3 x5 E& i
                                @.CurrIcon := "drivingHome";! _1 @5 y# t2 H. k5 p) P. w3 p; R
                                @.DrivingHome := true;9 v8 Y" A6 M4 `( M: Q9 \$ S
                        end;9 F- Y7 J: F2 @! t
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station. w+ x. }2 e% U# l
                        part := @.transpOrder;
4 c, p. v+ [. W& r2 o$ H                        part.move(@);-- load part9 U7 T/ y' x, l1 o' G; I
                        @.CurrIcon := "load";5 H" [+ Q! L6 [; U0 d
                        GlobalDistObj := part.globDestination;
4 i$ h6 h+ y+ K3 W: m                        assignLObj := rgmanager.rgAssignL;
9 y, N# V# ]" U. |- N! w; @8 K                        row := assignLObj.getRowNo(GlobalDistObj);
# k7 d( B# M( Q$ b, W9 ]                        if Row = -1 then -- since 70- D4 c! W2 ^7 O' a6 n
                                if lan=1 then, Z: r" O, x# \
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. Q8 b: T, o( w, K( L
                                                to_str("in der Andockstation: \"",?.~.name,"\""));9 i4 C; t2 X9 X- K- O+ W' ^
                                else( N# a5 }. B. ^' k$ T0 n% L
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 D9 y$ j( j+ b, d4 F% w
                                                to_str("in docking station: \"",?.~.name,"\""));                                ( b# c& d: p  _
                                end;' a4 U2 Z. M# `
                        else
( y) r4 ]& t& i! R                                @.Destination := assignLObj[1,row];
- Y/ L3 [& v7 b) {* Z& E1 Z                        end;                       
/ p8 o* M4 ]# c                        newDirection(@);- \6 e! _2 }$ j' Q$ \$ ~9 B8 J
                        @.HasOrder := true;
- L2 Y" o! n% Y; t* b. u7 p/ _) s5 W                end;
$ e  M! m2 z' u+ z9 h        end;% d! Q0 p" G1 i3 U$ {
end;        -- of the method
5 r# B, S# f8 a$ e3 y7 ?
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 * I$ O1 p; G/ x0 p$ l( L* Y% J- I1 j

+ x1 W0 b9 u+ S; W8 E/ {! [1 s1 [! e这是AGV_putin中arrive的method。  r$ t; B5 |6 e% @0 ~- s
4 ^  V  q. |  l0 F( F' z9 e
当到达物料速度越高时,这个报警更多,, c  G. G4 l) ~8 D7 ~0 }
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。& L- T% t$ Z) C- \' [) ]
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?- S# ~# v# a: u7 n

! ^8 A- G1 d2 L另外一个小建议,就是move,所有的move都可以这样
0 L7 s0 g, R$ g! vif not move() then debug end* F" F2 W4 F6 @- v2 g
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
' K: ]; b5 ~4 c3 p. @% hplant simulation中的free libraries有AGV模板,
) f4 r1 C: K$ ~# x  I. _里面也有案例。4 X9 z; w- t7 E8 S" ]" L
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
, h* }) k3 Z. o% w* Q
2 C" Y! o( g- f' f, L* X我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 5 U: B+ J3 t8 X' z, E

7 e% t! \* R- Q3 v那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 9 ?5 u6 V2 d+ ]$ j
这是AGV_putin中arrive的method。
( o2 d% u: h& p+ C7 F! r+ l! ~& A
! [+ Y+ r  t9 A3 Z当到达物料速度越高时,这个报警更多,
, d8 ]0 y! {  F/ P1 Z) w
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-7 09:02 , Processed in 0.016222 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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