设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7063|回复: 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 S' y4 q4 F; V5 U1 l8 ^) F
*/4 ~% h* Z% T% B1 Y6 _! ~
is
; e, c* g: l, D  [3 k8 }, ~        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: Y# }5 S9 @8 V7 ~# z, k2 ldo' n7 H1 G4 ]* p6 q0 g1 M0 @
        Lan := rootfolder.Internal.Tools.AOLlanguage;& |9 |2 l# j0 V% `2 E
        if current = @.Destination -- else return9 B( h1 d5 }/ ^8 Z: N6 P% p& v/ ~5 D
        then8 r- m" C7 ~( x/ w& ]
                @.Destination := void;
: v, r" K6 m3 S: E1 e; `- V; j                if @.occupied then; c* K( C) {3 b- G0 C- q; L6 z
                        part := @.cont;% P! B0 B$ K) x9 `
                        @.transpOrder := void;, E- n1 _9 k4 v2 I
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
  v, O' Q, W: Y  Z+ A                                @,root.eventcontroller.simTime);. I$ ?5 m6 D0 S- X8 M- g# r
                        @.HasOrder := false;% B5 Q1 ^$ [+ S) Q$ y+ [
                        @.DrivingHome := true;
: n0 r/ I8 Z0 K5 b6 }! t; z: U                        rgManager.tryToStartTransOrder;+ C+ h4 f* }- c- m' H
                        if @.Destination = void
2 R, g, a- j+ H6 o3 R; k& M+ L                        then -- no transport order for vehicle @' q; m- m! v4 Q! n. S) K
                                @.Destination :=( ^+ v) \/ E, R% Y% ~0 r1 v6 P
                                rgManager.nearestFreeStation(@,track.~);4 k5 Z2 z2 m/ v& F  X; u# ^/ I! O
                                newDirection(@);   
2 |. w" u1 E( [' R% V; I  j6 y                                if @.Destination /= void then
: z& ?* ~  I* a                                        @.Destination.NumReservation :=
, i2 W0 }' j5 L( h, L                                        @.Destination.NumReservation + 1;4 N" l, B8 a5 J" G1 [4 {! I6 e% Z
                                end;
5 c: p8 ^* s7 u  Y                                @.CurrIcon := "drivingHome";
/ c) `) w5 p0 D                                @.DrivingHome := true;1 U: _1 h& x& J3 ?' o" H. L/ c
                        end;6 M, s$ O) i/ ^6 f' j+ t
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station' {* R3 j  F, k+ O& ]
                        part := @.transpOrder;
( M, ^0 b% N/ O" @! C) D$ C4 z                        part.move(@);-- load part0 [* a, r1 \/ o. s6 o! f( Y
                        @.CurrIcon := "load";
; |! Q* T7 P% Z4 F# ]0 B  J8 x2 f                        GlobalDistObj := part.globDestination;
' e' @, S: k$ z$ `0 q8 z: E0 A                        assignLObj := rgmanager.rgAssignL;& F2 J2 a  x4 f# T* B& }* m
                        row := assignLObj.getRowNo(GlobalDistObj);3 j8 }- r' r6 g, {5 d' q: D4 d% F( C, a
                        if Row = -1 then -- since 70
$ t2 W) f( D  \( P( s                                if lan=1 then" G: ?$ z( I! Z1 K
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% i; a$ c1 t. Y( l2 d' R8 x                                                to_str("in der Andockstation: \"",?.~.name,"\""));
; [2 T, U4 y: I                                else: |+ g3 O7 L/ j) G
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ o' d4 G. N1 I. H* r                                                to_str("in docking station: \"",?.~.name,"\""));                                6 a5 N0 f* r' {3 [, N, {! ^
                                end;+ O- w* o( o. |4 [3 m5 W! _2 l
                        else' \+ L8 a  S4 J2 E0 {- P2 T- D3 p
                                @.Destination := assignLObj[1,row];
# h7 b) D/ `2 [2 V                        end;                        - l. L; m. Z& k7 E% M. _3 ]
                        newDirection(@);
- H# |  Q* o/ ^                        @.HasOrder := true;
7 D3 y' ], y* q6 W# x" k                end;1 }0 M/ O6 R6 |( p/ X# I
        end;$ ]2 G: R: a* w1 }
end;        -- of the method; p/ d- J: x5 G- g) D) B
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
/ \- [* q) |% B9 U; d- X9 O" F# h$ O* d# K. `) i' P; _8 l# w
这是AGV_putin中arrive的method。: F& y$ i' l% c; I# a

# V$ y; ^% k' j# N) ]当到达物料速度越高时,这个报警更多,2 ~: E$ A: @1 d: b
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。! }- K1 [/ J: c; U9 s- _7 V2 `+ ~
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?0 X$ Y. @& L: N( i

6 y' p4 \$ x* u另外一个小建议,就是move,所有的move都可以这样
( ?* d" X4 l0 {9 ?if not move() then debug end8 N2 A5 c( n6 F1 M3 [  L" U
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。& [" x8 m8 U+ k$ w; M
plant simulation中的free libraries有AGV模板,
' a' }6 j" B$ V( R, x1 R里面也有案例。: h2 s8 o* K2 [) X7 ~
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
: s$ H# I! h" }: s( M- c% M! J& o* ]9 K+ ]! i8 m8 _1 u
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
. Q8 l& ?" Q& J3 j; \8 I; K6 X& s8 T: n
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 1 {3 Z+ [6 N; E9 D! ]" U
这是AGV_putin中arrive的method。
" J& E  U% z0 {
( x; z' R( ^' g) l( Y( K9 a当到达物料速度越高时,这个报警更多,

8 ^; o/ ?! q2 l" f6 d; R  I$ Z另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-14 11:33 , Processed in 0.016308 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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