设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9970|回复: 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'
3 h9 q& k( o; a" b' G*/
9 [/ k6 \* o  x3 \7 N+ w9 e9 Tis; W/ g* O; E0 }
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 \: E" h4 a5 ^6 Q: @, Z
do6 ^7 E0 H1 C" _% g
        Lan := rootfolder.Internal.Tools.AOLlanguage;
3 t$ Y2 X. {4 b        if current = @.Destination -- else return
4 g3 c$ X  W" C5 n& t8 ~        then  W1 p7 J" P; G' V9 I
                @.Destination := void;
' p/ M# |, W- E+ C                if @.occupied then4 e/ _& j$ m, \: A! k
                        part := @.cont;
8 Q6 h" P% A4 {, R# r: b                        @.transpOrder := void;
8 L: e- C2 V9 M. K% c+ `9 ~  b, n                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 `2 j: q" [! T. n
                                @,root.eventcontroller.simTime);* i5 D- e' \! S9 x2 v
                        @.HasOrder := false;/ U, M# U/ w9 D( B) T# c
                        @.DrivingHome := true;- T, c6 _2 t2 I1 J8 Y+ d- p8 j
                        rgManager.tryToStartTransOrder;- j3 F2 I$ f3 W# k& u# C0 B5 h/ H
                        if @.Destination = void
4 w) ~' |' }" I, g/ s: ^6 r                        then -- no transport order for vehicle @
: ~5 D! m2 ~: E' G# `7 D$ z                                @.Destination :=
, ~1 k2 w: G" I5 s' u                                rgManager.nearestFreeStation(@,track.~);9 b$ L! q" M: E2 `
                                newDirection(@);   
7 |% m# W9 t8 t- N& `                                if @.Destination /= void then
% O3 _& V# }) C6 C1 t                                        @.Destination.NumReservation :=: R" s: k) }$ S) K, U3 z. r
                                        @.Destination.NumReservation + 1;
1 J7 j( C" @! Y9 i                                end;8 y7 y$ H6 T& [* ?
                                @.CurrIcon := "drivingHome";! z% `$ s8 \1 ^- }
                                @.DrivingHome := true;5 W# u1 a( N* l6 j
                        end;  d! C- i5 I+ g  F, y
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station# U) N& T0 o0 o& D: C
                        part := @.transpOrder;
( s' Y( Y0 b4 i4 b2 b( H  |                        part.move(@);-- load part2 t' M; J8 A+ O: G9 _/ k- x
                        @.CurrIcon := "load";0 q! ]. d2 p- v' ~
                        GlobalDistObj := part.globDestination;  Y: `$ G0 ]- ]' G5 q! `% l
                        assignLObj := rgmanager.rgAssignL;' p$ R6 L" [) P; e! p' Z
                        row := assignLObj.getRowNo(GlobalDistObj);
' Y0 S# r' P: Q4 q& p                        if Row = -1 then -- since 709 O5 o6 ~3 O3 x9 r5 v4 W/ H
                                if lan=1 then
9 B- w3 m: d7 d/ p. w  L9 `& f                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 m" `: \  c% M, _% [) n1 m                                                to_str("in der Andockstation: \"",?.~.name,"\""));5 J$ G; ]  Y; J: Z4 C2 o$ I% d
                                else# k  l( u) V, C. Q* a: f) }
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," b: J) `/ U$ i5 n# c: L  }
                                                to_str("in docking station: \"",?.~.name,"\""));                                - H3 R' d3 E$ s' j9 F8 S1 F5 [1 G+ m  r
                                end;4 @6 i9 V# v4 B# z, o2 O
                        else3 K6 @1 N7 X( c/ m% H
                                @.Destination := assignLObj[1,row];. H' f; s! l( h0 ~9 {1 z
                        end;                        7 @( Z+ u4 L0 W7 N: [/ s; L
                        newDirection(@);
+ [; J9 K$ y1 F" E5 U                        @.HasOrder := true;
! n& V  S- ?  b0 M3 _                end;
/ Q5 m# b& p, ]; S- J6 S        end;
3 K* G) l9 h, _1 B6 fend;        -- of the method
% }" ?) P: ]9 _1 \* u+ a
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 # y4 o( \6 E, m0 ]6 y; V4 k

3 W. v9 p# v2 `+ C* A  ?这是AGV_putin中arrive的method。+ W6 e0 n& A0 f; `: b/ M
5 ^) m, l! }* b7 H
当到达物料速度越高时,这个报警更多,
0 u% b5 D7 ]+ U可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。; N9 M; x/ k! [' q0 a+ ^
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
2 f) `' \: G1 V- L- m4 V9 h" T) I' @. V
另外一个小建议,就是move,所有的move都可以这样: a/ n5 O5 p9 k8 S
if not move() then debug end7 u0 v0 U/ C6 `- u9 k/ {
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
$ O: H. k3 Q7 T& _plant simulation中的free libraries有AGV模板,
0 r# ^* z% p( W$ s9 m里面也有案例。
5 X: c1 I( g4 h* N% x: u0 u我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。1 y! }4 U/ R3 B" h$ v
3 {" G, {) L( F/ C# J! o
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
8 Z. f/ `+ j5 O. e! H2 y1 C
9 ]+ \) d" p, V6 x那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 2 Q* u7 G' p0 G
这是AGV_putin中arrive的method。) W* \6 P  s" V6 h6 A- M7 F* N' z

0 j* m. z7 K+ ~6 C当到达物料速度越高时,这个报警更多,
- L) X8 W: R) [0 l
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-5 05:06 , Processed in 0.017195 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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