设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7727|回复: 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'
& Y2 j, W% c$ s5 t( y*/) ~1 ]+ A0 P: T* a7 x
is
$ y3 x( }4 g$ c* [9 @8 ~$ s9 ~- t        part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 P5 y, F5 r2 b
do6 T# O2 }# a- l. V' b& \
        Lan := rootfolder.Internal.Tools.AOLlanguage;! U: `' B4 ^- v5 v6 g: X* G
        if current = @.Destination -- else return
! X7 S1 i' E; E( ]        then# v! E' t4 d- i! E% b  {
                @.Destination := void;
$ L5 N6 y) k; f  g$ y' G! `' F- W                if @.occupied then* `0 v1 f+ w, M: C9 e# u* T
                        part := @.cont;& ]/ Z7 ?$ b8 X" V
                        @.transpOrder := void;# l) `, v6 r& A- c" z( W) @! N3 o
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; t+ q) E8 |  ?7 _/ v, ^; t
                                @,root.eventcontroller.simTime);  P1 C& D0 g+ e$ _; r
                        @.HasOrder := false;, B- K% M, _+ M. m) F! ^" l
                        @.DrivingHome := true;
4 u( a8 L# C* ~1 ?, ]                        rgManager.tryToStartTransOrder;& y7 h% _4 A" `9 @8 ~$ x
                        if @.Destination = void
+ r$ A1 q( b! N' i+ J                        then -- no transport order for vehicle @; }+ G2 ~& U& O! M; f! M% y2 S: h$ x0 M
                                @.Destination :=
6 V; x# q* R; M3 C, [+ m                                rgManager.nearestFreeStation(@,track.~);
( o+ Y1 H$ K2 z9 |% V* M; q                                newDirection(@);   ! w+ h4 o8 K: ]9 y9 E0 W+ U9 d5 K+ N
                                if @.Destination /= void then
# h9 l$ M: ^$ s/ U1 U3 L% f                                        @.Destination.NumReservation :=0 V- \* w  a4 b& j. E0 |% [* i  M
                                        @.Destination.NumReservation + 1;( f* b5 ?+ v% l9 j7 ?; Q+ x
                                end;- Q* C6 |: w# J+ I( P$ H
                                @.CurrIcon := "drivingHome";
: l* P2 e+ }' ~8 C                                @.DrivingHome := true;
% Z: j% z0 }( x) d6 Y5 A                        end;
/ {6 ^& e' D: A: g8 a* G- G                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, F& r) f; S, q! D% v9 e                        part := @.transpOrder;8 T  x' Y9 q" f) V* R- Q
                        part.move(@);-- load part
  K4 O2 y- t; O, [/ u                        @.CurrIcon := "load";$ A  l0 [% h3 G( }
                        GlobalDistObj := part.globDestination;
/ q" y1 L5 U6 Y$ V* y; W* o! X$ C                        assignLObj := rgmanager.rgAssignL;. B- s) Q! u- y0 t
                        row := assignLObj.getRowNo(GlobalDistObj);
+ M6 I$ M' ]1 l; g                        if Row = -1 then -- since 70
' t  r8 r# D+ P# c% {                                if lan=1 then
) Q7 G& \6 \- s# r* F( o                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 G3 }& e& n! E9 _+ O- L1 V& d
                                                to_str("in der Andockstation: \"",?.~.name,"\""));& ~3 Y' F! o5 n/ k" Z
                                else
3 c6 o. M3 `% Z" A% X* |                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, Y& E2 `. \6 q" C" e  L0 o
                                                to_str("in docking station: \"",?.~.name,"\""));                                7 U; B6 {+ R8 [5 C! D1 ?4 G
                                end;4 d9 S, e5 G/ f
                        else& Q$ w) C" @% {4 J
                                @.Destination := assignLObj[1,row];& X0 T& o" Y7 P$ j
                        end;                        2 J/ D5 r$ w5 b# y; f
                        newDirection(@);. Q; [3 p* M7 Z* Q" Z
                        @.HasOrder := true;( Z' c! g8 ~2 `: P& F
                end;; Q! w% @9 V5 U" b3 n
        end;
4 p4 D0 \, q, s& w/ l5 fend;        -- of the method
* N* m! i5 i8 Y7 G
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 4 {; |+ Q7 P: B' K
, A5 q& O% I, U: W" s: x+ M$ D. }
这是AGV_putin中arrive的method。3 f) C7 O% j+ Q
- b$ V: b% X, G/ r8 N& S
当到达物料速度越高时,这个报警更多,; H7 @% v, c( a. U4 q6 }
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
: y& Q, g4 E' M5 e* P& _9 ~$ [+ g5 V程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?* b! \( }0 `( }6 [* v" a6 {
% g$ n0 z& ~1 P. v' J9 }) u) R( A
另外一个小建议,就是move,所有的move都可以这样8 S+ C5 x- e& i* h
if not move() then debug end
" E0 ?$ Y5 c& k9 S! z! T这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。+ T8 z6 }& i, q$ Z2 _
plant simulation中的free libraries有AGV模板,
' O# L" |; X8 z9 V2 b( j: f里面也有案例。$ d* x* R/ j1 N) H( ~/ [# G
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
7 l/ z2 A+ o  H: ]2 h) T) u3 \) F' z+ @: O. n8 q  B! ^7 K
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 A. p( s) n8 q4 [1 L
  H. O1 ~5 [: T6 }1 F那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
5 p  T5 h+ x7 W3 n, b4 a这是AGV_putin中arrive的method。4 F' ?6 }3 b; Z" v
% P' _4 S4 }5 @& [
当到达物料速度越高时,这个报警更多,

& p* [7 S% F- U1 N" j3 [另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-26 08:47 , Processed in 0.021701 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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