设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8845|回复: 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'
/ [" ^  t7 }$ ?9 q*/
6 s# J  a- P$ ]! }is
3 t3 {/ C8 K. y9 h, S; P        part, GlobalDistObj, assignLObj:object;row,Lan:integer;% b7 a. y( `& |% B; x
do) l# d( o, \( }! h! u5 E
        Lan := rootfolder.Internal.Tools.AOLlanguage;5 J! o% e6 l( t
        if current = @.Destination -- else return: z+ o, T' t+ G# `
        then5 C0 T5 R" p. S0 g4 a$ s; V! z0 q, o
                @.Destination := void;
# m9 ^( D! n3 _  K  F& J1 l4 R                if @.occupied then
5 |' e* S( ~2 {                        part := @.cont;
' G$ q, {: _8 Z: J- p! v                        @.transpOrder := void;& w( \. Q' a7 @" e) Q* F
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 X) N' T$ u) @7 o                                @,root.eventcontroller.simTime);
7 O  S" z8 o9 J; C0 B. }                        @.HasOrder := false;' I% k2 d0 P8 d8 C. B9 {1 Y. m
                        @.DrivingHome := true;
( s) v4 _4 R* Z. J                        rgManager.tryToStartTransOrder;7 t3 U( ?7 g1 a. n' w, _7 k
                        if @.Destination = void5 j6 G5 w3 b. R1 C
                        then -- no transport order for vehicle @0 A/ H) j' g; p+ q
                                @.Destination :=
$ \3 Q$ l: h( _  D: M9 p: E                                rgManager.nearestFreeStation(@,track.~);
# s5 m3 U5 s0 l8 N; A! w, `                                newDirection(@);   
! u9 f9 o  P! T' Z5 \( x                                if @.Destination /= void then+ Q3 R- n/ {& E( u4 ]5 J& |
                                        @.Destination.NumReservation :=
% n2 e  T+ Z1 j8 ~6 Q( c                                        @.Destination.NumReservation + 1;
: i: k) @" Y, h4 `4 a                                end;
8 h& o, P; Q2 M0 ^! v3 T0 ^                                @.CurrIcon := "drivingHome";0 y$ _2 T6 R0 c) k" f
                                @.DrivingHome := true;2 K4 z! g4 P$ B7 g; ]
                        end;
3 h) H6 s! b- p9 n8 U" X                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* E, h8 `9 M) k2 x6 w                        part := @.transpOrder;) ^' r* n& D1 b0 Q; k
                        part.move(@);-- load part/ ^1 {8 K+ g9 H; x5 m* l
                        @.CurrIcon := "load";
6 `# z, R, R) F$ s" q" C                        GlobalDistObj := part.globDestination;
# G3 J( v6 V; K5 r* }/ r3 m                        assignLObj := rgmanager.rgAssignL;8 E# Q( g  \4 N0 h7 Q" f9 d6 u
                        row := assignLObj.getRowNo(GlobalDistObj);* V; l5 ^/ U# S7 Y
                        if Row = -1 then -- since 70  b' a' ]( @% m" m% G0 G2 v
                                if lan=1 then
+ k; @( ~- a" j2 l0 H& J                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# W3 v' R- r% [& r) o
                                                to_str("in der Andockstation: \"",?.~.name,"\""));. l% j/ c1 ~5 ?' w: i, y( q- Z
                                else: x/ a4 ]4 x: q9 s
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* Z9 I3 t7 [& k* V( @( J                                                to_str("in docking station: \"",?.~.name,"\""));                                  E8 E5 `$ \, ]
                                end;
* K5 V& l7 e. w                        else' w5 K: b" l  f1 K  R# c
                                @.Destination := assignLObj[1,row];, B6 G* |" k/ X
                        end;                        ' g. w7 h* c6 K
                        newDirection(@);
$ G0 @: v; d+ p7 \. a                        @.HasOrder := true;
/ E( K1 n) i8 n& k3 }                end;4 A) R1 |+ ~* k9 b
        end;
& W7 e+ T2 W" k" xend;        -- of the method
! [1 [3 X% p& F" C
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
6 R' X- l' b( c1 O/ _; U
3 p# p6 p, c+ G, N7 }% W; O这是AGV_putin中arrive的method。
' ]9 S& i7 K3 J9 W- E" f) Z, j2 p! a6 @" v2 k; R
当到达物料速度越高时,这个报警更多,
: u' D/ P" d7 {; r' a可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
& w8 h# s5 X" p4 W1 \: z# Y! \程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?6 ^% w5 y  R+ U
; u9 ^6 n( n) A4 A! o. f
另外一个小建议,就是move,所有的move都可以这样- V4 D0 i' F( P/ \2 ~) X
if not move() then debug end
2 O4 n6 [1 U4 Q' ]0 n) H$ l这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。2 p( q' a# }4 M1 H: {: V% D
plant simulation中的free libraries有AGV模板,
. N7 h* [0 |. i& s0 g8 Z里面也有案例。4 W+ K/ D( O4 P0 t" @) f! F
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。8 F5 r; V3 Y2 |2 `
1 m& k1 N" M9 T; W
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
& _- e) ]( x/ W$ J. l: o6 P7 w9 n6 N/ ?1 t8 J# p7 f2 b7 x" c
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
% D$ A! ]  [( E% ]" ?2 R这是AGV_putin中arrive的method。
' s6 [0 l! W6 r( U- g7 S5 x' g
! G7 X# t9 W2 r( E! e8 g# i当到达物料速度越高时,这个报警更多,

. b% `, z1 `6 W9 v& ], }另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-29 19:30 , Processed in 0.017515 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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