设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6066|回复: 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'
. i; J4 O7 x; |2 o# g*/( M8 E7 A5 t9 k" \/ A% V
is
. I* s7 L' C3 ]7 r        part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 Z( s: r. f0 q" N
do
- R/ d$ p/ V$ z/ a  @4 X3 _        Lan := rootfolder.Internal.Tools.AOLlanguage;9 r5 [* E5 b" x/ Y# I! u3 x" M
        if current = @.Destination -- else return* m6 j/ z. P4 P9 c. A
        then
; p8 J7 S: @7 P, k                @.Destination := void;
: d2 E$ Z  q  y7 y                if @.occupied then3 P& k, z4 `+ t. _; A8 g
                        part := @.cont;( \  h! g1 z( k! f3 w3 @- p. P) I
                        @.transpOrder := void;4 X. F) M& b; h! x4 s
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ N% b" I' F* r, I) K* m6 V2 }' Z
                                @,root.eventcontroller.simTime);3 U- R+ U, u* ?0 k/ k; H0 t" X" N
                        @.HasOrder := false;& P% x, j0 G) ^( M
                        @.DrivingHome := true;
- o5 p) k% }2 h/ \( E; [5 k- l                        rgManager.tryToStartTransOrder;
0 O$ s6 ^2 X2 W4 R& Q                        if @.Destination = void
$ p5 e& {' W! g. n- r6 W                        then -- no transport order for vehicle @. i9 ]7 X/ c/ d8 ]: b: c% W/ r
                                @.Destination :=
4 Q) j, L; {! I                                rgManager.nearestFreeStation(@,track.~);* j# }5 B* r  ^6 K2 s; c
                                newDirection(@);   
, @" {5 B, V  x* Z" w' J                                if @.Destination /= void then
  J! ?7 Z, O! L8 }) Q6 a$ L$ C1 Q                                        @.Destination.NumReservation :=' p1 Q( z0 N7 q$ U, _5 |+ R
                                        @.Destination.NumReservation + 1;
5 W* g! y8 _+ e; x* F                                end;
" t! X  U1 R2 R' M! r; @7 X- K                                @.CurrIcon := "drivingHome";. r4 T% g: j4 L9 S3 d
                                @.DrivingHome := true;4 G/ D; |% J5 q
                        end;* Z3 }6 j5 g0 B9 D, B% D
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station, G& G. T: s! I  r' x1 P
                        part := @.transpOrder;: [* \4 C2 x: G9 \( N
                        part.move(@);-- load part
5 R, v( I% d8 C                        @.CurrIcon := "load";
' W+ }( |/ G" E, }                        GlobalDistObj := part.globDestination;
. f: O4 ~$ L' g/ x6 ?7 h2 @- O+ ~- N                        assignLObj := rgmanager.rgAssignL;6 g  l2 Q3 i4 {4 t
                        row := assignLObj.getRowNo(GlobalDistObj);
, N* L, P2 A* d                        if Row = -1 then -- since 70( Y; y  b+ x3 s4 q! e' R" `
                                if lan=1 then
5 Y) w( Y$ `2 z. }8 X                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 E+ q* n0 b: \0 e/ z1 c                                                to_str("in der Andockstation: \"",?.~.name,"\""));
9 Y' C2 k; m9 \9 F& E5 F                                else4 Y  a- ~  J4 C8 S3 T% l
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! C2 \0 n1 d8 M- Q$ A  d
                                                to_str("in docking station: \"",?.~.name,"\""));                               
" V) S% C: g1 f( L1 Q6 \, }                                end;, N. M$ o2 ]2 }
                        else9 s( [$ C4 B* |  t9 W2 O
                                @.Destination := assignLObj[1,row];& y4 ^( B7 z, W) N4 m
                        end;                       
' |( m$ [( c4 J# O. q                        newDirection(@);+ G7 y9 R3 c' B7 V* x: `
                        @.HasOrder := true;
+ J" ^9 Z) B7 ~: D3 I+ a                end;) k% d: @- m$ |" m& T
        end;7 ]5 W2 y8 A* |$ k
end;        -- of the method' m+ Z) K6 \5 v/ q" i
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 , z8 W4 n( q  [. \, |0 k
( P2 M0 P' J' H" o
这是AGV_putin中arrive的method。
8 ], g4 g' n" u+ Q# D( _. T# M4 y. N- O7 Y. b' K8 e0 `1 a$ F
当到达物料速度越高时,这个报警更多,, F' R+ A) F  O& _  {
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。: }& O! w, a2 K
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
, O2 _! |0 Z9 G6 Y4 }% [7 K# m4 \2 Q* @  @
另外一个小建议,就是move,所有的move都可以这样
" k5 Q' I: e, g' f6 H* lif not move() then debug end: {8 ^' Z( {5 e
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
1 p7 l2 Y) Q$ g+ V6 gplant simulation中的free libraries有AGV模板,
* R, B6 r3 K; x% b里面也有案例。( ^/ T3 u# u5 ?6 L0 K7 B
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
( ]/ V; m* i3 l# r! W5 v! M* L  C$ e
" W& \6 Y4 f6 d" y2 `我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 2 o. @7 \0 v1 A& ~6 `" [

' v; M9 n7 a- |# C0 r/ V* j那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 : m2 W3 O2 V2 d$ a4 s) k" V
这是AGV_putin中arrive的method。8 i3 a8 Q) F! }9 k# n6 B

1 r, g+ C6 w# U( x, N7 K( }5 ?当到达物料速度越高时,这个报警更多,

7 I# I  K( b; ]: o2 a, x另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-15 16:31 , Processed in 0.034465 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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