设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5996|回复: 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'
1 i+ |( p( K' Y8 N0 u*/' f6 o- s0 m+ @5 ^9 `3 T
is7 m) i2 ?8 ~6 D) T4 c: g' _
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 L2 H. j9 F9 [! Q" m+ O* t9 b2 C& \$ R- G
do7 B- P1 X$ g7 {( W% ~
        Lan := rootfolder.Internal.Tools.AOLlanguage;
: D2 B& d* _. n8 s' u  i        if current = @.Destination -- else return
" V3 O% q3 Y! r. j1 X2 D1 ^        then
0 O: c4 e# _1 W8 A3 k                @.Destination := void;2 `' x5 w& _1 O- o
                if @.occupied then! z+ M+ f9 p- B# w
                        part := @.cont;
* Y- w( T2 f" @9 d) }                        @.transpOrder := void;
# {& b2 u6 o$ T; V3 _                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% \' l) U& j1 z                                @,root.eventcontroller.simTime);3 W) C6 ]$ A; q) N/ A6 \/ g2 \9 W
                        @.HasOrder := false;
  I* l3 P) B% m8 {3 m$ A& d9 p                        @.DrivingHome := true;8 L0 s, T. E. k" Q! ?% c( l
                        rgManager.tryToStartTransOrder;
8 f% q2 l) y8 l* s                        if @.Destination = void' d: [2 S9 E4 b+ F! C1 T
                        then -- no transport order for vehicle @
& R7 r7 z( Y, @6 M* Y" ^* F) w                                @.Destination :=$ R+ C7 a/ Z% g7 `8 z0 r
                                rgManager.nearestFreeStation(@,track.~);2 P4 U7 w% V! g$ Y5 b* T
                                newDirection(@);   $ Q; Z. x0 E8 j1 F& y
                                if @.Destination /= void then
: x0 m( z5 N6 A; c% j                                        @.Destination.NumReservation :=- r9 t" ?3 V+ N/ b) c
                                        @.Destination.NumReservation + 1;% B! b1 D  f& |4 u. ^& y- X
                                end;6 m) l; F. B) K- [  t; E
                                @.CurrIcon := "drivingHome";
, J' ~0 L/ y: e( j0 E; w                                @.DrivingHome := true;
- @0 u( v) _. X% h                        end;
4 k1 i0 S2 S6 _4 q6 Y                else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 L9 m8 h- U  L- B# n
                        part := @.transpOrder;
( Z5 x8 b; N" T; J1 f/ G8 ~                        part.move(@);-- load part9 x/ }- D6 b' h' L  Z2 m
                        @.CurrIcon := "load";
5 k) Q. u( W. C0 d! g# c                        GlobalDistObj := part.globDestination;
( ?% k! X2 j# a& Q, b" y( H4 e                        assignLObj := rgmanager.rgAssignL;- E# u* k  {5 k. b$ V2 ]
                        row := assignLObj.getRowNo(GlobalDistObj);8 @3 ?7 T; f( t% u/ F
                        if Row = -1 then -- since 70
6 ^( A! Y' k" t" p+ o; D1 D                                if lan=1 then" d- b- p! C9 n
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, l# ^) V+ `1 a6 v* C" s  s
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
( l% A- t+ u' X, s4 o! T                                else0 x+ ?  m2 y% G* ^7 e
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; L6 j0 Z, z2 p4 l                                                to_str("in docking station: \"",?.~.name,"\""));                               
$ K0 A4 H% @1 z" Q$ a' C% Z                                end;
' ]2 k. c" U$ `4 K                        else
* ~3 m: Q; p( P- `4 }                                @.Destination := assignLObj[1,row];
# J! I; w/ p# E4 n6 n1 I1 m" }                        end;                       
8 S& ?/ E. w/ y1 K                        newDirection(@);
# A  h! y. T0 Z/ h9 `: I                        @.HasOrder := true;. v' a6 X( F7 p; L% d
                end;. B% t, r5 C; t# L: a
        end;' ?7 t. V$ g0 W, K  x0 E' P, l" \7 e2 n
end;        -- of the method
9 l" m% _8 z" e
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 2 U' Y2 y' F- E6 C/ Q2 i# n7 x

  T$ y4 m/ w# W3 _' q0 c2 \  @这是AGV_putin中arrive的method。. v0 `1 y$ {6 O) B* C+ k
) {8 l$ F6 K0 `' u) v
当到达物料速度越高时,这个报警更多,
5 @! c3 B) g. B( d4 p& K! G" a, |可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。% e& r3 R8 n* c# Q0 Y; d
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
4 ^$ v: S7 h- Q4 g& M; P* D# E4 r$ L1 }# S
另外一个小建议,就是move,所有的move都可以这样/ @& c+ B- H( t& A4 ~1 ?
if not move() then debug end7 T6 I7 U9 s, _0 j3 H% m
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。& {1 I/ q2 _! b8 W- F
plant simulation中的free libraries有AGV模板,
0 v1 O' r" M5 k9 ~8 _6 d3 c7 D里面也有案例。1 D. r& V, L% R
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
( \& I2 U. R' `% ~0 e8 Q
5 i5 d% h* r& a4 ?! f, g. n& q我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
0 ]6 g0 Q" R/ R6 [+ J+ q
) \0 `  T% e8 L* S那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ) M4 @5 V0 G/ c: _' L! g3 |
这是AGV_putin中arrive的method。( e$ z4 |' ^- I5 y( |+ E+ q6 m

; m6 ^& V7 `. f, S1 @" I% \当到达物料速度越高时,这个报警更多,
" U2 y; ]% O& U3 N; n6 h
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-12 02:45 , Processed in 0.020115 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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