设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6136|回复: 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'0 M9 o1 I' ^$ L' v6 O! Z& H
*/
$ Q) p# F5 v+ l$ R; Jis
8 p! p' D; G. ^& S" M        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 B( F6 Z3 c+ b" N, x7 b7 Jdo0 {4 j' Q; y; V: L( C
        Lan := rootfolder.Internal.Tools.AOLlanguage;
5 z- y2 f. A) C/ Z        if current = @.Destination -- else return- X1 m( W. |. ~  c6 X+ U. d
        then8 e0 l! [) o! q* Y
                @.Destination := void;6 Q7 {6 Z. I, ]* k$ F
                if @.occupied then* `; M% m) K2 t* ?
                        part := @.cont;
# ?6 l5 z* b  d  e9 d, Y4 ~                        @.transpOrder := void;# d: `9 S$ {& a( u* T4 z
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" E: A& z+ ~/ F# R! c: Q# p                                @,root.eventcontroller.simTime);
7 \, w6 T9 q! i$ \+ e8 u                        @.HasOrder := false;
( j( s( ?: c; i                        @.DrivingHome := true;5 Q6 D7 p9 _( P0 l8 R
                        rgManager.tryToStartTransOrder;$ Q& v0 i0 T$ F5 l
                        if @.Destination = void
- D6 ~) `( h3 g4 F1 N$ x+ m                        then -- no transport order for vehicle @4 _0 N) w0 h. n$ _" @  P
                                @.Destination :=
- S) z6 {% R1 E& p9 l                                rgManager.nearestFreeStation(@,track.~);
# t) l! t% X4 h" n, y3 k                                newDirection(@);   
. [" g3 v) }& M: E& @                                if @.Destination /= void then
9 A5 K+ r. M8 K4 M, e4 Y                                        @.Destination.NumReservation :=
6 p6 J# c& U  p3 L& M# Y                                        @.Destination.NumReservation + 1;' ^: q! A+ x% J3 b9 h7 r5 p
                                end;
% |; K  [, b( G( B. L8 H                                @.CurrIcon := "drivingHome";+ K8 l1 F0 ?9 N8 [- l/ F" C! F
                                @.DrivingHome := true;
+ z% b4 @( A0 G, Y                        end;% M" c) C& h' ~* b. w
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* a- v4 l' a7 \% t+ p$ M- ?                        part := @.transpOrder;
) ]+ P; ]+ U  y' ]                        part.move(@);-- load part
9 B! {& M/ s. L7 K* E4 g) E# ?* O6 C                        @.CurrIcon := "load";7 F8 ^3 t+ _1 n1 o/ A5 l. c- s
                        GlobalDistObj := part.globDestination;
4 G( t$ p" V3 a1 P                        assignLObj := rgmanager.rgAssignL;
6 s$ T& `! g6 S: `* ~( |                        row := assignLObj.getRowNo(GlobalDistObj);
/ T* Y: r- q$ v* F) g. \) \                        if Row = -1 then -- since 700 N$ Z9 F$ c0 m/ @3 |# I  K- f
                                if lan=1 then$ E4 H: V% m- g  ?3 k7 @: J
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 W/ s, h$ G* s( p! _4 f9 \+ P: y
                                                to_str("in der Andockstation: \"",?.~.name,"\""));5 p0 f$ I# b' X) p5 L: D( z, S- x
                                else
: k- z; {9 z6 t2 z$ ?4 e- t# D                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 i( b4 ~7 ^0 T( |- h. x- v                                                to_str("in docking station: \"",?.~.name,"\""));                                : @: C; R$ c$ J
                                end;
+ i1 C$ M6 c% ~                        else4 s+ u! I  Q# m  m9 y7 B
                                @.Destination := assignLObj[1,row];
+ w; Q5 E* c' ^( Q# ?* R  B7 Z                        end;                       
* u/ n( E) I5 ~  G7 H                        newDirection(@);* [9 U& P7 N! k2 Y; c5 @
                        @.HasOrder := true;( O8 U' e) e; @) H) O
                end;4 r" h7 G* F( Z; S3 d4 p# b/ ?
        end;. @$ q" g; P7 k; C) B' T
end;        -- of the method
, m# V$ n. }4 ^0 N+ z" f* y4 ^( U
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 * _1 t" L( k8 F( g- `6 @: N9 y
) \7 o# {, _1 K8 H. a# b: I7 s3 q
这是AGV_putin中arrive的method。1 Q! B- s/ c9 \7 F

' W: w2 ?; h7 b( h/ Q& W- f& V当到达物料速度越高时,这个报警更多,
6 N; M# r4 \/ I* N" j. a可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
) ?1 ]5 d9 q. M5 {, f4 U* W  L0 n程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
9 |1 i8 c$ N' H, o$ V, Z' N
% {8 N! W: k' b- D另外一个小建议,就是move,所有的move都可以这样" @; c8 k" q  ~
if not move() then debug end
: D% ]3 b. d. F! Q: @  h  m& h这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
9 I- ]4 ?% G# Yplant simulation中的free libraries有AGV模板,0 Q$ J2 Q6 W( t! W* u. k/ H
里面也有案例。
; _) V1 J+ l: n) V$ j, j% D- u1 U我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。# v) i- _- A% `, U3 M
5 t) ?5 p& n" F0 k
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 & P4 n4 J6 {3 U3 I

# I0 L$ T$ i/ j/ w/ \! \& L那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
* V. L* u6 b4 W1 ?' k, k这是AGV_putin中arrive的method。
. }& {% o4 j9 y. j; \$ H7 D: ~. B2 P; |/ V
当到达物料速度越高时,这个报警更多,
3 q" b- e) W# D- B( v; A- {% N" v0 f
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-20 16:50 , Processed in 0.020965 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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