设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5956|回复: 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'( O9 g+ k; z& ^; k: x2 i
*/
2 j9 W2 V! v8 k) ?+ Yis
6 d1 v" `% N/ `/ D3 l9 z5 W        part, GlobalDistObj, assignLObj:object;row,Lan:integer;* i8 H  k/ Z1 T* f
do3 L- F$ W. h' _/ |. `" @( ]
        Lan := rootfolder.Internal.Tools.AOLlanguage;
5 G& e8 f$ l% U5 z/ s4 h        if current = @.Destination -- else return
$ t) I1 ]4 J2 M/ e0 M9 K        then9 s4 v  C" _5 \" H1 u4 i  u6 F
                @.Destination := void;
, c% j9 S3 }! i- a* l' ~) T+ C7 ~                if @.occupied then
  E- }# l! p5 k# g5 q$ y                        part := @.cont;
7 P& r/ B1 Q# ]2 ]6 A                        @.transpOrder := void;# d/ f- F4 R& g) j- K+ j
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) M/ f  T1 m9 W$ `                                @,root.eventcontroller.simTime);
+ l) Q# k  Z, H  A9 T! E                        @.HasOrder := false;
. g# D5 C; F. S# R0 g' q* [                        @.DrivingHome := true;/ \: R! [- ]4 j: B: T; z$ A% ?1 T
                        rgManager.tryToStartTransOrder;# [8 y% J1 K& _5 u( m' D
                        if @.Destination = void
: e0 R6 b& l% d3 p5 `                        then -- no transport order for vehicle @' m) J# ]: k, J# ~( S
                                @.Destination :=$ G: k: V4 w  A  t/ y3 }: Q0 M" Y
                                rgManager.nearestFreeStation(@,track.~);4 m7 i' s) B* C! x8 I! o+ t
                                newDirection(@);   1 T# m/ A! i( R3 t. B; z" ]
                                if @.Destination /= void then1 b8 u3 d( g3 h, S4 Q. f
                                        @.Destination.NumReservation :=2 s' y/ r  @8 ^) W7 g
                                        @.Destination.NumReservation + 1;: }1 b: P5 T: U8 U) z
                                end;
4 d* |/ M0 ]# _                                @.CurrIcon := "drivingHome";
, j! l- _2 ?2 [1 p+ Y( |$ M" L                                @.DrivingHome := true;
# A3 O* J/ [9 w- {$ P  E                        end;- [5 r! e& X, y4 K9 Y" m5 j% S6 z0 b
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, Z6 h, d1 d+ I" i, a9 e3 _' ]                        part := @.transpOrder;
" d) s( v& f- O1 i+ V& D                        part.move(@);-- load part
: d; R; W2 W" {' F0 r5 H4 t                        @.CurrIcon := "load";, S8 }! E; v$ {# t$ W! L
                        GlobalDistObj := part.globDestination;
1 O7 x/ H5 Z/ K  p0 b- K! l6 I                        assignLObj := rgmanager.rgAssignL;- Q- W) N$ E4 V
                        row := assignLObj.getRowNo(GlobalDistObj);
- g. O' O+ E  H+ K                        if Row = -1 then -- since 70
" }" E+ v0 j4 B! j" l& L2 e" d                                if lan=1 then; I% g) i, _9 W: h3 _+ R. j
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 |' N% }/ s0 Z                                                to_str("in der Andockstation: \"",?.~.name,"\""));4 v3 G  r6 e* o6 n/ T
                                else
6 z) M; W: x2 q/ J& H) _& B                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% F  j6 D- f8 H8 v                                                to_str("in docking station: \"",?.~.name,"\""));                                ! ]/ }8 ^  y( E- g
                                end;
/ G6 S6 L" T; |: a9 I1 ]! Q                        else1 M2 `( b. g1 Z( d9 X+ P9 c- E( v
                                @.Destination := assignLObj[1,row];3 E* D4 V( O5 C8 M
                        end;                        ) z( f4 {6 d) W$ {" u
                        newDirection(@);
( H" `/ G: ?, X3 r                        @.HasOrder := true;/ C( [* R+ x' W. |4 Y6 w
                end;
' Y+ v! u3 |$ r" N        end;
/ Z  e7 G4 U5 s' f( j6 _: p! Bend;        -- of the method
& u+ B1 l$ w3 r5 [4 m0 h
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 4 J& _! {1 W- F2 O/ r

- l2 k! n, L% F+ s' V& f这是AGV_putin中arrive的method。
, ~$ s3 c: @" a" S, }( S! k. k1 k- ?% t  a! x# n: B
当到达物料速度越高时,这个报警更多,' L/ t. y. x2 h* K. t: Q& d' f( y" }
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。2 T3 _' Z6 }- R$ T
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
; v' p* J5 t4 {4 N/ \4 R. N& w4 ~5 f% q* l( ]
另外一个小建议,就是move,所有的move都可以这样5 |8 _" w' _3 D$ Q
if not move() then debug end6 t8 D: Y# \  b+ E# \- d
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
/ R2 b! |% f8 _9 k* ^9 a9 J7 Mplant simulation中的free libraries有AGV模板,
7 a3 j3 p. O6 p  a里面也有案例。
: d- y6 E  F7 y) R我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
. s  k! [5 Q9 ^  }
2 h! r. k* k  v% V) ?5 i& t; z9 U我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
4 e' u& ]1 S9 d% r% [- ]9 D6 @' z" o! V- _3 D6 H' L
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 7 M5 t2 ^8 r+ q9 ?" d
这是AGV_putin中arrive的method。% E2 A! e1 Y, D7 D# {6 L, ^
* |  L1 ]9 V9 B4 I  @' c+ F& _
当到达物料速度越高时,这个报警更多,
7 d8 P' J5 H; G5 ^' h
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-7 22:52 , Processed in 0.020775 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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