设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8467|回复: 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'9 Q+ i' U$ F* v
*/
$ Y) N5 O% I' s$ @9 p6 ~* Vis; Y5 t+ d* n% `" p$ a* F
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ h- e! \6 Q( d# C3 x: g% Pdo2 ^1 |2 P' H$ G4 y0 k9 z" S& u$ k
        Lan := rootfolder.Internal.Tools.AOLlanguage;
$ X( G* V" `. E, Z; J  J' z: S        if current = @.Destination -- else return  k: U/ _6 M- W7 x: R9 [/ x/ j: L3 M
        then( a, m& c4 N* I
                @.Destination := void;
' B( P& U9 m+ b, s$ i                if @.occupied then4 q3 x2 @6 U2 c4 M. b
                        part := @.cont;
3 Q( |" n% U. V$ V! x0 p                        @.transpOrder := void;
: l) {4 H( K. Q$ T3 q: W9 x+ l                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! y5 H5 {, ]% _& N4 \
                                @,root.eventcontroller.simTime);* Z" O' j; R3 b6 f, v4 R
                        @.HasOrder := false;
; }- e! E3 Y( Y! m1 O( b' o                        @.DrivingHome := true;% r, I% s& m" Q" \7 H
                        rgManager.tryToStartTransOrder;# ?% n! z5 G7 Z/ I
                        if @.Destination = void" f) m" X; J3 X" n5 Q5 `7 r+ F  z
                        then -- no transport order for vehicle @1 ]5 C- o3 d9 l
                                @.Destination :=
3 z4 a2 r& n: b5 H                                rgManager.nearestFreeStation(@,track.~);" F5 r  @  l; X& K* Y
                                newDirection(@);   * W- E3 U; z! A( m! ^
                                if @.Destination /= void then6 b* j! g/ K: j7 t3 h0 y$ d
                                        @.Destination.NumReservation :=. {4 i; N0 I. k  g! U2 Y$ e6 O
                                        @.Destination.NumReservation + 1;
7 ?( c" F7 L$ O/ c, \  B# Q" c                                end;
+ _* M% ^3 G+ y) a. {                                @.CurrIcon := "drivingHome";
" F" A+ J# T* _$ {* u                                @.DrivingHome := true;
* C* w4 F" a# s* E                        end;( m9 ]0 o, R7 N+ I& q3 g
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station! Y$ F. ^& p: M: h- X  P
                        part := @.transpOrder;
1 W* K; E* ^2 @; l* T                        part.move(@);-- load part
/ d9 c/ J- n; r* R% q% r7 J( ]                        @.CurrIcon := "load";6 k9 C$ A" L; \8 _) w
                        GlobalDistObj := part.globDestination;1 G, W$ `9 V8 |/ H: S; t# {5 W( G
                        assignLObj := rgmanager.rgAssignL;3 V) w9 \: s3 F5 M6 N3 b
                        row := assignLObj.getRowNo(GlobalDistObj);
( h- _7 ]! m8 d3 l$ R' E, B  s/ |) h                        if Row = -1 then -- since 70
0 r8 Y0 J  U% ]0 c                                if lan=1 then& i' h; E+ K. X. S
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* A1 m( u1 ?" O
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
5 }5 _6 E( B: l                                else
- Y9 i2 K+ _7 L. B+ G) Q                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 H; O) H: p/ y8 r$ t                                                to_str("in docking station: \"",?.~.name,"\""));                               
+ X: K4 X8 _0 t, u; k. z                                end;* R& f% @+ I8 X2 A
                        else4 [, i7 m2 p1 P/ G
                                @.Destination := assignLObj[1,row];/ w. X7 t: y2 X5 K1 E
                        end;                        : h. l' ?: i- E
                        newDirection(@);
# T  K+ q6 V8 y% B( o) G% O$ y3 K6 Z9 C                        @.HasOrder := true;
  [7 g/ |, y' w8 U+ _( Y+ ^                end;, a# s# L( I8 w0 [6 ]* X9 j
        end;
4 W# A1 q5 Z4 e5 T6 Jend;        -- of the method
1 X( r" B3 Y, \" r& B3 x
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
% m* U/ }. r6 M/ u
5 Q3 b5 B% e( ~7 p- s" t2 [这是AGV_putin中arrive的method。  w. O$ I+ t8 P6 ?+ e$ H) M

8 x$ E4 ^! G6 O$ X0 ?  |当到达物料速度越高时,这个报警更多,
& k/ K3 m  B7 O% w' Q可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。9 J- O. `6 D" C, \
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
2 Z! `  G0 Q1 L' ?; b3 ?% W. D: O6 P; E0 Z/ v; E
另外一个小建议,就是move,所有的move都可以这样
1 W  n5 g% C" d+ U$ \if not move() then debug end
* P$ V/ N) U, r- C* {这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
: P/ V- z7 w4 d7 C7 ]plant simulation中的free libraries有AGV模板,6 R$ F+ d- I1 ^1 d( b* A: l
里面也有案例。
# E" d" w% i' n+ q7 ~- E我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
- v) S0 b! j. w2 f+ K0 G; w4 V% R; `- x# m
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
! T+ l$ V. g$ T
3 B3 P9 d5 Z  ^# a那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ; s: V: F  x- y. _0 s( W
这是AGV_putin中arrive的method。
% t* ]$ u6 A+ j8 C9 U/ B# H9 v5 V# l8 X8 r) v$ M
当到达物料速度越高时,这个报警更多,

- I# U1 ^$ S" E5 `/ I另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-5 20:15 , Processed in 8.850476 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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