设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8067|回复: 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'  b+ u& b3 Y$ l; _- ~+ J; Y
*/$ l- E6 M4 @* I9 d2 M! V% C' e- j
is
! L" S5 Z5 e, X$ w  h3 X        part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 ^4 R  Q1 e+ \  F
do2 c0 i: R/ ~9 z$ a0 t
        Lan := rootfolder.Internal.Tools.AOLlanguage;
$ s! b: K& N+ a$ ?  ~; v; @2 W        if current = @.Destination -- else return/ g, k# {& `* C; V
        then
0 }6 R! _( U/ O; v& g6 J8 x/ P                @.Destination := void;! O2 n- P( l* K! f# \- D& c/ u
                if @.occupied then
2 ]; `  i: }- ]* R                        part := @.cont;: v9 i5 k5 Y( W
                        @.transpOrder := void;' |, `& O9 [; q" E2 {7 X) |
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, ?3 Y# ^4 J+ |8 F1 `0 Y7 N2 H
                                @,root.eventcontroller.simTime);3 l% D1 n2 l* X9 Z5 _
                        @.HasOrder := false;4 F" y9 m! I3 g
                        @.DrivingHome := true;
$ C& i( L" \8 V! U$ e5 ~6 U                        rgManager.tryToStartTransOrder;6 d) L* F( y  P, Z
                        if @.Destination = void
$ ^  G6 v7 r2 t" ^( H$ O  X3 P                        then -- no transport order for vehicle @! W5 Y  L1 F8 }5 c5 P5 {+ ~: k' a
                                @.Destination :=
# R* ^5 w6 I# ~0 `6 C                                rgManager.nearestFreeStation(@,track.~);9 M- \3 W2 z. i, D  A5 E
                                newDirection(@);   : c) M7 D- V* ^" C- U
                                if @.Destination /= void then, y$ Z! g; o0 V; n
                                        @.Destination.NumReservation :=1 Z& h; Z8 v- G( R
                                        @.Destination.NumReservation + 1;' h0 O4 }  [# Q+ f: A7 t7 \
                                end;
  D/ G2 x9 d7 g2 \6 s3 J+ i                                @.CurrIcon := "drivingHome";8 `: u6 V# o# s
                                @.DrivingHome := true;
3 Y, H6 `+ i$ M) K+ H                        end;
7 f3 m; l! s* s0 C6 X( M/ _                else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ M+ T0 p$ D1 d: r' V! V: v
                        part := @.transpOrder;
8 g: z  ~# D7 h2 O                        part.move(@);-- load part
* V* z7 |% E: l/ s                        @.CurrIcon := "load";
9 V2 r" b, w. @- x0 p% r- U- j, _                        GlobalDistObj := part.globDestination;' ^: L8 D* u/ X% T
                        assignLObj := rgmanager.rgAssignL;
5 w  m; Y4 x- _# G. D; ^                        row := assignLObj.getRowNo(GlobalDistObj);
0 u$ Y& m0 l7 T( N6 J. o                        if Row = -1 then -- since 70, A1 w' d  C# C7 u3 ]
                                if lan=1 then
( o: ^1 n4 |: ~" E9 @5 H$ D0 i                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. w& |0 C( E1 \; C0 N                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ I& n* M, E( f! Q
                                else) E( \- F; R  o0 |
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," n* `) t# j0 X0 f( C7 C9 P
                                                to_str("in docking station: \"",?.~.name,"\""));                               
1 X' i- U5 W) }1 |5 R                                end;7 M- ^6 @5 X! e
                        else; H" \, H0 |, V
                                @.Destination := assignLObj[1,row];, ]* A4 x' h+ p7 h: H4 o
                        end;                       
; E7 Q" m; N! ?! c8 V. a) r4 k7 a& {0 P( X                        newDirection(@);: v- T* S( U/ X. {1 ]7 D/ x; V
                        @.HasOrder := true;% T& U3 {* H% I( s" i8 ]+ Y# W
                end;
: v0 u& p" D+ D& U; A9 ]        end;
9 C- V% w# Y. A" H  `$ G8 ~end;        -- of the method
6 h& W# T2 w* n# i; k6 t/ ^3 ^
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
% x) @5 H4 V6 B
' K3 Y* k$ |  C  E. b这是AGV_putin中arrive的method。7 A2 p) o: d5 |4 Q- L

3 e4 r  w: e, t, c( \2 h( q( M当到达物料速度越高时,这个报警更多,
+ B& x- ?9 B8 D可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。" X, A5 V6 \: S7 A
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
* f6 ~* x$ z; [* W0 @4 B
* X. n" B; p. x4 P! R7 y$ l另外一个小建议,就是move,所有的move都可以这样
  y8 o, [* T- g6 Wif not move() then debug end& f- d! s3 c7 L. u
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
3 U' w7 ]' T9 i/ L+ |plant simulation中的free libraries有AGV模板,
2 f6 j% A$ ~" e& h/ t2 Q( D里面也有案例。
( o# x! b6 `9 R; F我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
/ n( v% v; n4 R$ b1 t- d- Y1 I
% \' e3 J8 F0 @( c9 c我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 1 j1 e) |6 k) Z3 f

* s" w# A0 k: @6 S$ D那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 * y$ B. F% Q$ D3 V, o
这是AGV_putin中arrive的method。0 p4 R2 E$ E8 I/ ]6 ]

% }0 C4 k1 w& a$ t) A7 s+ S当到达物料速度越高时,这个报警更多,
$ d4 @8 C4 ~  ~* P7 n, Q5 k* C$ d, a
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-13 15:57 , Processed in 0.020688 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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