设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10244|回复: 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'1 A8 k+ @4 m, d
*/
8 i! V+ g6 n) c( a; o  b8 K! }is( v, y( S0 E# Z) s" F, ], x1 x3 l5 m
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; j) f. b+ o$ }, P& t9 B% Y' Kdo
" n$ ^6 X* Y. Q% K: ~8 U8 _% Z        Lan := rootfolder.Internal.Tools.AOLlanguage;
' Y, v' G/ \* X# K        if current = @.Destination -- else return
7 U  n' h2 d) n2 g6 o        then
" `3 h6 q! \7 r" w3 W! Z% X# \                @.Destination := void;# I& P2 y/ c! X5 Z% n/ h7 ^# m
                if @.occupied then
3 M2 |6 y9 j$ D. n# q4 ^+ ~4 k0 ]                        part := @.cont;
- l* R# J0 f9 c6 `+ g! d                        @.transpOrder := void;; S3 Z* O4 P* G: V  `
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& k: [# t0 b+ R) \
                                @,root.eventcontroller.simTime);5 y0 c- O# L- G9 m& ^" M
                        @.HasOrder := false;+ j# [2 t+ h; _5 X
                        @.DrivingHome := true;" L0 ], e9 T( z' O8 B
                        rgManager.tryToStartTransOrder;
' v) M+ @; {  N" i5 T! u. A                        if @.Destination = void
. P3 Z; d9 S4 g5 U' n4 O                        then -- no transport order for vehicle @+ ?$ U* ^. x/ S  U$ R
                                @.Destination :=
- Z, ?0 Q3 ^6 f                                rgManager.nearestFreeStation(@,track.~);
% E7 ?; Z! n% H# N- f                                newDirection(@);   5 w5 ~4 \5 _4 K0 `# C: F, G6 ]
                                if @.Destination /= void then* x1 i8 m* Y* ^. v5 W9 ]
                                        @.Destination.NumReservation :=4 w* m/ {% u2 k7 l6 ~% y% A% \0 Z
                                        @.Destination.NumReservation + 1;
' ]2 ~6 b  k7 O& y                                end;* n. B: Z+ m& _6 N7 ?+ ?* w$ c
                                @.CurrIcon := "drivingHome";
# e7 m8 G6 p1 i. C                                @.DrivingHome := true;
8 [1 z- y$ B$ i9 X3 i, P                        end;) v' h  s% Y6 Q) X2 K7 w- B
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station' T' _3 O. J% \1 k
                        part := @.transpOrder;
4 e" v7 F9 {/ }                        part.move(@);-- load part
9 q( \4 w# y, c  p3 F. u                        @.CurrIcon := "load";8 \/ f+ B! B4 [% P. f2 X" m+ ]
                        GlobalDistObj := part.globDestination;
6 r) \! ]9 a$ I                        assignLObj := rgmanager.rgAssignL;( }/ X- V# U6 ?$ G6 k* ?
                        row := assignLObj.getRowNo(GlobalDistObj);# O6 X. b% U; b6 g1 u# E' L1 |
                        if Row = -1 then -- since 70% L) B' Q- @( Z) o
                                if lan=1 then
5 Z  l& Q; A* K                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, b- u, y, {1 l3 x: _, z& [6 z
                                                to_str("in der Andockstation: \"",?.~.name,"\""));& w/ C' G# A) p  [
                                else
8 g) p% h) W9 d: U5 w4 ~' c                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* _& z- x0 a' C
                                                to_str("in docking station: \"",?.~.name,"\""));                               
# m3 j$ p7 B. R                                end;
3 b4 `+ J; ^9 I4 A- ~1 b                        else( D8 o- G4 e5 h3 O
                                @.Destination := assignLObj[1,row];+ k5 @- o9 m% Z' O( Z- N- |
                        end;                       
7 o- c( q* s4 h, S( U* S3 P* N$ [3 U$ w                        newDirection(@);
% e( R5 q4 d: I# B                        @.HasOrder := true;; K( B. l% [$ `7 }; p0 x- x
                end;4 J" F3 v( ~: {- l; C0 V! m
        end;
6 B; W0 x9 f$ c. \) b$ E8 j) z" Wend;        -- of the method  j+ f5 a% X6 u# x
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
1 U' w) K! N6 x
8 I- B. r# s; A$ @" C7 \这是AGV_putin中arrive的method。9 M( T" ]# V, c$ C* x/ G) v
+ m- _0 ?# L3 }  y: M6 l% B
当到达物料速度越高时,这个报警更多,  E. l1 K2 p' `. z. |0 f4 P
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
! _9 O1 r: Q4 U, l( n程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
& ]+ K' ]8 O- C0 w& q* r" v4 h. T* C; `# Q  ?. x) h
另外一个小建议,就是move,所有的move都可以这样
  a6 h# \/ ?* |3 E  U- Mif not move() then debug end! K$ [  D) N8 y* {& Y. y
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。) D, C& v" n# o
plant simulation中的free libraries有AGV模板,
( |) G- j' l" x8 ~4 c. i7 s9 r: q里面也有案例。2 h- J* W0 A% n5 J+ X
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。; @2 p0 u+ n$ \( x4 F
' W( j5 j6 v1 b# o1 m
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
7 D2 V9 U8 O0 h( U: B" v
* N) A8 ]) q! Z& f那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
, o0 G& D/ f  K# J4 Q  s. s: Z这是AGV_putin中arrive的method。& a5 k$ q  j  r, E8 X) W! W& y
2 U4 C5 [7 Q( k9 T- H7 X
当到达物料速度越高时,这个报警更多,

: L0 e3 v! M( L4 ^8 J另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-22 06:39 , Processed in 0.023597 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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