设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7218|回复: 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'
/ r8 s5 H) E  [$ d*/" O# W: S, a0 @: i
is) u4 f$ K) p' O& g" F1 y* I
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 A9 ]8 V* i& s1 j. B: qdo0 F/ \& H" [6 s
        Lan := rootfolder.Internal.Tools.AOLlanguage;
1 b+ a* v: ^- [4 f$ I9 Z/ Y        if current = @.Destination -- else return9 }# d% s6 E6 l$ m
        then& U, ?' N5 F' E3 [
                @.Destination := void;0 K, V: @- H/ J0 T$ z( Q, G( ?# q
                if @.occupied then" z0 v1 ?, j( _  T5 x4 |
                        part := @.cont;8 a: o# t7 Q0 ]$ _7 Q- G, {
                        @.transpOrder := void;
7 R$ d- C$ A/ V2 W3 F                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% [# Z; d& N% _( Z) k
                                @,root.eventcontroller.simTime);
9 U; E. x0 I6 W. a                        @.HasOrder := false;
. j9 w; [4 `+ W) |3 [6 _7 a& {# x3 m$ ]                        @.DrivingHome := true;
( L# l, \  X  U8 V, f                        rgManager.tryToStartTransOrder;
% Z( ~$ a  U5 Y" B$ V9 P                        if @.Destination = void9 }  n, ]2 e4 E% f
                        then -- no transport order for vehicle @7 M) W0 N: H7 e9 x, R! w( p- q
                                @.Destination :=
( i; S, T# C% M& n) n! P* L                                rgManager.nearestFreeStation(@,track.~);. U2 K$ i+ t6 y" \& P9 d/ [' f
                                newDirection(@);   # Q3 T7 N* Y1 W/ V2 s
                                if @.Destination /= void then
3 p3 b# [1 `, e0 N3 d: F                                        @.Destination.NumReservation :=
& t" j+ Z# g3 ?% a                                        @.Destination.NumReservation + 1;
, |! c/ d7 t' e2 q  B* w                                end;9 k% S' E2 w8 Q8 V# F. {" g1 Y
                                @.CurrIcon := "drivingHome";
3 y& z; w$ t) K6 p/ l- W                                @.DrivingHome := true;
7 |7 x! m, ]8 P; J8 p* N/ O                        end;4 ?5 E1 r( O" Y+ T: ?, B
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 Q4 J6 D0 i4 a" ~6 F0 x                        part := @.transpOrder;
+ j8 q  x9 Y" D2 ~4 x4 F% \+ s* L& |                        part.move(@);-- load part' E. c( h. G0 ?  c: g' A
                        @.CurrIcon := "load";5 l  F1 d" g! ?3 W) v2 [
                        GlobalDistObj := part.globDestination;
  k% l7 w1 R5 z                        assignLObj := rgmanager.rgAssignL;
' @9 O% Y% _: t6 E# V% q# N+ y1 f                        row := assignLObj.getRowNo(GlobalDistObj);( r. a2 U8 C6 _* K: ~! x$ @: e# M- c
                        if Row = -1 then -- since 70. ~* R% W& ?+ N4 i0 `
                                if lan=1 then
8 k) C. `. F+ W  r1 U: a0 ~                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," h* F  B5 D1 o# H
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
" o2 Q5 A9 I6 G! A8 ^: G+ @1 v; y                                else
  c$ d1 i) j- l" v; s8 a( ^                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% I/ b* Q8 s0 o; L' N3 t* M$ Q                                                to_str("in docking station: \"",?.~.name,"\""));                               
+ {8 C$ J- W2 s( e0 y( {4 }2 X6 n                                end;
% Z8 ^9 D0 e* Y0 q* Z2 L6 e                        else
; J$ F/ @' i6 r* F0 F: n7 B& R                                @.Destination := assignLObj[1,row];
, q  o: ]3 K; e+ A# s% x                        end;                        7 p' \! X5 ^! N0 \3 M7 L5 t
                        newDirection(@);
6 e0 I& n. [8 P6 c2 P                        @.HasOrder := true;& p" j$ y! q6 Q& f
                end;+ y% [1 y3 Q. _0 u/ B
        end;& d7 ~' j9 q0 q; |
end;        -- of the method- ~8 u' [; o4 D( a: U- E
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ) Q, L- a* g# [- E% _8 `! G  \; j

3 z0 D! A  _% c) k7 P1 `这是AGV_putin中arrive的method。0 Q% F9 U6 S) P8 ]6 [7 ^' Y
: s( M) O( m1 E- l4 m1 Q
当到达物料速度越高时,这个报警更多,
9 d: u9 d, K& L6 y3 V- T' a可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。* w# a1 Y0 }& ~% `5 s3 E, m. g/ `
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
) I% Z/ X, v+ e" g+ o0 s  o4 _
* j. a* H( M2 e- D另外一个小建议,就是move,所有的move都可以这样
5 p3 X4 ~/ ^/ H1 ~if not move() then debug end
( F& I8 g" E$ g2 }5 G/ F/ m+ ?这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。& _1 N# j1 q2 H6 |6 A( n6 I
plant simulation中的free libraries有AGV模板,9 J  B3 z0 D& a! s% \' J# v4 ^
里面也有案例。! s! }( w& ?, Z( U  f
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
; }+ |2 W! P2 }4 e% M5 y) N: ?, T; D' V8 t! C9 m1 W
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑   R5 V) c2 W! ~" d
( u% v, V0 N! j5 k/ A$ S
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 / Z, h) }4 Q- ?$ `
这是AGV_putin中arrive的method。
1 X" `+ [: j* t$ @/ D( A% v& B/ |/ S: l; k$ ~3 z! Y
当到达物料速度越高时,这个报警更多,
% ?+ m8 C( m3 b- p1 K. @
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-28 00:32 , Processed in 0.017007 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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