设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8682|回复: 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'
% C+ c7 ]0 J8 F9 z- T- I*/
- R0 u6 ~- b$ ?# sis8 `- S  s: C' L: V. A
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 p+ q0 G2 a. m  X# N9 O' g; E
do
) o* T+ d4 u) Y/ |# \1 k% [1 }( p        Lan := rootfolder.Internal.Tools.AOLlanguage;
/ u& s+ u! O) F) U" l        if current = @.Destination -- else return
* T  {7 o, p" j  J/ i3 v5 J# X        then, ?1 ?+ b8 q" o5 }, h5 F+ m
                @.Destination := void;; U- P+ e* t0 l+ g. a( L7 O( |8 J
                if @.occupied then# m9 t% r$ w" `" Q! u: n) _
                        part := @.cont;
# D- B% f' A/ v$ v* Q                        @.transpOrder := void;2 Q- g7 B* n$ t6 n3 |+ [* l
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 o: I' r- S5 S" f; e* y8 ]; s9 H3 B                                @,root.eventcontroller.simTime);$ z8 g; V3 j% S4 l% d( f2 x& T
                        @.HasOrder := false;( r- {; H6 Y! S9 F
                        @.DrivingHome := true;
; c4 b! P- p& e' x% ~2 }8 K9 ^                        rgManager.tryToStartTransOrder;' F) n  [* y( j$ ?: W
                        if @.Destination = void
  v5 C! Z4 y0 F4 ?! {7 J                        then -- no transport order for vehicle @
: I8 E5 @# v3 G8 @, `. j1 q                                @.Destination :=
6 g, t1 q* D+ m3 h' D; @  [                                rgManager.nearestFreeStation(@,track.~);
2 |9 H; q: `+ Y                                newDirection(@);   1 S3 c* g2 ~' P5 c4 m
                                if @.Destination /= void then
$ c. B1 |9 r) v                                        @.Destination.NumReservation :=+ O) F1 g( {% g' ^
                                        @.Destination.NumReservation + 1;  O9 ~# l8 Y3 p0 J7 L
                                end;
  k4 c! V# X) z' P: @                                @.CurrIcon := "drivingHome";" b5 x0 {: B7 R
                                @.DrivingHome := true;
3 I9 L" f- N; J. d* P  w                        end;+ l8 W0 ~0 J2 {7 Q% A! ^4 T7 ^# i
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
  l- p" K8 o) o. Q1 `9 b                        part := @.transpOrder;
. X& v3 P, _& o9 Y9 v                        part.move(@);-- load part1 S) l: C6 c& z6 ?' i5 G6 T
                        @.CurrIcon := "load";% ^& C1 Z# J  N
                        GlobalDistObj := part.globDestination;
6 h: B# V4 c6 I! x. m                        assignLObj := rgmanager.rgAssignL;
0 m! B  K! F% V& t% ~" C( w                        row := assignLObj.getRowNo(GlobalDistObj);
/ ^. n( C6 q1 y/ Q+ a" _: A                        if Row = -1 then -- since 700 [6 F3 Q$ E+ i9 ~1 P% W% C/ x
                                if lan=1 then/ ]& }( U" y) \) b, a1 H2 {
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& y9 Q: S9 I9 H+ |3 H: {4 @                                                to_str("in der Andockstation: \"",?.~.name,"\""));$ T& A- [% [- W  ^, v
                                else# B; @/ X  Y6 ]" p. E4 `- G0 I
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* K' }, e* |- K! j( t$ [- V, u
                                                to_str("in docking station: \"",?.~.name,"\""));                                ( G  A+ F; v, Z
                                end;3 y4 u, M" Q' T% R
                        else8 `) ?6 A+ ?/ b/ z3 n% t7 D; ]9 Q& {  u
                                @.Destination := assignLObj[1,row];
/ z2 C) z* ?" C  a( v2 P# X                        end;                        - L% I# w, O& t3 @$ _1 r
                        newDirection(@);
& \6 R  V# n0 n5 m/ A; w* f+ ^                        @.HasOrder := true;
) P5 f( W- n& Y6 H: s                end;* [5 M5 W6 P* ~$ {' r9 k' B' ]
        end;
4 o1 t. w3 h. Kend;        -- of the method
# N5 T9 v8 S& ~# U$ L. f# S! ?
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
/ S  k  I0 s# I0 j) s+ D* j# y' y. W( T" L$ |
这是AGV_putin中arrive的method。
( S  i& p- _2 n2 c) ?/ j
: v# i/ M- J- q% ?* m, {" P& d3 R  y当到达物料速度越高时,这个报警更多,# W$ z! x- N% ~8 {
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。) H. V6 Q2 w, g, Z" n/ l
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; t; U* H3 L* z5 L; s- f( |
* ]+ E. J' U1 c, ]/ y
另外一个小建议,就是move,所有的move都可以这样
' t0 p6 W1 @2 M: `# Lif not move() then debug end
" P6 r' ?' A& y2 M% Y" ]这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。3 y4 B9 Y; ^! Z5 T- d% j
plant simulation中的free libraries有AGV模板,
( S$ D8 O( i. u2 l8 p里面也有案例。" o7 J% h. F3 |* l* I7 Y
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
- f: f& x1 P6 c, Z" k
; ^, [8 @* _5 _& C5 l5 n我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 4 h! Q# a8 {! J+ a
+ l' L% {/ Y  o% p. d  s' u
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
4 V; r" d* M; B3 v2 P这是AGV_putin中arrive的method。
3 T' P% e0 P7 j0 y$ @$ y
% Z3 O4 U9 Z+ P- H3 n- H0 I* J2 `当到达物料速度越高时,这个报警更多,

: ?: q" Q& j2 }* a' f: |另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-20 01:18 , Processed in 0.014116 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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