设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9144|回复: 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'
! O; ^" L5 t$ T+ s2 z6 R! |+ t*/* A: ]2 R" S" Q% x' j" g
is
  i+ n( B3 X5 V! A+ y( K* F7 R        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
  H: w1 B" |0 Fdo- d  B, F1 X$ `3 ^: H
        Lan := rootfolder.Internal.Tools.AOLlanguage;
+ `6 E* `  c% J( `) E" R% I- h; ]        if current = @.Destination -- else return
0 _. r4 `  }) {+ ]        then1 {& a, l7 Y% ~3 m% Z) H0 Y* M
                @.Destination := void;5 Y/ _: ~. F4 t: [
                if @.occupied then
+ S9 e+ ~4 ]) D& f. o9 _9 T$ S8 j                        part := @.cont;% T' {) A- k- Z
                        @.transpOrder := void;
& D' K, G9 M: S4 R7 ~6 T0 Y                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 P) \0 P/ I1 k1 s, A6 Q- y& b
                                @,root.eventcontroller.simTime);
" A6 |, `  a: S0 B1 y                        @.HasOrder := false;
( d* A7 F. M3 f  w                        @.DrivingHome := true;
+ D) Z6 U- L+ w% M                        rgManager.tryToStartTransOrder;
. }5 V7 `8 J* p( h) o9 ~$ B                        if @.Destination = void1 i+ p1 v4 r; C9 z, e5 F
                        then -- no transport order for vehicle @, O" x% |! F3 t( B5 R" @
                                @.Destination :=
, Q0 ^# }' D& A9 I( N; s" Z                                rgManager.nearestFreeStation(@,track.~);6 t2 d7 ?1 X5 T) H: Q
                                newDirection(@);   $ e. J- z9 m# n, e2 A- c, Q
                                if @.Destination /= void then  l7 x4 q1 g) o2 A- I4 ]0 p* v8 H
                                        @.Destination.NumReservation :=5 M) O* m4 s' L" v# D) |& Q
                                        @.Destination.NumReservation + 1;% g2 d7 W7 U* W4 B# |
                                end;& i( b3 W2 M; H/ P  e9 b- ]0 M
                                @.CurrIcon := "drivingHome";
: z6 G! F8 u' P+ }                                @.DrivingHome := true;/ g$ S2 ?: F/ `( E  ~1 N& d& X: D
                        end;% K  s" N/ W; R  }3 R5 P  T
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station" i6 y, L( e2 x8 ~2 ?
                        part := @.transpOrder;
$ Y0 a3 L4 k1 U# J4 i- j5 I2 y( q                        part.move(@);-- load part
5 ^  D& a3 q/ y8 A8 O8 Y6 b4 w; a                        @.CurrIcon := "load";, p. d/ K2 ~* {5 u2 J/ X" W9 G
                        GlobalDistObj := part.globDestination;6 M' D7 T7 m) ~5 z" a- f! w
                        assignLObj := rgmanager.rgAssignL;
  r4 k0 H' W7 m4 t7 N; B6 j                        row := assignLObj.getRowNo(GlobalDistObj);
7 V# y& T: U/ M. f% [% q                        if Row = -1 then -- since 70
5 M3 T2 f7 y5 i9 {                                if lan=1 then- h5 W. H* {* u" q3 J* x: a$ g
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ S9 P6 i1 G* T. {% r
                                                to_str("in der Andockstation: \"",?.~.name,"\""));6 Z2 l4 v. `: d6 J8 p9 f" Q
                                else/ g. t7 {& i. M5 V; C/ ^2 |
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) W8 ?$ s" J3 f                                                to_str("in docking station: \"",?.~.name,"\""));                                ! q8 E; v* Q* A4 b/ V
                                end;
; S1 Z! z+ w0 R, o9 x8 e: B                        else
; d; ?  I: V+ k                                @.Destination := assignLObj[1,row];
1 Y+ @6 W4 F8 z$ Z( o' Q                        end;                       
( j& @4 @  c% l: e3 b: L. g6 L! P                        newDirection(@);7 N3 m( \# S& Z$ w8 E& ?8 t4 E
                        @.HasOrder := true;" i4 f4 y! `& ]
                end;
- F) _$ T8 T9 V6 w% H* f        end;) u6 K5 R( u2 {* u
end;        -- of the method( C0 B) s, E2 q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 6 V: Z5 [2 T9 ?+ p8 Y2 Y& O8 G" p# W

' B4 R% }7 `9 [$ Y5 k: |这是AGV_putin中arrive的method。5 K* V  c9 X3 @
" x# J! |( F! O% _
当到达物料速度越高时,这个报警更多,. Q- R; y! b. q8 m  m6 z
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
4 t( B5 Y% Y! k9 Z/ I程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?0 z: R- z& {' F' ?% ~. r+ v

, w( w; f5 Y% i/ g: Z另外一个小建议,就是move,所有的move都可以这样6 H' b& F; M, H
if not move() then debug end! N; [; C7 V: Z/ i
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
4 E7 {% T& C! I8 G7 Jplant simulation中的free libraries有AGV模板,
& u1 N+ d! t, {里面也有案例。
1 |: S; a& I; ~4 ]1 F0 o" A我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
  J$ p/ _1 A) ^; f7 h7 k, r8 E9 `8 F' O9 F9 q6 t
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
' W4 t( Y, h. {
, v' T1 w, R6 t& V9 J) j. i那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
- `2 ]0 H4 a- C$ D3 Q这是AGV_putin中arrive的method。/ {, G; ~6 t3 K* z
% x& \) }, @7 u  p9 H# T
当到达物料速度越高时,这个报警更多,
* [1 |5 J- p+ {# f  U
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-16 11:26 , Processed in 0.025315 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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