设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4837|回复: 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'4 x. R' }1 E- j1 e: U" t
*/* d5 L8 {5 S9 k, s8 A2 q
is, I, G8 u0 X+ [! A' K
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ q; F, s4 J$ ~4 s2 q) Gdo9 ^2 \3 H! b+ H4 d
        Lan := rootfolder.Internal.Tools.AOLlanguage;
7 C9 Z* T& |; U, C        if current = @.Destination -- else return, c! @" i! W& r
        then4 R; F0 Z6 }/ h' a3 Z' s* l9 p' T
                @.Destination := void;8 o5 U; f# G5 {9 J7 I, s
                if @.occupied then
/ a# _* |8 Q  d4 n& i                        part := @.cont;
& u; h- g3 ?9 a/ ~9 A                        @.transpOrder := void;
, b0 P4 L& x$ b0 I/ R/ n+ _                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ I/ P' s& {' U
                                @,root.eventcontroller.simTime);
5 H" D; s! x. k                        @.HasOrder := false;
* O0 T$ C  t* j& \4 Y. V* ~                        @.DrivingHome := true;8 j* P, d1 g9 @) H! ]9 f  M
                        rgManager.tryToStartTransOrder;  F. \1 y5 m7 d6 L& v) ?$ j
                        if @.Destination = void
/ Z2 _+ s1 E: {' y                        then -- no transport order for vehicle @3 W+ ~" k  b( }9 r" `$ J4 X6 s
                                @.Destination :=
* {; M; a# {, }4 F* G                                rgManager.nearestFreeStation(@,track.~);( a8 ^7 V7 x- W! f( Y. q
                                newDirection(@);   " S/ y5 R2 d% U) i8 p
                                if @.Destination /= void then
; o0 T7 i2 @) v, D                                        @.Destination.NumReservation :=  J5 O, c! o& i' v. B8 {# Y% T& u
                                        @.Destination.NumReservation + 1;5 M6 b5 M3 L8 p* f2 V0 k4 M
                                end;1 F! g3 ]& r0 g) z* O) c* E! X) }& ?
                                @.CurrIcon := "drivingHome";
% |8 l3 l' G( p. W; G, m. D; Y8 W8 p                                @.DrivingHome := true;
2 t: p- G/ n9 Y8 E# Z- ]8 ^, J) A                        end;  z/ P% @" I+ l: C- k8 ]
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 h* H* ]; W& K9 a, p                        part := @.transpOrder;3 D$ o( ]% O: |, @
                        part.move(@);-- load part
9 \0 ?1 E9 O0 N& V; z+ I                        @.CurrIcon := "load";
. q2 `" w4 o/ f! I! F                        GlobalDistObj := part.globDestination;
0 r' O8 w; F! {& _: {                        assignLObj := rgmanager.rgAssignL;
3 F; D& K0 K) y& W$ |3 C9 s                        row := assignLObj.getRowNo(GlobalDistObj);6 m& P1 y. u. M0 F
                        if Row = -1 then -- since 70
( T8 p, |9 @' Y, g1 T$ s                                if lan=1 then
. e3 f+ k2 }5 E                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ ~) [% I* ~3 s: w! I2 s/ O0 W
                                                to_str("in der Andockstation: \"",?.~.name,"\""));, K# y  h  ^" C1 d9 H/ _4 D' ~1 k8 H; `
                                else3 `" g, L$ [9 B' B& {# ?! U  G
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ t* y' M5 o' @( z( }6 E, a! ^                                                to_str("in docking station: \"",?.~.name,"\""));                                & @0 C7 J/ L" B7 ]
                                end;/ m3 E, ]: b- e5 s  h; h# {. h
                        else
) ~' s- F) b( ~% O7 [4 V                                @.Destination := assignLObj[1,row];9 f. d' `) X  Z7 _# s
                        end;                        - _5 [$ y' a# K. l+ f
                        newDirection(@);( I1 [( q5 @( p1 H. T
                        @.HasOrder := true;. j2 R) c- [3 J( ^/ J
                end;4 Y1 X' M( X4 V% c( _
        end;; s* X9 a: x- X' q( K7 W' t
end;        -- of the method# m: f$ z, b7 n2 f: [' j: v, B
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
, n% Q. |- c$ Q% ?# }- n1 f4 W
0 h( x) Z. ^/ {% X% B6 f" N! V$ b这是AGV_putin中arrive的method。' u& I/ r8 A, B! q/ A
: h$ g, k5 I6 ^9 {( I; M
当到达物料速度越高时,这个报警更多,2 @4 P+ v4 j6 m" d9 `+ C
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
0 x$ F9 h# M: B程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?6 V$ [) m  n& I0 ]: q8 D- e
1 N+ u0 j0 p8 h/ \+ A0 p4 j1 V
另外一个小建议,就是move,所有的move都可以这样' d# |- T  n+ }8 n3 e
if not move() then debug end( Q7 O7 L2 n3 M* X% G% J7 |
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。) c# t, i3 ~6 d$ O$ ~/ E% N
plant simulation中的free libraries有AGV模板,
: W( A- c; u- B% L9 R里面也有案例。0 t2 A4 W/ [! E5 N6 A
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。1 c! T) U" o: E: p# m, x8 G

9 S, d7 v" c5 j3 Y; k) Q( D+ X我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 , [$ u8 I  h9 Y$ m
- g- G9 _  a0 X4 m" r7 Y7 r% R# L$ Z
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
: O; r) m+ @/ F  x: W这是AGV_putin中arrive的method。
! M: P5 A1 h4 b2 i/ p3 S' C+ z6 `1 x0 M$ z# Y
当到达物料速度越高时,这个报警更多,

, ^2 [8 n# V1 {1 P- Y5 y! T另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-8-28 23:24 , Processed in 0.014251 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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