设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6574|回复: 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'
/ V0 u% z. Y, ^( Q. x' D*/
$ E- u1 t, l1 k( ]7 cis. w, d7 _8 I, T. r7 _( D
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: k' l: Q% |; o* E! U. H2 P6 j8 cdo
. y7 _5 d- w1 B, V3 J2 T9 S0 @3 Y, ?        Lan := rootfolder.Internal.Tools.AOLlanguage;
2 G8 x) y1 ~1 M/ H) o4 n1 q        if current = @.Destination -- else return
" O) i* u2 X- ]1 ^$ o) a/ ^        then
5 r3 |7 S. s& m: l3 f                @.Destination := void;  d. z* {2 ]) k6 l
                if @.occupied then
3 f( i9 ]7 U; e- }( v+ v0 ^                        part := @.cont;
) E- ^) T' R0 t( f9 n( D                        @.transpOrder := void;2 |6 G: l, k* n9 Q
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# K/ ~8 R# k, m3 Y
                                @,root.eventcontroller.simTime);
1 w! f( c, Y1 g# b                        @.HasOrder := false;7 j5 a7 Z5 t. D: [; a. [3 r
                        @.DrivingHome := true;2 U" d) ?7 K% \1 U$ h1 x: b2 X
                        rgManager.tryToStartTransOrder;
1 z" h. ]1 n6 y: s5 I" J                        if @.Destination = void
/ \7 V' L* Y, p                        then -- no transport order for vehicle @' p  S/ I2 k5 w7 E: ?
                                @.Destination :=
; L; J% `0 `# ^5 }                                rgManager.nearestFreeStation(@,track.~);0 J2 D- e1 I0 V
                                newDirection(@);   6 C; g6 \# O1 ~) F: C
                                if @.Destination /= void then
# D" G+ D# _/ s) s                                        @.Destination.NumReservation :=
! O- c- \6 f! y+ a% W2 o                                        @.Destination.NumReservation + 1;
4 A' Y1 i1 _8 h1 y, J5 {; {/ t                                end;
9 y9 s' ^* a  l6 G4 q                                @.CurrIcon := "drivingHome";2 u! o+ f! g# h8 B9 b4 w
                                @.DrivingHome := true;( s- ^6 K4 _# _: L+ ]: R/ W
                        end;
, y8 t$ ]/ k/ Y) p( B& E                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& M* b! h+ m6 w' ~+ d                        part := @.transpOrder;
7 j. u0 c2 s" v* T                        part.move(@);-- load part% M: j$ D- ^0 H- `
                        @.CurrIcon := "load";
3 a' h$ n4 |3 w: C# D! A" w                        GlobalDistObj := part.globDestination;) L9 e+ b: i2 v9 T  h( o- B! [
                        assignLObj := rgmanager.rgAssignL;
, W# K3 w4 m& U, a, i1 n                        row := assignLObj.getRowNo(GlobalDistObj);% |" O+ P5 k* ^
                        if Row = -1 then -- since 70- }7 I' e4 k0 H9 w  J* Q0 H
                                if lan=1 then+ b4 M- V" h9 m% G* h
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 V4 a6 W9 z" e( f3 R# x                                                to_str("in der Andockstation: \"",?.~.name,"\""));
$ e4 l+ Y& L) A6 C2 V                                else
. Z) f% w$ D8 }2 @; K! B- X" [                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# c1 {2 I; S6 f: r                                                to_str("in docking station: \"",?.~.name,"\""));                               
5 w) h2 ]0 F( a) c, L; a+ ]7 k                                end;, g+ E4 M$ Z3 V! d( d) U: o% N
                        else
' O7 M0 \+ e1 \+ F                                @.Destination := assignLObj[1,row];7 n1 c& l4 E4 {& n
                        end;                        8 V/ b3 K0 ~* e. o( D+ A, B
                        newDirection(@);
3 C6 F- [; |3 Z                        @.HasOrder := true;' B( I8 m( q# O7 _: ]
                end;+ C& [, W; c% ~/ p8 T
        end;
6 C1 B/ r$ F6 gend;        -- of the method$ D* {. x! [; d3 C7 K  W8 ^- E4 _" e$ ]
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ! P3 Y9 e: u# @
2 B4 p. R. T0 T8 c' e9 q3 a0 k4 t. n
这是AGV_putin中arrive的method。; Q' t7 ^- N: H; ~+ ?. [
$ k/ H, A! _5 S7 L  g* O
当到达物料速度越高时,这个报警更多,) _& s- i8 S, @
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。+ \- d  Q/ @( }' S# r* c
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
& y* h' ]  e+ [- P; l4 [! d  G
' I' d1 L* a/ {- b) B0 A另外一个小建议,就是move,所有的move都可以这样
2 Z) n6 J) p4 m  z/ Iif not move() then debug end- k8 J& v  e/ P1 V
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
6 o! y% B, P% G+ Z6 uplant simulation中的free libraries有AGV模板,
+ O" ?. ^. D& |3 k4 A' q' X0 \3 ?6 B- q里面也有案例。
# M* W; N, C; X! W' {" e# @我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。# `* l: u) H$ W9 \: O8 s
4 d9 A* @- V$ ?/ v8 }
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 * M, w" A9 a3 i8 |! c9 p5 D

  p  g5 y) [0 a2 s- a# `那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 9 V4 R' c4 r0 ], _# z
这是AGV_putin中arrive的method。
6 @1 {! M7 V  I( Y- m. A
. [- C. R! N. D3 K& W当到达物料速度越高时,这个报警更多,

: Y; @5 X' y8 c7 [- P& D另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-13 19:42 , Processed in 0.023448 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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