设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6960|回复: 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'1 O" R/ m/ N. {0 d# o5 @
*/
8 \6 I& w# p% y6 a; gis
% k5 X8 w. |+ Z; J1 u, s1 J        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ L( c" V* `' K* {do( m4 `0 z* z- |3 K. F) g9 v0 U
        Lan := rootfolder.Internal.Tools.AOLlanguage;6 U6 P7 O' q; f; e3 G
        if current = @.Destination -- else return
) T$ M! [( W  q9 ^8 F        then9 B; S1 w4 E- E1 q, |
                @.Destination := void;# \- I# Y. d5 I+ p  u* F
                if @.occupied then
% \( m/ t: N) G( _3 }2 H3 ?                        part := @.cont;* d( v! l- Z  _
                        @.transpOrder := void;
3 r" j" R( Z6 L* A) k" b  s( ^7 m                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 B2 ~* p, ^5 D1 ~" `
                                @,root.eventcontroller.simTime);1 C0 |5 \# D$ r- R' s$ `0 P
                        @.HasOrder := false;7 u* V9 J/ j2 i% v; U
                        @.DrivingHome := true;
6 M. t8 j+ B/ N, |3 a5 C                        rgManager.tryToStartTransOrder;8 z4 R0 Z* Q0 P$ {2 h6 c" w' }
                        if @.Destination = void6 I8 h- Z; j! D1 h5 i
                        then -- no transport order for vehicle @7 |5 c( @+ ^& d, M$ O6 x( Q
                                @.Destination :=
) {3 r. \: V  J- M                                rgManager.nearestFreeStation(@,track.~);* w9 @: _3 C6 b- g$ `1 f# R. y
                                newDirection(@);   & G% R. @$ R+ K
                                if @.Destination /= void then
+ R7 X' O0 t% r  ~                                        @.Destination.NumReservation :=. s' G$ }8 J: e% L8 n
                                        @.Destination.NumReservation + 1;' C, H4 r0 ~6 S4 h
                                end;
$ i7 t% L+ d3 ~) x! a$ N                                @.CurrIcon := "drivingHome";
; N4 }3 v+ J1 n$ m' W" T                                @.DrivingHome := true;
7 s. G+ O4 |# w2 L$ `$ G: L6 \                        end;
0 {- N$ i* D1 i                else -- the vehicle @ is empty, both vehicle and part are in the same dock station; E+ x* T1 ^2 E- d& \
                        part := @.transpOrder;
/ Z# b6 T, J7 L$ I                        part.move(@);-- load part
+ H& D5 p- W4 `0 n                        @.CurrIcon := "load";
  c3 {" h% o7 H, t) m                        GlobalDistObj := part.globDestination;
; \  S/ K8 k1 m- k( j                        assignLObj := rgmanager.rgAssignL;0 b. |' c5 b! U; q3 @8 U- C
                        row := assignLObj.getRowNo(GlobalDistObj);
3 l. V8 ?. b1 o  Z) o6 o  G6 Y) O                        if Row = -1 then -- since 70
. }5 C8 S! U9 f0 l7 d, G5 V( F                                if lan=1 then
/ V  Y/ x: S  E1 s                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 Y3 p3 l4 u' N0 f' z& T                                                to_str("in der Andockstation: \"",?.~.name,"\""));  [/ h7 ^9 z0 H% Z! s, ~
                                else# {3 w' @, k# \" y. J
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," w& ]% _& ~' I
                                                to_str("in docking station: \"",?.~.name,"\""));                                - B3 X' Q+ E; @+ c, v$ w( M
                                end;
6 e- f9 W# Z. N  h' d                        else
% _$ D# L8 ]0 `" b. e                                @.Destination := assignLObj[1,row];
0 G# }5 N7 R6 f" P, x) }# }                        end;                        * H% ?; ?( @9 I, b: b
                        newDirection(@);3 J% s0 V; u# e0 t, z
                        @.HasOrder := true;. ~% q% E% M/ [
                end;9 O+ U3 j" u3 l4 o1 w
        end;" V; D2 s8 ?* n9 Y. N
end;        -- of the method
9 _+ c( y; S+ P' d
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 - }8 R' e+ c. R* R

" Q3 V7 j4 t& C3 d这是AGV_putin中arrive的method。  i" L+ o4 x$ s5 S& ^5 H5 z0 x

( L  a+ e' a! |+ x, A当到达物料速度越高时,这个报警更多,
  s$ C3 C% l# U: ?, L! G; d! @可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。; g  Q, K1 B; F; z; H# V- R
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?4 K" R$ |, P( U, l

1 ~; e( M* G# S& ~& o- D1 d" e5 h8 Y另外一个小建议,就是move,所有的move都可以这样+ J; ]+ D# ?5 m
if not move() then debug end9 e) F7 i+ e- f, `7 P
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
: T% c9 k  L% R* _plant simulation中的free libraries有AGV模板,
- J6 v' X6 D. y/ I* {里面也有案例。4 f/ g9 K  Q& g' k1 R* @/ w
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
  o' M% H9 W5 s: Z5 Y( Q1 D9 t- Y$ ?  q3 R. ?  z
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
! y( z% }- _$ V4 t- f$ g* `3 \- f5 P* P, J  ^
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
6 V' v* M; l3 a/ G, P: X这是AGV_putin中arrive的method。+ `( e- ^' o6 _) d

( }7 q; A1 x3 o' h3 R当到达物料速度越高时,这个报警更多,

1 y8 P$ ^" P9 t5 b  X0 j. N, r另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-8 11:13 , Processed in 0.018453 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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