设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10140|回复: 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'+ [( J* R3 s% m8 s4 F
*/% e' Y! I4 ]8 f7 n. N/ u# P
is
8 U- u3 j/ ?; m        part, GlobalDistObj, assignLObj:object;row,Lan:integer;! ^' t/ b( R6 G6 }0 b# H
do% A8 ?9 A% K$ z& |$ K
        Lan := rootfolder.Internal.Tools.AOLlanguage;, `# Y( A5 ?2 A# R. |
        if current = @.Destination -- else return
) T, j& ?% ]! x5 P* K  ?" n4 k        then
1 b% m$ k  ?9 m4 @& L                @.Destination := void;4 f- r5 w' q, s# N, D
                if @.occupied then
4 }' {! r/ p7 A& U& T4 |                        part := @.cont;
/ u0 F, B( w3 @& @                        @.transpOrder := void;
+ J1 ?( e3 ~5 O9 U% h9 z* h# l                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ R+ u/ \2 y( V  _: m& j$ W% e9 w
                                @,root.eventcontroller.simTime);6 ~$ Z  W0 D' O5 U
                        @.HasOrder := false;
6 u, y! f# L8 i$ v8 V                        @.DrivingHome := true;) A6 g" n6 U3 X" x1 @
                        rgManager.tryToStartTransOrder;1 g& Y4 x: [) A. ^9 e. V; ^
                        if @.Destination = void
* S" F& x! \  R" A                        then -- no transport order for vehicle @# m$ y( [/ b. p
                                @.Destination :=8 ~$ f% Z# W4 O
                                rgManager.nearestFreeStation(@,track.~);
+ `, C8 \# G! V9 K' Y                                newDirection(@);   8 V/ s) @: S. {' V) [+ F8 b
                                if @.Destination /= void then% r: O1 {8 a/ {! v) k4 B3 q2 ^
                                        @.Destination.NumReservation :=4 g9 }, D1 M& v. z+ H& L7 W
                                        @.Destination.NumReservation + 1;
4 I' O4 f) l! X* A                                end;5 X! ~5 Z+ f6 T* G* o
                                @.CurrIcon := "drivingHome";; c/ K0 |8 T/ Q* d  [# t
                                @.DrivingHome := true;6 ~6 G- `+ J/ _- l+ x
                        end;5 P+ m2 p4 x% h, x4 v+ M8 c
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 }$ r& b- T2 I1 }
                        part := @.transpOrder;
0 [" O: F) P% G$ D+ S. q' M                        part.move(@);-- load part
3 a8 M6 s1 l) q8 s" z8 B9 f0 U                        @.CurrIcon := "load";4 ?6 U8 w  z( @8 C+ y* B
                        GlobalDistObj := part.globDestination;
" s4 j* a0 l# C# d                        assignLObj := rgmanager.rgAssignL;4 g3 M; m3 I" F& E
                        row := assignLObj.getRowNo(GlobalDistObj);
3 a3 {% Y, I$ a' `. o, v                        if Row = -1 then -- since 707 W2 H& ?/ B0 S+ B' {5 F% t3 R4 i
                                if lan=1 then
1 c6 [+ `. v9 d                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: w1 {& A7 g, l7 G, P                                                to_str("in der Andockstation: \"",?.~.name,"\""));
, z; N: ~7 ]* i, t/ |                                else3 S+ r0 \6 g2 B% q
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. H! G  P6 G/ h( V6 r8 _                                                to_str("in docking station: \"",?.~.name,"\""));                                % G, F2 e8 o( C; Q
                                end;! H6 B# p" z" R! L, f
                        else
+ c& U/ X, u' O4 r' a/ C                                @.Destination := assignLObj[1,row];. p) y) [& h4 f" L& u( m+ [
                        end;                        - A; A, y% X" g" F7 Y
                        newDirection(@);
$ Q- y" p" T* E( M  c) D                        @.HasOrder := true;
& Z6 Z2 G& Y$ Q: f4 w                end;5 |+ c  r. S0 p1 e2 U, C7 c: c
        end;& H% T( l* o* `; O
end;        -- of the method! y' f7 {- R: f: j, i; t) y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ( m5 a! l7 S% m7 z0 a9 P; i

( ^5 w; }, b4 q/ U, |这是AGV_putin中arrive的method。$ d( q' T9 S  C# e- f
, O$ I" q; t* K' B! I% q
当到达物料速度越高时,这个报警更多,
' D# H& G8 C/ [2 f可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。4 j& W, Y# j: A' A
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
! c0 b6 R" ]9 b& C* b5 o: i. q0 a' |8 b6 Z
另外一个小建议,就是move,所有的move都可以这样/ Z) o  T% m. {  @" A, A- H/ T
if not move() then debug end+ v* d2 [' X" t# C; I
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
5 g) h% a1 [- I( k" `plant simulation中的free libraries有AGV模板,5 C! R% b6 Y* g8 l8 A4 z
里面也有案例。, Q$ W# _( q7 Q5 j2 s# o9 h
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
6 k& K6 F( c, {
4 Y6 G" u& O* G" @# V$ p我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
( x  b. m5 h+ B& }: \# L' }6 D# s
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 9 D0 k' C$ Y8 K, t  L
这是AGV_putin中arrive的method。
" @- L1 F1 G4 S4 i8 T
8 S9 B& l9 M" Y3 t5 `6 h当到达物料速度越高时,这个报警更多,
$ j; ]9 M& T& P/ S' T6 {4 o
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-15 15:56 , Processed in 0.016169 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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