设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9790|回复: 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'
( `+ g9 h  a) b0 ~*/
6 d# t1 t; k6 Zis1 X0 V$ D! P, H) k& ]- A
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;; g5 ~# q7 j- {9 T0 Z
do
0 k) k2 U  U; o& Z% p        Lan := rootfolder.Internal.Tools.AOLlanguage;
3 @/ g  O5 a/ o+ L        if current = @.Destination -- else return
$ E# R  p% {, E: ?        then$ K: e" a% A# k
                @.Destination := void;
+ T( f+ p  _1 N( x                if @.occupied then1 K- _( ?5 f$ _6 V% o4 L1 \& ^5 p
                        part := @.cont;6 A% p/ A8 Y$ J' l6 F5 [
                        @.transpOrder := void;
  _* o6 H+ r# ]* _1 K                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ v# j7 o9 C3 Y$ J+ q. h$ \                                @,root.eventcontroller.simTime);
* v( f# L8 N; }7 ?" }                        @.HasOrder := false;0 W+ j2 B0 b0 u; v3 _( b
                        @.DrivingHome := true;( X% z  l3 o3 O6 a( b  z- W
                        rgManager.tryToStartTransOrder;
+ l8 W, c7 e( J, ]+ P$ A: m" D                        if @.Destination = void
" @+ j* F# O$ W# @. R$ g6 `8 ^5 E% W                        then -- no transport order for vehicle @
1 j3 X1 o, r8 L3 n                                @.Destination :=
( n  [3 c7 D* x9 S( Y, q; ^                                rgManager.nearestFreeStation(@,track.~);7 y' D/ w8 B+ A
                                newDirection(@);   
. S9 j8 E2 V$ N0 y1 ~+ S* Z                                if @.Destination /= void then7 t9 ?. Z' U" [7 S  S
                                        @.Destination.NumReservation :=
+ G6 S3 `5 I) o1 r3 y                                        @.Destination.NumReservation + 1;
0 U6 I7 h0 q" `# G3 a& K                                end;. G5 V+ l) _& s4 G- f
                                @.CurrIcon := "drivingHome";
6 L/ P* `( R* H                                @.DrivingHome := true;
$ |# R) W+ e; w9 b" {% g                        end;
  z; |* z) c, T0 e) B; B                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: i0 r9 `# ~# y: t- P                        part := @.transpOrder;
6 N. C' I& D6 D3 m4 Y* ^                        part.move(@);-- load part
+ Y) J) v, w+ m5 l, r! [                        @.CurrIcon := "load";9 W. q% L" E6 B0 V- X5 u+ _
                        GlobalDistObj := part.globDestination;
* o" Z. A; `7 E, J                        assignLObj := rgmanager.rgAssignL;
% L. A  |4 R* b# C6 n                        row := assignLObj.getRowNo(GlobalDistObj);
2 E( h" x8 S$ b                        if Row = -1 then -- since 700 ?( ?" K- a2 f9 v7 B" U! X
                                if lan=1 then
/ U4 P2 {# O! O& w" S1 L9 ]                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 ]* U9 P+ V/ }" P# [: V& g* F6 K
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
- z" a" U' \3 t, H1 ]! H1 {- x                                else2 `" R) J: Z: j$ v1 ]1 U
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 |- o- v9 }0 o7 X: K4 S) s6 t                                                to_str("in docking station: \"",?.~.name,"\""));                                ; `: K. |  c  g( C% ?/ q( e9 W
                                end;7 E. r. Y( l8 e
                        else( K/ X9 V! s5 W8 X
                                @.Destination := assignLObj[1,row];
0 S3 N! @3 T$ l. V7 w: b                        end;                        4 N5 k, c1 S8 X
                        newDirection(@);+ g) \" Q3 C% ~( X3 u
                        @.HasOrder := true;
" I& i6 P6 m* @- s7 |                end;7 C5 h) j! T  K' ?
        end;. |' X1 v: t& V5 Z
end;        -- of the method
8 A5 h6 ~. m2 y5 I
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
) F1 i2 Q3 |# ?: F0 E
2 K, d) f% p, ~这是AGV_putin中arrive的method。
: v) J, x- e; g6 D  K
! q0 X( _  y$ T! E( u当到达物料速度越高时,这个报警更多,2 d9 P: `5 }% X: n# k: D
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。0 R4 M7 t5 {) p- G0 a0 j
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?) B1 l" S' ?% d! _2 j7 P& y

! T1 X$ r. i' m+ R- B" w另外一个小建议,就是move,所有的move都可以这样: v- N+ i/ V0 l1 {4 J
if not move() then debug end
$ r2 U" ~6 ~0 o0 x3 l1 a# l这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。& |0 K! m, W5 z3 O& `% S3 Y2 R
plant simulation中的free libraries有AGV模板,
* s5 C: z1 u; F- N里面也有案例。
, e' B0 k8 n/ Q! }) T我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
7 T, D" x: Z3 T( z$ f" j4 c( [
6 I  v1 Q/ u( }8 M我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 7 o/ y+ f0 _1 f7 t- B5 m
' |) g+ ]: Q1 j% ?9 ^# E: B
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
. [( {9 D' C/ p. V1 C9 n这是AGV_putin中arrive的method。
! _% m; J0 O4 S3 u: R, ?' y
/ U! g) p; c. X  _; B% Y  f当到达物料速度越高时,这个报警更多,
2 h5 ]& L  H0 v! a/ a* S/ T' @. g
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-25 08:08 , Processed in 0.027651 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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