设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7005|回复: 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'* r% t5 {1 D9 f3 G+ s0 c' H" a
*/% o! j# \/ K* M& h% R% n
is: [1 {0 _5 j5 a
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 Y& |% `7 h3 I) {# T$ y9 |do5 F1 V9 X0 n- j
        Lan := rootfolder.Internal.Tools.AOLlanguage;4 S+ n& _$ Z; L: z% }3 z; W3 W; u
        if current = @.Destination -- else return0 I$ ~3 }: j& `7 q9 c: y; o
        then/ |+ V5 ^9 @+ v. \2 N& i% r' ?% `% M
                @.Destination := void;* e" [! L) W9 o. I" V. |' _: [
                if @.occupied then
% K9 c. ?- I8 X                        part := @.cont;' X9 G: E3 e' ]; D' a# g
                        @.transpOrder := void;
7 N1 M% [  o2 ?- W                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* j. D! Z- a5 r                                @,root.eventcontroller.simTime);% D( P6 `) y- K6 ?) a' _
                        @.HasOrder := false;
, o) H  _- P& X9 k; k2 s                        @.DrivingHome := true;
; A3 n7 o, T$ e. G# V* Q. I                        rgManager.tryToStartTransOrder;
% h9 o' |1 G8 U) I                        if @.Destination = void
$ Q2 n! E- O8 _' `+ `7 M7 y8 O" c                        then -- no transport order for vehicle @
- S' `' |+ M: r8 [6 ~7 H1 |6 y                                @.Destination :=0 o4 |  I3 I8 L7 p: \5 T
                                rgManager.nearestFreeStation(@,track.~);' J6 A* n5 A- T) u5 j4 }+ S
                                newDirection(@);   9 i4 [9 ?3 }' I
                                if @.Destination /= void then
- f6 s( A2 x3 T3 q3 W, z                                        @.Destination.NumReservation :=
8 X$ T& `3 ]* W1 A# d                                        @.Destination.NumReservation + 1;
) f. Q  L5 p5 v& R0 C5 z                                end;
* P( F# |9 @% T$ c                                @.CurrIcon := "drivingHome";
* s  u8 u6 i/ r/ U                                @.DrivingHome := true;
6 s; N- r+ l6 f" V& L, N                        end;+ ]; W5 \% N) I2 M9 B
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' d0 M- _3 @0 e" z8 {( m                        part := @.transpOrder;0 V! r  h9 ^- r% v4 q
                        part.move(@);-- load part8 `2 T5 d) g+ k' B
                        @.CurrIcon := "load";
, L6 \1 P7 S1 _2 l& M; k                        GlobalDistObj := part.globDestination;
' C2 g! ~& x9 e8 [                        assignLObj := rgmanager.rgAssignL;
* L9 u4 S0 ]  m; V                        row := assignLObj.getRowNo(GlobalDistObj);
# g6 m9 J+ r' b7 z3 k; Z. P* L) \# i                        if Row = -1 then -- since 70- l3 }5 `4 o9 g3 w+ }! s
                                if lan=1 then) T) q. P. z; N9 u* \
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# I& I  y1 }6 y4 P                                                to_str("in der Andockstation: \"",?.~.name,"\""));
  D* [# W9 ~1 m5 g/ G7 @" F6 i                                else
7 c  c3 ]! }5 G3 X  n. x                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
  d0 f' A! G' {# R: k                                                to_str("in docking station: \"",?.~.name,"\""));                                0 o1 s# G1 ]2 T/ s+ w2 x# j
                                end;
, [' x( l; R4 E. I5 E; e                        else
+ p1 r, X; y$ [5 {+ a; z                                @.Destination := assignLObj[1,row];
: o" \2 S1 \) Y; w                        end;                       
+ N+ M, l4 M$ P& u( t                        newDirection(@);; g; R( E+ Z) x& a. j. A' a
                        @.HasOrder := true;& S" p4 t" c- A8 @- h; i$ u3 r& Y! g
                end;
5 A  K1 |3 I2 J( s$ u( I  _4 f        end;5 _. j( m* S+ V* \
end;        -- of the method- i4 e: S9 s: t
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
) K" y% E4 h! j9 D9 u
/ g) W3 X1 z  B7 f* i7 G这是AGV_putin中arrive的method。
6 H9 |* u- p7 `: [% c( m8 }' o/ N! ?  v; T" l
当到达物料速度越高时,这个报警更多,
7 A" a# D# p, O" S. Q1 w% `可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。& W6 [: [9 `4 t: C1 H% {( z& R
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?& S* n& ?8 }  ^( T
9 m9 n2 u" l5 j% `5 O" h
另外一个小建议,就是move,所有的move都可以这样
" [1 n  y7 D& @# `9 i8 Dif not move() then debug end, h% D$ Z! Z* ^
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。5 L% T2 ?+ E( W
plant simulation中的free libraries有AGV模板,4 t8 C0 ~1 t# @5 Z" D, h
里面也有案例。8 j- `4 h+ L+ I3 T7 i- `' Q& q
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
; E& D4 m: Z' B: {- [' C+ V+ q! {9 w* w: J
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 + [: Z5 s( y2 A* E  p& Y% [6 a
( D# o; E: o6 D- r& W- ]% }
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
. V) b+ p* y6 V* F, R这是AGV_putin中arrive的method。9 y! k+ k: p3 e7 c

# g# Y. g* ?0 N8 P  N1 G当到达物料速度越高时,这个报警更多,

! |- s) K# {# e3 O; ^3 c另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-10 18:47 , Processed in 0.020750 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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