设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5438|回复: 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 u2 L$ z5 y' ]- [*/
& m2 `* Z" P. z) q$ c$ o  }is
# N- i% T$ Y0 p5 n        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 ?7 V& X6 a4 @4 wdo
# x( N; B0 m" B% ]        Lan := rootfolder.Internal.Tools.AOLlanguage;, ~7 q+ r8 c0 V+ ]# L
        if current = @.Destination -- else return
; q8 |1 Y0 R% p4 K$ I) ^; e        then% z. l; t- P8 X, J/ I2 h, g7 \
                @.Destination := void;" w" X. X* [: Q: m5 R' L
                if @.occupied then
! s. C  @) H0 p                        part := @.cont;
* p. E) t: f9 u2 U9 q4 {                        @.transpOrder := void;
8 {+ v. I( ^9 G. I0 m2 }# I                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) c# N* y( \, j/ o* k( I, {                                @,root.eventcontroller.simTime);
" [: h  B% A) {, X                        @.HasOrder := false;
, K  X4 F- A5 l8 U                        @.DrivingHome := true;- B7 s/ r- D* _2 ~3 M7 Q
                        rgManager.tryToStartTransOrder;" d9 Q7 p! k, ^2 @8 L
                        if @.Destination = void
, T0 j% ^2 B5 ~, E. r& B* @                        then -- no transport order for vehicle @
* w! u" c: w' f& ?                                @.Destination :=! r+ M7 e  M: r7 N6 ]$ T- u
                                rgManager.nearestFreeStation(@,track.~);! D0 e8 M0 E  y) v! M* U
                                newDirection(@);   ) U6 u9 l# T0 N6 o7 x  Y
                                if @.Destination /= void then6 x" O* L, ^( {3 t. Z9 m
                                        @.Destination.NumReservation :=
# m6 O9 D5 n$ x: k+ R1 ~                                        @.Destination.NumReservation + 1;3 ]% ^/ n0 n& t' X9 R8 b/ U+ X
                                end;
1 B6 Z9 ~' X% k$ K+ D. r- H                                @.CurrIcon := "drivingHome";& m, S$ `; n2 T$ k; x
                                @.DrivingHome := true;
+ H- S+ W2 ~" z9 g7 ^, ]                        end;+ K/ x# g- G9 a# A5 |) F
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& l  ]8 t& O# f4 _! A                        part := @.transpOrder;- j( j0 {. |1 C8 y
                        part.move(@);-- load part
( \2 n( n0 \7 \5 s3 C                        @.CurrIcon := "load";" l6 h3 _- w% M3 X* q
                        GlobalDistObj := part.globDestination;6 ?. b5 c0 o) e
                        assignLObj := rgmanager.rgAssignL;
9 d/ s7 [  d; K+ O; y6 G                        row := assignLObj.getRowNo(GlobalDistObj);
) s, W- |6 P& q/ ]1 {                        if Row = -1 then -- since 702 i/ w% m7 Y9 e: k: ]7 w$ G
                                if lan=1 then
* Y: [3 G! ?" Q# R9 p6 {# @                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 m1 U+ N6 D/ R+ r8 S                                                to_str("in der Andockstation: \"",?.~.name,"\""));
1 ?0 \' k3 @6 G3 A5 M3 s, N                                else
5 f1 H4 G& D6 t  G                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 E$ I% A9 Q4 K6 K6 c
                                                to_str("in docking station: \"",?.~.name,"\""));                                8 c: N( c1 \2 j( k0 x6 J
                                end;
  d3 `- m4 m8 ^4 l2 ^7 g: \& U                        else4 w/ V: v/ |" F0 X9 {
                                @.Destination := assignLObj[1,row];
0 R2 Z/ W( J: p                        end;                       
4 X' Z- C6 r5 d0 b+ ]) D                        newDirection(@);
! T1 _8 Y" u7 W' B; [/ C/ z                        @.HasOrder := true;
( `/ ^( ]$ R! v8 f' g                end;
8 w- a0 e$ C$ x9 ~        end;
- A+ G  @: y( C+ _end;        -- of the method
5 Q5 K! Q3 I) N; J, I  c, Z; s
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ! w2 t# ~& ^( [8 [! g' e5 G9 s; R
3 T; S3 |5 r5 Z7 T% k  ]  \( n5 u
这是AGV_putin中arrive的method。) W% _8 j# e- l! V  o
% @" O& W1 z& B% V
当到达物料速度越高时,这个报警更多,
& E+ C) a5 u' S7 p7 r可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
- |1 S& \; |3 A4 h  a程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?% P; f' k- p# v* E7 m% k2 z
9 G+ b+ T* `' y
另外一个小建议,就是move,所有的move都可以这样
" [2 i6 |) w2 @' K# m/ k$ yif not move() then debug end  o. g# k" H/ @6 `. R* K
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
! |) I+ V% i9 x- b. ~+ ~plant simulation中的free libraries有AGV模板,
4 C+ v( T+ D, h5 I' A7 [  W里面也有案例。7 E* V' ?2 [9 S/ j- ]* D
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。$ o% _7 S8 ?1 A# K1 E

& U7 ^# W1 O: A3 [! ~我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
. v4 G$ [( V5 r" f4 s* a  ]. `. f% H8 I
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 5 S: Q; {$ p$ M% z9 M" h- Y! e$ p
这是AGV_putin中arrive的method。7 x& F3 ]) N( b) U* W) K
* M: f1 E7 m( k' `( O! M7 y
当到达物料速度越高时,这个报警更多,

% b5 g' F. f8 U5 C/ ~" W% x; L; ~另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-24 03:51 , Processed in 0.023377 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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