设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6658|回复: 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'' t) e- Y6 _: i+ r
*/. X9 y. ]# {3 f6 u
is( t; e2 w0 B* u/ m
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 {& o, D7 l6 j5 Q/ X# I  @
do
# L( D+ J. H- |3 G        Lan := rootfolder.Internal.Tools.AOLlanguage;
6 P# \( s- |6 Z0 ^3 X        if current = @.Destination -- else return1 o! u6 j$ ]5 B0 N0 t
        then: r1 g. {5 p: r
                @.Destination := void;4 P  j& d8 H% F" v
                if @.occupied then! C2 E5 D7 ^; f- B( G) D* @
                        part := @.cont;  ]% ~' x8 x# A) |6 e; v( ^6 j9 _
                        @.transpOrder := void;
% L7 ?# G2 D4 |! _8 N                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" s  z  @. W  l                                @,root.eventcontroller.simTime);9 ]+ X$ J5 [6 l& P
                        @.HasOrder := false;
$ R! t/ Z( @1 D8 H) w7 n: h                        @.DrivingHome := true;
, H1 b% q: [8 b6 @1 w                        rgManager.tryToStartTransOrder;
% s) D! z! @: ^) ]) V4 J                        if @.Destination = void
& F. h; z7 |- J7 R                        then -- no transport order for vehicle @
9 `7 R* E% C: T9 {                                @.Destination :=
' ^/ b, t, i& Z2 F" S2 ~. x9 z                                rgManager.nearestFreeStation(@,track.~);7 t4 s. j; p6 D  v0 [1 C
                                newDirection(@);   
2 t* B) |8 Z' u8 x9 \                                if @.Destination /= void then6 s: H( g0 k0 ~6 O
                                        @.Destination.NumReservation :=
( N/ m) q: ?4 _/ m/ Y                                        @.Destination.NumReservation + 1;
% p$ G9 K* ?9 l' T9 j+ [( ~                                end;% e: @! n2 E: y" T* s
                                @.CurrIcon := "drivingHome";
6 U" X) q& r! q7 u# I                                @.DrivingHome := true;
. V4 ?% l# ~$ u4 C7 ^$ U( h                        end;+ s5 n* C5 X7 l/ x% f$ q+ X
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station! h, L8 y" P7 R0 t6 V5 `2 X
                        part := @.transpOrder;
) x& L$ M" j% G; r                        part.move(@);-- load part
% v4 h9 h8 V8 `                        @.CurrIcon := "load";, C$ M0 l6 u5 v1 s7 W
                        GlobalDistObj := part.globDestination;+ ~# a  P# O4 O6 X. j
                        assignLObj := rgmanager.rgAssignL;% k5 h( g, o' G$ q/ v7 B
                        row := assignLObj.getRowNo(GlobalDistObj);2 u* H5 D) b0 Q4 A* ^9 i
                        if Row = -1 then -- since 70! l6 \  l1 x. U
                                if lan=1 then
1 w+ D7 L4 y( F/ u                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- u: Y5 Q6 @2 [- K' `
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
. u! Q& g  Q: g3 H$ j4 F' i                                else6 [0 @3 E8 a. x+ @6 V( g& z4 s
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- F) w' p- p% L/ u                                                to_str("in docking station: \"",?.~.name,"\""));                               
6 p7 m3 g4 T0 {) _1 f- P                                end;
2 G, ]: e4 M9 m' g+ G                        else# z3 h7 W( b0 Z! C4 W$ }  C
                                @.Destination := assignLObj[1,row];% [: k( Q4 o0 z, U* q2 g0 m3 p% z
                        end;                        + Y0 [1 F: K. M' _3 L# p( Q' }) }
                        newDirection(@);
* D( y: v& w! A. I* f) q1 s) Q$ `                        @.HasOrder := true;
9 a% w, Q  K1 Z+ g9 E                end;
0 F" M% {2 Z5 F1 F        end;
$ m7 ~. p! D7 n8 m0 C6 oend;        -- of the method
6 U5 t" J8 E! @& y& x) T' @
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
$ n. V; p% y. Z$ y0 H; {; h2 J4 K! }
这是AGV_putin中arrive的method。* @, q3 G( y: g$ {6 U
+ b  k) ]( N" i7 d0 Q8 M2 _1 P: W) n* g
当到达物料速度越高时,这个报警更多,/ T: W6 W% y. q9 n/ ]
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。% |- _" ?; H& \8 \$ m$ B: P
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?7 i6 w% C5 r! e0 Z- I

) s3 s# @( q- G5 @; L$ y5 a. R3 p另外一个小建议,就是move,所有的move都可以这样8 q/ c# ^9 v( M5 R
if not move() then debug end( L& k: Z+ Q: T) \% N: L
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。. t8 B1 j$ Q% `# p; x
plant simulation中的free libraries有AGV模板,
1 i3 f' j( @% U. n4 M8 s& d里面也有案例。7 w% X9 ^; L0 i& A& Z9 P
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
7 q) D' V2 ?7 x4 N" d3 f. R
1 Z7 G" D. L1 L# }我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 % d* L/ J1 \$ r5 s. b

5 A/ F. B9 A+ M4 f' j那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ! ~- C+ W( u' V* n5 T4 k
这是AGV_putin中arrive的method。5 K) L% w4 f) f

! w- e9 m1 E, w8 V当到达物料速度越高时,这个报警更多,
9 _/ x. e1 ~8 p- A& P% M
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-19 10:20 , Processed in 0.020014 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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