设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8056|回复: 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'
5 _8 N, m, S; X+ v0 w; m7 C*/
  y7 ?# @* U4 lis
: s' x! F& I7 r4 m5 P# q& \% ^        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 b& K; }7 E8 Z* r6 T: X) Jdo" Z) m: ], ^+ W/ R' H
        Lan := rootfolder.Internal.Tools.AOLlanguage;
2 h2 @' i* x; m2 q4 T        if current = @.Destination -- else return. J* d$ o5 P! N/ W8 l( D
        then
$ B0 p) L; s1 t' `( w8 Q                @.Destination := void;% f) m) @: T; v; H
                if @.occupied then; ?, Z# X5 {( q7 p
                        part := @.cont;# E3 I1 O; \# T- }
                        @.transpOrder := void;
( }( U" u& I1 |7 K: I                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 h% c3 ^0 q& q
                                @,root.eventcontroller.simTime);
  p; {$ X  @+ U; U" f                        @.HasOrder := false;
# [/ o" J5 W7 |" r2 L                        @.DrivingHome := true;( b* C1 k2 E( R& O$ N/ d/ e! W8 `; r" k
                        rgManager.tryToStartTransOrder;$ @8 P% f7 ?3 ^, \
                        if @.Destination = void
- i6 |! [& o  R' `8 b( t2 C* B                        then -- no transport order for vehicle @0 N' U5 K2 |/ J/ q* |8 A4 G
                                @.Destination :=& ?8 M: r: ?/ S
                                rgManager.nearestFreeStation(@,track.~);
, u0 c/ k8 \( P* h' |                                newDirection(@);   
$ h: P9 ?& H# N0 Q' P                                if @.Destination /= void then
8 i3 X! s$ E* Q- M                                        @.Destination.NumReservation :=4 b" f, N9 @( I, ]! g
                                        @.Destination.NumReservation + 1;# C5 d; G2 }% W% k, @6 D0 W6 N
                                end;5 _" d9 @% ~8 h
                                @.CurrIcon := "drivingHome";
- a( t9 l  {' l, b* ]3 _                                @.DrivingHome := true;
0 s, J" F/ ~7 M- v; f+ a                        end;
5 {" ^# L; G: l5 r0 q; y- C5 R                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# z. V/ a* U+ s; X                        part := @.transpOrder;
8 F9 l1 X5 K: o4 o9 P3 ^                        part.move(@);-- load part
2 b0 g! }0 l3 ?                        @.CurrIcon := "load";
9 X) @2 X# Q5 i                        GlobalDistObj := part.globDestination;
4 g7 a% {1 O; ^! a# T/ V                        assignLObj := rgmanager.rgAssignL;
6 z3 Z1 g% `5 w" L/ J; w+ Y0 y8 W3 P                        row := assignLObj.getRowNo(GlobalDistObj);
4 F8 ?8 Y: ~8 b                        if Row = -1 then -- since 702 e0 T, V5 ~2 n$ @; ?5 D9 R9 H! n
                                if lan=1 then* ~( Q; G, f1 o+ L' U; T
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* ?1 h7 ?0 d, }) v$ P1 W, N                                                to_str("in der Andockstation: \"",?.~.name,"\""));
2 F" R0 A/ Q: e9 J* Q- K, [                                else5 y& l" b6 a3 I
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* X% `3 I1 g6 s5 j+ {! `( U
                                                to_str("in docking station: \"",?.~.name,"\""));                                9 I4 y- ]! O2 q+ l2 E+ `
                                end;
! l* \: B( Q* M, l/ ?. y! J" n                        else
4 g0 w! F  {# X* k) o5 H                                @.Destination := assignLObj[1,row];
7 e2 @. f3 O& ]# u: v4 j" Z2 h                        end;                        ) U! [- G# L8 D' g' b  J/ e, s9 Q
                        newDirection(@);% m0 T8 U; v" n3 _( k/ |+ z: J
                        @.HasOrder := true;
  e; y8 x8 f+ ~7 |                end;* {# i9 I6 V$ L5 Q: [  C. x
        end;8 r- \' m- `* U* Z
end;        -- of the method( p# i" m6 X" ?) O/ r
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 0 j& v* [7 f3 e9 U- M

5 b% X0 F0 @: z6 X# ~0 Y9 i这是AGV_putin中arrive的method。
2 Q0 L9 e  W9 o0 Y4 O: j1 e  S4 U. Z3 ^1 r, t6 y* k
当到达物料速度越高时,这个报警更多,9 V# H7 O( b: d1 O% n$ F* F; V6 ^
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。# z* v8 @; T* M1 T( [
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
& _! v& d4 Z- d  A
5 f! ^/ W& p) z. u另外一个小建议,就是move,所有的move都可以这样& X- R1 ~- z" y# J; A0 m
if not move() then debug end
; |9 G4 z/ \  H" J. J4 ]这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。% T' e# P5 Q6 q# m$ ]" I' r& @) k5 E
plant simulation中的free libraries有AGV模板,* k& ?- l7 g2 ~7 k+ E2 u
里面也有案例。
0 z( `; W; ]4 O我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
/ y5 z. J: z, c; \1 U" e
! h& M& m) `3 P) v$ m$ P我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
; C' C$ Q; F* b# A0 t4 i. S% f" y- f# s7 E( T, P
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
: b% }5 d. g' C1 O3 \2 L& g7 x. o这是AGV_putin中arrive的method。
# _6 I; G1 H: z( l7 K, x: g+ `" q2 W
当到达物料速度越高时,这个报警更多,

: ~: T' J3 h: J另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-13 03:24 , Processed in 0.019014 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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