设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7256|回复: 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'1 `1 b2 R  O6 ]3 @. {: X; y9 K
*/
7 C1 h( M. {0 a% Kis
; }! B+ K; v- W0 V3 a        part, GlobalDistObj, assignLObj:object;row,Lan:integer;) V7 j/ q$ c$ c0 T
do; R- o0 s4 b6 T) C+ K8 a
        Lan := rootfolder.Internal.Tools.AOLlanguage;" o/ x) v+ Z/ j7 Q8 v
        if current = @.Destination -- else return: v$ K5 z7 `5 M
        then  T& @  o* \# v
                @.Destination := void;) y% S7 }: {9 E
                if @.occupied then
9 W- j7 |6 c$ s. e7 w                        part := @.cont;
" x9 N4 S( W% e1 B  q- B8 Z                        @.transpOrder := void;& T0 G& A5 k, a
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
  U9 W" e+ p+ [4 v& e& @0 ]                                @,root.eventcontroller.simTime);9 O3 s- b* z/ u2 ?4 }% s
                        @.HasOrder := false;
+ V# q) g8 S" K& r% r                        @.DrivingHome := true;7 l% j, g3 ~0 ~6 S% ?' a6 Y# K, j
                        rgManager.tryToStartTransOrder;
$ }  |- n, g$ _. @' U% G( O+ T0 S                        if @.Destination = void
  F. R& A' \3 i2 K$ s                        then -- no transport order for vehicle @7 d7 v0 q. R) b' X- D7 r6 x
                                @.Destination :=
2 M6 U4 W! t0 v+ h" N7 H                                rgManager.nearestFreeStation(@,track.~);* |; V. n) F4 K) Q% A% g4 _4 h
                                newDirection(@);   + b! J8 Y+ `0 _6 _
                                if @.Destination /= void then# R: F! ^4 ]' T
                                        @.Destination.NumReservation :=
$ ~/ Q5 L, y5 z" ?$ U1 A                                        @.Destination.NumReservation + 1;
8 j2 _6 F& r) h( T$ q) J                                end;3 j& Q2 Y/ m$ k  r! I0 z
                                @.CurrIcon := "drivingHome";
3 K, Q/ T5 n! o2 O                                @.DrivingHome := true;* ?& e+ @1 @  V$ l; x
                        end;
' v+ I( ^6 i4 I$ Q5 l2 @! Y+ g                else -- the vehicle @ is empty, both vehicle and part are in the same dock station; @- Q3 S1 p& b6 C9 `: w+ r
                        part := @.transpOrder;
* Q% r3 @( y7 D# [8 k                        part.move(@);-- load part
7 o5 o; @; I. ?/ G                        @.CurrIcon := "load";' A6 L( o. K4 I6 G/ x
                        GlobalDistObj := part.globDestination;- M$ f1 Q6 k& b, |* Z# x/ c" Q
                        assignLObj := rgmanager.rgAssignL;  m7 S% W: f' X. E9 Z( _
                        row := assignLObj.getRowNo(GlobalDistObj);
; S* p7 t- w5 s5 N                        if Row = -1 then -- since 70
4 R3 \. g) }/ }$ Z* B                                if lan=1 then
6 B: ]2 t; t+ G. N$ }5 G) m                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- J8 `) i0 u% O) p% W. X
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
5 D" S: M* n1 N2 g                                else
( ]& W  Z8 P7 K) t                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; K( E" g0 |( G% i! J                                                to_str("in docking station: \"",?.~.name,"\""));                                - t8 F& u2 v0 L; q0 ]
                                end;
& s' [! ]% M3 `4 d; E                        else
- x# `, X8 f* u" R                                @.Destination := assignLObj[1,row];
( ]' u6 a8 [1 Z. B0 k0 \& `; D" W                        end;                       
2 e7 ]/ p6 i& J                        newDirection(@);
1 e, q$ S* X- e                        @.HasOrder := true;
; j' K7 d, G; j  ^                end;  n/ C, T$ I# {9 n4 x
        end;
1 ~$ U# a9 J7 Q3 y6 \: uend;        -- of the method* r& R( d& C. S" |5 Z: J7 l
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
! a- l. H3 Z. m, ?6 S" F5 }9 U8 o3 }5 k1 X  }8 I9 \% g  S) J
这是AGV_putin中arrive的method。
) C2 L2 L7 D# H5 G4 ^' G) }" g0 t2 M8 C" p6 }1 P
当到达物料速度越高时,这个报警更多,$ x2 _, v# U  D2 h
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。1 @4 s/ ?5 l# y* Q& ~, `$ q3 q* y
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
4 U9 R5 i* D( F  h2 C; u+ Q. I: y/ h4 k$ c& z+ B
另外一个小建议,就是move,所有的move都可以这样
; t$ t) o/ Z: ^: r- mif not move() then debug end3 z3 m" V# ~5 W" C. |& ?
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
, A* W5 k/ X) hplant simulation中的free libraries有AGV模板,
+ L- M/ f% f/ Y$ [/ o0 {  m. V里面也有案例。
8 n4 Z) p: Q, G我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。2 Q, S& S# B) |1 C  W
. L5 T5 o  o  R! N" Y7 w
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ! p9 N3 p$ J+ D& v1 p, p
! U# E$ S) n* e( d( g; C3 H
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 % o9 L# z* [0 U7 H4 o
这是AGV_putin中arrive的method。  b) [% a6 j: r) {5 l
' Q; ?2 r$ `% N/ V! h5 y& w' o
当到达物料速度越高时,这个报警更多,
  W  {1 d% G6 {/ x. O  w0 r
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-31 04:31 , Processed in 0.018226 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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