设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7779|回复: 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'
; F3 r. i4 v8 m) }*/) @7 L+ g, A2 ~5 W
is0 |) w6 y, _& K* {; c/ ^: l1 @
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! n1 |- c& O, ]8 o- hdo2 u5 t1 k& W' D+ n$ l
        Lan := rootfolder.Internal.Tools.AOLlanguage;9 U6 J" Y1 i8 n
        if current = @.Destination -- else return
6 R6 P+ E& m2 u        then" o& e, u6 L) H8 O" V* I: @
                @.Destination := void;7 _( H9 \8 z$ Y* l0 g/ H) w
                if @.occupied then
8 m; a- L3 g% a  a0 K# h1 r0 A# v                        part := @.cont;
: x0 I/ z5 S: @2 K5 k% ]                        @.transpOrder := void;
% _# ?- j/ h  \5 {# ^                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& L# b' r0 |3 R3 }                                @,root.eventcontroller.simTime);# l0 U& l( H9 m  X' P
                        @.HasOrder := false;$ X9 {5 K7 Z+ y' y- X2 d
                        @.DrivingHome := true;7 I- _+ S* b, p3 c# Z& O
                        rgManager.tryToStartTransOrder;
! ?! c7 q2 B6 {+ H( r                        if @.Destination = void
7 p/ J' n7 y0 P                        then -- no transport order for vehicle @5 m7 e+ ^* ^$ n  n: e
                                @.Destination :=* ^; |: q/ w& }4 Y8 x( U" W9 F. b
                                rgManager.nearestFreeStation(@,track.~);
; _- i. b6 c  ?% I- s. I( l                                newDirection(@);   
0 n' h' b* f$ L' M- r                                if @.Destination /= void then
, V+ w8 K' r- E# t                                        @.Destination.NumReservation :=
! @  F% [. L1 E* c7 A                                        @.Destination.NumReservation + 1;
% F+ e9 W9 i6 z" A2 |0 R                                end;, u- T, T' \7 g/ G  X1 D4 v7 T
                                @.CurrIcon := "drivingHome";$ U( D# G4 ^: G5 k8 u( k% J% J2 g# G, B
                                @.DrivingHome := true;
3 k$ Q5 T; R2 w: G1 `; M+ A                        end;
% J+ ]- _2 @/ D; s1 Q                else -- the vehicle @ is empty, both vehicle and part are in the same dock station* w# `) P( H+ C) i- r* f4 Z
                        part := @.transpOrder;
5 P/ i$ t  h  U( s  ~1 c                        part.move(@);-- load part$ m' Q" W6 ~4 g: h2 V
                        @.CurrIcon := "load";4 d2 H+ ~$ O  u$ ^5 f; S6 K; l. o3 W
                        GlobalDistObj := part.globDestination;7 Z1 q. F" |6 H+ F" r9 T' h# H4 \& `: z
                        assignLObj := rgmanager.rgAssignL;
8 |: V! c  ]3 R( ]3 |* n                        row := assignLObj.getRowNo(GlobalDistObj);- ^5 T: B& x& }0 b
                        if Row = -1 then -- since 70) ?9 c6 W: @7 k; b; `( f' p
                                if lan=1 then$ y8 E) S4 y7 D5 D
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),  I7 S, N, h3 D8 o+ ]9 v9 t
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
6 Y2 j0 M3 O8 {, M5 V; K3 K                                else/ @, t, ?/ P9 @* \1 u
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; ~) z+ p4 P* u' p  _! s
                                                to_str("in docking station: \"",?.~.name,"\""));                               
5 C' ]2 a7 G& j                                end;/ H' L) w0 e" c) |+ z$ m* C
                        else, d& q& P6 @- X6 |- N$ S
                                @.Destination := assignLObj[1,row];& L: ~; i( Y$ p6 Q! X) n
                        end;                        6 y! k9 c8 B9 M  G1 p8 ]5 J
                        newDirection(@);
1 ~2 s$ a/ }2 S7 y6 b2 @, }9 ~3 e                        @.HasOrder := true;# N2 Z4 v! K- F! H" x! @4 ^, e
                end;- v; B$ N: l+ x( j: ?9 r# O/ C
        end;0 K+ d9 _4 h/ e- y2 O9 n
end;        -- of the method
" d9 x3 q9 B# D2 W) n1 Y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ; u' `1 ?/ E( B. R% q

. j) W7 [0 S6 X* @4 L' S; U这是AGV_putin中arrive的method。5 x/ C6 @% F" M% Q) B+ W  P2 `) g! @

* e. i$ [4 }& ^$ F9 \$ @1 K当到达物料速度越高时,这个报警更多,; z. Y. [9 O8 l  X1 g( \  p3 x
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。, o- U; U- _9 T* U: m
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
- L2 A& H( C6 Q4 E  t9 [: @& [0 [# A7 z) I3 S
另外一个小建议,就是move,所有的move都可以这样2 K$ ?+ u, M) E, S2 d
if not move() then debug end/ r+ n+ X0 ~+ Y4 t4 X
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。- X* K# i% Q2 h, x# S
plant simulation中的free libraries有AGV模板,
* ^8 b* ^- @' X里面也有案例。" u# w3 Z5 g2 x( m
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。( f) M- z- V+ g; g
/ s# w  n0 m' H7 I( s# {
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
4 C  g# I0 s, r
$ k- p. g" S# j8 C% V* [那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 $ g8 l6 P( r4 b4 b8 T
这是AGV_putin中arrive的method。% J, N0 J4 E6 v% X$ k9 O2 O

# `. x$ Q6 g* Q- J  e3 {  O当到达物料速度越高时,这个报警更多,
' t/ o) v7 A+ G5 N, H
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-29 01:25 , Processed in 0.015616 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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