设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8837|回复: 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'8 \$ h! @  g% R( t
*/
- B+ b/ Z' S  |' J1 p' Lis& y1 i. K$ n$ \. ?
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 ^& x" ^- [; ?1 c5 n
do
( ~) v; p' e" u- m3 r% n        Lan := rootfolder.Internal.Tools.AOLlanguage;" _: q" p$ s9 v$ P' }' o8 M% L* _
        if current = @.Destination -- else return
+ I, e7 N5 a2 J( E! W& C7 P        then
* `/ O, E8 p9 L3 y                @.Destination := void;
" h- |& Z8 u% W1 ^* g1 M( _                if @.occupied then' T! L, {! x: @7 u( C. b9 U" ~* `4 ]
                        part := @.cont;+ ?& {& s  ~4 o1 L- z# i/ E, o# I
                        @.transpOrder := void;
# U0 }8 _. o# B                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ M6 B2 Y, F' ?4 O3 _* I0 G: d; j                                @,root.eventcontroller.simTime);- h5 I( {+ T  \
                        @.HasOrder := false;$ ]0 e% T- _9 \/ w
                        @.DrivingHome := true;7 Q2 S  @) ~5 x7 [& v
                        rgManager.tryToStartTransOrder;! V; \0 Y5 ~8 U( K
                        if @.Destination = void$ ~: O. |4 ?: Q8 Z7 M5 f5 q
                        then -- no transport order for vehicle @: S. o: v, ~' m: L/ P
                                @.Destination :=: D0 p# b. Q7 q, O) x3 ~* \/ \
                                rgManager.nearestFreeStation(@,track.~);
1 |! ]6 g. s* D$ _! Y; Q                                newDirection(@);   ; ^$ @: A9 V) f2 O
                                if @.Destination /= void then
0 P5 Y" W7 s9 P3 s7 B                                        @.Destination.NumReservation :=1 N/ b' p( ^( B+ r+ Z
                                        @.Destination.NumReservation + 1;$ r$ W( N: G7 f/ c; B2 Y
                                end;
+ O% F4 j2 L" V" t                                @.CurrIcon := "drivingHome";6 I4 f8 l0 }. f. k- o  e# j; n
                                @.DrivingHome := true;
7 P7 A' X/ R& C4 D                        end;
3 A+ ^9 m0 X  j. S0 D8 Q                else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 J" H" H" P% F  t- K2 m+ i
                        part := @.transpOrder;
" S3 q) D- n0 c" D+ ]- B$ H# G                        part.move(@);-- load part' [! H" W* g# |2 X! J5 F* K3 L
                        @.CurrIcon := "load";
4 r" J; T, `, J$ T8 m                        GlobalDistObj := part.globDestination;! G0 o/ K/ a% A: p' u" f' X0 G! r+ G
                        assignLObj := rgmanager.rgAssignL;7 V* ]7 U& e. \  ]( V
                        row := assignLObj.getRowNo(GlobalDistObj);
  k# H. h. ^! Z9 e. q                        if Row = -1 then -- since 70
' w$ z7 ?, C8 w3 j" A2 t, n2 c                                if lan=1 then3 R' c  m0 o7 ], _
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) w- D1 {( x# j                                                to_str("in der Andockstation: \"",?.~.name,"\""));
2 Z3 M' ?" N5 p( s5 h7 n                                else  r4 Z. W  r8 Q& X7 @* r
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 X" S0 e0 Z$ d' l, n. {( F5 _                                                to_str("in docking station: \"",?.~.name,"\""));                                ! A- E7 V  g, O* m9 z
                                end;
3 O* r" K, z8 I" C                        else, t7 i" {7 L% [
                                @.Destination := assignLObj[1,row];) F. e; o& I0 I+ ?% _: l2 d
                        end;                        4 G7 V% B$ K- X& g1 F# x9 _- `
                        newDirection(@);
/ ^; ]' z4 Y# `* {' ]5 [5 w                        @.HasOrder := true;
( R- |% ~: R7 s1 S! ~                end;+ C/ P/ V- X0 L2 r* q/ v! T4 p4 t
        end;
$ _+ @( f* N/ E  W, d) f( n! lend;        -- of the method
+ X/ W/ \, r5 @6 _: b
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 1 m9 }, a$ ^4 E2 `* ?

  ~- j. H2 c/ O  z6 n& t# X这是AGV_putin中arrive的method。% \7 l) D' C  k" c) s' A
' v! A0 P5 z2 K4 p. B& L
当到达物料速度越高时,这个报警更多,
2 X* R! \9 M6 \0 y4 U& w可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
- g. J2 ?6 \6 p5 j) ^4 h* {5 J7 k  T程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?1 \8 a) d9 b* k" a# T* K
2 j. }1 G* Q9 j' m& B7 o
另外一个小建议,就是move,所有的move都可以这样
( c( I( C4 g! ]* ^2 z, L! m9 [, Eif not move() then debug end) v5 A: ~" ^& C5 R% T$ `
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。4 C; M4 K5 L, a! M, l3 ^
plant simulation中的free libraries有AGV模板,: J: s: ~, m2 s3 M; l; Z# p
里面也有案例。
0 K% k: h! M5 {( w% K# t0 }4 x我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。2 g% F- S4 c7 ]- d5 ]7 f8 B

" o# V( Q1 A. R" w我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 + M6 E) f* S9 o, {# F3 s7 J
3 g" r% \  x$ Y! \  l7 I) v
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
. H: d# o4 D: ]' M1 \这是AGV_putin中arrive的method。
) w$ G4 d' `4 f1 D! G6 s6 y. ]
+ p) K8 g. D4 i当到达物料速度越高时,这个报警更多,

- e. T" e1 Y  r& z另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-29 09:09 , Processed in 0.016572 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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