设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6217|回复: 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'
$ K" {2 R0 a4 }! u! l; q: g*/2 Z( X' T9 c  R3 K
is* P% o7 v. _9 ]8 u" q. i
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;! P! T  h0 X7 ~6 U9 k* s
do8 V% d) K! \, C. [
        Lan := rootfolder.Internal.Tools.AOLlanguage;
( ~, P" O) K+ \, F' U        if current = @.Destination -- else return! _! Y- Q  v/ S+ G
        then
- a% ~; T8 o$ ]" B  l' g                @.Destination := void;0 i" u4 ^* S. j: y* M4 p& ?
                if @.occupied then7 Y' ?+ y2 H  Q! Q- M8 s
                        part := @.cont;
9 I5 f, j! Y7 \' c# {- U+ u1 Z                        @.transpOrder := void;4 I4 R3 u0 _* [5 l
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," `6 i& C1 a7 c9 B* M1 C
                                @,root.eventcontroller.simTime);
1 p+ l- P" b' s; l" O8 u                        @.HasOrder := false;3 v6 t; z% W8 }  ~% I# X7 y
                        @.DrivingHome := true;
/ i! F+ N8 O- l  y. b: t                        rgManager.tryToStartTransOrder;+ z( Z& c5 S( [0 e$ Z
                        if @.Destination = void
* \# a; a4 N9 Z! |8 f& p                        then -- no transport order for vehicle @6 E/ y# U' C: c3 g
                                @.Destination :=* d$ Y3 y. E2 Z  _# w# \, D; m2 I
                                rgManager.nearestFreeStation(@,track.~);
& ~2 k  g" A7 H( z& c1 `                                newDirection(@);   * h+ y. v% f* q1 o
                                if @.Destination /= void then
3 O$ V" X& J1 l/ N5 F                                        @.Destination.NumReservation :=6 A# W9 u  T# _- z' Z
                                        @.Destination.NumReservation + 1;4 I4 ?8 F( [! {
                                end;
2 M. V3 ?1 i, P5 h                                @.CurrIcon := "drivingHome";
4 b) p  \: t! X0 o4 f                                @.DrivingHome := true;5 u6 ?( d4 F  p9 Q$ M( b5 Q% H
                        end;4 I0 D" U2 n: E- Z6 |1 w/ e- M
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 e6 z$ t- J8 ?/ f
                        part := @.transpOrder;
! Y& [2 R6 u7 H                        part.move(@);-- load part
2 }% Y' {; a3 r1 `9 @4 {4 ?+ c                        @.CurrIcon := "load";! v- m5 ?" `, F6 N/ Q6 t6 y
                        GlobalDistObj := part.globDestination;3 S4 R% E( _7 J0 X
                        assignLObj := rgmanager.rgAssignL;
/ I$ `' d4 o) d                        row := assignLObj.getRowNo(GlobalDistObj);
1 ~3 I, ^; G9 J/ ?. u& d( W                        if Row = -1 then -- since 70
, ]1 r3 @" v9 J                                if lan=1 then+ \+ y5 X+ n9 j$ X$ x
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* Y/ `! K+ z  k- W                                                to_str("in der Andockstation: \"",?.~.name,"\""));2 M  L$ n0 d. |) L7 {! K
                                else
: T& F& l+ j$ a. l                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 I  |2 f" ]2 _+ R- s
                                                to_str("in docking station: \"",?.~.name,"\""));                                # R# q3 N0 y/ s" i
                                end;8 n4 e" Y' E% C9 h4 ~: S
                        else
( T/ i+ O1 |, v7 b                                @.Destination := assignLObj[1,row];) U, t9 {* L( H3 d  Z) z8 a! a
                        end;                       
7 F7 e) @9 ?; a3 v1 S3 E  A                        newDirection(@);
7 ]' P1 ?* i) }. K: p# e                        @.HasOrder := true;# x* {1 y) L2 h
                end;  x1 U) f( }* n* N; O. r
        end;
* s6 l: H) t" y; d3 n  Oend;        -- of the method5 ~5 w2 q/ H- ^1 @2 F* q3 F! i
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
# \  R6 H5 v/ F) @* T. I5 h/ Q; T3 w
这是AGV_putin中arrive的method。
. |1 G6 w5 o0 V$ _6 b% x. [
/ k: c9 @1 Y$ n0 S. O当到达物料速度越高时,这个报警更多,8 }" S- ?$ x& P- y! o
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。) y. w9 d( b5 u2 M& S( L
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?* g$ I' X6 c, `* M2 _$ w
$ q1 u0 t5 Q+ k  u+ r! V6 ^
另外一个小建议,就是move,所有的move都可以这样
* r$ C0 [* W% A8 q+ _if not move() then debug end
0 M# e5 a. L: O0 D- Z% K这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
8 S5 Q- _- I% U3 Q& bplant simulation中的free libraries有AGV模板,
+ Z2 l2 j4 Y" |4 t4 T里面也有案例。
4 B6 \8 C) i4 n  z我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
; e! C8 O* e* B  V6 E' u  U4 s, q
0 t0 c5 c$ I6 y" B& X) t8 `我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 : w2 e% |2 B& [! E

0 s9 r, V& w0 m. Q  g那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
! z5 W& [# }9 J. Y, S这是AGV_putin中arrive的method。
$ W- |# `0 ?1 m% C( V' p. z7 K
) I3 _& f' f5 b" R  x6 c& V9 V) d当到达物料速度越高时,这个报警更多,
7 ^( U! Q6 B' s6 r' U4 Z2 ?7 `  @' [
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-25 11:01 , Processed in 0.020793 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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