设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9694|回复: 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'
: W* }) _/ @) b; y. W3 C*/
2 l9 I1 h" _  x9 [& xis8 |& w& |7 t* O, r. D) E: d7 c
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;% }* E6 E2 N1 F/ R! i* x8 E
do
# Z. f3 _/ D7 f* [        Lan := rootfolder.Internal.Tools.AOLlanguage;7 g! @3 l: T0 _2 K: k* I8 V2 s/ I
        if current = @.Destination -- else return% y0 J" w" m. i6 @
        then
7 j6 S  P9 P8 f1 I, @4 w4 I                @.Destination := void;' y" _8 Z" G% C# _9 p" O6 D4 B
                if @.occupied then- w, y5 X- u8 E* x/ \# c
                        part := @.cont;' L* Y5 n, D& A: S
                        @.transpOrder := void;9 Y+ O- u7 r; S" R
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 k% }: l* y  P+ L; J7 k# ]                                @,root.eventcontroller.simTime);
- r8 E6 T" `5 C7 {, h                        @.HasOrder := false;
# o5 R+ h" ~$ Q" D& u& x0 ?                        @.DrivingHome := true;
$ B4 d" b9 o# o# R4 q- e( L                        rgManager.tryToStartTransOrder;
  K3 J+ q/ t: a/ r6 U( ]$ @3 I                        if @.Destination = void
# q+ _5 F( o5 A; ?, l7 B                        then -- no transport order for vehicle @% v/ V- O: H7 `) w! m
                                @.Destination :=
, c" d; i2 l% x3 ]& A                                rgManager.nearestFreeStation(@,track.~);  v$ N0 u  b9 \8 l9 Q! l1 k
                                newDirection(@);   ) k  p* h( [( C+ k: Y" n$ p
                                if @.Destination /= void then
0 c% R1 [! @0 V( t  I8 z" I4 F9 n% `                                        @.Destination.NumReservation :=  J0 Z- n1 Q, X
                                        @.Destination.NumReservation + 1;
" a8 C5 D+ }! B4 ]9 t                                end;/ l: M2 J7 V% v6 T( B
                                @.CurrIcon := "drivingHome";
1 l1 |/ L0 e1 P0 Z* x                                @.DrivingHome := true;1 s5 n& x2 u6 j$ j( Y
                        end;
4 g) g/ q8 c+ c3 j                else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ L1 y0 O: K9 S( s9 Y  g# e5 G
                        part := @.transpOrder;
7 E+ }' ~" a: y8 F                        part.move(@);-- load part5 y$ H1 W5 F, s
                        @.CurrIcon := "load";
) s2 Z) ^* o! W, Q0 Z- E( }) @! l                        GlobalDistObj := part.globDestination;5 d7 J" c3 h) G- s, X1 _; G
                        assignLObj := rgmanager.rgAssignL;
! ~' l; ^# [4 a/ Q  Y                        row := assignLObj.getRowNo(GlobalDistObj);
* s$ }; l) r) C: m3 Z                        if Row = -1 then -- since 70
8 X( C: m# o7 g                                if lan=1 then. ^0 n' E  ?- @+ j3 h1 D
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; |; G) k/ F( _- C& M' U6 Y                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ V3 b0 t- w4 M8 l: Y
                                else* T. `% \+ i9 u# M! N  F$ C
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 B! f# l( n! F) W8 x
                                                to_str("in docking station: \"",?.~.name,"\""));                                * S0 [- M, |3 y5 q/ k* j6 k6 I
                                end;, p2 ~  T5 g+ v3 X, `3 d$ ^
                        else
' V& I$ ?- E/ G6 ~4 L( k0 O                                @.Destination := assignLObj[1,row];5 g7 P& K+ X$ ^6 v: j
                        end;                       
0 s* d$ d# B4 r. Y( V6 O6 Q                        newDirection(@);
9 V) R. V. I: s& J) v$ u                        @.HasOrder := true;/ u! b3 V. o8 k) p4 E$ `
                end;
/ Q0 b. [4 |/ M, n, k        end;
% E2 S) a7 \% V- F: L! dend;        -- of the method
" A/ L) q; C. h9 S' N4 ^0 \& L1 J& g
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 + ~& u+ X0 x) h1 m
' d$ ^6 r$ T5 |) [1 S; r
这是AGV_putin中arrive的method。6 D9 t' ?( E4 H

0 P2 V* |& S/ m9 q当到达物料速度越高时,这个报警更多,, A, ?3 }1 G8 [2 n5 S: A" v' O
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。3 [5 r$ S3 s" L/ n& W9 k: x' Y0 h0 @9 d
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
! R9 K0 H, h" l4 c& L: e8 A0 W% q$ {8 S+ C+ v/ _2 n" d( B
另外一个小建议,就是move,所有的move都可以这样
1 x" v7 r% w$ O3 @if not move() then debug end  ]& G6 W5 h* b: K) g, S
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。- l5 W6 G7 m$ s
plant simulation中的free libraries有AGV模板,: a7 a3 F# K  R( Z
里面也有案例。
& Z' [; v' G2 U! B8 @4 h5 o% r: L我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
3 m" J9 N+ L, F
1 [; d: b% P8 W, T, q我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
2 |- I, ]4 `, N" a' i; \: H# a6 C/ E  A# y7 Q% S* r' S
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 . S5 M2 o$ L: t8 g( T+ c& n
这是AGV_putin中arrive的method。+ W  V$ Q2 P! ?' g. E0 ?
  j# m5 N* ]8 u4 Z
当到达物料速度越高时,这个报警更多,
$ t! y5 R+ I9 ]) ~: S+ o
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-17 23:54 , Processed in 0.026710 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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