设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10209|回复: 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'2 @; {8 p* m% U: P
*/
5 R2 i' M0 w$ Y& [# u: x1 Q) \4 w3 P; Z- Ois
# F5 w. J2 T( G9 c1 h        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 |3 N; F( L" I( _: ]) t0 udo
3 i* f' H* t$ Z1 _0 l6 h$ P        Lan := rootfolder.Internal.Tools.AOLlanguage;
# z5 H& ?2 O! P7 f1 z        if current = @.Destination -- else return8 C' j+ Y: p! u6 ^8 X
        then7 k1 d# ]% q% U7 v8 `" R
                @.Destination := void;
% b$ f: ]0 z; k& `/ ~                if @.occupied then
: c; G) {- ]0 G( y" I& K6 N                        part := @.cont;  Y8 f$ `- }, F$ |
                        @.transpOrder := void;
+ d: b% g# o2 G% c! C8 r' F                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* \! W- A. z2 h6 u9 [+ i                                @,root.eventcontroller.simTime);
' Q" b$ `# [# K2 ~$ T) s. g                        @.HasOrder := false;
0 O8 t  J! L8 l3 C  {                        @.DrivingHome := true;8 c, y. P0 G7 X! ^+ M+ F" G
                        rgManager.tryToStartTransOrder;: B0 ]% T9 u( J
                        if @.Destination = void% B" B! e* a8 O  B# h1 \
                        then -- no transport order for vehicle @5 i# x- j" o6 U: M
                                @.Destination :=+ v: g! o9 h9 c' Y5 b; P# ?) S
                                rgManager.nearestFreeStation(@,track.~);
8 p0 G& p+ R7 |. t; R7 ]+ o                                newDirection(@);   
* M( h6 }5 H+ o! h                                if @.Destination /= void then
- B5 W5 Z- t; [$ g                                        @.Destination.NumReservation :=$ M) S* k. B- I- U
                                        @.Destination.NumReservation + 1;& }* v" H9 S- B( ^
                                end;  [7 z$ V2 D5 H9 r
                                @.CurrIcon := "drivingHome";
& V, v9 }- D  P                                @.DrivingHome := true;
9 ?# L4 t  f4 N% u8 A  S; N, p                        end;
' l; O! h0 u- G# O2 L2 R7 i                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 c2 I2 t9 o" J+ a3 ]                        part := @.transpOrder;
, k* I2 j6 u  d1 m                        part.move(@);-- load part
/ k- b6 H  Z, R! [                        @.CurrIcon := "load";
2 W& X3 o* ~6 m% s4 ^1 O                        GlobalDistObj := part.globDestination;
4 W3 ]+ V1 r) ]# z! K3 A8 X& M0 u                        assignLObj := rgmanager.rgAssignL;
& G* M, I6 v/ a3 U                        row := assignLObj.getRowNo(GlobalDistObj);
8 V& ^$ _# g0 L2 O& G                        if Row = -1 then -- since 70' @) s! M* W7 U# j# ?  R) }
                                if lan=1 then' V1 n2 j+ E8 [4 f: W8 ]& v6 s$ ~
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* ^+ o8 G9 t; c" z2 L                                                to_str("in der Andockstation: \"",?.~.name,"\""));
, K" L- R7 w; A                                else
2 q% ]! D/ x+ V1 I: o8 k                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& ]7 c/ H2 G# U% v, ?$ p/ \- ~7 J! n2 V
                                                to_str("in docking station: \"",?.~.name,"\""));                                . j9 P- n3 A# J* X* m& F) t5 h' z
                                end;
, O$ z" E, w# _3 B                        else- Q9 ~, v+ J1 A/ E  [
                                @.Destination := assignLObj[1,row];0 H; \/ z+ E- E( m
                        end;                        - y  ^$ j( h* V
                        newDirection(@);
% y- h' E1 {3 q) {                        @.HasOrder := true;
3 j- E5 z6 F3 ]                end;; U7 L. H3 T6 {) |& g8 \& B
        end;5 e) Z; `& |/ ^8 L( r
end;        -- of the method+ S% N- f5 u; e- |
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
2 M, D7 T8 x( ~0 c" X' h
8 C& i2 k3 s; G: c$ Y/ H! g" {4 n5 r这是AGV_putin中arrive的method。
8 @' O: E) d6 P9 H, Q0 F' G' V/ Q  v. f% B/ Y
当到达物料速度越高时,这个报警更多,! v& _! z7 P2 P
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
" r: P9 Y$ q4 ]0 w  [% u程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
' O* L$ j7 g) `' a% J  e7 {3 m; U
. r7 _+ C3 J& c2 C, T另外一个小建议,就是move,所有的move都可以这样
6 L! u* g+ X- }if not move() then debug end
$ j; m+ ~& l' `3 p. _, Y. y这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
, e# Z  h* i4 I: `  e% zplant simulation中的free libraries有AGV模板,  b4 z) L+ d( A9 A$ \* o
里面也有案例。+ S# @+ t/ W. C9 g9 k% K  {1 g
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
$ L' d3 m( J1 ^* W# t
; s7 a! Q3 ~. _7 K. j" D我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
  g4 T2 D# y; x2 w/ a7 e/ v9 g: ?
3 E! W% t' N8 h5 J那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 * v) H' @* y9 @! j+ j
这是AGV_putin中arrive的method。5 x+ i# S& R' L* b# `

" K$ O3 k6 j. O$ q3 ~" j; F3 g当到达物料速度越高时,这个报警更多,
3 ?% ^2 R& r8 p% U: K3 O
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-20 08:50 , Processed in 0.016171 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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