设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8555|回复: 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') q# k( {9 H: T6 Y; U
*/4 Z! O! R2 m$ x: h) Y$ ~
is3 w7 x4 J2 W- r% h
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 r  y1 j/ j5 K1 y' Q" V, tdo. d8 K/ G1 o- g3 P
        Lan := rootfolder.Internal.Tools.AOLlanguage;
7 e5 P2 H% U8 A& @) q        if current = @.Destination -- else return( {) N* k2 s7 |- V
        then4 C: u" a7 o9 ~- E
                @.Destination := void;
; e! z8 l; l- H: P1 m3 }                if @.occupied then
' }% U/ }1 w' _                        part := @.cont;& t3 L( h: W. P1 U4 f5 v
                        @.transpOrder := void;
! Z! r1 H. D3 y                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 F! O9 I) @3 }) F+ t1 p
                                @,root.eventcontroller.simTime);1 X' a6 k* Z) G
                        @.HasOrder := false;
+ P5 `" G$ v* ]1 D" h* `                        @.DrivingHome := true;
* O5 @8 F% J1 M: u/ f- ^* N/ e" n7 @6 a                        rgManager.tryToStartTransOrder;
+ T: g- R4 Y7 `) J2 p9 I) _  g                        if @.Destination = void! t+ o& T5 S; B
                        then -- no transport order for vehicle @' ^; d) Q, \+ d0 d; l# q7 M7 m7 ?
                                @.Destination :=
+ [$ d2 a0 I  K& E                                rgManager.nearestFreeStation(@,track.~);0 _& ~% B8 x' N3 k
                                newDirection(@);   # H" ^; z/ k( h5 F' ~/ ?! e
                                if @.Destination /= void then& V0 f2 S7 w* `) ]1 H
                                        @.Destination.NumReservation :=
5 h; {; ~+ P# o; y                                        @.Destination.NumReservation + 1;
: T& W2 y- ~2 U$ g                                end;
, J% H) O! m9 v; G. ^                                @.CurrIcon := "drivingHome";
$ v5 X6 z% [; w* H  W2 G# x) l                                @.DrivingHome := true;
* B1 @, I; C$ Q8 w( S                        end;7 V% w0 V1 K$ i( Y
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station% ]9 d, ^; I# b, X
                        part := @.transpOrder;9 G4 ?5 j" I( n- g
                        part.move(@);-- load part
; \9 p* `) i- Z% f0 I5 r                        @.CurrIcon := "load";& D8 @" z* Q6 u* [, T
                        GlobalDistObj := part.globDestination;! o1 e, w2 T, K0 q& L
                        assignLObj := rgmanager.rgAssignL;3 c  N5 d3 M" ]" ]6 K
                        row := assignLObj.getRowNo(GlobalDistObj);
' W. x6 E& E4 F                        if Row = -1 then -- since 70
5 [/ e, j6 w" M$ `. v! P                                if lan=1 then
1 G2 j+ e: J) J; ]                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 @) m8 L9 h6 B/ ]9 }
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
& T; r9 q: ?  D: [  R; ~                                else; q0 _$ l, P9 @8 t
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, {$ M( X) r1 H# B7 D                                                to_str("in docking station: \"",?.~.name,"\""));                               
/ t4 |6 H3 O( S                                end;6 y5 f# l1 ~; m1 {, t
                        else. }5 g' _' w# ~( m6 V
                                @.Destination := assignLObj[1,row];& w3 W) a* S% G, K$ y
                        end;                        # F% x! ~, ]8 {: G* l# a& ?- U/ J/ r
                        newDirection(@);
7 A4 P# x) I( J+ \- q( f( _                        @.HasOrder := true;9 _. b$ P3 l% C/ g; c
                end;6 k4 f( E' _' a, F6 ?7 {! U. Y( G
        end;  y8 Y  J; F1 b9 y
end;        -- of the method0 m) L, p. M% X6 L' S: Z. o
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
% d( y1 \' k  o! D- R7 U; K+ e6 ]* X# M- {) g) e
这是AGV_putin中arrive的method。
# A3 n, W$ j1 {; N& c
/ @: B' @4 L8 }. i* p当到达物料速度越高时,这个报警更多,
# U, n6 Z% H; F4 W可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。1 [& [5 y/ p1 V( Y& }
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
  P. T0 K% @( a& u) m1 p. ?. ~. i4 d4 N: @
另外一个小建议,就是move,所有的move都可以这样
, y; N- c/ |  U* h8 x1 F2 Vif not move() then debug end, d. Y$ S  ?5 Y: E% |" D
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
5 g$ ^& n$ Q' U& O! ~' x7 i9 Vplant simulation中的free libraries有AGV模板,4 h( N( l7 M& W
里面也有案例。% |+ i: e. R, b" g% d- [# K8 q8 [
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
1 X7 l/ |5 r: a& M0 X. `# r* j
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 # k5 {, {4 u4 J0 Z* f1 c
7 M% e% F1 x7 j* c  M; A3 n
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
" Y( `  Z6 D/ |  Q. f9 n& z这是AGV_putin中arrive的method。
: [) V( i3 Q. ^$ o, f! B7 M5 \0 |5 h+ u$ h/ K' k
当到达物料速度越高时,这个报警更多,

3 w% p& H" ?* w* x+ q8 V. \- O  s另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-11 11:05 , Processed in 0.019710 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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