设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5748|回复: 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 \4 |( }+ M+ w* q: a
*/
) J/ C3 b% F: @2 Z7 Q3 `# l: sis& p$ L2 z+ A- z' r8 Z( [( [" ]# z% P3 b
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;% x. M. ~2 H; O+ ~& a
do
/ M9 P. g" ?+ u6 n. X        Lan := rootfolder.Internal.Tools.AOLlanguage;
# |& {4 \* x# [0 M        if current = @.Destination -- else return8 D2 e6 U8 s4 B! `
        then  D2 _( U8 ~4 W: I! K
                @.Destination := void;
5 s1 W$ I) [: Q# P                if @.occupied then; Q' J( P% e# R8 y+ c8 i; @
                        part := @.cont;' o6 {6 A/ z$ O& K
                        @.transpOrder := void;
: l0 _  r$ |8 y( }& y, A                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, p5 K$ p2 F9 q7 ^                                @,root.eventcontroller.simTime);
$ f, _7 C3 O1 @. g" L& ?- i                        @.HasOrder := false;
+ Z& U1 Z( T6 l1 q% E8 J/ Q                        @.DrivingHome := true;
+ O6 E$ a+ U" O- q                        rgManager.tryToStartTransOrder;
, A( z1 j6 K) }1 k/ @: A" f                        if @.Destination = void
! `# z, z4 |- ]# F9 E                        then -- no transport order for vehicle @" B+ N- y8 i& g3 s; P4 W
                                @.Destination :=
) p6 F! L( q# W9 a                                rgManager.nearestFreeStation(@,track.~);
  {! K* j  \3 U! c0 N0 C* @                                newDirection(@);   
- `$ e% s+ n, L; F# S                                if @.Destination /= void then
0 A; R. w: E( A* R" q# N                                        @.Destination.NumReservation :=, P+ Q" `2 z: G& I8 C' ]
                                        @.Destination.NumReservation + 1;
) Y% g3 L7 x" Z, H2 h+ S& a                                end;
2 P& @' Y% J" ~6 y/ K: S                                @.CurrIcon := "drivingHome";) U3 B( d9 Y+ i  Q2 u7 v
                                @.DrivingHome := true;1 J7 k6 o' u* V9 b% ?; q
                        end;. h7 i. J: t; U+ E/ d5 K
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 {& k1 x" ?& d3 v                        part := @.transpOrder;+ k6 ~2 f2 c7 A. L3 z, K. ~
                        part.move(@);-- load part
8 F& ~. r2 ]+ O( n7 h; G: {8 Z                        @.CurrIcon := "load";$ Q4 z* |! P9 n. V( R/ H3 J$ F  K5 V
                        GlobalDistObj := part.globDestination;4 U$ R) ^/ N' V/ O
                        assignLObj := rgmanager.rgAssignL;3 ]5 C" d3 e; q! t3 K5 C, [
                        row := assignLObj.getRowNo(GlobalDistObj);
: _0 f8 O. K' Y# D                        if Row = -1 then -- since 70, B% D) n1 B0 }. K
                                if lan=1 then. z) ?) R* e& r& x
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- g9 Q: R% _- u& n9 L                                                to_str("in der Andockstation: \"",?.~.name,"\""));
+ _: q6 ^8 k9 s' f7 j4 |0 b4 w$ Y                                else/ r% I. b+ d# V* M5 N: [  g
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% i" C1 C6 X7 K6 z" a1 x& U
                                                to_str("in docking station: \"",?.~.name,"\""));                                2 o7 ^8 B1 h# G$ J5 l! S! }6 [3 w
                                end;
8 @6 h' {. f) G* f! `7 ?                        else
, o5 }8 O1 N! b8 K: L. o                                @.Destination := assignLObj[1,row];4 I  g! O8 D" x6 p& t, v) T: w
                        end;                        3 h6 a  V3 V8 z/ A9 x5 P7 K6 }
                        newDirection(@);6 P. L) H1 A5 A/ d* D+ j* x6 k( J
                        @.HasOrder := true;2 U. G, a7 D0 [, |8 b4 y2 }
                end;. H7 }* I, k+ Q" p% @
        end;
7 Y8 Q. T+ G% m' J2 xend;        -- of the method; \3 ?, J. l6 l8 t
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 # y- b0 ]- s$ m+ L8 n4 F% [

+ b+ z7 v3 X  x这是AGV_putin中arrive的method。% `% m7 W. R' a: {8 X8 V+ a, M

* |8 C3 [* |$ u7 N( N当到达物料速度越高时,这个报警更多,
8 f- J: M- G- M7 J可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。6 S& y2 U$ t" S3 L
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
3 J+ {3 |8 q, j
' ]' V  m+ e: j$ s另外一个小建议,就是move,所有的move都可以这样
% Z4 P! b( z& p3 `, \' o9 ]if not move() then debug end
* l: S3 |' J; ^( k这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。7 Y3 }5 X; j1 m, \# k
plant simulation中的free libraries有AGV模板,
# |" Y# B3 r* u$ r+ ]- g里面也有案例。
( q7 [' V1 Y8 A/ @: j. q' ?' h我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。! ?9 T5 u9 Q3 C

# T+ E3 H1 K$ u1 ~" z# K7 z5 V我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
4 e* J8 A$ k: |8 \# a; L5 `
* d4 a( X; I' N! R  W那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ! O8 J# k( R$ r( X! D
这是AGV_putin中arrive的method。% O7 t- m! l2 G8 _# l- E" k
) C- p* D8 F4 H- `* ~
当到达物料速度越高时,这个报警更多,

. |# d! }7 z% A1 g3 Z$ w另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-16 19:12 , Processed in 0.015487 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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