设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6286|回复: 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'
# x7 D1 g1 H4 V) A*/' V! \6 R6 O% g1 {5 j
is5 b3 j7 e+ x5 Q9 ?5 f
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 j) |8 ~3 u( c8 Sdo
  x7 s8 l6 e, l- f* v: l2 ^) n& {  \, f; t        Lan := rootfolder.Internal.Tools.AOLlanguage;
) V5 p4 n, s4 _9 Z        if current = @.Destination -- else return
* T  j: V# F2 q# R2 G* R4 m6 b        then
* r' h, G+ n2 Y0 ?- F4 G3 h- E                @.Destination := void;/ [) h# _& x6 v3 g; U( [0 X
                if @.occupied then1 I; p. I4 p: B. M; s+ l( L7 H% |
                        part := @.cont;* n" u3 v4 o% c. P0 Y1 }* a
                        @.transpOrder := void;
9 [6 Y8 T! e( h/ ]                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,  j: m& [4 T9 K/ d9 h7 c# v  O
                                @,root.eventcontroller.simTime);
% Y6 Q  i' J" G                        @.HasOrder := false;2 {6 c8 k# M: b% l
                        @.DrivingHome := true;
( _% a" n5 r! `5 n9 \7 v& I                        rgManager.tryToStartTransOrder;
3 q5 W. q, ^! k. @9 W                        if @.Destination = void
0 A: }% L& q) |  l                        then -- no transport order for vehicle @0 p6 A2 j, V# h; ^$ z8 J9 t
                                @.Destination :=
8 U5 I; I# p! g: V, ]. r                                rgManager.nearestFreeStation(@,track.~);) z' {+ b+ p3 Q8 v% c; k# I+ H
                                newDirection(@);   ( y; ~6 `) e" Y& r5 r
                                if @.Destination /= void then
' s" S5 B! S' j! I8 I                                        @.Destination.NumReservation :=
! E" K% o& N9 z3 R                                        @.Destination.NumReservation + 1;/ m, y  m: R, A2 D2 x$ H9 N
                                end;$ f, f# c1 ^% @5 h2 @; Q
                                @.CurrIcon := "drivingHome";
: E. g3 @9 E4 S5 |                                @.DrivingHome := true;
8 G& J4 K- f2 @1 B3 H; t                        end;! C  c& b; ]  T5 t: x
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station) a; O: m) `5 ^  B* y7 s
                        part := @.transpOrder;% s3 E1 @) I! w( g6 d& k. ?
                        part.move(@);-- load part
' I( ^% _, \8 Q4 y8 b                        @.CurrIcon := "load";
; n% E, ]! ~/ ^) K5 e                        GlobalDistObj := part.globDestination;
8 `1 ?! r/ D" k/ G# c, }( t                        assignLObj := rgmanager.rgAssignL;8 M7 o' H$ z" R" E
                        row := assignLObj.getRowNo(GlobalDistObj);* Z% P3 X+ P) `7 a
                        if Row = -1 then -- since 70
+ _; j- J  _: Y9 d1 |1 m( J                                if lan=1 then
9 F) J; K( e8 M, d7 b' R8 o                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 S# R# V1 U: A0 ^                                                to_str("in der Andockstation: \"",?.~.name,"\""));
) i- C5 U2 u" s0 c$ ?5 [                                else# W  M, m9 M, }7 D% v' ]1 |
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; N$ C! |+ U) p, u) W                                                to_str("in docking station: \"",?.~.name,"\""));                                - t( M& ~% S; ]) z1 n
                                end;8 [4 k9 y$ x/ k# x0 e, R
                        else
. U8 n5 J' X8 f8 L2 y# o6 }& B2 X                                @.Destination := assignLObj[1,row];
( x& S/ K: w. k                        end;                       
  J0 ~9 g% Q; W% ~, |" ^                        newDirection(@);. m. U) p+ U. O* ^- ^0 T& ^9 x
                        @.HasOrder := true;  o! G; I+ s1 ?, t. a: \
                end;  @4 ^! R* O+ |( `( h
        end;1 x6 v# |4 X9 l5 F; N7 R3 I5 ~
end;        -- of the method4 q0 L  [8 k) D+ B, l
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 $ }* y) E5 M; L3 L0 Q

. r: Y- ^& x! x+ Q0 q7 [1 ^0 ?2 @9 M. W这是AGV_putin中arrive的method。9 V9 X9 ]5 u+ Q1 _$ g2 }: P
( T. O: h( F- y8 q, z$ e: w& r
当到达物料速度越高时,这个报警更多,- j: t9 S: r. h5 [  S; K
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。0 c; w1 O# K* O6 w- e
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?! X5 c& h! u; K- f. F. C* x
  x$ C% m  u, o6 i9 ^
另外一个小建议,就是move,所有的move都可以这样* M& O5 b! O( d
if not move() then debug end( i, d; l$ h. O! d& w- {- P
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。9 h( i2 P* p% E/ k- l
plant simulation中的free libraries有AGV模板,
. D0 Y$ }5 d+ o6 w6 E3 d3 _里面也有案例。
& a, e6 ^6 H9 L我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
2 f) T8 e0 ^, ]; W( L/ p, F0 [5 M% h9 \: D3 k) Q6 F/ w2 j
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 0 I: d/ M. w( E' j' J5 b5 R
  c; V2 {0 d/ }. ^9 V9 a1 E
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 + e* p: v3 ~/ A# F( K2 z
这是AGV_putin中arrive的method。& o3 O  B5 M" `9 O

; m. z! d9 C' |5 ~/ o* ^+ @) M当到达物料速度越高时,这个报警更多,

$ x* \* x0 I4 N, ~) e' F另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-28 19:56 , Processed in 0.019485 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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