设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10198|回复: 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'0 J1 b6 q8 n8 n
*/
* @4 V2 G  ]) n* u2 H9 ]6 [is1 R1 J9 b# u, a! O% D$ v
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;* m# L. D: K5 N  o& |0 `5 q+ X' v
do- }/ @/ }7 z- I/ p0 F0 P
        Lan := rootfolder.Internal.Tools.AOLlanguage;
7 e# l% l' ], z/ v        if current = @.Destination -- else return
' J$ }' [! D- x; z+ V5 T7 R        then
- \: h% p- Q2 ^9 E                @.Destination := void;
- G! t( e8 U! @" |                if @.occupied then% E0 o7 L) z; J( o: X: v6 n
                        part := @.cont;
2 m( v- O9 ?$ `                        @.transpOrder := void;
0 _. }/ W3 q/ b, S0 X                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ i4 ]) D8 o  g
                                @,root.eventcontroller.simTime);
  E  O* [/ Q5 o" P; S+ S, |                        @.HasOrder := false;
* I9 r0 [5 E+ `, d0 A                        @.DrivingHome := true;. u" J' ?2 a4 J' v  g
                        rgManager.tryToStartTransOrder;
8 U6 T* K1 ~9 U( s( @2 M                        if @.Destination = void
% ^9 j2 P, D3 |4 e7 l" \0 `. l                        then -- no transport order for vehicle @
3 U- ]* e; p+ d) j0 g9 Y  ?4 M" X& z                                @.Destination :=" R( {3 L3 }- x( O. r7 ?0 }
                                rgManager.nearestFreeStation(@,track.~);
& n& c. _7 p0 u/ e5 J                                newDirection(@);   & W) h! K! C! C6 a9 K3 u9 X
                                if @.Destination /= void then4 ^. w5 ~1 @/ E
                                        @.Destination.NumReservation :=) [8 @/ V2 S0 e! d+ K# h
                                        @.Destination.NumReservation + 1;: Z- W* v8 I9 [, `
                                end;6 k5 A1 y% p8 K( u
                                @.CurrIcon := "drivingHome";
6 N! z/ [& ~+ ?$ ?3 g- _                                @.DrivingHome := true;9 ?* A' l: N& g) p' F; W
                        end;
5 c1 _( n  b( l                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; n3 N- L4 J: n  K6 |% U: x                        part := @.transpOrder;, o# G: e4 T! Y6 c$ |, H
                        part.move(@);-- load part5 p# B, ?3 s$ Z& ?9 e' s& n
                        @.CurrIcon := "load";
# F% \9 M& _% b5 C" u                        GlobalDistObj := part.globDestination;2 U6 ^& c9 w. o1 w3 ~- V) ]- l6 d$ w
                        assignLObj := rgmanager.rgAssignL;
1 E/ q7 k; o+ y. T! S                        row := assignLObj.getRowNo(GlobalDistObj);
9 F# W- ?7 e( d9 [& J& `( W                        if Row = -1 then -- since 70+ |$ o! |8 a4 j
                                if lan=1 then
+ G$ q+ a. M& F( v: C                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
  x) a. T' K) k0 }: n                                                to_str("in der Andockstation: \"",?.~.name,"\""));% P- M& D  W2 n# W/ `( T1 k
                                else
1 g& m- _+ }* ^% T9 l8 A6 E                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 P- u; c1 v! V. f( E( k                                                to_str("in docking station: \"",?.~.name,"\""));                                , U1 U; o( Y2 K; H# o* T+ x
                                end;$ d/ Z3 K) v9 a, [
                        else
/ H- ]' D% @. q# [1 R! ]4 l! W                                @.Destination := assignLObj[1,row];
4 z6 D; Z3 Z0 l9 T2 R                        end;                        $ T, l5 L: `1 d. B6 S
                        newDirection(@);
7 X  K) Q7 f3 e: E3 ]- {( h8 [                        @.HasOrder := true;: h( R( C# Q% O2 M" b& l3 f
                end;0 G& l+ I4 \, v/ D) D: u8 [
        end;; H% w/ D# r. A
end;        -- of the method
/ E% \+ y7 t5 q* d, N
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
8 o3 p. a" F: j2 G) {7 `8 T
9 \( |0 x% M" x4 A这是AGV_putin中arrive的method。7 H7 \) s, C/ ?6 R. M  j. J
  i( Z& X$ y4 \$ q; h4 f* n1 a
当到达物料速度越高时,这个报警更多,
: W# K: @& T7 [) o0 c可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。' g: Y; M( M4 T$ z, n3 ]& b! _! A
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
6 W  b; l4 d7 h4 v1 v1 C( ?. @! s6 q0 c$ S) k- l- f8 X2 r
另外一个小建议,就是move,所有的move都可以这样- y7 G6 J' U/ L. [$ [4 E5 I
if not move() then debug end
9 m+ c2 ^  j0 U, ]! ^, a" _这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。# C4 [8 v/ w) F$ v, g
plant simulation中的free libraries有AGV模板,& {. V. R# p0 d
里面也有案例。6 s$ H2 L7 X& a, ~- o
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。3 C1 {" R7 D& h

$ E, v7 O$ I6 v5 }7 Z我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑   }9 P/ X' s& u: ?8 I
7 Z! L) x9 k9 @6 A  ~4 p* O
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 : q$ j* p+ h" r& b- ~
这是AGV_putin中arrive的method。: ?8 o2 E+ v# S3 w% ]+ F7 R' N& J

* {. e/ P2 m# U# f当到达物料速度越高时,这个报警更多,
" F( G+ J: [1 Y5 T7 l0 w
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-19 17:58 , Processed in 0.025442 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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