设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8019|回复: 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'
$ Q8 N: c+ Z0 `$ k+ t- N% ]*/
, P1 M4 ^2 x/ a( I# h: t9 Ois: L+ \8 [8 L% L2 L) u
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;' `& W6 K. d0 k" P/ a. t
do' R, }2 p3 {* K# p! H
        Lan := rootfolder.Internal.Tools.AOLlanguage;& ?4 ~3 P% f8 D9 ^& y
        if current = @.Destination -- else return
/ n3 a' E/ E: ^4 i1 @        then# h% P2 X5 v7 r# I5 |
                @.Destination := void;1 A9 J- R& Q" y- q
                if @.occupied then# y' J+ U% F" i% \. y3 ?$ C8 s
                        part := @.cont;
/ C8 s% X' M4 [, P& S# e, e' w7 I                        @.transpOrder := void;
, }% V9 H- E9 H' d* X                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 c# T( T; p; V, d                                @,root.eventcontroller.simTime);% a. Q# R! g2 i6 G
                        @.HasOrder := false;
8 k- ~* c3 S! |- S                        @.DrivingHome := true;) _% |0 b( i" @: Y
                        rgManager.tryToStartTransOrder;
; Y$ S, c, j& S& t* Y4 Y0 R/ F7 N                        if @.Destination = void( Q% z# K( y. {$ p
                        then -- no transport order for vehicle @
- @0 V; b9 }) _3 Y, t4 d/ W# V                                @.Destination :=! Q5 W' C" K: {( \7 A/ P
                                rgManager.nearestFreeStation(@,track.~);
. V) b3 L$ i7 z8 t                                newDirection(@);   
$ q* @5 E( b6 I8 L( D, l/ h7 k                                if @.Destination /= void then+ g; t+ I$ u, D
                                        @.Destination.NumReservation :=4 H( I; x# w. g% Y
                                        @.Destination.NumReservation + 1;" I% {& h( R$ c: b5 m. a4 i7 a
                                end;
7 g' P$ D9 |- i% ~                                @.CurrIcon := "drivingHome";
( K8 i8 h2 t0 R# @; V8 n' U                                @.DrivingHome := true;9 U7 q9 v7 g  G8 K; O: h) |/ M
                        end;
5 h: T% I. j' X% g3 k                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
  i. e" S& k9 A' I6 M# P% ]2 H                        part := @.transpOrder;
. J! {% k5 X  e* [                        part.move(@);-- load part
7 j6 i/ e6 V& |+ h                        @.CurrIcon := "load";
# r; S+ U: @# d) E                        GlobalDistObj := part.globDestination;
3 c0 S/ E2 {' l' N0 m# t  H; y                        assignLObj := rgmanager.rgAssignL;& p9 U+ K. d2 q: i& T& T
                        row := assignLObj.getRowNo(GlobalDistObj);/ `+ `" ]  f0 Z7 Z6 t
                        if Row = -1 then -- since 70
8 @1 n5 ^: k2 u, C( i                                if lan=1 then
3 g0 I' A5 ]" |5 N$ w4 L' W: X; S                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; `, w; d3 J% B; D                                                to_str("in der Andockstation: \"",?.~.name,"\""));
# e1 ?; q( r! \1 s# O  Y0 N0 Q$ B8 |                                else! Y! {$ y# b& k6 ]' `: p6 ~9 Q$ B
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
  F0 k5 l$ R& ^$ o! c! x+ b& n" ]                                                to_str("in docking station: \"",?.~.name,"\""));                                / T) T7 q5 p, Q. a5 p
                                end;+ A; L' A  k. ?; U( ~
                        else
) b9 y# m. Y8 y                                @.Destination := assignLObj[1,row];
5 r, a4 \5 }1 o! K                        end;                        0 v/ ?! E- _/ k4 ^3 \! C+ _
                        newDirection(@);% Z+ N7 A" X+ n0 V+ ~1 @
                        @.HasOrder := true;
' A" y* x! ^0 i- q# {6 m- Y9 P6 g                end;8 B2 _8 i+ w& `: S3 H
        end;
* i  C* |, \4 x, f+ y  Cend;        -- of the method
2 ?' ^* I* D0 l& t7 c. u6 g
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 5 I4 o0 X/ E# m) m

; j5 }( z- N7 n这是AGV_putin中arrive的method。, ~6 D0 k) t" c/ Y1 r: A! K
* Y* K/ V& ^% q5 Q5 V
当到达物料速度越高时,这个报警更多,6 X4 J) R, r# N& L4 P3 J, o3 m
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。! K6 a" K+ j- K7 k- i
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
8 O2 F% J1 u4 Z8 }2 l
3 h' o+ z" L  g) w8 i/ d. E另外一个小建议,就是move,所有的move都可以这样9 A+ B: f$ k, N; z# @4 [
if not move() then debug end
) j* ~) t0 G& m3 o' Y这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。: p3 m) R, G& A/ T5 J2 k
plant simulation中的free libraries有AGV模板,
9 D0 A6 x. |& z* D& w里面也有案例。
8 k$ j2 p( \$ L2 q/ v$ C. ?我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。: C& [: v' D4 l7 n+ c5 K6 [

  d- y8 G; P1 C/ d9 I0 l. a& Z我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ) \# y3 V& {% m$ x+ Y2 M

3 h8 E7 I" @& M1 h那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ) q/ a% }/ S+ V/ c3 Y& K
这是AGV_putin中arrive的method。7 c0 @' k  U5 k7 s

" m( l, t5 G' O( K. j当到达物料速度越高时,这个报警更多,

/ ^7 K8 s8 K5 P0 a/ w: W2 n; M另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-11 06:04 , Processed in 0.022330 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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