设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9173|回复: 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'
( Y8 y2 W( r' c0 G9 Z*/
- ?  z5 V4 r# t$ N6 D$ v1 V! qis
" Y: |$ c4 ~# H8 a8 @        part, GlobalDistObj, assignLObj:object;row,Lan:integer;; \3 }9 E5 r  l4 U  L9 T1 j
do
& n7 X# N2 J: q* P& w2 t# T+ f8 O        Lan := rootfolder.Internal.Tools.AOLlanguage;% m8 }' E' D" i
        if current = @.Destination -- else return( \9 ^: U  Q" J
        then' F2 b  ?0 o' z6 t  S( t4 B2 [* V
                @.Destination := void;
2 X- x: T( ^# S$ l0 r                if @.occupied then
# G" i- F/ z9 S/ ~5 V( _- G. C% W( d3 V                        part := @.cont;
! V& f1 g; N7 ~, R                        @.transpOrder := void;' R; k$ l: t" b
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ Y6 B9 j. q% }+ A) w
                                @,root.eventcontroller.simTime);! [8 C* p( k8 p; C) ~
                        @.HasOrder := false;+ ~5 U0 Z$ W$ y; P
                        @.DrivingHome := true;5 I5 ?* {6 p$ Q% J; f
                        rgManager.tryToStartTransOrder;
# p4 `0 ~+ N5 P+ C# M                        if @.Destination = void6 o# X- M- {  v. R) ~: h* p7 ^0 e
                        then -- no transport order for vehicle @
9 e: F1 Q) D- ^* ?0 L( B7 c' `! I                                @.Destination :=' \3 k1 [, k' o+ n: {
                                rgManager.nearestFreeStation(@,track.~);9 |5 j( Y# v4 ]* I
                                newDirection(@);   
# }5 D' d, x/ Z                                if @.Destination /= void then
& h& M$ P% w  u+ a                                        @.Destination.NumReservation :=& [5 U, z0 L1 u# q" k0 @: i
                                        @.Destination.NumReservation + 1;# y7 Y) e: {+ s1 `
                                end;
, P# D- g2 {# W& k4 M  I                                @.CurrIcon := "drivingHome";
. E2 Q7 Z" J, V& [& _- }! Q# Y                                @.DrivingHome := true;7 q5 y* M) }" h5 p
                        end;
% R) a8 O5 n) E                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 U) s! t$ K* |+ J                        part := @.transpOrder;' l& }" l) B$ b' Q  _9 W, ^
                        part.move(@);-- load part
+ F7 X0 H9 c( Y1 ~/ g/ W- e  N( J                        @.CurrIcon := "load";
; d9 }$ h; P+ a" t! y                        GlobalDistObj := part.globDestination;0 h' I& C2 A* Y* s' I2 }
                        assignLObj := rgmanager.rgAssignL;
8 a6 s, ]' w% i8 O6 i                        row := assignLObj.getRowNo(GlobalDistObj);# U+ g* I) m. m- O, @0 q+ C0 F1 ?: ]
                        if Row = -1 then -- since 70
& y# e% A# m3 B  z4 c7 Q. w                                if lan=1 then4 v6 z' B7 T0 x
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ b% P, a. r! I  @+ E# I9 b
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
3 W; f/ {: s$ ^+ F$ V* a0 G                                else: |4 }; @8 Z" r, `! f
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. ]2 c; Y/ I$ o, H# N4 R                                                to_str("in docking station: \"",?.~.name,"\""));                                , f$ _3 w. W+ _4 I4 o
                                end;8 a( R0 R( A5 v0 e; }2 H
                        else1 s0 X1 K1 l: G% x$ n( K
                                @.Destination := assignLObj[1,row];
. L, k. D: V! O# B, N                        end;                        ! d% Z' q8 v6 P' y; @* I
                        newDirection(@);
/ |9 k+ v5 C' @                        @.HasOrder := true;
- b; S4 F) a" k( n3 N$ M                end;3 z( `0 p/ }3 G1 a9 A# e- N/ m/ R
        end;) ?% U: T( |! D1 g0 A
end;        -- of the method
: \. W1 W% O' K4 V) l2 {' o
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
1 f/ r, u! u) T2 m! j
  z* o4 L) z/ \) j( K$ P, N- S  o这是AGV_putin中arrive的method。+ H; O& g: M  b' t* N. L5 i0 M% ]

" z% c) H. X9 _% t* i0 Q当到达物料速度越高时,这个报警更多,
) ]/ u9 d4 r6 P" U可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。% Z' O6 G) U# N' i; x6 k/ h4 h
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; R3 I2 m+ {2 C, r6 L' |1 ~

  U+ C$ H$ a  F* l8 K) \* Z# m另外一个小建议,就是move,所有的move都可以这样
" l# b1 Z* Y$ c$ J% h" _$ ~" \7 |* nif not move() then debug end" U/ b2 ]( Q# c/ e: x- @6 ]( b$ w
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。( x: I6 K" N: [2 C+ s: k$ G# |" }! A
plant simulation中的free libraries有AGV模板,5 ^$ p& i4 Z8 \4 ]' X3 Z
里面也有案例。- x6 F! u" R5 v
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。* @" Q  u# X7 Z: {# ~0 h* G
) j  _1 Y- T' |5 g6 n; n% z+ p
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
. P4 \/ S0 V5 v( x6 j
5 B6 E$ ?4 _' p, ]那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
; H* a5 s! h+ \1 @这是AGV_putin中arrive的method。( U% \1 k* X3 J9 I8 }* H

# s( O7 O0 t& {# `/ P' U当到达物料速度越高时,这个报警更多,
: l) h1 C4 ^! r$ ]
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-17 20:57 , Processed in 0.016997 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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