设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5619|回复: 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'* N. W3 A& c% o/ P, q; I
*/
8 R1 T0 S$ v" P, G6 |is' x6 R7 h) C* o3 r: c$ G2 @
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ `- Y6 e. G3 s( X$ ^9 P! K- ydo" j6 g' d: v( B$ @3 E- e+ O+ U& C
        Lan := rootfolder.Internal.Tools.AOLlanguage;
$ l) z9 O0 {0 q' L8 D" c        if current = @.Destination -- else return. l& Z* n9 s* H% Z* ?* N
        then0 z; G7 I. v& I; J  g
                @.Destination := void;4 j" e# ^- r& [5 o1 s
                if @.occupied then
# ?4 c) K/ t/ W( u$ f6 p                        part := @.cont;
, o. p3 S7 Q3 ?: K; b4 X                        @.transpOrder := void;# Q$ H+ r4 j; u
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. P; J0 v8 X' Q8 n' F$ f
                                @,root.eventcontroller.simTime);
0 j6 b$ f: p4 z  x6 @                        @.HasOrder := false;
+ R2 M' M& x# u1 R  [                        @.DrivingHome := true;
6 f4 E3 Y6 c3 S0 T& J                        rgManager.tryToStartTransOrder;
5 ^" R/ c5 w& L" q                        if @.Destination = void' G2 y& I% M, |0 H3 f  _/ `2 x
                        then -- no transport order for vehicle @
) }0 a9 Z; ?' I; _" q                                @.Destination :=
9 W# O6 N+ o) ]4 p0 r                                rgManager.nearestFreeStation(@,track.~);- x9 R2 x& l4 V- Q8 ?
                                newDirection(@);   
0 E( P( i4 N1 }6 f  c                                if @.Destination /= void then' `4 U* r2 ]+ S6 N! N9 Y% J
                                        @.Destination.NumReservation :=
# V& G  E' u6 [/ v7 A5 W4 s                                        @.Destination.NumReservation + 1;0 Y, |5 b! F" T- P; {  Q
                                end;
; ~6 Y/ y6 K4 h8 Y7 _                                @.CurrIcon := "drivingHome";
* W' r, I7 K# d& `( U. {                                @.DrivingHome := true;
1 j/ F4 j+ J! t; x3 j4 f                        end;
# q. z. ?* `6 ]" F' p4 K                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 r- M* q9 T( `( H0 v3 ?3 t                        part := @.transpOrder;
, z5 K* f8 Q; f% L                        part.move(@);-- load part
# z: B* I2 b8 G3 [6 s7 o* i% V                        @.CurrIcon := "load";
8 B# q) C# f& P  p                        GlobalDistObj := part.globDestination;
4 `2 s1 u$ D$ O6 u+ t                        assignLObj := rgmanager.rgAssignL;
3 z6 b* K8 K8 @: d% `                        row := assignLObj.getRowNo(GlobalDistObj);
3 O8 x/ ?  E! O. i8 Z0 a7 B8 Q                        if Row = -1 then -- since 70
7 S) |0 V( d5 Q6 f% Z* y( ^$ C                                if lan=1 then4 o4 ^. m  W) s) X
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: {8 P6 u3 M+ h- D$ y, P                                                to_str("in der Andockstation: \"",?.~.name,"\""));
8 c1 e8 j" m6 w1 F4 I; Z; S! p                                else
; I3 [7 }/ {% }3 p, u  q                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 G' x  [* ^% h: u& l0 I1 F( E
                                                to_str("in docking station: \"",?.~.name,"\""));                                . l3 T, K; V* w" ]6 u, m+ k
                                end;
  t1 g$ M- Q, d6 D( D) j1 L2 U+ |                        else
# w+ Y# H# n$ q, |9 c  g' k" ?( T/ E; o                                @.Destination := assignLObj[1,row];
; p# ?" Q/ V0 G% h+ X, t. i' t8 Z                        end;                       
# F! Y; }/ C9 U) ]& [' }                        newDirection(@);; t* M2 u0 |2 j
                        @.HasOrder := true;
' c4 F6 o9 @- ?* b0 y$ a9 N9 j                end;
9 t% x; @8 d' I        end;
. g0 _+ L% w7 ?5 E7 Zend;        -- of the method
' ~. [! t  q) ~2 m7 {* A4 G% @
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 & ]: K1 H( x  o2 B
( W7 E' \! Q6 }& M9 L2 e
这是AGV_putin中arrive的method。
0 V$ b9 s! L  h5 V
6 _: D# V( d' V3 C- T8 F& R( i当到达物料速度越高时,这个报警更多,
  i( M2 c+ c) D( k3 t可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。. U2 L% H' ~4 U1 r/ c) C8 H* @
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?# Y) R. r' x) ~+ g3 H  h

& ?7 j& ^" f- n  C  J另外一个小建议,就是move,所有的move都可以这样0 j) v7 B' S# `$ U2 I: b
if not move() then debug end
) ?' ]) P  G. m! a# m* M3 {这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。: z4 v0 l- ^' Z7 r. f$ c5 |
plant simulation中的free libraries有AGV模板,
/ Y% U+ {& m* G7 I里面也有案例。
0 C5 h' `! q6 Z. r; ]2 \3 b我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。' Z5 Q4 N- q' Q

+ |6 m- F5 g/ v) C8 O0 ]我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
. c# a7 n8 v2 E+ H4 }, b
. S+ Z5 m" O6 ?( O* l7 c那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
6 b' ~7 V2 `- M, g0 M: r% f这是AGV_putin中arrive的method。
& k! o1 g2 u# L! G3 Q5 L9 i% [  O. e
当到达物料速度越高时,这个报警更多,

3 ~1 `0 _. a0 e另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-9 15:05 , Processed in 0.018105 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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