设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7148|回复: 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'- G3 Y9 w( s: S9 B# d9 J0 `
*/9 t1 ~6 j, E- I! ^
is
9 S+ |0 \9 I. f! O2 \5 S& x        part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ s$ q4 n2 d: o6 w! s! V/ I! g
do
' R( K9 a" l6 h) b( \6 B3 t        Lan := rootfolder.Internal.Tools.AOLlanguage;
( O% m' H) i( P* j5 B        if current = @.Destination -- else return
% T3 D$ @7 D6 q5 Z6 z* X        then% D) U6 [7 Q* x9 ]1 t) ]% S
                @.Destination := void;
3 P* {* g+ ]+ I+ R                if @.occupied then- A9 J+ b% C3 W, k! `& \: P' d
                        part := @.cont;; F3 A6 G( T% b6 ~; L9 l, A( s$ M
                        @.transpOrder := void;
' {% g/ |5 Q1 E5 x- |& D8 E                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,  X- ?( T2 u6 ?# O$ H+ L; I
                                @,root.eventcontroller.simTime);& y: v) v: F- p% K
                        @.HasOrder := false;& w+ Y9 o/ b( T2 v$ R. {' D5 t9 L
                        @.DrivingHome := true;
% V- b) b3 y1 H/ \                        rgManager.tryToStartTransOrder;9 g# `' J* d) j1 l6 ~7 ?7 c8 }
                        if @.Destination = void0 i2 N* G5 W* @& p
                        then -- no transport order for vehicle @% j, l5 U: V* E; C  R  o4 l' e
                                @.Destination :=3 R1 k% i5 F& Y/ A- ?
                                rgManager.nearestFreeStation(@,track.~);
2 v0 a8 f/ r  K5 R: d                                newDirection(@);   
8 C6 I- e4 k8 K' D* t/ C                                if @.Destination /= void then
( N4 `/ r5 m+ ?8 ~& h# l, _( H% e                                        @.Destination.NumReservation :=1 V# G2 X. h& J2 N( g
                                        @.Destination.NumReservation + 1;
; T4 H: |# }: W% C* H) J                                end;
( Z' `7 s/ ^& m9 t3 i                                @.CurrIcon := "drivingHome";
& x, X) W: H. E. w! m                                @.DrivingHome := true;; o. e2 L6 h: |# X& r/ g0 c
                        end;
  P0 T1 r( [* _. b' O                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- w% x2 c0 w2 a5 u                        part := @.transpOrder;! W! m: O' n' B# U# v$ X8 g% m- V
                        part.move(@);-- load part5 r# Z2 s( z& @. j; a
                        @.CurrIcon := "load";/ Y7 g9 Y% o5 o* d( i2 |" i$ Y
                        GlobalDistObj := part.globDestination;8 j! Q+ R! y0 |# y' a9 X
                        assignLObj := rgmanager.rgAssignL;5 z( T, t" H: j" d
                        row := assignLObj.getRowNo(GlobalDistObj);8 i  _( }( l. a' i# g3 E
                        if Row = -1 then -- since 70, f) x) `1 D2 J6 {- l1 y
                                if lan=1 then/ w7 d' i% P2 \3 k: \+ a9 W
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& o+ ?5 d7 m  Z; P+ F% o
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
, ~. h: @+ @  f' ]7 e                                else
# O) e0 S4 Q/ z: b. u  i( g: S                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 y- R4 H  F6 [: H: q( o                                                to_str("in docking station: \"",?.~.name,"\""));                               
! q5 U/ ?6 b/ g; B                                end;5 `% P% w9 ^+ {  W1 \
                        else, x& ]& J' a9 Z0 }6 j4 ~4 F& r# e; j
                                @.Destination := assignLObj[1,row];. o8 s5 Z, J* c. ~6 m9 Q7 A+ p
                        end;                       
8 a. C5 |1 V5 |" N" ]+ Z+ v                        newDirection(@);
/ u( b' \  `9 k* W                        @.HasOrder := true;
2 w( o& p  [( q% o" _) Q/ ~  [                end;5 |1 X* k7 T  Y/ D
        end;
# e+ E! y: J* {3 _& e! hend;        -- of the method; @" K: @4 ~  B& P. O( R) D* ~
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 # R9 |2 V/ f6 H' p* m1 Y

. B( v* f' z( Z  p1 d8 E这是AGV_putin中arrive的method。9 }; L! G. A3 N& O

9 B7 E$ m5 T  J当到达物料速度越高时,这个报警更多,: x' {) I/ D& I8 C8 i- Z5 V
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
' W7 J: @" ]9 a/ }: u, w程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?8 k7 u" Y. b& c8 b

, ]8 _/ e7 Z8 X2 {& @8 e另外一个小建议,就是move,所有的move都可以这样& y: F( J6 K- L3 @$ a  b
if not move() then debug end2 n. L! ~% n/ y, y  g# P+ E: q3 Z
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。, r5 f# w+ s& F8 N% U# m/ ?
plant simulation中的free libraries有AGV模板,
- ^; w7 z6 x# e1 P里面也有案例。
# w2 L! ~! b8 N$ J6 n4 Z我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。% _) @& l% c& @( P7 j. |5 D

9 I5 y# v4 C$ c5 |我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 - i/ ^4 h# c' k0 J/ b7 G
1 O5 h" s' N6 \7 q& g6 i; L
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 / Y" F4 ]- h  \  s! N
这是AGV_putin中arrive的method。! z5 R  y: k1 w1 C0 Z

9 X( x$ E4 r4 c( x2 {0 ~! r当到达物料速度越高时,这个报警更多,

, a8 V( s  D9 f/ t0 T. H2 G另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-22 02:10 , Processed in 0.021435 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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