设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8395|回复: 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'; H* S. |( r& h0 x
*/
2 a" i* o5 c6 h! x- r4 m2 Tis
2 y$ x+ e( w% o3 S8 M        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ @3 @9 |: R/ a, N% Ydo* O6 q( G! u: @
        Lan := rootfolder.Internal.Tools.AOLlanguage;) [% n& ?. Y  ?$ d7 w8 a
        if current = @.Destination -- else return
5 P( z0 g# K" H1 O        then
( }3 p( u/ T+ W4 q2 o3 u: o                @.Destination := void;4 d) N. z( a' x, z% p
                if @.occupied then
# a6 p2 b  m4 b! Y3 c% r                        part := @.cont;& ^% }  P- d4 p; U& f
                        @.transpOrder := void;+ p+ s" |& e: _* S
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: c9 ]6 `2 D0 T; P% }/ }+ G2 s                                @,root.eventcontroller.simTime);8 M' |$ \0 ^. u1 k# p! B4 t
                        @.HasOrder := false;# G/ b  e  R- d. I9 O3 }( `& L) f7 \
                        @.DrivingHome := true;
$ k' \7 L4 `$ V) O: V                        rgManager.tryToStartTransOrder;/ B# J3 i, {: J1 H; I/ Q
                        if @.Destination = void
* s6 |$ V( X1 [  R$ K                        then -- no transport order for vehicle @" o0 r, A' f8 J8 Y5 D
                                @.Destination :=
% ~1 P. V& `/ S                                rgManager.nearestFreeStation(@,track.~);% k6 O3 R* i# v$ [
                                newDirection(@);   - J1 k4 Z& T% J( p8 K1 `
                                if @.Destination /= void then7 s$ q/ J# J( j4 _; _3 J2 R
                                        @.Destination.NumReservation :=  V5 r$ C0 Q: K7 J
                                        @.Destination.NumReservation + 1;
. A1 f" R, Y7 ~                                end;
0 _, r8 E! ^; X/ j; T4 W                                @.CurrIcon := "drivingHome";. s( P! \0 U0 w1 l: K
                                @.DrivingHome := true;
9 b$ ?2 n1 D0 g                        end;
5 G: d/ N& W; G- T% [/ J1 t                else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ H0 [4 D( j- _2 L1 Z6 f& V1 Q2 X
                        part := @.transpOrder;2 \6 A9 V5 \0 h
                        part.move(@);-- load part% U6 I3 u/ |. |! H: z
                        @.CurrIcon := "load";
0 ^+ j. X' l( ~1 U0 A$ a                        GlobalDistObj := part.globDestination;
5 H' B% {8 E, t                        assignLObj := rgmanager.rgAssignL;
; O% \* x9 d3 o; T. e9 C) m                        row := assignLObj.getRowNo(GlobalDistObj);$ g+ I- x7 g8 c
                        if Row = -1 then -- since 70; T9 U8 c0 L' W! d7 P4 ]/ g
                                if lan=1 then
) |/ t( \1 |/ W1 [6 f' `  s                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" s/ K$ Y0 {6 F( Y4 Z) f$ P1 m                                                to_str("in der Andockstation: \"",?.~.name,"\""));
) o7 v* p% y5 A2 j                                else2 J& v" S. h7 T. t; O
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 S7 L4 L7 P; Z$ g                                                to_str("in docking station: \"",?.~.name,"\""));                               
' i2 L/ s$ ?5 w* I% N! u                                end;; V: \$ A* n: F0 {- C, o
                        else
/ h* m/ K/ x5 i. p$ ~9 p9 a4 L                                @.Destination := assignLObj[1,row];1 H$ P) H+ G- }/ [. A$ g6 G
                        end;                        6 X0 Q' D$ V1 @. J
                        newDirection(@);
+ c; b% A# N$ |( q                        @.HasOrder := true;2 ~, X5 O8 J# S& w
                end;" m; [2 ~5 s) o8 Q: e) b! S) O
        end;
( Z8 }8 C$ t! p9 \6 jend;        -- of the method& j6 U$ q. X" q$ v0 S" r
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
6 M2 p5 I+ f/ p1 Q) B+ g
; ^7 \) i( k$ M这是AGV_putin中arrive的method。
3 ?$ E6 ^/ k# K0 Q& f/ X
2 q8 c7 m$ |! B当到达物料速度越高时,这个报警更多,4 _( S) U5 V, l
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。* c$ j6 M) P" q: T
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
. n% B5 U! Q' s& ^& x! U) D; G  v- T! i8 G, A: M/ l
另外一个小建议,就是move,所有的move都可以这样
7 C& [: p4 l% u3 zif not move() then debug end
5 k0 `- _5 I0 B8 p% f; Q- C这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。. ~# s. B2 P/ E
plant simulation中的free libraries有AGV模板,; p! c! A5 P1 X' Q! a. s
里面也有案例。4 V9 i8 a9 E4 b# t0 v  Z
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。7 P* d& C( h' r, q& W. C
+ e% d# g* ]7 J5 Q; U
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 8 i  ^( N+ h( H' _
# m4 F! G3 V6 r' z3 j% G' l! b6 S
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ' T# c( ]6 o: ~  R
这是AGV_putin中arrive的method。( a" G9 j) n2 ~& f0 C5 c

4 N  w  V" J! E当到达物料速度越高时,这个报警更多,

2 J. A9 ]; h7 [- N1 S# k另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-1 10:25 , Processed in 0.016218 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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