设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5595|回复: 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'. l( Z3 b: q* g$ X! i( ~, z0 ]. _5 J
*/0 ?7 J1 j( S/ I! U' {
is
4 n- z. i+ {& q! O        part, GlobalDistObj, assignLObj:object;row,Lan:integer;% @- r% l$ U2 T* }7 Z  ?
do! Q1 \. i( d' H: `$ F
        Lan := rootfolder.Internal.Tools.AOLlanguage;
  x2 j8 i, f6 W) Q, Z        if current = @.Destination -- else return
, F1 Z( z) E1 a# L9 [4 |        then
9 f, v# m6 |9 y                @.Destination := void;% b8 r, S" a, Z3 d. m
                if @.occupied then- Z( G; Q& R% c
                        part := @.cont;
9 J) J% y6 k2 @" e/ {6 w' B7 U                        @.transpOrder := void;
3 f5 E4 B8 V5 v8 m: T                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% P) I1 M. e$ Q0 }' N                                @,root.eventcontroller.simTime);
! m8 j& y/ ~4 `- g: n: D                        @.HasOrder := false;
0 p+ D& i* n) H: C1 K$ |) Q# p                        @.DrivingHome := true;
: d. A1 f/ d; _$ n5 W# J% f& B2 m$ D% _                        rgManager.tryToStartTransOrder;8 v& D% f# E- G
                        if @.Destination = void
6 a: R9 u& y+ D, f                        then -- no transport order for vehicle @, K9 e8 e( u4 M$ P6 ^3 Y, D" s
                                @.Destination :=
; f$ C" E8 `4 x                                rgManager.nearestFreeStation(@,track.~);# K7 Y1 V8 p1 k* [1 k: T# o
                                newDirection(@);   
+ a' n9 a6 y( _' n                                if @.Destination /= void then0 h: ?9 d* r, k
                                        @.Destination.NumReservation :=
8 \7 s6 L" C+ l) g9 p1 v                                        @.Destination.NumReservation + 1;4 F' o/ k1 A: u- U" ^9 E4 Q
                                end;5 q. m6 P8 q! g( o' x5 J
                                @.CurrIcon := "drivingHome";) n, ?5 M& {( D: A$ _. w. g" ^
                                @.DrivingHome := true;
2 g* f7 E7 |# L! _                        end;
! C5 B4 u# |' `4 p                else -- the vehicle @ is empty, both vehicle and part are in the same dock station: o3 y& H: X- h9 V: ]' E( y+ U
                        part := @.transpOrder;5 o3 r* A  f. h+ X, \" P
                        part.move(@);-- load part
0 ?  j6 G% N3 D4 f4 A                        @.CurrIcon := "load";6 H. @% O" }% F2 Z$ X; E
                        GlobalDistObj := part.globDestination;
/ e& E6 b4 |* t% ]                        assignLObj := rgmanager.rgAssignL;8 L* o3 Q9 K6 y5 g
                        row := assignLObj.getRowNo(GlobalDistObj);
1 r: p0 [+ V% y$ S+ M                        if Row = -1 then -- since 70
; V/ l8 ^- p2 j                                if lan=1 then
' E& {  @* w' ^2 Y                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 \/ t8 N# K0 g- |
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
' a4 p; S* J! \& m; a                                else
" Q7 d' Z% {- A1 x# A" L                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ m0 P) H1 O( R# ]$ e6 ^; e                                                to_str("in docking station: \"",?.~.name,"\""));                                2 c, v& Z- k: G' f! e# Z' D4 }
                                end;5 k' E0 s1 C2 l* q# h! r$ {+ i
                        else& R* ^% B, R2 [: _
                                @.Destination := assignLObj[1,row];- q! I. X& `7 i  i& l, c
                        end;                       
0 l5 u& D! M+ r- P% I4 ~7 T  L5 c                        newDirection(@);* c/ [: X* @# n6 k  }0 r! X
                        @.HasOrder := true;- X. C) N5 [( F4 j  J: U
                end;8 o2 T  U7 s2 Y& p' S
        end;% I8 S! y+ [% g; {, p1 ^; a8 Q  x; \
end;        -- of the method
9 [! W. y" c6 j- b! \1 L
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
7 `; s* D0 L; @$ Q  C* Y7 C, b9 C
# r5 H1 g# h6 |6 t这是AGV_putin中arrive的method。. M1 i+ r5 b9 [, m" k5 H

1 h6 G! C& Y! ^9 C* Y当到达物料速度越高时,这个报警更多,8 r# U* ]" X6 y+ n+ l/ [
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
2 s% q1 w: E, G4 \- p9 e2 G3 Y程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
) N" l- d& R. V
! g0 ~% A; G; L% y0 S另外一个小建议,就是move,所有的move都可以这样5 r# o/ b  F* A" h
if not move() then debug end) X( T8 g5 ~, W! J6 X) c
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
" _' \6 i( T9 C6 _2 j+ U5 ?3 Aplant simulation中的free libraries有AGV模板,
% e( Z6 V+ ?5 a" u. j& q里面也有案例。
2 x' G4 L. {) u: P9 r, M4 `: X我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。" L+ h" u2 x  O8 k- j5 F4 b1 e

& |- R) i- E% p* z% e我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
- r/ G. e3 l/ `0 J+ A. B  f' a' F5 o5 E& x$ D/ o
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 1 X; S2 G& K! a
这是AGV_putin中arrive的method。- y" R# W4 e# B, }' q

. W# U! C) ~8 ?' E+ z当到达物料速度越高时,这个报警更多,

* Y5 g4 H9 i* X& I8 b2 o/ I另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-7 21:24 , Processed in 0.019678 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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