设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6115|回复: 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'1 Z- W: T- O/ b/ I+ {
*/
- Y7 b( Z$ R9 D) o( V$ _is
) Z+ J* t0 j- j        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. V$ z% Q/ t5 z% `do
$ X/ `3 W; a! d* d  K        Lan := rootfolder.Internal.Tools.AOLlanguage;, i* B- M4 k  T
        if current = @.Destination -- else return0 r3 l" f% I% F! n% b
        then
5 k3 v) v" \- E* {* V. ^) R# x                @.Destination := void;4 d2 x3 `6 E  \+ W7 `
                if @.occupied then$ C  u$ v9 w/ a3 @+ T
                        part := @.cont;
! b9 S* m3 S6 A- d* E9 ~$ B/ m                        @.transpOrder := void;/ R4 }! ^+ N7 E/ B/ Y
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
  O/ }4 S* l, C0 j0 W& }7 m                                @,root.eventcontroller.simTime);# v5 R$ G/ ^6 B- @& S+ w; E
                        @.HasOrder := false;9 i$ P( l: T% @2 z
                        @.DrivingHome := true;
! I) V& S" Z7 g5 l, G) u                        rgManager.tryToStartTransOrder;
( r$ C' N# G2 T9 R% k                        if @.Destination = void
! r" \6 @- g. H: F  h8 Z4 G- N0 X# M                        then -- no transport order for vehicle @
/ ]/ [) a! r. ~$ g( T7 w0 t                                @.Destination :=4 ?* t# I9 j/ c: X2 q2 Z5 [
                                rgManager.nearestFreeStation(@,track.~);
: @8 s+ `1 g9 @1 F/ E                                newDirection(@);   
0 ~4 M: m: z8 Y                                if @.Destination /= void then
$ _  a' \) l: \$ I) A( f# n  w% w0 u- ]                                        @.Destination.NumReservation :=( L% ^% P6 Y3 ?0 F! j
                                        @.Destination.NumReservation + 1;
: ?5 _0 n" P- Q5 T* E                                end;0 J/ P6 S7 S4 i- G8 @9 g
                                @.CurrIcon := "drivingHome";7 L) A! e; u3 H; T% A
                                @.DrivingHome := true;/ ]: p. n! w6 z; W: I5 C9 @
                        end;
1 S1 k+ n% o! @% v                else -- the vehicle @ is empty, both vehicle and part are in the same dock station" P+ ]. S* ?4 X) U% X' ?
                        part := @.transpOrder;
$ c& R! d6 M2 r, r1 E                        part.move(@);-- load part+ o; `1 M7 L. d! U9 p1 R: C( D
                        @.CurrIcon := "load";" O" u0 v4 N2 ^
                        GlobalDistObj := part.globDestination;" r3 e5 y" m3 Q7 ?; y
                        assignLObj := rgmanager.rgAssignL;
  e5 |3 l7 i2 W* N                        row := assignLObj.getRowNo(GlobalDistObj);+ J# F% f) O" Z. m% \+ J6 \
                        if Row = -1 then -- since 708 P, C8 R! ~& b- C5 `
                                if lan=1 then
# U7 r+ ]& |* D7 U' n                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 y: U$ ?, e4 A/ d
                                                to_str("in der Andockstation: \"",?.~.name,"\""));4 f- D) I$ Q. P6 D! u6 l6 n/ y# B
                                else3 l5 d+ B" X+ e* {" L! A. a! ^
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% O) C; O5 V  ~                                                to_str("in docking station: \"",?.~.name,"\""));                               
4 I- a8 i/ w$ H+ {- W4 u                                end;
* l0 C* T. E9 Q( f$ H                        else
) o9 Q  Y+ C2 T0 J* _; @                                @.Destination := assignLObj[1,row];  y1 l. u& g& p4 [: }
                        end;                       
% r9 i& M: ^& P8 i- O3 ^                        newDirection(@);
# O6 |1 ~' \% i! I8 s0 y% {0 j                        @.HasOrder := true;1 b  G7 [7 B8 m4 l7 P
                end;
, n2 O( b+ Z9 l2 f1 T1 V0 Y/ t7 M        end;1 l/ a4 o+ C8 Q, l' K- _6 R( G
end;        -- of the method  N. h: ~4 n+ \6 Z' |$ T
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 3 L0 O* `/ D0 }

+ V' ^5 W! R8 p这是AGV_putin中arrive的method。. F9 I& J' @9 A. }" @
+ n+ x+ P& Q, J5 n8 I( s5 B9 M
当到达物料速度越高时,这个报警更多,
* R% B+ }" y. n可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
% S$ W2 L' ~% }/ V程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?2 q2 Q% X; d1 C4 \( O8 k% j9 [

* p  C+ B* Z& h另外一个小建议,就是move,所有的move都可以这样8 _$ w, X% ~7 \; [6 q2 W& F
if not move() then debug end
5 w$ Y9 X3 \  ^% r+ {这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
) Z1 g( X2 |  d6 L; v7 xplant simulation中的free libraries有AGV模板,2 C1 O( V+ h; n8 r1 B4 a
里面也有案例。' ~" z: Q6 Y. J4 K% O
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。2 f: C, C4 J" O, L* \6 `9 f

3 F$ Q0 e4 D% e  H$ w" R我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 , j; s* D5 p1 [' p' {1 {% X

7 ?) e  L  t% E" W那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
# K# I" i( ~5 h6 U9 ?1 T8 p1 C这是AGV_putin中arrive的method。
# f( s1 K! B( c* r, H+ a/ J7 \: @
2 \5 q+ Z( ?* s+ L; e+ e当到达物料速度越高时,这个报警更多,

: D! P. o" w. O另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-19 13:04 , Processed in 0.017072 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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