设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6004|回复: 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'
3 M" ^3 w4 @4 ^6 x1 p*/
$ ?: Q2 O  U1 f8 xis; d" Z/ r  L" A& X
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 J8 Q/ h3 P: w# i; V, L
do3 `0 T; ~6 {" F
        Lan := rootfolder.Internal.Tools.AOLlanguage;! E8 W% F7 ]# C
        if current = @.Destination -- else return3 r' C+ w6 j! J  C4 l/ U  @. E  U
        then
6 n  f! e# X6 g* T( C% x0 ?2 B                @.Destination := void;
: F2 E- z* m( D" K! P- p" B                if @.occupied then/ r, E# g7 W  P9 Z( i
                        part := @.cont;
( g5 D: J8 Y& x* s" T                        @.transpOrder := void;7 M1 c- z0 p! K8 O& c. e! s" |
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 F0 {3 Q9 n& P1 |, S  |2 x5 c
                                @,root.eventcontroller.simTime);
' z, i5 |/ O5 k& [9 A                        @.HasOrder := false;3 U4 D9 X  o& f! s$ I& u
                        @.DrivingHome := true;
7 @! n! ~3 ?4 r" l0 t( j; C4 u                        rgManager.tryToStartTransOrder;% F+ r9 P( |$ M* Z
                        if @.Destination = void
4 A8 R- B+ o1 \( J$ [  c0 K                        then -- no transport order for vehicle @( m& O) l1 f0 K  v* W
                                @.Destination :=8 o9 h" T" J0 ^% x5 Z. D0 J
                                rgManager.nearestFreeStation(@,track.~);
: U7 G5 R1 L2 @8 E- S" A                                newDirection(@);   . s3 B% |1 }7 S! R. e( |. e' R
                                if @.Destination /= void then( _9 {. @" ~" I6 X
                                        @.Destination.NumReservation :=; C% U5 j9 x" }9 `9 F: J
                                        @.Destination.NumReservation + 1;$ j3 W3 j8 m' l% C3 Q4 \5 o
                                end;
9 e; n( l! Y. H# l# B$ G1 R                                @.CurrIcon := "drivingHome";% B+ s* Z4 @: G/ U  @2 [6 n
                                @.DrivingHome := true;6 Z* k/ i; W. C& s* H
                        end;0 V) q+ F- i* n) P! o' T% ^
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 N1 C" v/ v# e* D                        part := @.transpOrder;
8 ?% E! A: E: L3 @, c! g+ x8 B2 P                        part.move(@);-- load part
0 G4 q+ g- j" w: X4 E0 E! i2 e                        @.CurrIcon := "load";- ~( K/ I: Y5 n1 C: {" @. X
                        GlobalDistObj := part.globDestination;5 U3 d. U6 h& C
                        assignLObj := rgmanager.rgAssignL;
) |8 O) A- _* y4 o$ P, G                        row := assignLObj.getRowNo(GlobalDistObj);
" G5 I9 Q* O5 e1 ]                        if Row = -1 then -- since 70
5 i2 Z% l8 H- ]3 R' E$ y                                if lan=1 then
7 }, s8 V& Q5 n( R                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- s( N. Z3 u* |; ?                                                to_str("in der Andockstation: \"",?.~.name,"\""));& z$ P% z; N, k) L: a+ a
                                else3 Y7 h# }. w: K+ L- z. Z# S- r8 K/ \
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, a: L8 v" ]" J4 J( h                                                to_str("in docking station: \"",?.~.name,"\""));                                5 C0 O3 [' V% I) X0 w8 {/ q
                                end;
& e+ _5 w" x/ x& M; [9 e, V                        else+ @0 L3 F/ D6 P& `
                                @.Destination := assignLObj[1,row];3 x* W$ a. l- Q% K+ t( A9 d# o
                        end;                        # K2 S3 @! S0 D$ ]/ p& b; T  ~$ {
                        newDirection(@);8 L$ ~5 s7 e; A) L
                        @.HasOrder := true;
* [9 p. V4 t! H7 H# r) U7 e                end;
; m0 s3 g5 ~8 [8 T- u: B        end;; w+ V/ J" A1 L
end;        -- of the method
/ l+ F& i8 h% G, C$ r* R
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
8 E9 t) P6 C/ m* a* V
  B: G3 e2 Z- ]; l) E1 R& B) z8 _这是AGV_putin中arrive的method。0 M1 l# y( u! ]) ]
" H; E. u1 e) [! q% {
当到达物料速度越高时,这个报警更多,
5 A0 D9 c% l( G0 S( j5 N可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
' j9 }/ b! A" {程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?8 B0 S+ \; C5 U, A* Z0 D6 ~" d
! E$ X- @5 g; y; Z3 _8 J+ M& I
另外一个小建议,就是move,所有的move都可以这样. d7 ?! a+ ~: N: k: g& a- H! n
if not move() then debug end
% U7 j0 ~! {1 X  B, w. v( i这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
8 K' W; {5 H; E  b/ C9 {& H- Xplant simulation中的free libraries有AGV模板,
* T% \: X! D$ a" \8 T! T+ Y里面也有案例。
  F4 C& |0 @  H我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。6 q/ {  ^) F# x9 S. c4 O* m; K! s

/ c. U, h# h  A" @: ^我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ) W+ v7 C( ]. T- W
2 j% H6 ]: @3 C4 ~( {4 |
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
$ h3 I9 q  S+ @6 I* I# ^& j这是AGV_putin中arrive的method。
' Z3 V* u5 v! M9 v1 Q9 Z9 h
! b8 D# v6 H: Z8 Z% @当到达物料速度越高时,这个报警更多,
. d6 }! K$ N4 U' n& v3 M8 x6 @
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-12 14:34 , Processed in 0.038298 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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