设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6439|回复: 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'" s: T+ o# c' Q% X* ]
*/3 O: C, A2 {" z4 M
is
% @9 \0 B. q# R. `6 g- ^" i        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, l7 q1 {- W! `/ e) \+ ]. N* ^do
. @: L) ~& c4 Q7 b, P# \        Lan := rootfolder.Internal.Tools.AOLlanguage;
  f1 {( B& ^, g  h  ]. i# M        if current = @.Destination -- else return1 h3 u8 l- O2 O" h# ^
        then
6 N' u. Y6 L0 b8 f8 E4 k; r, D5 x9 h% ?                @.Destination := void;% M) }) {' i# ]1 A; g+ H( ?3 C
                if @.occupied then
" g6 k; f$ p5 n7 X, e- @                        part := @.cont;
+ t: r5 G$ p# j                        @.transpOrder := void;* }0 g" i! h2 D1 v; E" D" ^% m0 H% Y
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 N% F0 o2 c' f' b% f6 v
                                @,root.eventcontroller.simTime);1 r' G8 h& ^" Y5 ~0 H) }0 Y( X! o1 j+ D
                        @.HasOrder := false;
4 y! f+ D) L) `: G9 [) ~                        @.DrivingHome := true;9 [( k- w! ?* F3 w: s& w
                        rgManager.tryToStartTransOrder;
: F( ?, u8 |- M                        if @.Destination = void
# }) a- l  ]( Y                        then -- no transport order for vehicle @. a4 |4 \: r* F' B3 j7 C& n
                                @.Destination :=; s# [4 |' Z" H. B8 |
                                rgManager.nearestFreeStation(@,track.~);1 }& p  _: ?3 S3 ^" F( f
                                newDirection(@);   
! T0 k: k; Z- M! h                                if @.Destination /= void then
% t( N( O" P. T+ k! t                                        @.Destination.NumReservation :=4 n! ~# L. l* Y1 u# z, X
                                        @.Destination.NumReservation + 1;
' o$ Y8 H( d; b5 n8 r# C                                end;
: \* h& a- l' c( C1 R1 _                                @.CurrIcon := "drivingHome";
! E+ {: K) |# J& b# ^2 q3 K. A1 u                                @.DrivingHome := true;  t$ }$ ~" n5 n# u; u# X
                        end;
) n3 ]9 A" ]/ R' z) x$ g                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. X) c* J0 z! _6 X! W                        part := @.transpOrder;+ ]) W. R  S$ E4 D; I: V9 k/ {9 v
                        part.move(@);-- load part
7 F' J7 E" p/ L2 I" o  h                        @.CurrIcon := "load";1 [! p$ ^' t2 V( N3 ~" N5 ?8 L
                        GlobalDistObj := part.globDestination;2 S8 M8 G- ?! _( N0 F- {1 |# i( v
                        assignLObj := rgmanager.rgAssignL;
( }! b7 q: a) P/ y9 h                        row := assignLObj.getRowNo(GlobalDistObj);" t' W2 i% O1 B, i
                        if Row = -1 then -- since 707 H* i+ f; t# c7 o6 J2 Z
                                if lan=1 then
* Y, l0 S2 d7 p8 z7 t: z0 V3 _, ^                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 }* R& H9 g: n. A1 Z
                                                to_str("in der Andockstation: \"",?.~.name,"\""));& m4 Q; n& F7 l& S% M2 K& e
                                else
3 s% V6 @6 n$ j: g" g. n                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 F' {( Z1 [5 K+ I! h8 I" r6 v                                                to_str("in docking station: \"",?.~.name,"\""));                                ! n! Z; G$ d% v+ f9 U& [
                                end;
' A0 c* V) m# c) O3 N                        else
) D) B6 {3 ?$ E' H0 E9 r' M0 ]                                @.Destination := assignLObj[1,row];: a; {1 C5 x! f% |/ O/ z- L
                        end;                       
  j  D# Z7 @4 S0 {! A                        newDirection(@);# h) L, E) g( j6 l3 {
                        @.HasOrder := true;  U4 d+ c5 L+ I- p- U; u
                end;0 \; m4 e! c+ t+ T% v1 _
        end;( H3 b  P; `5 |2 t
end;        -- of the method
- k# _0 D& Y( v6 K2 L' q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
) G- [" k" n% [+ H7 l9 r3 D
5 d7 Q- [: \6 f2 `0 |7 A: `! G这是AGV_putin中arrive的method。
' z: K  x( E% o! G) X/ c  F: O+ _5 ~" ~  }+ g# Z
当到达物料速度越高时,这个报警更多,
8 ?- G" O) J5 P可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
6 I) H' B+ I3 W9 Z程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?# d6 u9 j& f6 y9 v0 s
/ c  o; K3 _4 H* u2 G* w5 a& f- Q
另外一个小建议,就是move,所有的move都可以这样- y. T, ], [( T2 R3 w$ X
if not move() then debug end" P1 S! p- i6 k* x- Q1 _
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
) y/ V/ r  q+ V( Q0 Uplant simulation中的free libraries有AGV模板,
1 V. Q/ P* A. o! L) Q里面也有案例。4 ?3 }2 D. i6 m. M& [
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。3 w7 B5 d: L+ l( S
; w7 \+ b1 u, a% Y
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 " G' e& {. B5 O& x" @3 m& D. o
( c  f! Y+ j$ C; J  @6 m/ i& ~
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
6 N' H( Q3 Y$ u3 v8 ^/ |2 e$ q这是AGV_putin中arrive的method。1 u6 k' q9 V% H1 E2 E

1 M0 T/ h% D% l' b当到达物料速度越高时,这个报警更多,
7 j  O/ k5 C) ]6 b; `
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-6 19:20 , Processed in 0.020072 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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