设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6273|回复: 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  x+ ~6 @) n$ S" L+ a9 p6 Z- I# `
*/1 n. T: r' ?% i  j3 F2 w
is
( Q/ E8 m. B' B8 H9 h5 P6 j1 E" w" ^        part, GlobalDistObj, assignLObj:object;row,Lan:integer;. j0 z$ l5 _9 w3 d2 d! d- r
do
0 F$ W8 U. U4 e% n        Lan := rootfolder.Internal.Tools.AOLlanguage;1 [& ]* M% b+ f# H) a3 Z4 c( V7 U* A
        if current = @.Destination -- else return4 Y7 n& p+ S/ @* G( ]3 p8 |
        then% A9 l7 O- B1 F, L* o) v4 M& {
                @.Destination := void;  z. m5 a. n" r& e
                if @.occupied then2 N% S2 W3 Y: N- _
                        part := @.cont;; A+ Z) Z; `2 g1 o) m
                        @.transpOrder := void;
9 K+ J/ ?0 j0 h. l" k* M1 _( Q4 C                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,  q4 h: f, s0 N. W& J( c( X* R
                                @,root.eventcontroller.simTime);, p) O( V" I; c3 H% [7 J
                        @.HasOrder := false;" c: e- H/ w0 i2 D" _; ], z. U. H
                        @.DrivingHome := true;
: ]3 h) E' L: |) z; e$ H5 L) d                        rgManager.tryToStartTransOrder;
5 |7 G0 s# Q' R: E                        if @.Destination = void
4 X+ a  b0 O$ {# C5 H6 G- Y! ^% p                        then -- no transport order for vehicle @1 g  f' l  X: H4 p5 i
                                @.Destination :=
! d7 ]2 C- T! m2 }/ `/ ^                                rgManager.nearestFreeStation(@,track.~);! z( V- R2 x& a5 n  [" T% x
                                newDirection(@);   5 K3 k" [( C( Q( k9 G/ J% G
                                if @.Destination /= void then
% ~8 f1 O! R5 V7 ^% A                                        @.Destination.NumReservation :=6 u# p% w2 _4 z# ]$ e
                                        @.Destination.NumReservation + 1;
9 b' `% H" W; H* E) ^4 l                                end;  O2 G. v" P  C0 b7 ^; k
                                @.CurrIcon := "drivingHome";
6 {5 X5 N, b* _9 Q3 {7 Z                                @.DrivingHome := true;; j) Z# b1 \: c6 E1 q
                        end;+ x/ Z! q9 s6 g! n' \  I; x
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* ^5 a- M5 X1 J. }8 f                        part := @.transpOrder;
+ ?5 @/ ?( _: O                        part.move(@);-- load part- [/ h+ W! c% K$ N1 s
                        @.CurrIcon := "load";
. d, @4 c9 g. q. O) b/ y                        GlobalDistObj := part.globDestination;
/ P& w- {. f: a3 x                        assignLObj := rgmanager.rgAssignL;
4 Q  e  t/ g& w$ [1 V% v- z5 M                        row := assignLObj.getRowNo(GlobalDistObj);
: w% \9 w, H: M                        if Row = -1 then -- since 700 G; @2 X+ t" l# G" u3 l
                                if lan=1 then
. N& F: i! x0 b7 P8 u0 {                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 T% f; A0 X7 _! E                                                to_str("in der Andockstation: \"",?.~.name,"\""));
; L2 v  |6 L9 v$ z  I. `$ Z                                else
1 [3 s* Z# o" V6 m                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- ^8 w3 |0 \# a, d
                                                to_str("in docking station: \"",?.~.name,"\""));                               
5 q* z* v: h: Y1 c. {: V                                end;
/ E/ {5 l) K( k- f) a- v( ^* J                        else
+ W' u$ Y3 z1 v- o$ F* [                                @.Destination := assignLObj[1,row];
; C: ]; r: p9 J) ?; y7 u5 Z3 i6 G                        end;                        ! E% X: v+ [  m" U1 l* |; t0 }( X
                        newDirection(@);
8 i" }7 s- n6 b( b1 W; G                        @.HasOrder := true;
5 S! o$ i3 U) M7 u+ a0 P6 ]; ^: x% k                end;
* [' a1 f6 h5 S' Z        end;. j) e; f. V1 D- }  `
end;        -- of the method( P2 L9 z$ F; L& z5 Q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ! `9 Z0 I- `6 u& }5 [
+ K, u' n; B& _: t# J) o
这是AGV_putin中arrive的method。6 c8 B) |! w+ {+ j

# K8 z4 g$ a* H9 K2 D5 T; `当到达物料速度越高时,这个报警更多,% ~6 Z% Q. c2 u
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
* I0 I7 x3 P5 t  @+ Z- k2 y* w, k2 L程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
) Z6 m$ ]! B7 y! _' W) h4 A" n# A9 E* X9 \4 ^
另外一个小建议,就是move,所有的move都可以这样
' g1 `$ T' ]7 [% R; \1 J7 C' ^if not move() then debug end
: h: j0 [  W5 F- w3 v这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。1 M: I! t& x! n5 g# O7 D+ ]
plant simulation中的free libraries有AGV模板,
8 `- b4 y1 x9 I- X/ j& }里面也有案例。" p& W6 c7 H4 x7 }4 y
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。6 T8 o% }( m% r$ j  P, l

) ~9 }/ ~* d  S' v/ u" ^我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 8 v% N% I% ]+ @; |; e5 B

% t( m- w3 R7 ~那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
' Z/ h9 k$ o3 m" S, ]+ l) K这是AGV_putin中arrive的method。
! E) @. q+ W9 m+ \  M0 ^0 M; C3 P
当到达物料速度越高时,这个报警更多,

& Q; ^7 R3 m: `, z另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-28 06:19 , Processed in 0.020382 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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