设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7610|回复: 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'6 ^$ |1 g# m) g# V) I2 p* U
*/" X. i2 Z2 L: @5 U* B
is
1 c6 h9 l) L" P# }% Z; v        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. c1 x' m& ~( s2 @7 Vdo
0 |) ?9 l6 G/ V) i+ |; }! B        Lan := rootfolder.Internal.Tools.AOLlanguage;" u% H# `! |& X2 X2 X; r  d; |
        if current = @.Destination -- else return4 t/ _; V8 A5 f
        then
; k0 o3 l: I( H, t0 g2 G9 z                @.Destination := void;1 t1 ~( R2 B; r) a5 B9 M2 ~
                if @.occupied then
  s+ Y; {3 o' j" o' w9 ]8 S                        part := @.cont;9 [+ i2 G7 F' b4 Z9 N5 M8 t+ ?
                        @.transpOrder := void;& [7 w( O% \* @, c" F- D
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 z% l6 s1 t' P% h) K2 C                                @,root.eventcontroller.simTime);
( I& h3 @: U/ F! Z/ b                        @.HasOrder := false;
: r8 Y9 F; Y- ~6 B$ a4 I; M                        @.DrivingHome := true;9 c& B# }" U) a
                        rgManager.tryToStartTransOrder;
+ `& |" b0 x# D                        if @.Destination = void
: ]: J4 d9 c! k                        then -- no transport order for vehicle @, L- e3 m/ e! f  M
                                @.Destination :=
/ Y2 y9 v& A5 S                                rgManager.nearestFreeStation(@,track.~);
7 T* Y$ f5 K0 u# s                                newDirection(@);   ) o3 J  b& i' }7 T" W8 f2 I
                                if @.Destination /= void then
% q, _: m; o1 q8 [9 N! w, ]: `8 ~                                        @.Destination.NumReservation :=
, \  ?& e( Z* ?4 B2 v. T" Q( q                                        @.Destination.NumReservation + 1;( Q9 z7 ]( [. I2 z5 v& ^0 J1 B
                                end;
1 Q; l5 M3 L  A4 u8 [9 R                                @.CurrIcon := "drivingHome";
; }: \) d6 e# f% h                                @.DrivingHome := true;
) M, y/ b- i- A9 o& z1 {                        end;
3 E2 F* O8 n& `) F% k+ K: y8 y! @# L                else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 \4 ]7 {' W' ]
                        part := @.transpOrder;
, n3 n3 ?7 r) |. X4 {1 }9 U2 \& E' s                        part.move(@);-- load part. [6 ^# E# f. U  ]) ?
                        @.CurrIcon := "load";
$ g! Y2 p4 O% B! ?1 N! m4 s4 \                        GlobalDistObj := part.globDestination;9 Z2 F4 g+ z8 L5 ~! s
                        assignLObj := rgmanager.rgAssignL;- V. ]0 ?/ D4 T8 \8 y3 {( s& n
                        row := assignLObj.getRowNo(GlobalDistObj);8 V7 |+ `, l( Z2 ~# N; Q
                        if Row = -1 then -- since 70
4 y8 v' ?8 |+ t; J4 }                                if lan=1 then5 U# \, O4 ]" J2 a( x2 l* ~/ y
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 u! ?, N" h6 l2 ~/ k1 ]8 d                                                to_str("in der Andockstation: \"",?.~.name,"\""));% _% p( M, G* M. W8 ^, H! t
                                else
, g; A( K- Y! h$ Q% Z5 G" J1 C                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% l% x. N8 r6 ]
                                                to_str("in docking station: \"",?.~.name,"\""));                                6 |6 |  m* c& `$ e3 ]
                                end;8 M6 B3 H; r: \2 Z% ?/ |
                        else
5 Q. Z5 o4 x! `. L) M                                @.Destination := assignLObj[1,row];1 P+ Y/ L4 F0 ^
                        end;                       
( G- }2 |  N5 k                        newDirection(@);
2 }4 _1 z/ x/ Z0 _                        @.HasOrder := true;
1 h; y2 \+ T; T9 b* t3 [                end;" ^% h! }& \( E+ w
        end;
' c  u2 @% @$ O) O5 S+ V4 \( X" lend;        -- of the method
* \2 O2 a1 `( M$ x* z
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 " Q# `7 h( x, }
. ]9 I  _: W- e' g( M8 o
这是AGV_putin中arrive的method。) R2 B0 P; i; r& l! F
; g; K3 ?, }! i: R) G
当到达物料速度越高时,这个报警更多,# z, t5 s$ v! ]; I" M* g0 U
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。, i; [: `9 {. v; N
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
9 Z9 x, S' p3 B1 E6 l; F' P9 v/ c/ P& D
另外一个小建议,就是move,所有的move都可以这样
. m+ [# j& J1 p! {( x* ^* \: ~if not move() then debug end7 p6 `5 k% N( I7 `0 W" g( T
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
1 y* O/ V2 r+ I; q3 `plant simulation中的free libraries有AGV模板,* V4 H6 o8 A+ n" O2 S# J" Y+ u2 @: d
里面也有案例。  I/ G4 _, F8 k. V
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
7 {# F" A' D; e" J) \9 N; h6 G2 \( \( K
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
/ E+ m6 w2 y% R! f; c2 b& u9 D0 V( \4 ]7 G
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 * y) i, T. ?6 ?% Q+ ~: I; W6 e
这是AGV_putin中arrive的method。% s  `/ f0 H# {5 Q6 A  F

7 W4 ]3 q$ |( b/ n. v& J当到达物料速度越高时,这个报警更多,

8 I% ]5 }$ x. }0 O( Q9 T, a另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-19 23:14 , Processed in 0.016892 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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