设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6648|回复: 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'  a+ @1 }  c. P/ P" l5 N' t6 B4 c
*/
5 k$ j0 H' x/ C+ V8 G; t7 _& Tis
3 s& ]& T/ |* o+ p4 r, Y/ C        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% \) d+ a( n. N* [* H% Edo' V: m5 c5 C1 s7 Y/ N
        Lan := rootfolder.Internal.Tools.AOLlanguage;
: b5 s2 a3 @. y1 V+ R) [0 |5 b( U( ?        if current = @.Destination -- else return3 x: P; M% v9 L( O+ s, ]# q
        then
2 n' r1 R6 F! d1 `0 C. `                @.Destination := void;2 B/ U7 G3 e' z
                if @.occupied then
( N$ F& F" a% H' a+ h0 X                        part := @.cont;  k1 W8 z5 D& X! |6 h  t) X. X
                        @.transpOrder := void;
9 e6 P6 N) K( f, L! n/ H9 D                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ |& X: S( _" F0 E3 R3 j                                @,root.eventcontroller.simTime);
# p& e( ~1 g9 G. P0 k  m! _+ z                        @.HasOrder := false;( p2 O3 y- W1 B
                        @.DrivingHome := true;
: m* g  b. \3 {                        rgManager.tryToStartTransOrder;
3 K* |1 h6 B7 s9 K3 ?3 k                        if @.Destination = void
, J' P3 r: p* q2 Z; m! i! Q3 @                        then -- no transport order for vehicle @
, U" l1 e: C1 m4 U8 `# n                                @.Destination :=9 T  g) X! W/ n) r0 t3 n
                                rgManager.nearestFreeStation(@,track.~);5 p$ b+ d; x: ?+ `. ]: S2 ~
                                newDirection(@);   * z3 q3 t5 u6 I
                                if @.Destination /= void then
* L" g; u5 B# p+ g  G( y5 K8 T                                        @.Destination.NumReservation :=
$ [5 }$ f. O+ r8 P% a                                        @.Destination.NumReservation + 1;  S3 |: P5 |1 p( k4 a9 }/ n
                                end;
1 a, i/ k: B6 ~6 a0 N0 b: r" R: D                                @.CurrIcon := "drivingHome";; q4 i& N- e  f# b* D& U7 C
                                @.DrivingHome := true;! C( @" t- d4 Z# T* T+ b
                        end;2 X3 b+ G: ?& J7 w9 N* m& i# R6 C1 @* k
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. x- e! ~8 i; Q& v: s                        part := @.transpOrder;
& b! v2 `2 j( s3 ^, M$ W# H1 F( t                        part.move(@);-- load part/ o7 X; }5 ?  o$ K1 j1 [* ~
                        @.CurrIcon := "load";
: h& J2 L) a+ w# `1 V  T. a& q, q" Q                        GlobalDistObj := part.globDestination;
) s+ y, J. n5 M9 Q* F  q0 E4 l                        assignLObj := rgmanager.rgAssignL;) B: C: O+ d6 ^' f
                        row := assignLObj.getRowNo(GlobalDistObj);
0 {6 i2 O3 n3 o( m. [! W                        if Row = -1 then -- since 709 a# J8 o. d5 y( h0 p* H, q
                                if lan=1 then8 ?1 f7 v0 P% g" ]0 _
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; |7 {1 I2 |- ~' @7 P5 ?
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
* q% C) X6 |+ w. ]                                else# u& \5 @& Y  W9 j$ Q
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) f% ^( s( }  N  Y2 E. c. T' S                                                to_str("in docking station: \"",?.~.name,"\""));                               
6 j% i- m( @0 f, p                                end;$ h. h3 V5 \5 [8 W% {( t- P
                        else
2 i9 M7 c" c- L& Y1 v                                @.Destination := assignLObj[1,row];/ m  }2 ]7 M  b3 Y% a4 n; W# {* J) B
                        end;                       
% E- n* r1 x: U! z8 L                        newDirection(@);9 F# @# y3 X; a+ x! w. \/ ~6 @
                        @.HasOrder := true;
# u: O+ v6 a0 _6 v5 x                end;' }. B& a- Y9 e8 d
        end;
& ~$ R1 t: O) f  o  hend;        -- of the method" o7 z6 [3 G8 Z; u% }& l* _2 u' Y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 $ s( b0 H7 C7 N2 w

4 y- b& C2 L* R1 f这是AGV_putin中arrive的method。) u( X' b0 V0 i8 s8 ^
3 `" z. E2 g. t) R' X* f& t! r
当到达物料速度越高时,这个报警更多,
; F6 x$ e$ Y* p! N! J8 b; O" e: e  ?可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。0 J- n; ~# _$ F: F- B
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
3 Z1 a7 r  v! Q/ F' D4 B' D) i% C8 h0 w; v' @
另外一个小建议,就是move,所有的move都可以这样
9 }3 g# d+ z% z* Q# p" D$ [if not move() then debug end
- W! z) Q1 ?& l5 X2 S这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。7 h& V6 M7 Y; f& e. N! c4 E' u
plant simulation中的free libraries有AGV模板,$ g6 J) P* F/ q4 l; g5 r$ X
里面也有案例。
" x* r& W5 i$ H% w9 B我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。( z: b; z5 t  b6 |# N% e: p
4 G/ {- d( ^& Y" Z# K1 }
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 0 F3 J5 x. j! l5 C' v' J

4 B; Y8 n8 F$ r$ ]那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 - e7 U) N. P8 l6 X! `8 T6 q8 h
这是AGV_putin中arrive的method。- P8 ~9 J5 n/ K! \8 T

7 `( i* f3 u6 B8 T当到达物料速度越高时,这个报警更多,

, h8 W7 K, j2 l8 R- z另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-18 14:50 , Processed in 0.019567 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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