设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10251|回复: 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'- x7 K5 J/ v% I4 }1 ?6 K; w
*/
* U$ h5 w* P) x) H+ Xis
3 q4 p) E# o% `' D( v4 B        part, GlobalDistObj, assignLObj:object;row,Lan:integer;) P) U6 A' F$ x0 y
do
; K( A7 y3 Y# K6 e        Lan := rootfolder.Internal.Tools.AOLlanguage;6 N9 R: v, a8 c
        if current = @.Destination -- else return: l4 L1 v+ q6 g2 Y$ j% j9 F- o
        then
" o9 j- F% ~3 Q4 g: p' |- e/ x                @.Destination := void;/ `; i/ p* n! r2 Y0 O
                if @.occupied then$ g6 R1 a' V' |0 U8 @( |
                        part := @.cont;
1 l; _' o. F3 `& U0 y5 O% A/ C3 W8 g# o/ S                        @.transpOrder := void;
% H" H0 }3 g9 w0 Y: C                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* a+ S2 {! g5 R& A
                                @,root.eventcontroller.simTime);
5 Q0 t1 z% S0 h, }& ?$ R                        @.HasOrder := false;
; H# \: J/ P+ j% I3 A                        @.DrivingHome := true;& z3 P2 N3 }1 q( |# \1 u$ }8 ]
                        rgManager.tryToStartTransOrder;
7 j3 m# L" h& }# P8 N, h2 {                        if @.Destination = void7 v9 M& |& b6 ?/ A- e
                        then -- no transport order for vehicle @
* N% Q$ ^, ?+ o0 A: A( u                                @.Destination :=+ }  ]3 K5 V* ]0 |  _! T$ {
                                rgManager.nearestFreeStation(@,track.~);9 z$ E9 j+ N5 ?/ y2 R; J. a
                                newDirection(@);   
) @9 O$ V% j* B6 m  |+ l. g1 R                                if @.Destination /= void then
: P7 j; h. A7 |" [2 j( M                                        @.Destination.NumReservation :=
$ B! \$ H/ T, I: c                                        @.Destination.NumReservation + 1;
& i) U) }; }* w                                end;- x$ f1 p6 _7 ?9 p& p
                                @.CurrIcon := "drivingHome";) p' i5 g; u- Q, I$ _
                                @.DrivingHome := true;) m1 O# {: ^/ P9 ~  z/ @$ U& s
                        end;
% ~$ z/ z- A7 X- c, k                else -- the vehicle @ is empty, both vehicle and part are in the same dock station' g! R( t0 d5 }# l
                        part := @.transpOrder;
% \8 E1 U  _/ s- ?# d) t                        part.move(@);-- load part6 x2 a" _2 `5 k) k* R
                        @.CurrIcon := "load";3 }) n# ~3 {0 Z: T6 ~( M/ ^
                        GlobalDistObj := part.globDestination;
5 i! Z- z, g' ~, G                        assignLObj := rgmanager.rgAssignL;( O) D0 e. \; d& I
                        row := assignLObj.getRowNo(GlobalDistObj);% n, |+ x! [4 M8 N
                        if Row = -1 then -- since 70
4 H* I* j; T3 a6 j6 f: g                                if lan=1 then
4 F! f) `) t; R: y5 d4 q3 p                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. z1 `# N- H1 J7 s0 l
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
& E6 \8 H; i0 M- a" [* D                                else  F  G# o% u3 v+ p: D
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. e/ `' D: Z, h% f( I! t                                                to_str("in docking station: \"",?.~.name,"\""));                               
  Y1 R# o: U  j4 a$ D9 X0 D                                end;
  a! ~1 l8 `' B0 h3 e5 C                        else! G, I6 T6 |) ~" ~2 s. n/ N7 o$ Y
                                @.Destination := assignLObj[1,row];  A; Z2 `4 w' `$ @5 _! K
                        end;                        - B/ _9 j$ o: x( _8 _8 B/ u
                        newDirection(@);
1 H0 ~6 e) \- I9 R                        @.HasOrder := true;* I, x' p( K; ~2 Y- N6 ]9 X- Y8 b
                end;! H1 C! ~7 p; R
        end;
* }0 Z6 Q& d4 r  e4 d3 cend;        -- of the method$ B& m! _3 o$ [/ y# J( ^3 g
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 : D) c; v, f' U, o% A

  e- m! a0 F* t* s/ y. m) x. w( l这是AGV_putin中arrive的method。
  o/ O( Q$ x/ J6 z* ^; @/ N
7 z; c2 G# B8 r2 f# u! b6 k2 R当到达物料速度越高时,这个报警更多,& s# ?: y+ r0 u
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。% D' V9 p$ I  x
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
  J% S+ E. G6 I7 h8 j  v4 |$ m9 d4 o9 R" k
另外一个小建议,就是move,所有的move都可以这样
7 j# w3 t$ Q5 x( ]; c& [7 qif not move() then debug end# H4 b$ a' M7 o  i
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
. \1 v7 M& f6 Y- N' `- tplant simulation中的free libraries有AGV模板,
, P; c" T) {$ n+ ]! T/ [里面也有案例。" |5 `$ [9 t# i) F  c6 A
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
& f( B% T- f! G) D3 J3 R! T# K# b
7 N9 G) |; R. ]- x1 s' J我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 5 G" B4 P# f2 q- E1 O- P4 v
& D: R% @. ^  K! z9 D6 W
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
1 S9 w  i( p! E# q: m这是AGV_putin中arrive的method。4 u+ B2 p# g; A) @
, p) h$ N. V6 `' }) {/ @2 L$ s
当到达物料速度越高时,这个报警更多,
" A& z, a( _& T& P0 Y! t' M6 y
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-22 17:36 , Processed in 0.016548 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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