设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9567|回复: 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'
( ~* B( N6 }' v*/
* f' Q& ?9 n7 L. p7 ^7 i, Pis
  ?/ R$ t8 P; C! V0 K/ ~6 ]        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! E( R9 q0 i7 v4 @" T, {do) A( \, {4 t7 E9 ]8 c, G
        Lan := rootfolder.Internal.Tools.AOLlanguage;5 R4 g/ p( w% R/ \2 N8 Z. k2 }
        if current = @.Destination -- else return
7 _) O* Z9 u) d8 B! r' B. Z        then; S2 f" T$ a: |3 s8 Q) Z# r
                @.Destination := void;, a+ |- T; I; D9 S( t5 P/ X( [
                if @.occupied then- s# P4 S7 i$ n5 Q  E
                        part := @.cont;  {% ~+ H5 O  k: G" w* B7 s
                        @.transpOrder := void;
& v) i; ?+ `% t- G+ Z                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) O8 C7 F2 t) A2 n$ g) Y
                                @,root.eventcontroller.simTime);+ ?& U7 n/ _8 G% v. Z5 E7 {
                        @.HasOrder := false;; u' P& S% A. T, ?! G; V' p
                        @.DrivingHome := true;: `; q) a, y$ v& q0 y- V0 T' X5 n/ F
                        rgManager.tryToStartTransOrder;: E* `6 @2 a2 {6 ?. t  A
                        if @.Destination = void
4 ?$ M- N0 D! f: z4 z+ L9 [9 \                        then -- no transport order for vehicle @
/ l* d9 i6 L) n& E9 a& q, r                                @.Destination :=
- z% A" T7 C+ Y+ a- j& `                                rgManager.nearestFreeStation(@,track.~);# l" l6 |2 x' h% t" L1 f
                                newDirection(@);   $ J" b0 E! a7 J! v/ X& R2 k
                                if @.Destination /= void then
; o; q: y% m$ Q/ Q9 N# N                                        @.Destination.NumReservation :=
- F/ A5 Q" j. U# u7 z                                        @.Destination.NumReservation + 1;
4 }+ \( i; Q( V! C                                end;
7 r+ j7 Q  b8 c0 Q# X                                @.CurrIcon := "drivingHome";
4 m1 Y4 A8 B2 P: Y% @8 a9 U; h                                @.DrivingHome := true;9 [; Z$ ~+ R( B. U' [0 m
                        end;
" n0 M$ _6 X6 y: E. j* Z                else -- the vehicle @ is empty, both vehicle and part are in the same dock station* o4 h% [8 Q2 x, W
                        part := @.transpOrder;
6 A! `/ h  `+ g% h7 Q' ?2 n, c                        part.move(@);-- load part2 d" N: B1 e% R( @1 ?
                        @.CurrIcon := "load";
" Z) _* B; W$ w! \+ r                        GlobalDistObj := part.globDestination;  {' X% ?0 R( }5 p" R8 M+ u& j
                        assignLObj := rgmanager.rgAssignL;
% ~- k  G$ Q4 B) K+ U* x0 u                        row := assignLObj.getRowNo(GlobalDistObj);
' L5 M) ^- X+ C: H; a                        if Row = -1 then -- since 70! z2 e' g  \1 P: j
                                if lan=1 then* ^. ]* F/ d: p5 \* q
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 J( C  M5 i- i8 ]2 @1 w
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
8 R( ?0 m$ c5 ]! h, R; D2 i; O                                else9 O* N! A  J' N6 B
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: r! i! f2 z0 Z9 J4 l
                                                to_str("in docking station: \"",?.~.name,"\""));                                % B1 j' x3 |6 J( }! [  `+ U
                                end;4 {7 f. `5 S/ T4 X1 z
                        else
: T5 W- S  A4 C' p                                @.Destination := assignLObj[1,row];0 ?* z6 P( ~( D1 B7 [' i9 p5 T$ Y
                        end;                       
* t+ h! P1 D7 g9 Z0 y$ t                        newDirection(@);" X! i% p8 u& `! r: H
                        @.HasOrder := true;1 f5 {6 z8 g) ^4 \8 u
                end;
: X) R" }, f) t- X. Q4 x3 X# g$ x3 B        end;- B8 o0 J# }$ [1 Z, w: c
end;        -- of the method' p5 U2 |# R' N
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
  G- T* L+ ]8 O- D1 X* h% F' V, C( M8 G
这是AGV_putin中arrive的method。
% U8 W4 ^% d: Q, }, G" v: G. ^) _6 V9 i* Q( Q  U$ r; _) t5 P, W' {& \* j
当到达物料速度越高时,这个报警更多,
# ^) @. A1 ]  A6 o* U& i3 A可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。1 U" [. r# |6 J- |4 t
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?" ?- q) N. P4 R6 y& M6 s6 A; F" O
" v4 q- e) R% ~- }  M
另外一个小建议,就是move,所有的move都可以这样$ ]; r7 Y; s! S3 P* T
if not move() then debug end
, H2 ]' s# ~6 [8 ^+ ]4 g这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。+ e% }: h) q7 b* W0 b5 q# S
plant simulation中的free libraries有AGV模板,. t* w1 T0 U6 D/ l0 L5 p
里面也有案例。
1 E: T" G7 ~+ R! n! e我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。: Q" Q+ h/ s5 M: S  O) j1 ~

2 F& U. f- y) n! |0 y: k8 G* E: D- M我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
1 V9 Z, B; ^$ O3 y2 o: c& b
/ W* ^' w% {$ ], ^+ G- D; {) A那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
2 |- K6 b( l3 v2 m- Y1 B9 C这是AGV_putin中arrive的method。
% ?* R' r/ P( W- n" J/ H8 q' G$ ~/ j* t# t
当到达物料速度越高时,这个报警更多,

: j; E; @6 L8 g1 I# r  s- B$ S另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-8 14:24 , Processed in 0.015676 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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