设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9768|回复: 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'
. {  I  w4 p- ?$ K*/+ _2 I) ?  ^, |! b; @+ G7 k; a
is: R1 b- z+ K) E7 n2 U
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# C8 \0 d" K" e  Q* Vdo  ~. f4 q: M/ O! S4 V2 r. \
        Lan := rootfolder.Internal.Tools.AOLlanguage;5 B8 J* O  s* n7 d4 i
        if current = @.Destination -- else return
: @4 f1 U% {9 `6 n/ o* J        then
& O/ U. w) J: j3 i+ ^                @.Destination := void;  G( l. e& P# f% V' t$ t
                if @.occupied then7 M( Z! |6 C6 Z7 z
                        part := @.cont;. K' w: ]5 {$ h7 D( Y) o
                        @.transpOrder := void;
0 A, B$ M0 q" @4 |% _$ t! g  q' w                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 I3 G/ h# U' b" U; Z                                @,root.eventcontroller.simTime);
" \7 r, M0 O1 \; r                        @.HasOrder := false;( ^% m5 b$ Y: |% k: O! |
                        @.DrivingHome := true;
* X+ k" J( @8 F$ \4 O                        rgManager.tryToStartTransOrder;, b* r# F$ ?  @9 h0 C
                        if @.Destination = void
* ^+ k/ f, J  ~! s, [                        then -- no transport order for vehicle @
. j- E6 q: u# ?9 |# [- c                                @.Destination :=& C8 q- J8 l7 P6 A5 D# |; z; j2 K
                                rgManager.nearestFreeStation(@,track.~);  b0 w; c6 O7 A) K
                                newDirection(@);   1 s( W9 Z; o; w4 ?9 S0 d
                                if @.Destination /= void then1 h" n! _* p1 b6 ?: E
                                        @.Destination.NumReservation :=
( O) B* |$ J2 K                                        @.Destination.NumReservation + 1;
0 r$ x# S  G* U) ]/ t% [                                end;
4 h" n& J; e* j* R& B                                @.CurrIcon := "drivingHome";
1 f+ M# r- b3 b$ \) h                                @.DrivingHome := true;" e1 q( m( k3 j7 b. N/ G, l
                        end;
, M+ r6 T, o- ]  }                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! P8 U/ L$ R: W                        part := @.transpOrder;0 s0 j$ j+ b+ F  Z  V: A8 b
                        part.move(@);-- load part7 p- Q8 m* W9 t2 N- L/ W
                        @.CurrIcon := "load";3 q& s6 g' s) @# A  G/ V; F+ \
                        GlobalDistObj := part.globDestination;" u7 _8 H- c9 s, g
                        assignLObj := rgmanager.rgAssignL;
2 P' l3 x# L" ~' l, h                        row := assignLObj.getRowNo(GlobalDistObj);
, G. X. l) _% ~5 z# O0 H% d5 u                        if Row = -1 then -- since 70' E8 k- v1 g+ Z6 U, }* r4 Y/ k
                                if lan=1 then
. F3 J# \+ l3 K' Z( O                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),  J2 O4 D( |7 T1 k, H! P
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
- T, v8 t, b4 F' u7 K                                else' }3 }" A/ x6 }8 R' y
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ ~& z0 [( }- r$ P' b                                                to_str("in docking station: \"",?.~.name,"\""));                                + G7 d5 p( @: x
                                end;! u' }- |9 P! k* F  Z
                        else# K1 L3 g! \' o2 `
                                @.Destination := assignLObj[1,row];* \* F6 `6 s- t! y/ J) E8 O" v
                        end;                        % E  R: W# c8 m( e8 G! p
                        newDirection(@);
, V, L% U# B, R5 P9 i: k) f                        @.HasOrder := true;0 f+ m7 x6 g+ n7 f$ S8 j9 S& u
                end;  _4 I' L2 j+ B) Y  i
        end;* {: t: I9 p; N( c+ i  L
end;        -- of the method$ m; l; C# E; C. c& f3 E
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 / h5 I1 F2 _9 X  y- H
3 F: M' Y4 I, ?* C
这是AGV_putin中arrive的method。$ ]0 k/ |1 R0 u  |2 @
. V: J3 Z1 M6 x, G, @+ ?) y0 T' ?  f
当到达物料速度越高时,这个报警更多,
& p6 Z$ o% i$ K' N! }% T可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。0 o( Y$ ^! f8 e
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
/ z3 c& E. t$ |* t
: {) R; {9 f& d: P+ q9 d0 g! o8 {: f另外一个小建议,就是move,所有的move都可以这样) V7 Y9 y8 _' h0 x7 d# m
if not move() then debug end5 z. N% `3 Q) {! E4 Q
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。7 {2 |  G) f* r4 S1 F; w6 _
plant simulation中的free libraries有AGV模板,9 X9 |* O( \: m, W3 C6 u/ U
里面也有案例。
( `+ v$ m. o% o4 D& U, n我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
5 T7 I2 K5 ~0 ^. u
, [* }7 M  z0 Q) x我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 0 q4 U) T+ I$ a$ P

& M( C5 L( l% Y/ H4 Y7 K那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
! I2 B$ h# U9 k, R8 J" l, z这是AGV_putin中arrive的method。+ u% M' T6 ^2 b7 u2 D

5 P# N/ i; L/ \  R& D当到达物料速度越高时,这个报警更多,

* z7 v1 Y$ \. j. F& W7 n  g另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-23 15:46 , Processed in 0.021394 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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