设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8047|回复: 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'
3 A8 @+ j( d+ P2 ]*/
3 {$ {) e$ ?& w( c8 R4 q. Fis3 W, t" Y$ _! H) f/ R
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& H' Q+ t! A$ a# Jdo# N% s" F6 P& `& M
        Lan := rootfolder.Internal.Tools.AOLlanguage;
0 d5 R5 \: [* r: J$ I. L        if current = @.Destination -- else return" D' d; M7 Z. Q" y+ }! O
        then
/ ^$ c* h6 r; B* w4 q+ G                @.Destination := void;. U3 {8 Y. o  ]" N' d
                if @.occupied then( G' r" z% s$ Y- ?, _+ p
                        part := @.cont;
  V; [# h/ S% X3 r                        @.transpOrder := void;
! \# F; Y; v4 D+ O- ?" w' J% ^7 n+ ?                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 u' B% B' Z* E8 |0 U2 [- X" E5 Z
                                @,root.eventcontroller.simTime);: ?$ U+ s* {8 g
                        @.HasOrder := false;! l0 I/ r) f2 [
                        @.DrivingHome := true;$ p2 s5 Z3 z9 O1 }
                        rgManager.tryToStartTransOrder;6 _4 n# i% P! x  e" v; o- U
                        if @.Destination = void
* E( S% h+ c* P5 L4 q. Z: h4 |                        then -- no transport order for vehicle @3 x4 f2 c! y0 w0 F1 A2 n) l5 |
                                @.Destination :=
0 ^* I5 U0 o. ^* x                                rgManager.nearestFreeStation(@,track.~);
8 m9 }9 y; Q. V# a5 c5 y$ J                                newDirection(@);   $ O' ]4 m9 [1 i0 u' t; H4 ]
                                if @.Destination /= void then7 ?0 ]! x; Z5 o$ w! V* u% m% S
                                        @.Destination.NumReservation :=
% L+ q; c$ [# a9 F+ O& p/ }                                        @.Destination.NumReservation + 1;
, u3 `1 k% R7 s% E9 u9 U                                end;  D4 [' c) }: J% L2 C1 J* U( O, V
                                @.CurrIcon := "drivingHome";
: ?. W8 E' T& r7 G+ c                                @.DrivingHome := true;
5 L* P+ W9 \$ P# L                        end;- C. }" Q2 x$ _1 j7 G4 j
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 c; _% z5 q3 i1 @& r
                        part := @.transpOrder;
; ^) W) J2 h! {# b8 W) s                        part.move(@);-- load part7 v4 d2 r4 A/ C5 f8 G$ ^
                        @.CurrIcon := "load";* N! g. y- V( m9 k5 c1 `; `. Q
                        GlobalDistObj := part.globDestination;+ b0 w) B3 D3 I+ u/ ~8 X$ d
                        assignLObj := rgmanager.rgAssignL;  c9 f5 o) g3 _# b7 n; C
                        row := assignLObj.getRowNo(GlobalDistObj);6 t7 c' i4 s; Q9 k" V5 l- p! B: t
                        if Row = -1 then -- since 70& y/ {$ j1 b7 m( K# ?+ a1 C
                                if lan=1 then3 A; h& P" r& ]0 B: |
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% ~0 Z9 g/ j' z2 V  H" X, v                                                to_str("in der Andockstation: \"",?.~.name,"\""));& ^6 t( V# Y" A
                                else  Y2 o0 h4 U5 ?) ?
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, ]3 D5 T& X% X' o
                                                to_str("in docking station: \"",?.~.name,"\""));                               
8 ]- k& T6 p; i8 h                                end;
* o6 j6 q5 x! o! L# g3 W                        else# f3 t  _  X7 J) }/ v
                                @.Destination := assignLObj[1,row];
% e& w2 R( r/ D  {* s# j                        end;                        " e0 ~' q/ o, w# }4 u- C1 _
                        newDirection(@);2 d9 Y  x: E1 B+ v. v4 M; M0 k
                        @.HasOrder := true;
' m% e1 i& z) @                end;
1 N# F* Q1 {; F. t! c        end;
8 {, f( L0 Y7 R5 ]) ~end;        -- of the method2 \' `/ b8 X. ?  V: d
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 1 F2 \5 O2 G9 i

* J& P, d9 z* E! N% m这是AGV_putin中arrive的method。
/ o/ Y* I2 Q# v& ~$ O7 F. m
! t3 h$ Q0 Q0 F. l- K当到达物料速度越高时,这个报警更多,9 g" }3 Q: [9 g, j5 p
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
7 z9 p- ?/ {+ k* t, R  T) p9 |2 c程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
6 N3 w4 V  H, l( D; Q8 g6 c
- y% r$ |* t5 Z0 e% y另外一个小建议,就是move,所有的move都可以这样
6 H+ L- }8 ^  vif not move() then debug end
* Q/ T/ P+ U# ~' }, F# {这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。2 ^7 h- O$ n- |% }
plant simulation中的free libraries有AGV模板,! \. p3 W: k( y! A" n4 L
里面也有案例。  `$ y& [4 n5 I4 Y$ V4 m! K
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
7 ^- o  r& `, {2 _4 i6 S# t5 K6 i/ C. s$ y4 d( x3 A5 Z
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
/ i* o* v2 R. y! t0 D2 ?; m1 O2 v- j) ^7 ~1 m4 Y) S1 r# V4 Y
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
& G" H! t! E  N+ P这是AGV_putin中arrive的method。2 h9 x) J1 U9 }' |+ U

* C4 c( V+ O- c3 Q" c2 O0 ?当到达物料速度越高时,这个报警更多,
, X2 l8 i# l! @6 Z6 S; t
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-12 16:45 , Processed in 0.022002 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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