设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6033|回复: 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'& d( q" p1 F% `9 [0 d: B6 D$ F" a3 q
*/
$ J/ y$ A( O% r1 Qis4 b3 H( K7 x( a/ ~+ ^
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& D" Y, ~( B. g% ido4 t# B/ D6 I8 w8 J
        Lan := rootfolder.Internal.Tools.AOLlanguage;
$ T8 Q( t/ X% v* m6 Y* Q' a- K; C; @        if current = @.Destination -- else return+ s  \  ^1 R  Y3 t# W. @$ o% I
        then
. }; @/ B. O* c8 G* n                @.Destination := void;
& K" O: S7 H$ l9 A9 ?                if @.occupied then
  o, Y5 R5 m- \% A  \- ~                        part := @.cont;( w/ c. s4 E  r9 N! ^8 C
                        @.transpOrder := void;
9 y$ z' p* s4 J' F0 W+ R2 ^                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 ^1 l( |5 x2 M
                                @,root.eventcontroller.simTime);
& `+ z4 q% H, i  }% t3 K                        @.HasOrder := false;
+ t: {4 @. u" M) |& T5 z                        @.DrivingHome := true;( N/ F; C6 L$ Y, S) e0 V( i
                        rgManager.tryToStartTransOrder;
, U& e& q# m, @( G5 p3 Z                        if @.Destination = void
1 ~+ x) j6 ^) @# k! R% Z7 z/ `                        then -- no transport order for vehicle @
9 T7 u2 ~* s1 l# D# i, U1 j                                @.Destination :=
3 H! A1 c& N1 E$ p0 s8 Y6 D                                rgManager.nearestFreeStation(@,track.~);
2 f) @6 u  P4 F$ Z                                newDirection(@);   : [7 E1 Z" X  X1 q9 ~( S- m+ I
                                if @.Destination /= void then
6 {' S+ }) g( m                                        @.Destination.NumReservation :=4 B. Y! |9 S0 ?4 K; U  o: Z
                                        @.Destination.NumReservation + 1;
; C2 J8 Y: M( N0 V, A# @* o8 Y' J                                end;
& A3 z. L2 ~( j                                @.CurrIcon := "drivingHome";. }5 Y  [* l; a; `: T6 _
                                @.DrivingHome := true;
, m; U( j% }9 r1 ~* r                        end;
- J3 w8 k7 d6 J3 l; ?                else -- the vehicle @ is empty, both vehicle and part are in the same dock station' Y( Y* o+ b! [) L
                        part := @.transpOrder;" @. i/ {- J4 i% }5 B, Z
                        part.move(@);-- load part
) R3 h( H3 }+ c( t# e                        @.CurrIcon := "load";) Z$ k2 s9 @* @
                        GlobalDistObj := part.globDestination;
# i& P2 S  b; p2 W# B' X3 T                        assignLObj := rgmanager.rgAssignL;8 z, o  a& e7 @3 u5 Z, C1 l: ~: @
                        row := assignLObj.getRowNo(GlobalDistObj);- U8 u( q" ^$ h* x) G+ c% {+ C
                        if Row = -1 then -- since 70* ^' }0 @: @+ w7 R* f! @) B! R
                                if lan=1 then6 C1 I( \2 p" Y% R$ K3 c
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! e1 G6 u9 H. C$ d                                                to_str("in der Andockstation: \"",?.~.name,"\""));
( E! Z. j5 S" i8 [/ a+ Q                                else
/ B/ p# G# e  f6 Q                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' p6 ^6 l: k+ }. F3 p: F, B; d4 C
                                                to_str("in docking station: \"",?.~.name,"\""));                               
' {) @/ `( S: W3 B2 p                                end;
3 {/ n3 n' l' g) C6 V: a! I                        else
+ h, H  V' N, \                                @.Destination := assignLObj[1,row];
6 K# N3 H) v" J                        end;                        5 s; C2 h# C$ v  m7 m# C0 A
                        newDirection(@);
/ I; Q  q5 @" }                        @.HasOrder := true;
" J- S% p% E) Z( F- v9 _                end;
! i7 P7 E) s& N+ z9 a. L        end;
& g$ ^! w) c5 p% Zend;        -- of the method: l$ T/ o$ h; P) c
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
) d/ z; {/ O: N- }- Q/ x4 t7 d# p" |- A8 ]$ j; i1 U% F3 r! ], W" q2 [
这是AGV_putin中arrive的method。
9 f& Y/ l6 [9 M/ g( O, Q2 F1 H4 Q
$ a0 f% `4 d7 s+ `8 U当到达物料速度越高时,这个报警更多,
0 y, \1 h' c# {0 e可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。& A  C4 Y* }) E: m" w
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
& {, S# a+ c) @9 z
" v8 h0 H( g9 z% B4 x另外一个小建议,就是move,所有的move都可以这样
) r9 t0 R9 W; }4 J# F9 t6 Kif not move() then debug end
9 b5 Q  x# K/ p- G. k+ g& X7 E这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
8 I" I9 F3 b- t) d( x8 {. r  e4 Uplant simulation中的free libraries有AGV模板,/ T, Y" q! S1 P% p, `# U/ D9 j
里面也有案例。% K& M  m+ k0 l: A5 Q+ ?8 u
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
2 R; b3 M" I+ N
  S8 E: K: Q% t6 F0 M* R我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ( E5 T& c4 [) @3 d0 f
# P+ U! P- u4 o! {! W) n
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 0 @! I9 e( g/ C( r& ?
这是AGV_putin中arrive的method。1 F3 \' s: I# B8 Z

/ ~% E3 l, f; b# D' v当到达物料速度越高时,这个报警更多,

+ ]7 V! a1 Y7 S! ~, L8 ]8 T另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-13 22:40 , Processed in 0.020225 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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