设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7822|回复: 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'
+ I* k3 T( v) ?/ j7 w*/7 I' f% c+ C4 x+ Z+ Y7 ?2 B
is
; G9 e+ A; p) b6 u. t# [) o        part, GlobalDistObj, assignLObj:object;row,Lan:integer;' o4 Y" D8 b' T; ]3 Q" s* s
do9 ?" T- ~+ E0 W  v5 P
        Lan := rootfolder.Internal.Tools.AOLlanguage;
% j, h7 J  }. Z; y1 i7 k8 x        if current = @.Destination -- else return- R. J* `# p7 t" M0 Y
        then
8 C+ j$ i- p  q& ]2 r                @.Destination := void;, {9 p% g; j. ]7 C
                if @.occupied then
( D  S3 R) Y# Q/ o! W                        part := @.cont;
" C- _' Y2 ^. o3 y3 v) ^5 d                        @.transpOrder := void;
& U+ W$ n3 n2 L' I% f3 V7 S9 l                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* W2 `# z4 x/ s- ?+ B                                @,root.eventcontroller.simTime);. g# ~$ ~- K5 T4 x$ B
                        @.HasOrder := false;
3 a& @' o$ }7 L                        @.DrivingHome := true;" j/ g/ w8 o! b& U+ }1 ~
                        rgManager.tryToStartTransOrder;; W; E5 q0 n. p
                        if @.Destination = void9 ?  h. D5 ?. o5 ^
                        then -- no transport order for vehicle @
( x! m8 e, c3 }# D: o+ G9 V                                @.Destination :=8 p) w' k3 b( y0 `
                                rgManager.nearestFreeStation(@,track.~);( K# j: G0 V1 D$ x: E& V, j
                                newDirection(@);   + @  |7 T+ W$ u3 i( T: u
                                if @.Destination /= void then
! i* S3 N# X0 {1 L# s0 f                                        @.Destination.NumReservation :=" l' V( m; v7 q. O9 a+ h1 m( W
                                        @.Destination.NumReservation + 1;
2 `1 \" f/ I) q* J9 ?+ _+ G                                end;
3 D/ Y) d& T; m; y5 r2 l8 a5 p) r; v                                @.CurrIcon := "drivingHome";# U+ x  Q! [' R. [; _" w
                                @.DrivingHome := true;
+ B4 z% ?  j( f- v                        end;& t  R$ M9 Y. n, C
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ ]% _+ D$ F4 |/ ?                        part := @.transpOrder;
% {' z( s4 {! u; I- N) s* z                        part.move(@);-- load part+ D! \/ N2 y" A! _2 f& ~& G% J
                        @.CurrIcon := "load";; f  h! z) F3 V0 s2 C- `1 V( T
                        GlobalDistObj := part.globDestination;
: L  X* t4 j& j6 [                        assignLObj := rgmanager.rgAssignL;
! c' L  m, \8 I                        row := assignLObj.getRowNo(GlobalDistObj);
/ i; `5 t9 m7 z! S. N/ ]                        if Row = -1 then -- since 70, I- o/ U" ?" r+ V6 ]9 S1 U; F
                                if lan=1 then2 y* i( O' B8 @: b0 e. G& @. Q
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) J  ]7 ~: d3 X5 a1 ^                                                to_str("in der Andockstation: \"",?.~.name,"\""));; x: A" g# n" f. c$ O
                                else
$ N. ]( B( ~- K0 w                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) ], Q" B# {1 B. q! `                                                to_str("in docking station: \"",?.~.name,"\""));                               
' d  x) x( R8 K0 j) D0 h/ ]( @                                end;
. ]  Y! f; l, f1 u1 Y) y                        else
( ]& m/ W2 H8 }3 T$ R0 W% i                                @.Destination := assignLObj[1,row];
5 Y& W3 c. c- B& q; P# a                        end;                        ; F7 g# H( v5 k/ D1 r6 }1 q
                        newDirection(@);* u) f( ^0 u* u$ Y( X$ V  _
                        @.HasOrder := true;
% C, P; W/ E7 L5 `4 x; X& g                end;1 l: b' m% z8 b8 B  p( I
        end;: _3 J! I! }. t' A$ m
end;        -- of the method
  y3 a4 S6 b4 A! z
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
% q/ j/ D. g; J8 z( x
. c2 p8 I- M! y* \8 R& M; P+ J这是AGV_putin中arrive的method。
6 A. i. ?3 I1 |) z+ J# {# R3 u
, N$ k2 v! e+ x# K4 F. J5 C' d当到达物料速度越高时,这个报警更多,0 P! O+ Y' J& V0 v/ j5 R6 \% d. H( I; |
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
& Z9 G8 x' c8 a0 c  h2 T5 s0 @5 ]程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?6 t! h* t; n$ ?8 i$ l3 b# w9 S

3 T7 w6 o2 R8 R3 k7 C& h6 P另外一个小建议,就是move,所有的move都可以这样- H8 C: I! U  `, n' h$ t
if not move() then debug end
( {; m7 A6 j4 V5 z这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
2 b! {+ q; U! n* H& r+ g  J! Dplant simulation中的free libraries有AGV模板,. T- p6 U# A$ ?2 d6 g( @
里面也有案例。# b3 h; [0 v0 @
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
0 h% O+ V1 ?. w. J: r, Q% D! C
5 }) ?( Q6 U+ D% v' n: t我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
. N, ]. B8 {* d- }7 D
/ h0 J& `& O* H) }5 n: r& v: I那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ' q+ T. X! e. c# n
这是AGV_putin中arrive的method。, s2 H/ w' `$ [9 F( S3 X5 N2 c
; B9 x9 n9 z- z, m2 i" a/ z5 P
当到达物料速度越高时,这个报警更多,

0 d; E+ Q5 E: V" P) [另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-30 15:33 , Processed in 0.019975 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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