设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6852|回复: 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'9 Z9 G( \2 K* r! Q9 i. F
*/( B( V* h* H0 |- ]# S( J
is
7 Y5 m& h1 R5 `5 {, P        part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 L( H7 Q2 ^7 W  ~+ O% Y1 N0 {; T
do
/ I9 V/ t# V7 L2 P        Lan := rootfolder.Internal.Tools.AOLlanguage;
& S! F/ p1 d) @9 n7 E% ^1 y        if current = @.Destination -- else return$ j! F- w& i/ d6 Q. o( [
        then
' f8 ^4 k! A# t6 ]' |, Y7 p                @.Destination := void;
" }9 O* y+ m) G. P1 c: S) _                if @.occupied then
# D3 T3 p" M/ v! `( M                        part := @.cont;
/ @2 V) M, ^3 E: o# @- K                        @.transpOrder := void;
" M5 o% \) i1 c; Q                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ h/ J  e1 F8 n9 p" k
                                @,root.eventcontroller.simTime);2 ~6 x6 W: q1 g0 v3 i1 h0 X
                        @.HasOrder := false;& U8 F. q* I7 t( C# A
                        @.DrivingHome := true;7 u6 i/ ]1 m7 \2 G
                        rgManager.tryToStartTransOrder;" L1 ]. @: h+ A
                        if @.Destination = void$ q' Q1 ^( R( Y4 K5 Q
                        then -- no transport order for vehicle @, L8 k+ I$ ^1 {
                                @.Destination :=
, }$ @' o5 m2 E                                rgManager.nearestFreeStation(@,track.~);
# a; u3 e3 Y2 |) y- G$ U                                newDirection(@);   ' u9 h9 h# N# X  c% F( I" T
                                if @.Destination /= void then
$ m0 j3 r( L8 V8 Y# {                                        @.Destination.NumReservation :=
% M5 l( H3 Q5 N5 N                                        @.Destination.NumReservation + 1;% ?7 R8 D7 B, J" Y5 J
                                end;
' m0 {- |( C0 u% m! ?# W                                @.CurrIcon := "drivingHome";0 `) o" n7 k: O, r; j$ M
                                @.DrivingHome := true;
, Y0 _: g3 s4 w, \, i( _                        end;) a; w8 D2 q  N5 s9 N2 c. X0 e8 @
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. X! D- @: a8 j# F                        part := @.transpOrder;& Q& p% z( w4 e# I; _% z
                        part.move(@);-- load part! M, ~" D6 _0 f
                        @.CurrIcon := "load";
/ I' D6 ]' J. K1 ?* v7 G                        GlobalDistObj := part.globDestination;  z8 L+ Z& j1 _  c' m; b" h( W( H
                        assignLObj := rgmanager.rgAssignL;
# z. q. h( D1 }/ x# N: z                        row := assignLObj.getRowNo(GlobalDistObj);- T' `' n4 Y3 J: Q3 A, [
                        if Row = -1 then -- since 70
: U# j, B: j; _& X& g* b                                if lan=1 then0 v# a2 n; D- R4 L
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. }+ p. Q* @) J+ S% f1 j
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
9 N- v. F: n( X$ L: g0 C                                else
% X$ O( i; I# |* e# }% h                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 |  @1 T1 c3 S& h2 Q3 ~9 |8 y                                                to_str("in docking station: \"",?.~.name,"\""));                               
' k3 z- M0 Q! L' q. r                                end;; s1 u' F! \3 ]; X4 J: E3 r
                        else: v0 k% b3 ^2 H8 N; m
                                @.Destination := assignLObj[1,row];
, t+ [; q+ s& c                        end;                       
& Q2 k4 u8 G( d$ Y3 G                        newDirection(@);
$ S) K' S8 E$ w/ |5 W) b                        @.HasOrder := true;- J$ T2 p* v/ W2 H4 B# X
                end;' J# Y4 E: l! `, Z
        end;# d: u" F# S0 W" N- Q# \9 S) ^) ~# S
end;        -- of the method
6 M! f- ~+ M  c6 W0 I
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ! T  k* B0 a7 w( k/ i3 J2 S4 X& U
: a: D" m7 w5 o* k
这是AGV_putin中arrive的method。
) Q" q1 T5 W! n* a: F0 C# N0 A# j7 ], [
当到达物料速度越高时,这个报警更多,
3 d9 U7 [7 x! S' [+ o9 r5 F8 q可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
" I% D6 J( W  C2 R" [程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
" p/ ^* ~5 V$ h3 y: J' _7 |
" T0 G3 t, K! r) G0 F- |另外一个小建议,就是move,所有的move都可以这样9 j2 y# ^" O7 p: d1 r4 O
if not move() then debug end
* v' Y/ L; g$ ~$ }" I5 w/ j这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。- r9 V0 S/ r1 @/ s
plant simulation中的free libraries有AGV模板,
+ r5 M! e' r: |% h# U; G1 @4 y9 a! t里面也有案例。
& Y  y4 k# K; Y1 V我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。( F% K# E/ l0 U9 I9 l

6 u2 S% r) ^  Z. `我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 3 T7 K+ ~" L  s0 [; u/ ?

; t: i7 M+ r+ Z' r那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
8 I. @6 E; @2 T" O' F这是AGV_putin中arrive的method。
) F! v  x: W9 d: N4 S1 ^  A3 S% ?2 Z1 ?2 e+ d8 F
当到达物料速度越高时,这个报警更多,
6 C) o. ]) Y5 |
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-2 14:27 , Processed in 0.020890 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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