设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8452|回复: 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'
! X# s6 }/ q) g4 c/ x; q& E/ m& x*/) H, Y4 W/ F7 g
is6 W( U4 m5 {; l. I
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: I+ i' r/ P  jdo
- G: V; ]6 t) l2 J; Y        Lan := rootfolder.Internal.Tools.AOLlanguage;5 F0 s: z0 y7 R4 c2 |5 p
        if current = @.Destination -- else return/ |  ?  N( D; y0 Q$ ^
        then
# |. p7 D9 W/ ?5 _/ U" I5 B                @.Destination := void;
2 a* a  V& I: z  h9 h0 @                if @.occupied then
% I& L7 A8 i8 a$ [  b8 W( I                        part := @.cont;
% k5 O9 o1 i# a, w9 H                        @.transpOrder := void;2 J" P" Q6 h3 d( r9 J# S' I: n/ O& B
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 D$ A$ _+ @1 c9 H7 S" M% F0 Q! b8 ~
                                @,root.eventcontroller.simTime);
; P  O: h5 ~$ E" s$ `% H$ r& N! f                        @.HasOrder := false;8 x+ O& F* \# H1 O4 X0 C. P
                        @.DrivingHome := true;* k& I% N0 Z* |9 x" A! I+ ~6 e
                        rgManager.tryToStartTransOrder;& k+ i. r* H! F+ k4 f/ N. b4 F
                        if @.Destination = void
" x$ C6 M6 Y) s* Q0 r- ^4 F" L) k                        then -- no transport order for vehicle @4 d3 c; |1 g, l; W
                                @.Destination :=
/ J( l8 B( m9 Z0 ^* \: e                                rgManager.nearestFreeStation(@,track.~);3 i$ j2 y+ }. B  {/ S5 _$ |
                                newDirection(@);   
' }  b1 P- u, \! V                                if @.Destination /= void then
( j. y; m' Z* _% J) v- X+ j( c. k                                        @.Destination.NumReservation :=
0 [$ {  t- W( F+ T8 J, @2 D" v                                        @.Destination.NumReservation + 1;
5 B$ _0 U( j* i) R7 m6 c                                end;
0 F7 y; y/ K2 |9 y# F# W                                @.CurrIcon := "drivingHome";
2 n5 t5 t9 j, H7 `                                @.DrivingHome := true;
7 S- D* N, ~, V! Y. u& w' L( t                        end;
$ a0 C5 l( y. E                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% v- w* V* g& \$ B+ t& s                        part := @.transpOrder;
( d2 F' b/ V; g- {  n                        part.move(@);-- load part* n+ e8 D* y$ M4 f- [7 `# G# K  |
                        @.CurrIcon := "load";
1 }( q. h3 D3 ?* q, y0 b2 S9 i! ]5 h                        GlobalDistObj := part.globDestination;; F& y9 N  R2 e! g% a
                        assignLObj := rgmanager.rgAssignL;
2 s  K: B9 n0 K  a9 ]! Y  C                        row := assignLObj.getRowNo(GlobalDistObj);
- Z9 ^% j1 e6 Z* i- H                        if Row = -1 then -- since 705 V3 [( Q1 ?; R4 P. I+ d
                                if lan=1 then3 z$ Z9 s) P" A3 H5 T7 w# g
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- f2 e, v4 E# K8 Y- ~
                                                to_str("in der Andockstation: \"",?.~.name,"\""));* R/ x0 s7 g: y
                                else
5 G$ [6 ?8 ~8 ^                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ v& T5 ^0 i6 _) R9 Q) I& B                                                to_str("in docking station: \"",?.~.name,"\""));                               
3 j& v- P# F7 N7 S5 N* C: j/ _  w                                end;
( Q* x( A3 k+ P                        else' c3 ?5 d' s5 J
                                @.Destination := assignLObj[1,row];, G! R& ?& O2 V
                        end;                       
7 F3 z. r* ~* V: G, R: E8 N                        newDirection(@);3 C5 k) T6 t5 F
                        @.HasOrder := true;" l+ v+ k1 }- Z- T  c9 P
                end;: j! Y# V% J$ E' r+ c; {/ l& L
        end;! ?) U5 A' T/ h& q9 x+ o
end;        -- of the method
4 J4 x- s" G1 N) f' \& h. [  m7 G1 p
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
. T5 d0 a/ G' u3 |! @/ n% G3 e7 y3 n+ q7 C7 Z! u5 C
这是AGV_putin中arrive的method。
( U% U. f* r1 M  i3 A* w
3 P6 {2 r8 h% z0 o当到达物料速度越高时,这个报警更多,
; ]$ X! d! [/ ^7 f  d可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。4 g2 Y9 C: c5 n# T/ [& V7 v) u
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?+ b! T" W6 c7 x: C" X+ P  h

# D, e) E: g1 x7 p" p另外一个小建议,就是move,所有的move都可以这样6 d) @2 X+ F  W
if not move() then debug end- o7 I, e# Z( O- t/ F8 V& }
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
# Q, W/ }. c0 @4 M& _) a% qplant simulation中的free libraries有AGV模板,
  j# F# Q9 x% C里面也有案例。
7 A* g+ N# X6 d我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。3 C0 M4 O6 r. k
( Y$ T9 m+ |" k1 _+ @1 g* V8 n+ D. o
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 . H) N) k' G: N  y1 i" r1 X3 Y
- c2 d+ J$ n4 j2 u8 ~# z9 N) E/ }
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 % H  `6 E0 B  ~
这是AGV_putin中arrive的method。3 D& g5 M, L! Q

* g- l) Z" B! \' S; ]+ `! N- N当到达物料速度越高时,这个报警更多,

0 I' n5 x/ o: }/ ]' `' q另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-4 22:32 , Processed in 0.015620 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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