设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9527|回复: 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'
; O+ P% B$ i6 h*/# D% G' v$ a+ c  `
is
/ C9 }1 c# F% z/ s& d        part, GlobalDistObj, assignLObj:object;row,Lan:integer;- w6 e# {' H: v. ]
do2 n* s2 j) D9 t. S) P0 {& R
        Lan := rootfolder.Internal.Tools.AOLlanguage;
6 d# S# z& K3 d/ |/ u9 ~* M! c        if current = @.Destination -- else return+ |* N8 S, N6 x! A: b8 O
        then! _: e, o( M! h. ^, x) C8 f" r
                @.Destination := void;
- m& t( `) b! _( j7 M+ |                if @.occupied then
0 v% ]  p9 k: F. e  t- w, Z1 ~4 {                        part := @.cont;
+ Z8 M5 M' Q: @& a) Y                        @.transpOrder := void;
( ?& m2 L8 ^- W1 e1 a                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ {+ k& r9 ?* m& ^# g7 Y3 _
                                @,root.eventcontroller.simTime);
- z/ b" }- r& H! O- J! L                        @.HasOrder := false;
; o3 D* h8 r5 r9 q) i0 \5 W                        @.DrivingHome := true;; u1 b7 N; k# Q4 n0 S
                        rgManager.tryToStartTransOrder;
, q& z: u$ W$ _" i6 u5 F                        if @.Destination = void8 k: a8 V# [( F1 Z0 Q' z2 p3 l- z' ]
                        then -- no transport order for vehicle @
7 u3 F3 ?$ a. J# `& e# j' C                                @.Destination :=
0 q7 i( m* w& ?. w0 ]3 S  ?8 a3 y                                rgManager.nearestFreeStation(@,track.~);
+ i: l! Z. Y! w+ ?                                newDirection(@);   + O3 a2 F# e3 L+ r, z4 q" F  N# w
                                if @.Destination /= void then
6 s6 y+ P( Y0 w                                        @.Destination.NumReservation :=
0 f7 v: {* ~/ _9 v+ |                                        @.Destination.NumReservation + 1;  z1 ?6 O1 s; c* x: U8 A% e; @
                                end;
  y7 i. h8 v) ?4 Z. }, e                                @.CurrIcon := "drivingHome";9 D* n. J4 U6 \& d" K9 x& r  D
                                @.DrivingHome := true;
& j2 L9 g$ f9 t0 r                        end;
7 \4 T8 K. r( {6 b  Y5 K/ v4 G& U                else -- the vehicle @ is empty, both vehicle and part are in the same dock station, U! _8 z- x: @0 s6 E+ J
                        part := @.transpOrder;; E0 p' f. R+ Z% X
                        part.move(@);-- load part
* a  U. C6 T8 }1 g                        @.CurrIcon := "load";
5 G* Y: O0 D7 `" w                        GlobalDistObj := part.globDestination;/ R9 ?. }6 \4 t# Q
                        assignLObj := rgmanager.rgAssignL;( x* p9 U+ }9 U' r$ }  U
                        row := assignLObj.getRowNo(GlobalDistObj);
7 t! S% m) T2 Q$ O9 y0 B: q: T" }                        if Row = -1 then -- since 70
2 C3 H8 t/ q7 g0 w' K0 F                                if lan=1 then6 @, s9 F6 J5 x
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 g; h& j: C2 O! T* q
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
4 d8 u. z1 d/ S  F3 M                                else
2 h' M1 v5 T* t) m" a4 g( P# O% |) v                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ ]1 B8 n5 K5 r5 y* g
                                                to_str("in docking station: \"",?.~.name,"\""));                               
4 O% S7 {5 X" `: j! ]- a4 b                                end;
( w3 K* z; W6 D1 e                        else3 x% L8 O0 k: e; v" q! Y/ K' T
                                @.Destination := assignLObj[1,row];+ N: i" i# d" C4 f$ ~; r
                        end;                        4 F) {# j' _  m7 y& \3 {3 \
                        newDirection(@);
# D/ ~/ X- s" n. a7 c0 l0 `                        @.HasOrder := true;4 K6 E/ |( l/ V2 N
                end;
+ ]* V, R  }2 H$ l+ h8 _. q        end;  \. H0 v( R6 z6 v- }
end;        -- of the method
- d2 M( ?. s! ?
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 " @( C& ?# N) h8 t3 ^; q) X7 K
! G9 O4 k1 Y5 d: d' n1 i5 `
这是AGV_putin中arrive的method。
0 R, a4 J" t+ G; T& `; |# A8 O2 R4 C0 _: I& A" d. T* y
当到达物料速度越高时,这个报警更多,3 C/ n4 ?9 V- O2 S( {; V' U
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。. }" J5 }; J) H% h: W2 \) a
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
6 C% F" P( O& M5 o1 E, o3 g) V; P
5 e, |% Y. U3 B3 ]3 b$ F% i另外一个小建议,就是move,所有的move都可以这样
( ^( B( T! h0 W9 Wif not move() then debug end
2 E3 d, d/ {9 s) k+ I2 M这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。+ T" Z) ~  R; C
plant simulation中的free libraries有AGV模板,
- F3 v: j  |9 g2 V) d; H里面也有案例。# N/ {  ^0 O. Z& `4 e& S( ]4 R* \
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
9 ^5 j( r2 t5 U4 Z1 ?8 `7 }; T9 e- U( W# M( ]/ q/ @
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 6 q. C1 a; P6 |( L# s# ^+ C
& b2 Q% V9 ^( [6 o& h; n  q
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
, o/ H1 i# Y% A) i3 H这是AGV_putin中arrive的method。, i1 u" [1 Z6 x8 a
' c- Q, N  B( t# _% S1 Y# t0 X
当到达物料速度越高时,这个报警更多,

4 }) P1 U. k% V8 i4 E* P( \另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-6 05:49 , Processed in 0.019758 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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