设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6892|回复: 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'
$ h3 I: \, Y% v* v! s  V6 _*/0 i: a0 l$ ]* p6 p8 G4 |
is
3 k, U% ]$ S0 c8 d8 O* z        part, GlobalDistObj, assignLObj:object;row,Lan:integer;' S9 S: y$ f  Q6 {9 W/ P! {  j1 U8 W
do2 S- a3 }6 y4 ~1 m/ N1 j
        Lan := rootfolder.Internal.Tools.AOLlanguage;, H7 p( `& ~8 \2 |  Z6 h; d/ M
        if current = @.Destination -- else return. Z7 j; I+ n* i+ I
        then0 B8 d( v: n4 K2 l+ n( O+ L3 K
                @.Destination := void;
6 Y; t2 E$ A0 f  }1 I                if @.occupied then
( u1 ^8 l% Q% r                        part := @.cont;5 z2 {% O) H0 F# n
                        @.transpOrder := void;( ]9 B. t+ Q$ Y! ~( e$ V6 R
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& K/ V: ^' g: p, a  u
                                @,root.eventcontroller.simTime);
: r+ x+ Y) ]% [5 U4 q1 N' F' X                        @.HasOrder := false;
4 Y5 s, l- s7 I4 u+ F* M                        @.DrivingHome := true;
" J- h) J3 W6 d2 J$ b5 r( g                        rgManager.tryToStartTransOrder;
/ `  ]+ A0 S6 r- I( P$ N! H3 j' ]                        if @.Destination = void8 Z: o& ~. a; ^5 Q' b3 q
                        then -- no transport order for vehicle @
3 G  g" K4 e3 e  u0 j! g                                @.Destination :=9 @, Y# V5 K7 Z, ^
                                rgManager.nearestFreeStation(@,track.~);" l  [' t5 n! E( |% ^$ y  L
                                newDirection(@);   
: m3 f9 H' v0 b0 c                                if @.Destination /= void then
2 C9 n0 E! X. j2 z) B! a                                        @.Destination.NumReservation :=+ ?7 w6 y  p- L5 u5 x
                                        @.Destination.NumReservation + 1;$ Y4 r# ~5 }) v; P# m7 {
                                end;; ?; M. n' O" O+ r7 T+ L! W4 @
                                @.CurrIcon := "drivingHome";$ `; L# q! n8 k% j3 X. b/ h. k  q
                                @.DrivingHome := true;6 @* r! \8 I3 E4 q( c* o: f
                        end;
$ Z- g. Q- K/ t- _* ^3 ]                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' b8 W1 D! o3 W$ z                        part := @.transpOrder;
" `+ J4 |/ c! Q. b                        part.move(@);-- load part
; |4 V5 Z2 |) G: s                        @.CurrIcon := "load";. [( r2 Y/ d* z+ \! N& x2 k$ c
                        GlobalDistObj := part.globDestination;( r, `. r8 m1 t* Y3 x
                        assignLObj := rgmanager.rgAssignL;5 |- C+ {+ j! U  L
                        row := assignLObj.getRowNo(GlobalDistObj);
' q+ K2 x2 A( |& f                        if Row = -1 then -- since 70# \' I. ~/ c, @# C/ X% g2 V
                                if lan=1 then
& X0 e2 O! k, X                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 P5 G( J1 X* X" @% Z/ v5 M
                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ h( y" X. U! R
                                else
8 Y7 y( f" G6 B+ P                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: w: f) R* D2 B- B/ [# N
                                                to_str("in docking station: \"",?.~.name,"\""));                                  W( {2 _; D$ D& w, Z* L+ s
                                end;
3 p% x, U7 F7 L$ Y: `& E                        else
; y$ ?0 L2 Q9 r( Q% P1 f                                @.Destination := assignLObj[1,row];1 C: P8 \8 g; ^' C0 |% ]
                        end;                       
1 S. u, I( x7 {' G/ G& \3 u; k: @                        newDirection(@);; f0 ^! C( D/ O  w6 f
                        @.HasOrder := true;. V! p1 X" |% c1 W0 b: S' v' E  A
                end;
9 s2 F6 n$ `, a7 z/ _        end;
2 o0 t1 @& x7 O5 b3 k+ _& Bend;        -- of the method+ q2 p+ w6 ?. J( e4 d6 S7 m2 |
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 5 d1 S- w' q0 ]- \
1 R) }& a7 ?& _6 r' [! {
这是AGV_putin中arrive的method。
, c* G2 N) K. i+ e
! Y- i4 R) s" O: G2 {! r, b! I当到达物料速度越高时,这个报警更多,8 i0 l/ q" ~1 e3 y
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
! v+ }" _! E4 k+ P程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?( D! b% u4 M' _, ^
2 X% o$ k1 i# h# J" x  Y
另外一个小建议,就是move,所有的move都可以这样1 F+ n- D; a4 _5 \
if not move() then debug end
4 N& T6 B3 N  B% K2 c- p1 @1 F这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
7 |4 P* \  T( D( G/ d. n' Hplant simulation中的free libraries有AGV模板,$ R9 l8 x8 a: N6 Z; m
里面也有案例。6 C2 \+ I4 I7 _. y4 X+ V
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
7 _( V, g4 B* S* F! r6 r5 Y
6 o/ _# W' ?- W我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 5 r" S. T6 n6 @" `

, K' u2 A7 ], B0 C4 v+ Z那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
8 c9 ?- K- b2 z/ E这是AGV_putin中arrive的method。1 F$ G' R1 k# B5 n/ Z, x- X* C
) Z+ J+ Q0 k' V
当到达物料速度越高时,这个报警更多,

( d/ m% a& I# f% _2 n另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-5 04:12 , Processed in 0.024428 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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