设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8308|回复: 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 D, F* P8 t9 b
*/# N& |2 l# [7 E; u) x2 B5 g* @
is2 J# I: n8 s5 C; X* A( p
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 x* T/ ]9 I# r: D7 F1 F
do
/ K3 A* i( f9 v% e. ~* S# `        Lan := rootfolder.Internal.Tools.AOLlanguage;, [7 y" u' y, N1 \8 P7 Y% Y
        if current = @.Destination -- else return& {6 R% `8 N7 X, E! q* c0 Q: S6 s0 d1 M
        then
' }, \: r2 L& @/ d, z/ \# q                @.Destination := void;% U: x1 h9 O7 ?
                if @.occupied then- W) P* ]0 ?6 T. S3 X4 a
                        part := @.cont;- c2 q" M, Q2 g6 S: O) j% a
                        @.transpOrder := void;3 Z2 c& W" j2 Z0 F
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ p3 c* U0 l/ ^( v
                                @,root.eventcontroller.simTime);
7 R2 X! s2 A; O; _7 W, |                        @.HasOrder := false;' s( N& I: _' S5 T
                        @.DrivingHome := true;
. h7 m% @" i' M  T( a                        rgManager.tryToStartTransOrder;1 a- {( t& d* V9 A
                        if @.Destination = void, P4 s( v* b# ]
                        then -- no transport order for vehicle @% r7 t" K; v& D% q/ W6 G0 L- [
                                @.Destination :=
- E: x7 g% }$ O% Y' l7 D, ~' c                                rgManager.nearestFreeStation(@,track.~);& y3 p& C  R  u. p2 z# w1 U
                                newDirection(@);   2 }# O: |5 W% d  a, y& J( l" x! d
                                if @.Destination /= void then7 _# i' u7 F8 p) g6 L
                                        @.Destination.NumReservation :=
7 H6 _% u  s5 c, }& n6 }! D- F                                        @.Destination.NumReservation + 1;
0 {& `. p$ J; _& }) i! d$ y6 C                                end;8 G/ [7 U6 A. e* w4 D. I/ q/ p2 \# r% O
                                @.CurrIcon := "drivingHome";
. b1 d: U7 a* V2 P4 k3 x5 ?" d( n5 m                                @.DrivingHome := true;
8 R) z- m1 {; ]                        end;
" N& t* v* d8 y  X' z                else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 {( E# m. r0 Z- }3 J; I# u  P7 p
                        part := @.transpOrder;
) H5 e0 p4 X$ z( _                        part.move(@);-- load part
$ w7 H! [4 h. Q" |& s7 J                        @.CurrIcon := "load";
7 }) j8 b* p$ c. q" h( @, a                        GlobalDistObj := part.globDestination;
2 Y+ A4 {+ _3 ^0 {) [                        assignLObj := rgmanager.rgAssignL;# m; E9 U* h/ t4 b: R% p9 G
                        row := assignLObj.getRowNo(GlobalDistObj);" p: g* @) `- w/ o
                        if Row = -1 then -- since 70
  A2 P; l2 i, t3 f                                if lan=1 then2 z+ j' A! g& F/ b% p" \) ?8 G
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: D) R1 A! Q% N& _5 |6 ~
                                                to_str("in der Andockstation: \"",?.~.name,"\""));  C; ~/ b. e8 A9 W8 N( n
                                else4 Y6 ^4 I8 @6 _( o' r% a! V3 k
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, |& t$ ^0 m! s/ c                                                to_str("in docking station: \"",?.~.name,"\""));                                * U4 ?! E0 x5 F2 R
                                end;) h2 g; N2 |5 q2 `5 A) f: e0 Q. v
                        else+ U# r, U" R, S  p- q9 R7 u
                                @.Destination := assignLObj[1,row];
& q! U) N3 J0 k5 p6 R7 `" I% p6 U                        end;                       
! _2 I/ ^4 X4 C# C  F                        newDirection(@);
1 d) L2 e1 |! G$ X4 b                        @.HasOrder := true;
" I6 J  T: ]& K7 ~6 _% f" r/ n/ G                end;/ X3 E" V* S# w& C% F
        end;  g, v$ F- [4 g; B% ?
end;        -- of the method* s% K$ v( m7 f7 N( |* F% ^
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
5 {, k( U9 Q  }1 Z- e$ K
! P7 \& p) F% B' ~. D4 }这是AGV_putin中arrive的method。
8 M' H/ j2 ^; b9 S) ?* V, X2 B' x: m1 o/ R# X% p3 E
当到达物料速度越高时,这个报警更多,' b2 [. d1 A2 u( H
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
% `: Z+ g% k9 F' Z0 D, ~. R程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
2 x8 A+ K& Z/ a, _$ F: Z$ l' r1 ~  P9 c% t' |, u! G. G
另外一个小建议,就是move,所有的move都可以这样
  K, e5 L6 m; t' `if not move() then debug end1 |2 f+ z. O  f$ s- }2 q
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。: V) P  C; n' r
plant simulation中的free libraries有AGV模板,
9 L/ G( K/ v1 i. q. f1 F# p里面也有案例。' \) s- G8 ]) e5 b9 ~
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
/ c* g! J- x5 K! w( X5 A. @. e9 s, K" U$ x6 A7 Q6 U
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 $ A" q8 K7 B, c' ?3 `, C

, V3 T0 m0 ?: _! e7 A( y那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 7 y4 N# C+ X4 I/ ]4 I
这是AGV_putin中arrive的method。8 N2 N) n% e; \* e8 H

5 d1 t  K( U0 N# F5 U当到达物料速度越高时,这个报警更多,
% a  L- e- D# V3 D$ K1 k
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-27 00:01 , Processed in 0.018142 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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