设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9885|回复: 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'& u! W6 o; a. u$ L5 |1 t9 ^
*/
& v% m) K1 K; Z' M; Ais
1 o& E/ j- z# Y, O4 Z( s        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. D6 {* I1 ?$ S/ i! H6 Mdo" r/ v. g% P+ |9 V6 d4 P
        Lan := rootfolder.Internal.Tools.AOLlanguage;) I7 p' R3 ]. h% F# I$ j& E
        if current = @.Destination -- else return
2 b. e% t! k: ~% x$ `, U        then
3 ?, t4 f$ u  i% J                @.Destination := void;
# I! I4 g1 S- }  G, Z1 L                if @.occupied then( q# E4 J1 j& G/ |6 x5 J& W
                        part := @.cont;9 e  x, s# w1 B" ?2 p6 Z
                        @.transpOrder := void;
5 g0 ]& D8 w4 v- X  x0 t# E                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 G& `" l: h9 C0 F1 O5 b6 @% M, _
                                @,root.eventcontroller.simTime);4 ]( M$ `, _5 g5 C- T2 K; t2 C
                        @.HasOrder := false;( S: P! Y( |# B' J8 T+ I+ h
                        @.DrivingHome := true;8 \, z& K$ m% `6 W7 @
                        rgManager.tryToStartTransOrder;; d  c, i; x2 ]9 ]/ h7 z6 \8 s; I
                        if @.Destination = void1 C" |. \+ w+ x
                        then -- no transport order for vehicle @4 @- q+ S  i  w7 N- O
                                @.Destination :=* `! U  z# x/ [9 U# E! n
                                rgManager.nearestFreeStation(@,track.~);3 d" a# a( M/ u- h6 S+ R: G
                                newDirection(@);   ( z5 O: u- Z; }1 U! D( t& r0 n
                                if @.Destination /= void then
( R) a3 A1 }6 v! ^% N2 [                                        @.Destination.NumReservation :=
3 n2 Y# F8 Q% d1 _8 x* J. r! D. [                                        @.Destination.NumReservation + 1;
; W3 g- Q8 }, ~% f, B/ {5 O1 t( v$ {                                end;
6 |* @( ]5 P% A4 n! U                                @.CurrIcon := "drivingHome";
$ ]% U: j4 F# h) i8 e0 w                                @.DrivingHome := true;+ M2 z; O! j6 c! f9 N2 g
                        end;. ]0 o" S7 x2 u5 C7 t1 Y
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 Z3 H0 d# S2 ^) r
                        part := @.transpOrder;  K- r; I2 J( s: [
                        part.move(@);-- load part
. ]4 C' u6 ^1 D                        @.CurrIcon := "load";9 {4 Q! `( f: u1 j
                        GlobalDistObj := part.globDestination;
; O1 j: G$ G, K: B" p) H                        assignLObj := rgmanager.rgAssignL;: I2 S8 [' s' t' B6 p2 h8 e! L
                        row := assignLObj.getRowNo(GlobalDistObj);/ B+ P7 l* z5 D  _/ b$ K3 B- U& G- {2 |
                        if Row = -1 then -- since 70/ G+ C. z% F. j$ d' K* L: d$ ?% c2 o
                                if lan=1 then  k. N  E4 [  a$ g8 G2 |- `6 i$ w
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 n6 G" S$ I4 W, x; O4 {" }                                                to_str("in der Andockstation: \"",?.~.name,"\""));* `7 S$ k. @7 R! a4 W! q% e! D( m
                                else
9 A' ?$ G$ G! u# g' x3 V                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ [* n! [, P/ ]$ _                                                to_str("in docking station: \"",?.~.name,"\""));                                7 J8 I$ t) @1 D; F
                                end;- e  A; R0 k/ ], u# i5 v
                        else6 y! j) ~/ p- E- b, V4 W) ~8 i
                                @.Destination := assignLObj[1,row];
5 S3 D! [7 }/ G8 d- m# ^                        end;                        3 ^: @) R) e" s7 q, P( u
                        newDirection(@);
$ E1 G7 [) [2 G                        @.HasOrder := true;
0 o' S, u1 V+ F4 R1 C  g                end;
  D) J. R8 f  R! I- f        end;
" g* D0 Q/ @' t4 O7 oend;        -- of the method/ `( C6 K( P$ o# ?9 b
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
% Y% B: I5 `! {  w$ k* s' N
" K& z% c. S+ g/ g# h% e1 r7 r( C7 q这是AGV_putin中arrive的method。% A3 w! U2 ]3 V9 Q+ f! s8 Q' s

* P% b, r1 m& k, d2 M0 @当到达物料速度越高时,这个报警更多,
& e/ s! t5 l0 A/ S5 `可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。: O2 u2 N3 K, F% Q% D* x" u9 g
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
; u7 ]; B: l/ O5 s: z( ~1 u  V% V4 ^1 J
另外一个小建议,就是move,所有的move都可以这样( B+ R7 P/ C8 M& y/ [8 n
if not move() then debug end
: P% p$ e! q: [: ~3 l这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
+ ^, `* ?+ T6 V  ^plant simulation中的free libraries有AGV模板,7 }/ R4 f1 _( {+ d& u) W9 s4 P0 ~
里面也有案例。% J4 @; L6 [) V- ]/ [; X9 ~7 b( A# E
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。" @' e; w' Y6 x& Y/ g3 A

  `9 V& x4 K$ T! e6 ^我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 5 v9 d( o3 `0 B2 j0 l/ O

: X+ e, c4 Y% A那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ! t; e* w) i5 l' ?; d1 S. ^
这是AGV_putin中arrive的method。) x- L, \0 N3 \5 J" P5 _" s

; D3 c. ~6 V( ~7 g当到达物料速度越高时,这个报警更多,

9 `6 \+ d, [/ b! E2 Y  \另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-31 12:28 , Processed in 0.016930 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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