设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8952|回复: 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 i0 Z$ n6 L1 z1 X4 w0 i0 n
*/$ m' L# O% f4 Z0 q9 h$ m9 M
is
/ |" h/ Z1 L& ?0 G        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 A- G6 H  A0 b  p5 c/ V4 |1 P% Jdo
' C  v" c( o/ D% \3 u7 C        Lan := rootfolder.Internal.Tools.AOLlanguage;( v! b% k' H+ y4 U1 J7 t
        if current = @.Destination -- else return
) M# M1 r4 l& X5 {6 f% x0 ]        then
3 x1 t! r! f: H1 _                @.Destination := void;- k6 B" O6 t6 s( L7 P
                if @.occupied then
: A7 c! W" D8 r2 h                        part := @.cont;7 ?( ^; D3 g7 g
                        @.transpOrder := void;$ E; M- t% t4 k) Z6 A! k) i. g
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. N4 b7 S& K9 a. {% ?+ k
                                @,root.eventcontroller.simTime);
, m1 w: q. `. K( D1 m                        @.HasOrder := false;. Z/ c: q3 p- P( ]8 D- s
                        @.DrivingHome := true;
, U$ |' a6 }& |4 Y# n4 U                        rgManager.tryToStartTransOrder;
7 r1 B2 K( f. P  G4 W" u                        if @.Destination = void! m. C* H; N2 v% f2 g9 s9 U% x
                        then -- no transport order for vehicle @
* E( m1 r  B  c$ J7 o4 D5 Q                                @.Destination :=
! I/ q9 [- R! M; ~0 v                                rgManager.nearestFreeStation(@,track.~);
- V6 X& c2 r2 ~$ K. \                                newDirection(@);   
* t% I9 T  f/ ]5 G# U  V                                if @.Destination /= void then2 q" k- C0 o; C$ u  W9 x# t; P) G; \( S
                                        @.Destination.NumReservation :=
$ G( T; D, w+ Y5 ?$ N2 N* @                                        @.Destination.NumReservation + 1;4 i' ~$ _0 ]6 Z: u
                                end;' J# I! e2 K6 B/ M: Y+ |5 F2 t
                                @.CurrIcon := "drivingHome";
, C: ^- o2 w) Q8 B7 r                                @.DrivingHome := true;
' q8 Y8 c$ D+ l, G$ X" ^                        end;2 {2 b' u2 p3 J$ U- b3 q
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, i0 ^4 P. o  k0 w                        part := @.transpOrder;
' y8 {7 r1 @1 Z7 y" q1 [+ f                        part.move(@);-- load part1 ]# E' D3 K+ y- _, ?( A
                        @.CurrIcon := "load";4 W/ A" M: K0 N) D& _9 g& i/ }
                        GlobalDistObj := part.globDestination;
; b. @! R& M, u6 T* W4 M( V" u) h                        assignLObj := rgmanager.rgAssignL;% g& l, L  c. \3 o0 H0 V  P; G
                        row := assignLObj.getRowNo(GlobalDistObj);
0 l& f+ W) Z! [1 W& a" N- I+ T                        if Row = -1 then -- since 70
9 F( ^) j4 {# |- J                                if lan=1 then- q1 M" O0 G) L5 }1 S0 x" D% w1 Y
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 G$ f- a& V+ a1 N# V                                                to_str("in der Andockstation: \"",?.~.name,"\""));2 Q! k/ r; \$ a. C! E- l
                                else
8 f8 {" G8 r: S/ b2 `                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) E5 w" ^% k' f" w- A, Z. v                                                to_str("in docking station: \"",?.~.name,"\""));                                3 x, }7 e' J" C+ Y1 X
                                end;2 [  ^8 B8 ^- \: ~) v
                        else" V  l4 }; w  b7 O2 Q
                                @.Destination := assignLObj[1,row];- T8 k6 i3 {7 A+ u$ ~. k
                        end;                       
* E4 z! i2 f# \7 F% [" M. M                        newDirection(@);. @5 M! ^& ]: p& W
                        @.HasOrder := true;2 {' Q- @, e8 j# [3 O: U
                end;5 W2 X: h+ c/ \. _* O, B+ M8 |+ u
        end;
) W' l: C5 d: [( j: _' u/ L/ {end;        -- of the method
2 G- L3 I  b$ t1 E7 {0 y% E
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
% \8 w1 _; u& i8 k; t
$ u* Q7 N0 G. J这是AGV_putin中arrive的method。
! L( b. W+ i' C0 e& |0 L4 |2 e* n0 Q6 N
当到达物料速度越高时,这个报警更多,
; p1 K, W. |; L# k. J可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。( K0 B& B& n( v
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?+ W% K; v6 ~5 v% E0 j" e
/ ?+ V$ M9 A' v: j- R
另外一个小建议,就是move,所有的move都可以这样
0 p0 s, [* L, g4 y5 ^if not move() then debug end; F) L! W$ n8 c& l/ r3 g( i1 F/ a
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
! P. G4 z5 Q. `6 @" hplant simulation中的free libraries有AGV模板,
: Y  `' E3 a" q  g' t2 K2 X里面也有案例。1 T: p9 `" N2 H4 q7 _, O
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。/ v2 i% B, Z6 K6 Y7 _  V+ D3 q

. r7 `# B  m& a  K' K我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 5 S, X$ q* h/ f+ f& s

, s9 K' V: p8 K3 d那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 : y8 o8 v8 f/ H! G8 w, C
这是AGV_putin中arrive的method。
) k! j* f9 t$ e  s8 D# z+ l
% v# s9 ~: F( J& M7 \# m+ E$ |当到达物料速度越高时,这个报警更多,

7 v" K! K; E( r- z+ m另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-6 01:18 , Processed in 0.018554 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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