设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5526|回复: 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'( \' {0 ]0 L2 ]9 ^" y2 s
*/% K7 j. L; y/ j; F; a4 w
is
& X# W  f% U2 P+ \- G/ M1 q2 p        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ D6 L" c6 n" U( G% Qdo
! b' v' S- S( q" e$ ^        Lan := rootfolder.Internal.Tools.AOLlanguage;/ Z/ J8 D; j+ M9 p8 j
        if current = @.Destination -- else return
7 `5 s9 X* }5 e9 D3 s        then
; s- U( \( [7 E$ x1 c- F                @.Destination := void;
$ `8 }0 U* z  F" @                if @.occupied then
' ?( \$ q& ?( Y8 _                        part := @.cont;
' q8 ~+ n( r9 n1 x                        @.transpOrder := void;
2 M. ]& q# `7 T# W% t! R: q                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; g) p, X/ t/ j1 q2 Y# \
                                @,root.eventcontroller.simTime);" W! I" j# Z; U6 f, t
                        @.HasOrder := false;
, {$ [2 x# r: |& O( t8 T# C" ]: z                        @.DrivingHome := true;
: a" S/ a0 x/ R                        rgManager.tryToStartTransOrder;
! v: }! O- P4 B, p+ G7 j1 l                        if @.Destination = void
. t& C; ^' X+ K- _: @                        then -- no transport order for vehicle @
4 D. n  G5 w: O/ |: ]! J; O) X+ {5 u                                @.Destination :=
, U6 B' ~7 ]5 p& r1 W8 b5 m6 f9 G( T                                rgManager.nearestFreeStation(@,track.~);
* z/ W5 z/ s2 N# }                                newDirection(@);   
+ S5 V6 i9 t. C4 ]                                if @.Destination /= void then
9 p4 X8 C" P! C4 G( q1 h# y, W                                        @.Destination.NumReservation :=+ \# w; G2 g5 _9 r
                                        @.Destination.NumReservation + 1;
6 I" y* a+ S) Q) {0 b0 q1 }. r                                end;' {, }% X1 w% D3 U4 W
                                @.CurrIcon := "drivingHome";
% ~* l8 Q/ w) c3 ~0 h  ]                                @.DrivingHome := true;" }' c8 h& y- j( k! J
                        end;) Z* r+ m& l: u+ @  \
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station- X% t, ^9 Z: ?  t
                        part := @.transpOrder;- [! n5 j' }1 t& W1 U
                        part.move(@);-- load part9 \' U. ^8 [- }# Z, o# Y- G
                        @.CurrIcon := "load";
! E, W4 D* J$ L. j- K                        GlobalDistObj := part.globDestination;
4 r# G/ d6 W5 y# V4 c                        assignLObj := rgmanager.rgAssignL;, t) D9 Q( _6 I) g5 c; N$ m
                        row := assignLObj.getRowNo(GlobalDistObj);/ k+ e0 @% ]" v3 ^1 u+ e  S
                        if Row = -1 then -- since 70( H4 ], E' P+ F; R
                                if lan=1 then$ _: [: a7 h8 R$ ]& X
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: \0 y9 P1 `5 v. l- l+ X2 U; B                                                to_str("in der Andockstation: \"",?.~.name,"\""));/ @) e9 O) Q) U4 B5 K
                                else1 X( \6 k' E  a9 r
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 e3 a' i5 @' y9 h7 c3 i7 t) R                                                to_str("in docking station: \"",?.~.name,"\""));                                ) r* |+ S6 C  M7 G" p/ b( D
                                end;
( [3 Q% O0 m5 D; D                        else
7 C6 W1 G# N) _0 g6 w                                @.Destination := assignLObj[1,row];2 u) b+ e" H. L1 ^/ S
                        end;                        ! @4 T- T* e& W  c9 O
                        newDirection(@);
9 W8 V$ R+ G/ a0 l1 O                        @.HasOrder := true;* Z/ F6 r2 D6 ?: b0 W* j  B
                end;9 y) l# b2 h$ ~& f/ n
        end;
( n9 B! {  a& P1 Bend;        -- of the method
* y3 O! |$ _. Y# r# j$ ^, c
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 4 @/ u* Y1 s" Z# P
$ L# y! z0 h: r+ A5 j
这是AGV_putin中arrive的method。% R; U: g1 _% |4 e6 H* H
% k/ E2 Y0 T/ @) m* _* w$ [- `7 U
当到达物料速度越高时,这个报警更多,( e: V# t0 J7 x) c: s& S$ N
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。6 T/ H- j. j+ F2 |* m$ c
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
  v' X; j# U9 y5 ?
) J( {( c0 }. d. R% \& }( y另外一个小建议,就是move,所有的move都可以这样
  Y4 y+ n$ l) S& P( q6 q" Pif not move() then debug end9 X& K9 n/ r5 s4 s% E
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。6 x2 L6 D  K2 Q: J: L2 L" h
plant simulation中的free libraries有AGV模板,7 k+ p5 {# [0 C( `6 w) l9 \! t2 e
里面也有案例。
9 n5 B& m* f! O+ j我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。9 @) l3 b, {7 }5 Y8 f
1 ~# d+ n& p) B
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
& R+ @1 R( m3 {: j5 u) M: W- k2 ~- Z+ ?4 |4 [8 Y
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
$ D3 T" j& f* O6 e& _这是AGV_putin中arrive的method。
* h% C- P. T9 `$ c4 e3 ~& i5 b9 p, H
2 A* f# j) z2 m- ~( {当到达物料速度越高时,这个报警更多,
6 M1 r  q. y. Y  v
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-2 01:04 , Processed in 0.021204 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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