设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9438|回复: 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'; Y7 Q& k, ~1 G' O- n! h- n! P5 Y( Z
*/0 Q, @& H5 y8 n# o. l/ l6 `* r
is* @- B; z$ \0 H, K6 D( f0 T  Y: U
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 |8 {- @. b, G3 g1 j- z9 A
do) S/ ^' I# s+ n. m  ]" S' o
        Lan := rootfolder.Internal.Tools.AOLlanguage;
# w3 K4 s& e1 W0 W3 @        if current = @.Destination -- else return
# d' ?6 w& p4 Y        then
, u' {4 I8 ?- Y2 N9 F                @.Destination := void;. f* [" O3 S1 g0 g/ U
                if @.occupied then: I# X+ d, g  Q' g
                        part := @.cont;
( u3 T, O6 t) e6 N                        @.transpOrder := void;! C! c, Z) J* x- u& N
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- v* |! d, ~$ _2 A
                                @,root.eventcontroller.simTime);
4 G  f4 X( i8 @& I                        @.HasOrder := false;
$ l5 Y  E' d0 q! j                        @.DrivingHome := true;# t5 I3 a' [+ Z  @3 ^3 @8 y
                        rgManager.tryToStartTransOrder;" f/ U$ n' N) S7 n6 I$ i
                        if @.Destination = void7 B& S8 |* L( o5 z
                        then -- no transport order for vehicle @) V$ e' M, X; r3 X3 G
                                @.Destination :=! U0 f) P, Z1 v5 Z
                                rgManager.nearestFreeStation(@,track.~);
% n4 n) e& M- K$ G6 V/ p7 b                                newDirection(@);   
. \9 w( e4 R4 Z3 Y9 J' W; i                                if @.Destination /= void then
. X% E8 F4 J2 A0 O* G                                        @.Destination.NumReservation :=- U8 f5 C0 u  R5 o, \5 G: u% O
                                        @.Destination.NumReservation + 1;
9 q6 q: Z" p3 ^& P  k: m                                end;+ b3 _, R* Q4 ^) |) V# u
                                @.CurrIcon := "drivingHome";
9 F) V9 P/ Q/ w4 n7 d+ H                                @.DrivingHome := true;1 f4 J' Z; d& p% {# U% L  {8 Z
                        end;
4 M9 a& ^0 W+ n' ?- ^2 z2 r% O& ], S* ~                else -- the vehicle @ is empty, both vehicle and part are in the same dock station# C; ^- Z# _- W
                        part := @.transpOrder;* s- ]3 m: N$ n* z
                        part.move(@);-- load part
0 W" a8 G  T3 o! e2 m! L                        @.CurrIcon := "load";- |( {3 M9 j! h! }* L( ~
                        GlobalDistObj := part.globDestination;
, }' h, Z. Z) D5 y+ B; s1 ^6 [                        assignLObj := rgmanager.rgAssignL;5 S& b0 n1 F5 W
                        row := assignLObj.getRowNo(GlobalDistObj);
% C. N* ^4 d, _8 }3 S4 h% `, a                        if Row = -1 then -- since 700 o" {% Q& j$ f0 T# ~: h
                                if lan=1 then3 q) g4 x5 G( |- h6 W
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 I. x: t  }0 |/ x: `1 g6 |
                                                to_str("in der Andockstation: \"",?.~.name,"\""));, x( v3 J, d" ?3 H+ y  `
                                else
4 }% y% G3 R$ j8 f+ y! i                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# v- }. R4 Y, X( \- V* C) `! T
                                                to_str("in docking station: \"",?.~.name,"\""));                               
- }/ W; {! H/ K/ g, d; x/ o                                end;! ~' {3 l* w. L  \# t
                        else
& e3 s( v/ _  V8 x# B+ c+ H                                @.Destination := assignLObj[1,row];! e5 f9 u0 h0 V2 }* W* R& b1 e! ?
                        end;                       
7 ?4 z& ~. k8 `1 o5 d, x% W                        newDirection(@);
2 [* F2 [1 {; r" W7 h2 R5 N                        @.HasOrder := true;
& A4 j, \, c/ f4 j: w                end;
* B/ ^1 z( u0 z4 w8 T        end;
( B# Q8 M, U9 z) Y0 hend;        -- of the method
# c2 H, ?3 l, M
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
) C/ k' N# s8 r6 R/ U5 B& g' m2 A3 i# f3 ~7 @. R6 Z( F
这是AGV_putin中arrive的method。$ d( R$ I* s: ^% e& S7 D( e0 Q( ^/ Z

; w* \) n+ c( ~当到达物料速度越高时,这个报警更多,
/ o, q+ e7 U; W! o可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。/ ~  s. D( t4 D+ D
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
6 Y( M! F7 B# ~& [
0 H/ D' {2 S) ]3 S& [) Y另外一个小建议,就是move,所有的move都可以这样
7 i# C% N) l4 f3 k% Vif not move() then debug end
! y0 [! n: ]9 H# x: @+ M' M这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。6 v0 K4 f( q" V& Y
plant simulation中的free libraries有AGV模板,
  p' H' E( L% K& t6 Z里面也有案例。) _+ E# b7 y- u% e
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。0 L6 r7 r& ?/ a7 p6 e2 G
5 S" \$ i: y) d4 s  l$ @" O. E
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
2 T2 ?( g: |3 a3 |. p+ r# m7 U7 P0 M) Y) x7 @+ H2 ]/ H+ h
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
6 P5 b8 L2 I( V) ?0 ~6 W* ~这是AGV_putin中arrive的method。
0 N% j4 g5 G) }( n0 z( q5 u+ k$ ^, I+ g# D5 {' P7 I
当到达物料速度越高时,这个报警更多,

4 G& }+ S% r5 `1 w$ O5 i另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-1 06:20 , Processed in 0.020470 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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