设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10108|回复: 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 U3 `) f2 y! {8 b! ^& J& T
*/7 _" b: t* m# t& s
is
* g4 |9 g1 f8 \$ ?        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 o$ g: L& _& {! f. Mdo5 S, N5 y5 K3 p' \0 j3 h5 M5 A3 l& A
        Lan := rootfolder.Internal.Tools.AOLlanguage;
2 Y6 S0 W; _; s        if current = @.Destination -- else return: m/ [: s0 `: A0 n5 d
        then0 N3 C7 M9 h, L7 u
                @.Destination := void;6 i$ c; b: }9 ]/ G% X" Z$ K
                if @.occupied then1 ~" g; q7 q9 s$ V; i6 ^. U$ ^
                        part := @.cont;& _0 b* m( ?) Z% D6 c. J) R
                        @.transpOrder := void;' p! N0 M! h& w
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 E9 j) z5 b$ M                                @,root.eventcontroller.simTime);4 h& _* R0 P  f0 B% @$ V" ?
                        @.HasOrder := false;
8 o: ]: r$ W! q# r, m' f                        @.DrivingHome := true;
) r; F8 E5 @% M, p/ i4 R                        rgManager.tryToStartTransOrder;
& b0 {5 c6 [, e) y4 X4 F% H* n                        if @.Destination = void$ U! Z' [  o4 H
                        then -- no transport order for vehicle @
2 g; f3 w# O( H1 e                                @.Destination :=$ r# G7 `& f" P  O  a/ V% ?2 D8 x7 d
                                rgManager.nearestFreeStation(@,track.~);: _9 N+ r4 H; H% ?7 R
                                newDirection(@);   3 J. Y# v1 r: ?) _: @
                                if @.Destination /= void then
- a% }6 s/ d2 L! I                                        @.Destination.NumReservation :=
# f* i3 Y5 l4 o9 V                                        @.Destination.NumReservation + 1;
, f/ M2 L. s) o2 i8 r& E2 t9 s' Y) A                                end;8 w& K# B1 h& w9 A$ f. B1 ]# z
                                @.CurrIcon := "drivingHome";* p0 Z/ q8 u  e8 N
                                @.DrivingHome := true;$ ~+ X. {6 ]% z8 x& p
                        end;
  D. C; z3 }" n                else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 _0 J: j* R: k0 O( E% r" h
                        part := @.transpOrder;9 p7 ]% i, H4 U8 H
                        part.move(@);-- load part
7 y$ }8 g( ?+ ]9 k2 x7 h# E                        @.CurrIcon := "load";# A9 \0 p4 I  N8 Q7 l
                        GlobalDistObj := part.globDestination;
  l& [3 \! C  q& I6 f5 J                        assignLObj := rgmanager.rgAssignL;* u5 o3 U7 v: r: \* C2 U: h
                        row := assignLObj.getRowNo(GlobalDistObj);
( g) A$ r3 B% x                        if Row = -1 then -- since 704 H# |7 Z, @0 I4 a- N  m
                                if lan=1 then
. a5 i/ Z+ k# ^3 d" e, X                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 L- o( f$ {/ t# L2 X8 s! o  u
                                                to_str("in der Andockstation: \"",?.~.name,"\""));: C9 z; \6 [$ W) o' f6 q( h
                                else
8 F4 q$ o. Q& z/ n7 M1 s                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ o* ^  ^9 E4 Z2 X8 h  q# k  _
                                                to_str("in docking station: \"",?.~.name,"\""));                                ; Z4 \; k) M: k, u
                                end;
+ `3 l, k+ Z  I$ {) I6 `8 I: G                        else
6 s! T7 N9 ?. ?( }8 r                                @.Destination := assignLObj[1,row];
9 N- b+ G& Z0 Y& e8 p' J6 D: W' U                        end;                        0 j% {; ?8 x* x$ {
                        newDirection(@);
9 N) y+ E5 ]& ?2 u                        @.HasOrder := true;! n  J# ~' e: C: q
                end;
: ?/ G0 ^7 b1 a) N. v2 P) }        end;
& I9 h( C. q; H- u4 S* ]- P. u; B# uend;        -- of the method
& ^) p- M( ^# x4 H+ Z
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 + u4 c6 d; _4 @) i/ Y7 H( R

0 j" q  R. ], {这是AGV_putin中arrive的method。
: C! Q$ O9 i" q' e
, H; s, T/ k5 I$ h( [0 P当到达物料速度越高时,这个报警更多,3 _! ?" f" c2 x
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。* N5 ?0 \) g% v$ x3 a8 W
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?0 W2 l% H$ E4 Y0 Z2 V/ z8 \( {

6 J( E" b' v) Z; k另外一个小建议,就是move,所有的move都可以这样
$ Y1 |% n! @( Hif not move() then debug end, h3 J9 }1 q' \4 `
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。) ^' F0 X8 l3 {. k$ a. K( s" T
plant simulation中的free libraries有AGV模板,
- r% a$ V) X: T( w0 l, c里面也有案例。
' T0 T1 v# |) F1 B' c% E我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
7 K8 _) j" N" e4 M6 E# F' I( o1 D
5 Z* c! A: Y( X' p2 @/ D我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
( m; {$ {& J# ?) @8 i
4 X' B" I  z4 n5 F  i那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
9 C( J& V" L; c  m2 M这是AGV_putin中arrive的method。, l& v" n/ R* {

& \' M) p9 |7 A+ D: S当到达物料速度越高时,这个报警更多,

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

本版积分规则

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

GMT+8, 2026-9-13 21:46 , Processed in 0.022849 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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