设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8399|回复: 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 {( k3 A6 Z8 w8 H$ O, o3 L+ g*/
1 Y( x8 C4 j1 o# Qis+ j" t. C  Z7 ?
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& c1 ]3 W  l3 ^6 q0 o8 Vdo  F0 }6 b7 ~2 U9 F( T- S
        Lan := rootfolder.Internal.Tools.AOLlanguage;
. T& [: \, ?. Z: D. T4 x8 `' S* u6 n        if current = @.Destination -- else return7 r+ l, a6 S. i5 p3 U7 i4 l0 {
        then% ^* ?  ?' ^. T8 @# y: o
                @.Destination := void;
! n& D& d8 F8 m4 A                if @.occupied then
* s7 b' f! A  J1 X" P# s# s                        part := @.cont;
5 I/ {/ B4 N& p: c* U8 N5 z. O                        @.transpOrder := void;
% P+ H& `$ k  @/ r                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
  c' |4 p' C, R                                @,root.eventcontroller.simTime);
- ]% x, a2 E' M8 k                        @.HasOrder := false;
& S' ]0 t* R1 W                        @.DrivingHome := true;7 g; G- s& {  N) Z, z3 n& P
                        rgManager.tryToStartTransOrder;
4 C6 t% J1 W6 ?: s) e4 h                        if @.Destination = void
% a' |  G$ d2 s7 x- n+ O                        then -- no transport order for vehicle @
$ M2 J8 Q- n. U1 W6 Q. ?                                @.Destination :=
0 |8 I! V  q9 S) i. f: V- Y                                rgManager.nearestFreeStation(@,track.~);) t9 Z- O7 j4 e: E' G; D$ h
                                newDirection(@);   - j. ^$ x* T) g( h
                                if @.Destination /= void then
% [4 y' |, x& Z; d0 K! i4 @                                        @.Destination.NumReservation :=% t  N/ G: p1 y/ l) E6 k8 \
                                        @.Destination.NumReservation + 1;% B: W# g4 t& u- J6 H
                                end;
' D0 o" f: [" h9 b% [                                @.CurrIcon := "drivingHome";' i1 I' x, h$ b* }1 }7 H  _! }6 Q& c  Y8 K
                                @.DrivingHome := true;4 l0 F) Q' k7 ~0 q
                        end;
' J: D% q5 W" M1 U6 }, Z                else -- the vehicle @ is empty, both vehicle and part are in the same dock station) \/ b$ [7 D4 c- \3 v
                        part := @.transpOrder;1 G  ^, V: m* t$ e1 J% _
                        part.move(@);-- load part1 m( q7 A/ Q' `" {( [* o( ~9 {
                        @.CurrIcon := "load";4 i0 s! T1 o2 S4 l
                        GlobalDistObj := part.globDestination;
' U* _6 s6 a( {3 ?' T                        assignLObj := rgmanager.rgAssignL;- w: s  Y7 y6 C' n8 @) z, T5 n
                        row := assignLObj.getRowNo(GlobalDistObj);/ B* N5 C4 B5 o3 S$ L# a, V; L
                        if Row = -1 then -- since 70
5 f% d+ s+ F" l* [3 P" K                                if lan=1 then
6 c2 X) V0 w8 d. \: S" L* `) e# h                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 s4 E, L2 |: z                                                to_str("in der Andockstation: \"",?.~.name,"\""));$ `' Y4 @( P9 h
                                else
, i; f) s6 c$ p9 l2 d5 V$ |2 {                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 N; W4 P3 J: f( g- Q
                                                to_str("in docking station: \"",?.~.name,"\""));                               
1 G1 s9 N. z9 i5 [: T8 v8 _                                end;
* u  T- t- @- h: S) u- m                        else
, f$ [$ b6 }) C% h$ X! @                                @.Destination := assignLObj[1,row];
1 S5 U/ R% H) k4 O! r& E( y                        end;                       
- m& R; ]: r  f  j( }                        newDirection(@);
( T; G0 u, O- ^3 n9 B; ?1 n                        @.HasOrder := true;
& ~# `$ {% F; h                end;/ R. @% u! }( ^! V: s' b
        end;! P2 T+ S2 S+ R+ u
end;        -- of the method
. l9 m; j( T# A1 V( H1 @
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 3 H8 D, a3 @4 d2 Q; J1 k
7 X. Q; U. [) \9 U1 S& c! P
这是AGV_putin中arrive的method。( D- t& V6 M) U3 Z

+ z- |" l) v. G1 j; S) X8 y, n当到达物料速度越高时,这个报警更多,7 w/ V; @: T/ ?* \
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
) L  m, U5 X, B7 i* z8 f- y程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
. v# r9 P& Z# _, M9 E) g6 M- t, T1 l0 f/ u6 J8 N
另外一个小建议,就是move,所有的move都可以这样4 N! L% X% @( U) d6 @+ r
if not move() then debug end  z: @3 D( ]8 D! e; b
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。8 E& A, o7 ?3 x1 g
plant simulation中的free libraries有AGV模板,
' y9 K0 ?' _3 V% H: m; s2 o里面也有案例。
4 a, F. o9 \9 c/ V+ _) W6 s我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。. i2 \; N' L2 R/ ~# S$ Q

* ^! `0 z& S8 m0 P我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 + x9 d1 p6 j" g7 ?
6 d$ z4 E1 i; s. y6 Z8 v
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 * r3 w6 Y/ C+ E1 m7 A- ^8 a0 p$ P
这是AGV_putin中arrive的method。
5 o' O" `1 _9 i5 r4 R  h+ [! r. d, Y" g
当到达物料速度越高时,这个报警更多,

/ i$ K4 V3 P. a3 X( Q另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-1 16:55 , Processed in 0.015668 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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