设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6480|回复: 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'7 L# U: S  M2 z" f0 \
*/* d  D; ~6 Q# a0 G: M6 P
is% S, x( l2 \+ j4 Q
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" H- r! Y5 U" r+ [: ~* o( Ldo
, t* ]9 i1 D2 W. t# U* ?$ H7 M        Lan := rootfolder.Internal.Tools.AOLlanguage;
# `4 S0 Z1 H6 K/ T' U: ]& O3 O        if current = @.Destination -- else return, s! j& S. z( n% _
        then. I/ ?; j) Q0 k3 F$ g+ b2 K" w
                @.Destination := void;
! `) t  ^7 c0 f) }, l                if @.occupied then
  v8 J0 z5 w( V* ]$ W8 o                        part := @.cont;8 ^8 t; P; d/ c8 f9 ?& U
                        @.transpOrder := void;8 Z& a8 Q$ s4 k& W! V( {; S
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ I/ z; g/ l( C$ T% Q: k                                @,root.eventcontroller.simTime);
* b0 A0 e" S& s0 p/ k( H                        @.HasOrder := false;3 r7 _" B( m& @3 @9 f4 |
                        @.DrivingHome := true;9 z) }# m/ G, I' Q3 s2 N
                        rgManager.tryToStartTransOrder;
. g) V: Z7 G3 ]                        if @.Destination = void1 n% j9 j  L" _$ n& L' l8 H
                        then -- no transport order for vehicle @
1 V. x' T$ Z( x- a' m  {6 D                                @.Destination :=6 S* T4 {5 j$ d6 R5 P9 J
                                rgManager.nearestFreeStation(@,track.~);
5 `4 ?# G- |. f0 {0 |4 u: s                                newDirection(@);   " b& {* g3 T; O
                                if @.Destination /= void then
( s5 a  q- I" J9 D/ L5 y4 p  A3 D                                        @.Destination.NumReservation :=
! S; |% F; l; K% l: u                                        @.Destination.NumReservation + 1;( b1 F! V7 S- |* X* C' W
                                end;' _5 y5 K3 `* d# ^4 v; n5 m! C
                                @.CurrIcon := "drivingHome";. |4 F( s3 G( Y, r9 h+ v, b, s  s
                                @.DrivingHome := true;
$ X. H* ~% V0 Y/ ]                        end;$ G+ w' K- V+ Y2 X3 A5 G7 T
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 o5 d9 d" l7 M$ V7 K- l
                        part := @.transpOrder;
( n: ?2 u) X  Y4 V! b! l9 F                        part.move(@);-- load part9 ~2 t+ ^' z. g- d( [* b
                        @.CurrIcon := "load";
" S2 N; E4 Z. X- S! y0 X, Y                        GlobalDistObj := part.globDestination;! K4 ~* |) U8 K( J
                        assignLObj := rgmanager.rgAssignL;
* N5 s8 R; D& R% |                        row := assignLObj.getRowNo(GlobalDistObj);
# B3 P/ b& l! Y  Z$ N5 @                        if Row = -1 then -- since 702 L) k/ w0 l6 Y
                                if lan=1 then5 C2 i1 o4 ~! f+ F
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 y1 z( U: z# p" ]
                                                to_str("in der Andockstation: \"",?.~.name,"\""));# C0 f  G" x( ^; {
                                else% z" H) {+ P2 h& W
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) D" V& P: @6 T, k                                                to_str("in docking station: \"",?.~.name,"\""));                                3 g, @0 x0 W- x9 }
                                end;9 V6 Q' @6 ^  q; Z* h1 ?( A
                        else
0 M+ |6 p( ]. ^7 k& [$ B                                @.Destination := assignLObj[1,row];$ z) @) P+ s6 U: f5 I
                        end;                        : c) X4 H+ }. y  I
                        newDirection(@);
; W' x. b9 M4 ~' Y/ I                        @.HasOrder := true;6 C; q' ~5 ~" M/ }5 q* ^
                end;
6 u/ T, J0 \% N) n        end;
* @# b) M! e+ r% I  T# Send;        -- of the method$ {; J1 c4 c+ r9 z, |
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
* \. @) \7 h+ C1 W6 ~5 G, Q' D6 `0 E% M" Z9 }# ?
这是AGV_putin中arrive的method。
- ~+ s% H9 S. t2 d; ]5 P/ b6 Q! e* r2 _4 j4 H! Q3 A8 p$ V
当到达物料速度越高时,这个报警更多,  J/ H9 A: b9 g7 L
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。$ k5 e! A8 z1 L
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
% H( y: _( o, R2 }/ }& O6 _" T: [# @% N6 F2 g- W* A- O! Z
另外一个小建议,就是move,所有的move都可以这样4 \9 l- S( |+ l4 n
if not move() then debug end: |/ \& a/ O) o, R9 g. X
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。* m4 v' [3 R5 ]5 N0 t
plant simulation中的free libraries有AGV模板,, u2 ^& c/ X6 o
里面也有案例。
2 p: Y0 R+ V3 \  @$ w0 f8 {$ N" r我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
. T/ @- |  O3 ]/ z; A* d6 L
1 m8 W% B3 X- x1 P# q我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 R& z9 x: u* C* _# c
4 e& g, ^! T  N, t6 W那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 # f0 `. ~: S" c- g+ c
这是AGV_putin中arrive的method。4 K: B  r- N1 ?

3 y1 z& {1 F; N当到达物料速度越高时,这个报警更多,

5 [) k4 J9 }8 z/ x3 K4 _1 m% v另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-9 06:54 , Processed in 0.017457 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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