设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6761|回复: 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') F8 {- L. R1 Y# O8 o
*/# z* d3 E1 k( O; j% a  X
is  @4 u: D2 {0 @* w5 i
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;' c- J; G1 F- {! E$ z
do
, U; V7 g3 g+ s! @7 W        Lan := rootfolder.Internal.Tools.AOLlanguage;
6 f! ?; t3 u# U7 G9 i  E; b        if current = @.Destination -- else return# ]2 ]" [0 Q) ?
        then
  z& P3 T5 T3 n$ @9 p                @.Destination := void;  M9 K: \4 S# d9 L9 n( O% e. t
                if @.occupied then# o& t$ D' ?7 H" V9 T/ R
                        part := @.cont;/ a1 K+ o) j* P: w7 m; _
                        @.transpOrder := void;
: i# l5 ^& \4 x9 c                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 `* q3 A3 {; a& ^- H
                                @,root.eventcontroller.simTime);' N/ r* t( P2 E- ?/ r; Q4 o
                        @.HasOrder := false;
/ r6 v; L7 P5 D                        @.DrivingHome := true;1 Y* f4 L: |8 _" c2 L4 q, B+ V
                        rgManager.tryToStartTransOrder;, ]0 E8 w' g' p+ K# _" B: y
                        if @.Destination = void: [/ V  \. u$ S9 e5 d: H
                        then -- no transport order for vehicle @3 b, {* V, j+ |
                                @.Destination :=7 c4 ?$ h  A, j. `; y
                                rgManager.nearestFreeStation(@,track.~);
* L* i0 ^* x7 [& O                                newDirection(@);   ) e# A4 R0 Q) I5 u- j/ I2 F/ J
                                if @.Destination /= void then* u( p' J  a. g8 N0 K: A
                                        @.Destination.NumReservation :=
2 L+ V- |! \. h2 P& {# I; c4 n                                        @.Destination.NumReservation + 1;7 y0 f+ o3 {4 x5 Z6 n3 B: ^
                                end;7 e) @# k& y  G) A- X8 R
                                @.CurrIcon := "drivingHome";  Q& D$ L3 H5 q* E2 @! V8 b
                                @.DrivingHome := true;8 I5 ?  g/ x; ?  r3 D' G  V
                        end;
. B" U. `. m* b/ T! s; ^. H                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) W" w# Y9 N, u1 P                        part := @.transpOrder;
6 K+ K3 R- d9 W' ^6 O3 G+ Q                        part.move(@);-- load part0 r. T  }- w3 m! [# |
                        @.CurrIcon := "load";
7 `, ]' U, i- y$ Z4 U5 ~1 Z                        GlobalDistObj := part.globDestination;
" g+ ?' {' w) D) g, L& x3 J: y                        assignLObj := rgmanager.rgAssignL;
- N) e. ~- A& |1 u2 c+ h( y                        row := assignLObj.getRowNo(GlobalDistObj);( M+ F- W9 Z2 a5 V: X; D
                        if Row = -1 then -- since 70
" N3 A/ v$ e. c4 d6 |( I                                if lan=1 then
& s$ i/ {! @& E1 J                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. C! s) _9 K1 X+ Y5 r5 E1 R2 X/ b3 W                                                to_str("in der Andockstation: \"",?.~.name,"\""));
8 J1 d8 E  A9 ^' n                                else  U8 ?9 v$ z7 t# [! }; j& C
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% o) ~* \+ N. U, `  [' O; D
                                                to_str("in docking station: \"",?.~.name,"\""));                               
5 B5 u$ n- J- X+ t+ g. f                                end;% k: ]0 b9 a) ~+ K4 G: I$ t
                        else/ C7 V4 J. Q8 c
                                @.Destination := assignLObj[1,row];
, B( v! y: A3 D; x2 n. O" [                        end;                       
6 K& q6 `/ n) t9 H9 q3 \: F                        newDirection(@);8 [8 ~7 a1 J; u, R7 K
                        @.HasOrder := true;: ~1 ]! D4 V" {6 a, C! g% r
                end;, N( F& \' P) A4 {, f( `$ p
        end;
: Y  K' M" o6 G& j4 D. z# bend;        -- of the method
+ F. Y! j2 `& g5 F# V: a
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
% m0 z! Z% b: u& K$ r$ W7 O1 d" \3 R9 E  j" L: x# e6 h5 {
这是AGV_putin中arrive的method。$ Y% T: l" y4 K" p

" M% L! w8 K% {. ^5 I: V& N当到达物料速度越高时,这个报警更多,
% g: E- Z" a9 \0 s可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
8 j8 _4 ]1 C( P8 e+ V5 f程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; R( s) A& f+ M( ^% p- E* |
5 u6 a2 M& ~6 V
另外一个小建议,就是move,所有的move都可以这样
( y5 M4 Y7 |# B1 j8 S- fif not move() then debug end
+ `5 s) a7 {( s) A$ [; q3 \  e这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。; `6 {" }! X) P6 a
plant simulation中的free libraries有AGV模板,9 n3 J$ R; o2 P& y" I7 O, U) W
里面也有案例。4 o# k! R4 b3 h( q& b6 s9 e- t4 N8 C
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。" E6 R9 X* z6 A2 R, n

- H" u" l+ X6 o  r* T我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 + F4 m( F' }" R7 t
) I& W- D& u, D& T5 \: D
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 # Q+ Y+ B  Q3 J! E
这是AGV_putin中arrive的method。
' {. K: [. U0 I: ~6 D9 w* e4 X; K; U- L3 H7 u+ D
当到达物料速度越高时,这个报警更多,

% Q8 e# R- e: d( b另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-25 08:44 , Processed in 0.022160 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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