设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8146|回复: 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'
2 U# `+ k, h- S' Q8 |% X! Q) h*/
% r/ `! ~- ?" Q+ K7 ~6 Cis" J+ j# v4 K" j7 M/ C# o. y
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 Q( j2 E! y/ [8 S
do
# O' I/ E6 U) q/ i" b+ [        Lan := rootfolder.Internal.Tools.AOLlanguage;
1 C1 C- d' o" [$ {        if current = @.Destination -- else return
  g; G# ]* t) c        then
$ W4 r7 ^1 ?- h$ C                @.Destination := void;
% {6 R- q$ [8 P                if @.occupied then
1 U+ v! k. {. [- P9 d                        part := @.cont;
4 N) I* r3 ^4 H& e2 Y5 z. o+ _                        @.transpOrder := void;
; O% n- Q; d4 I! b9 y                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 m  _5 q. Q0 j2 p                                @,root.eventcontroller.simTime);
7 z# B+ Y! Z) r: _9 X( {: p                        @.HasOrder := false;
5 ^, }1 l; k7 W' R) k1 q6 W$ {7 f                        @.DrivingHome := true;
& h; ^  j2 J. ^* p                        rgManager.tryToStartTransOrder;
$ v3 N3 J/ Y3 {( S6 Y3 I- a) V                        if @.Destination = void( E2 W; g7 A, ?) ]
                        then -- no transport order for vehicle @; D  j0 c5 y5 N* G
                                @.Destination :=; q6 J$ z& Q" L, n
                                rgManager.nearestFreeStation(@,track.~);
* X  c$ m2 I2 d- c                                newDirection(@);   . Y3 q9 N, C7 r
                                if @.Destination /= void then  I7 [7 R* i* {9 b
                                        @.Destination.NumReservation :=
- {5 w2 z+ ^$ ^6 [$ }# B                                        @.Destination.NumReservation + 1;
8 d: }+ |9 @2 b/ I8 d3 d. f                                end;6 D+ @% [) \/ n7 S+ b& t
                                @.CurrIcon := "drivingHome";  N$ q; ~" \: g2 ~! ]
                                @.DrivingHome := true;
2 C" a* Z& W( B: d. [$ N: C                        end;
8 L  D( l/ \$ W: T/ g3 X                else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 U+ k3 J5 K7 W/ s6 t' _2 h
                        part := @.transpOrder;
. ~9 t" i  m7 z# G* V8 h# z9 P# B                        part.move(@);-- load part
" m' k# v" x& n9 c- K  s$ d                        @.CurrIcon := "load";% t$ f4 V* @. o* d! W! C
                        GlobalDistObj := part.globDestination;  m2 P1 ?; L; |" W5 t9 O6 d
                        assignLObj := rgmanager.rgAssignL;
% ^- ]( v  E" L2 c2 ^5 Y                        row := assignLObj.getRowNo(GlobalDistObj);
2 x( S( \! n% E0 J2 X                        if Row = -1 then -- since 70
, ?' w. `  J/ w5 k5 z                                if lan=1 then
9 A! V* r( Z3 A. t# K  \, @. s8 P                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 b+ h: {) t- \5 J                                                to_str("in der Andockstation: \"",?.~.name,"\""));; l, f% S: [; h  U, A
                                else
5 s& O9 m3 R4 B8 r- `; _1 G+ b                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! B  f- C# W; z+ _. i, ^
                                                to_str("in docking station: \"",?.~.name,"\""));                                , W2 x/ n- \, R( q1 o. r3 H- b: f
                                end;; e" {; E8 q+ W: e9 |& ^$ p
                        else
+ a. U" T) X5 j1 u4 V( e2 X                                @.Destination := assignLObj[1,row];5 A+ ]! A6 Y% O1 p! K  r) m- |
                        end;                       
  t( x* |) j3 \( z1 S                        newDirection(@);, I+ [/ w* x7 e4 t, J
                        @.HasOrder := true;
8 D4 T, j/ F/ g, ^                end;- I2 r+ ]3 `! h5 m9 n
        end;6 f% x! C/ B2 G6 R6 [, V6 T# t
end;        -- of the method5 B  z( P. B" I' [; K; U
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
* P5 |3 T/ _+ I1 N+ r
3 G& l7 V. v9 o; s8 }  P0 J/ k这是AGV_putin中arrive的method。
. D+ k4 P. i6 r7 c- e# h" M% y( ~; o
6 I( @+ q* f; O4 r4 O当到达物料速度越高时,这个报警更多,5 b; W- b6 a) }. t9 d7 |; U
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。8 ?& n5 N$ x$ r
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
4 `# C8 f  a5 s9 E# ~$ F- G& w5 j& T2 V$ X
另外一个小建议,就是move,所有的move都可以这样8 V3 A( b( Z9 H, d5 v  H1 W
if not move() then debug end
8 i3 @- z6 E4 U& l( H4 J这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。) O2 h$ ^9 l; [/ n5 S
plant simulation中的free libraries有AGV模板,; G3 S" Z& k6 u! o
里面也有案例。  h# o4 |; h3 ^. Z8 }( V
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
- \! M" t- e/ x2 c* O
$ i2 G/ ?( _" U我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 n6 b' g; }/ g% N
  x* \' _/ \5 g6 w4 G# i; o那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ! L; C0 M: F5 H2 _- O
这是AGV_putin中arrive的method。
& O9 t9 m3 x1 X) J& Y( r* N) B) l, f8 V% D4 s
当到达物料速度越高时,这个报警更多,

0 ]  v' x6 w1 Z7 @' K. W4 L$ a另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-17 07:53 , Processed in 0.021141 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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