设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5590|回复: 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'
& d3 T' |& m! `( L0 l0 k; g8 Q*/
7 Z# u: Y. F' Ais
- u% Q" d" v$ E; b  D. o        part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 B: J6 K3 v) Y
do3 P, m" g) R2 v( C% H/ ]" L
        Lan := rootfolder.Internal.Tools.AOLlanguage;
  O; b7 R/ ^6 ]        if current = @.Destination -- else return
4 ^/ m- d$ W- f) `' {        then4 j: T  W( W4 n
                @.Destination := void;
5 L. q8 m' x, u3 Q                if @.occupied then
, t7 `& o( t4 I% C$ h/ d+ d                        part := @.cont;# n" e( i7 P1 o4 r$ P
                        @.transpOrder := void;4 j. g' o6 g1 \7 Q4 h
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! ]# N* Z2 K8 e0 I  A
                                @,root.eventcontroller.simTime);
9 ^; R$ Q3 N% t, E6 s, x                        @.HasOrder := false;: r2 l  ~! V$ T8 s" P
                        @.DrivingHome := true;
! a7 A. s9 q9 v5 d! q$ \  T                        rgManager.tryToStartTransOrder;' J4 i1 y5 A. X, Q
                        if @.Destination = void" F# R1 G' y# P! l7 @! j) X* ]) b" n
                        then -- no transport order for vehicle @3 _3 ~3 E0 U' b- r& b
                                @.Destination :=
$ H8 z) X: t8 Z$ @7 q" \( L                                rgManager.nearestFreeStation(@,track.~);2 W1 R- d' Z. Y
                                newDirection(@);   : ]4 m& [. s( u
                                if @.Destination /= void then
% x5 |! g7 G/ L& X                                        @.Destination.NumReservation :=8 e" h# p6 ^6 e  u3 H
                                        @.Destination.NumReservation + 1;  k7 `; |  c' \* p! H" g- T# i
                                end;
9 ~  u- O2 J, p& j& w                                @.CurrIcon := "drivingHome";
0 h" r1 h& t  @% U                                @.DrivingHome := true;- l5 c- o* e8 Y
                        end;& p  r8 s2 h0 L& K
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 e& r% Q5 i. ]& c7 P
                        part := @.transpOrder;: ^/ n& Y! ~% N! `) \6 a. W
                        part.move(@);-- load part
9 ~: T% z, P3 U$ _' l1 r  e                        @.CurrIcon := "load";
( b+ m& U' c0 C! C) ^9 R+ g                        GlobalDistObj := part.globDestination;
9 n3 N) u# h( o  l                        assignLObj := rgmanager.rgAssignL;
& Z5 }" p; o  Y- z, D6 F" M# r, c, e                        row := assignLObj.getRowNo(GlobalDistObj);4 z& M7 j1 c5 R
                        if Row = -1 then -- since 70- i* H  A6 l1 ^2 }+ m4 m
                                if lan=1 then
0 ]$ q2 k. w- s- C- @, a                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: ^; e8 h$ G3 d9 U
                                                to_str("in der Andockstation: \"",?.~.name,"\""));" a0 V$ O2 v& b$ O! {
                                else
2 B' b# b" F8 J+ V2 ]( L" S) Q7 L                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ D. F/ X9 b% Z. W4 `
                                                to_str("in docking station: \"",?.~.name,"\""));                                # s* N5 w7 ~$ G/ A( [  t
                                end;
/ {7 e7 e1 x$ x. D+ P/ Q! M                        else
1 L5 H( n8 B4 Y$ q) p* E4 @  U- j                                @.Destination := assignLObj[1,row];8 W! L2 I0 c2 k- }5 v6 C
                        end;                        0 |% }1 ?! Q, e  `/ S
                        newDirection(@);
, p, Z: h! _- Q9 j2 [' z                        @.HasOrder := true;; {: v. t- d8 [9 T
                end;
$ K; r. K5 W# A. q4 Y  g6 v0 @        end;. `7 N: O0 J( Z' o* G7 I) L
end;        -- of the method* z+ C: b: N& u; @( O0 f3 d1 l% t0 K
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ! U, r- u9 i' V4 b
+ @9 N6 F, h1 H7 B
这是AGV_putin中arrive的method。
9 F2 o9 k, |9 _5 Z# R% Y
" l1 r9 o! B! k* Z, P% y" [当到达物料速度越高时,这个报警更多,: T* k5 @2 n# S" d. b. U2 M( {
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
( T. L) b3 d$ r; @程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
1 k/ g* j- t4 s* j' f6 y* h3 p5 ^2 F" {
另外一个小建议,就是move,所有的move都可以这样# `, j: H4 ~* F; W
if not move() then debug end8 e, e+ W6 P7 p: {" D/ g0 n* @
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。& ^, [$ k& N" y8 e0 {8 \( M" d
plant simulation中的free libraries有AGV模板,6 L- @# k+ C8 N6 ?
里面也有案例。2 j# z& v& q1 f' S
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。1 Q  ^5 b0 Q1 \

$ |0 J4 a; u8 b7 n, p& I我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
* k% {$ b2 j4 k/ k7 i% t) H* N" ^* j* z6 `0 {; }
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
% u/ N2 o9 N0 o. c这是AGV_putin中arrive的method。0 P' s* r! w; D( Q( X) s% ^5 M' Z* N
1 {3 R9 @$ K7 j' F6 [
当到达物料速度越高时,这个报警更多,
) e; Q" u; b6 Y0 m' X% r
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-7 15:06 , Processed in 0.023598 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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