设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7021|回复: 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 P0 c$ D7 z% n$ }
*/
, B* M. B" a9 [( Fis
  z0 e+ @2 A4 a1 m* ^$ y3 b        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 _, P; |6 D( H8 H/ K& Ndo
3 N- Y4 k" l6 O        Lan := rootfolder.Internal.Tools.AOLlanguage;8 m! G: Z% G5 l, R- F% Q: y
        if current = @.Destination -- else return
* c5 e9 g! ^; u7 a& U4 Q        then
7 b/ s9 U; `" k5 y                @.Destination := void;$ n. ?5 n1 K" k9 }6 m* N, J  c. B' e- C
                if @.occupied then3 L$ @7 E0 Y* u
                        part := @.cont;0 n6 Q' L' W' e0 X: {2 f- e
                        @.transpOrder := void;' g5 }! t& Z5 n1 ?8 J+ Y: a' k" U
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ {7 X3 S4 s0 u1 Z# I) s                                @,root.eventcontroller.simTime);. P- E% }& }7 u* f
                        @.HasOrder := false;
& O3 t8 r4 _. K- N3 @                        @.DrivingHome := true;
7 ^4 _. Y+ K7 K                        rgManager.tryToStartTransOrder;
: ~5 H$ `# M4 J# C( d                        if @.Destination = void$ \! O3 J" I' |* c0 Z
                        then -- no transport order for vehicle @+ J5 r3 r5 y  N
                                @.Destination :=
, P2 p: R$ c+ j. ^! \0 N                                rgManager.nearestFreeStation(@,track.~);
) K: p# R6 F5 v! S. P' @" [0 P7 c                                newDirection(@);   
+ H& b' E4 q, f8 B5 f                                if @.Destination /= void then9 ?6 C! ^% p. R- p; r' |  U
                                        @.Destination.NumReservation :=
9 G/ u, z3 h+ B! y2 F+ I                                        @.Destination.NumReservation + 1;+ d3 O6 T% J" P% h
                                end;
1 B1 A; F. D4 y' z                                @.CurrIcon := "drivingHome";) [% `% f; j9 N* W% @' A; f
                                @.DrivingHome := true;# c  V* {7 r% B) N. K7 o& n/ m. f
                        end;7 z# e# y# }4 \" y8 \7 S" r! [7 }
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; r- m! \/ |- r: C                        part := @.transpOrder;. U* F! R- L- b7 m+ h) X8 k" u
                        part.move(@);-- load part
2 ]+ w: s8 A4 r& h- h                        @.CurrIcon := "load";8 t, S0 F8 W4 a
                        GlobalDistObj := part.globDestination;( |: K6 F$ b" k- ~" p9 T
                        assignLObj := rgmanager.rgAssignL;1 a/ z2 C/ V3 u
                        row := assignLObj.getRowNo(GlobalDistObj);
% {, R( `! r0 M2 M$ @' O                        if Row = -1 then -- since 70' d3 c6 R" t( U2 I
                                if lan=1 then' g& B( J% |; ]. B
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! u" x1 H, A' g) L                                                to_str("in der Andockstation: \"",?.~.name,"\""));
9 G+ z+ m5 g- b* L9 M                                else, [+ x9 B8 j. I& a( T: m& h
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& P% [! y! B, H/ ^* b$ B0 e                                                to_str("in docking station: \"",?.~.name,"\""));                               
  g4 O/ a4 E& h1 z% j9 i3 ~                                end;" ]  q( h! I9 Q* m3 R" d- a7 W
                        else) I+ |: H' B' |- \* V& N1 @" e5 ?, \. k
                                @.Destination := assignLObj[1,row];/ R% D( e$ V) i; J' y! u8 c3 L
                        end;                       
9 a7 P8 X: K' g                        newDirection(@);
" Y9 I. I9 M/ c9 f- r                        @.HasOrder := true;- u' K0 M8 m# [7 ^4 v
                end;( b# i1 p- y3 a0 n5 R1 D/ ]
        end;! Y9 h0 ]( D" p" F
end;        -- of the method4 P; n, M( D. [; |* u
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
& D/ x' K3 B0 v; v+ c
" O5 P& ~& O8 z( F这是AGV_putin中arrive的method。
; b- v# o8 ]+ m% d$ W
' D- J* P9 b4 z+ M8 k当到达物料速度越高时,这个报警更多,
0 q4 Q' C( s2 ?+ Q# u3 z可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。1 F- t  A% W1 W, j7 a3 S8 ^
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
4 @; t" z; _6 @: g  E1 w) N0 c* \7 x" D3 b3 S5 n
另外一个小建议,就是move,所有的move都可以这样
( Y2 z" |5 b; x- P2 k& cif not move() then debug end
7 u  C( C) F$ o这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
9 K' ]( U$ ~- U& ]# {5 {, v! Gplant simulation中的free libraries有AGV模板,  ~8 l/ N$ o/ |1 t
里面也有案例。
- ~  M' w' K& Z+ X( ?. g我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
7 f2 c1 L5 |- t+ D3 `
1 r. l! A: A2 `# s我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ! }. B/ _3 u6 z8 m0 @

1 X1 A! U$ O! Z- }3 c那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
  e7 F9 j" t8 b0 F0 l这是AGV_putin中arrive的method。- j+ x/ |6 D: E7 c  B0 f) L

% _5 n& T+ [  _! n1 b; r- b当到达物料速度越高时,这个报警更多,
$ J1 ?1 M( }# ~* Q5 ]9 ]
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-11 20:58 , Processed in 0.024735 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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