设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7375|回复: 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'! y. `3 i/ u, j% c
*/
& \3 {; W! C! y0 g4 s) jis6 p) r' Z6 z) E4 |+ a' \# K1 a
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;- Z$ y( s* r1 V7 D: A
do
# O- c4 m+ E. c1 w" X& X        Lan := rootfolder.Internal.Tools.AOLlanguage;" ~! H( l0 S: {- O; M  g$ s6 p
        if current = @.Destination -- else return
$ A0 O& W  U, O/ W        then3 I* `" J: a8 b. j' X  y, B
                @.Destination := void;8 {4 F9 c6 R# h/ U& B
                if @.occupied then
' e% b  b; @; [$ k5 T                        part := @.cont;" h2 I% W2 l+ c% R
                        @.transpOrder := void;' G* C& `* |2 D' R0 k8 ^  o& ?4 o
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" ]8 X$ g) K  k- f0 u                                @,root.eventcontroller.simTime);! U$ P( s) @& [3 H5 E' X/ T( J0 u6 q
                        @.HasOrder := false;( J, i) U$ @  W3 c
                        @.DrivingHome := true;! z/ A' N7 c) k1 R9 Q, i+ F  o
                        rgManager.tryToStartTransOrder;$ i! x4 [0 e" R0 u  `0 n, J
                        if @.Destination = void6 i5 J2 g4 X% R& a4 W( o
                        then -- no transport order for vehicle @
7 s; q1 k3 e+ C1 C- |+ Q( _                                @.Destination :=
8 L; n  ^% Z  ]                                rgManager.nearestFreeStation(@,track.~);
) v. w; f  s" K7 _9 i7 C* F5 B; \! x                                newDirection(@);   
" r5 O1 Y" d. y! }                                if @.Destination /= void then- `% G1 F! Q. V3 B) G4 [$ U. M3 G
                                        @.Destination.NumReservation :=  B6 z) i# P+ A
                                        @.Destination.NumReservation + 1;7 J. g6 t+ U7 ~; ~
                                end;
# k  C+ W8 h7 J/ s- O                                @.CurrIcon := "drivingHome";8 B9 f7 e- m$ w% m5 t0 ]( |' x
                                @.DrivingHome := true;( J0 |3 \1 [+ U1 L. Y
                        end;9 D' p0 F' u6 q+ E3 U! M$ R
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 q' t& t. O+ M+ k. }! l# S4 h                        part := @.transpOrder;# P6 V1 O1 ^. |4 K  ~) O6 V% q. B
                        part.move(@);-- load part
/ l& n5 U( V* R" w+ Z* G9 z5 G/ R                        @.CurrIcon := "load";
( w7 W" J7 s5 i; Q& k                        GlobalDistObj := part.globDestination;: i6 C; o4 p' q# B
                        assignLObj := rgmanager.rgAssignL;
+ t# W8 ?7 ~# {8 x& G- v( z8 i, _! v                        row := assignLObj.getRowNo(GlobalDistObj);' w  E# \. [5 L; T/ s' O
                        if Row = -1 then -- since 70! n6 g( I/ |* s: |& x2 x
                                if lan=1 then1 U6 P+ ^: a; X( p. a
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* s/ |5 g6 m. M* }7 T4 q                                                to_str("in der Andockstation: \"",?.~.name,"\""));
- r! A, a8 t1 j( o                                else
, o  E/ v5 {1 c2 B) B                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! w  W- x9 J8 _7 @% A
                                                to_str("in docking station: \"",?.~.name,"\""));                               
& |0 A; Q& R' f6 {: ?' X                                end;$ X' V* X1 A9 ?' T( {5 ]
                        else
  l& T6 X0 L: J7 N) h* ^& K9 \; D) {                                @.Destination := assignLObj[1,row];* L5 S! V8 M' U. M
                        end;                       
/ `1 \  }+ N& Z6 ^" b                        newDirection(@);
# d% o0 j( B2 f4 N5 `                        @.HasOrder := true;
5 y+ D6 z6 N  H: i# L1 W  W- \                end;
& K+ q8 R- {/ [% X  U! g* r        end;
, e+ D) j1 v  {+ |$ Yend;        -- of the method1 c0 v' W" t! H& W, [, p; t
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
5 h& w5 [3 w& n3 I$ X( r
* C0 S& c3 X: E3 g3 z* ~这是AGV_putin中arrive的method。+ A! p2 ?/ {% L
. c3 G1 K, K5 k5 y8 p8 _; _1 z
当到达物料速度越高时,这个报警更多,
2 H( t% T7 I( e可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。5 N: P( D- V. ]2 i+ X
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
+ R5 k0 J/ p6 R9 x: g' w: O4 a4 }+ b/ }) R: M4 ]: T
另外一个小建议,就是move,所有的move都可以这样
- k$ b( T4 Y) X( nif not move() then debug end
8 A0 ?; q9 ~% e3 {% s这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
# ?9 `+ ?0 @% Vplant simulation中的free libraries有AGV模板,
, W9 R# W+ m6 Q& r里面也有案例。
# E. d3 Y# Z- v3 o8 C- j我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
5 ^5 h! O  Z' M$ A8 y) ]9 i2 g/ x
- {, A* S0 O9 z我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 A; C  \0 G) `4 u7 o- g, U6 H3 s) ?3 q& b
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
" x+ d1 n2 d9 |2 {% d5 H' O这是AGV_putin中arrive的method。7 C! @3 n7 \* o2 L8 c* M) g
) K$ V& X+ b- U! l: u& }
当到达物料速度越高时,这个报警更多,
* j* G* G8 h2 ]: B7 I7 J7 E3 r3 y# k  i
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-8 03:34 , Processed in 0.026812 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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