设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10296|回复: 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'
3 Q1 R9 e" u6 l*/+ G1 J0 K4 S/ v& W+ C
is$ E+ K9 I7 D$ V8 m% {9 |, ]
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 B; v9 }5 S* }- ~
do9 U" W' ]0 A4 O
        Lan := rootfolder.Internal.Tools.AOLlanguage;
! x) p4 m& m: X, C        if current = @.Destination -- else return
5 |7 i7 y, O6 d" w! W+ x3 G1 y        then; `$ k2 w0 V9 P/ I8 R) p
                @.Destination := void;
2 o2 ?' g2 ~" S5 C7 i4 W                if @.occupied then  c9 F6 u, a+ J" j
                        part := @.cont;
' A  W' Q' [" |( x7 ]                        @.transpOrder := void;
. ~6 p" j, u$ p; M8 d                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 }( o$ A& u$ w- C( E                                @,root.eventcontroller.simTime);
) L. B0 B# H+ J: N# @                        @.HasOrder := false;
( \5 M$ z9 T6 h* q  R0 K                        @.DrivingHome := true;, t& s3 Z, o1 o" f, U: P
                        rgManager.tryToStartTransOrder;0 I" Z' i* j1 ?' {) X2 b- `
                        if @.Destination = void! f5 h2 s0 V& D" L- M# I* r
                        then -- no transport order for vehicle @6 ~1 x  [* a( r% G) B; o
                                @.Destination :=* i( @1 _9 C* c: W
                                rgManager.nearestFreeStation(@,track.~);) J; D; h+ z4 ?2 B% _: D
                                newDirection(@);   1 j  b0 ^- @$ z
                                if @.Destination /= void then
7 ^0 P- H& l( g3 b                                        @.Destination.NumReservation :=
4 D* i2 f7 G6 o# D8 }                                        @.Destination.NumReservation + 1;
+ z1 o1 l6 H, X! b" |                                end;8 @6 \( D+ m: m/ h" ^
                                @.CurrIcon := "drivingHome";; M5 Q- x0 m) ?, E4 a* W% {) q
                                @.DrivingHome := true;4 i* T* V8 B& \: N: z( S- m/ ]
                        end;
0 w# N8 p. {4 c& Z6 s) W& A& y                else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 Q2 C3 @5 }" X8 p1 S/ B& X
                        part := @.transpOrder;
) Q1 p9 h( r) K  Y( S- m& ]                        part.move(@);-- load part" x3 n" T- O( t- s  x3 g* f# l
                        @.CurrIcon := "load";
/ q( l' W  m7 i                        GlobalDistObj := part.globDestination;! V5 [% o+ F% \2 z$ _
                        assignLObj := rgmanager.rgAssignL;$ a. h4 h3 Z; B( B7 o
                        row := assignLObj.getRowNo(GlobalDistObj);
; S0 J/ i( Y: `/ t3 P' |                        if Row = -1 then -- since 709 ?% l3 [* }. _/ f* L* @
                                if lan=1 then
% g' A0 P1 g3 U) k9 ]3 `, w' ]                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: e/ c' v( R1 R. y- g                                                to_str("in der Andockstation: \"",?.~.name,"\""));
2 ~; _( |2 F& o4 R% u$ S                                else2 s, W, P9 r+ g; C6 k
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
  r( R3 o5 q: F2 o2 I                                                to_str("in docking station: \"",?.~.name,"\""));                               
* g8 n. F' \4 {$ N8 l4 W                                end;
% d+ U+ C: y- G/ f( g                        else
; b: Y, U6 v, B, i* s                                @.Destination := assignLObj[1,row];
2 X9 u2 S3 j/ t$ X                        end;                       
" A; V& N! b8 o& F6 D0 z  j9 J                        newDirection(@);0 ^6 N/ X2 z9 L
                        @.HasOrder := true;; F5 D% h- S( ~# h/ O' c
                end;
- ^/ m1 `3 P7 |9 l# H2 t: i0 N5 _; Y        end;. h2 X0 v- y) A8 T
end;        -- of the method9 |' ^0 i0 e/ ~2 U: t
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
1 q; [7 U  V* k$ D( z6 H
4 U% C- x0 Q" R; e这是AGV_putin中arrive的method。: G3 ^8 {! l" M
& G" R9 N( C+ c
当到达物料速度越高时,这个报警更多,
6 c. D1 [5 ?- Z* j" C可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。) J. u; u; D$ q3 }& T2 n
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
( D- D7 l+ [% {* Z
6 h4 l+ C1 ], u/ i! A$ V- _( r另外一个小建议,就是move,所有的move都可以这样
& E- H* q# N, e) g8 Uif not move() then debug end0 Z3 e) n  H4 a& R% n" M
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。+ [% B7 M' N7 {  k+ {* l0 R% b$ D
plant simulation中的free libraries有AGV模板,
$ G- F' `5 _1 X+ Q里面也有案例。
3 ~8 ]( }2 @% p' J我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
- f; j; N' ?/ v# K1 U) Y3 m: s/ Y& ?; l9 d: B7 `; P; b* @! B
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
/ _  w. ?& o4 Z+ z8 W) W
7 ?; U2 t3 [8 z. k- F那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
2 M2 Y6 s2 L* b2 b* @这是AGV_putin中arrive的method。
( H  a. d. P( j2 j' _; {. g# e4 x6 \! x4 \
当到达物料速度越高时,这个报警更多,

1 s0 v9 v3 _0 |; _3 ]另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-25 07:48 , Processed in 0.019488 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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