设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6626|回复: 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'
, d7 P: `, w1 O9 N# x( |*/
* q( J6 V6 _$ s0 b# T; L- Xis: P$ r# w+ f/ [5 d
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 D% Z3 q3 O2 g# z9 ~( n% O
do9 @# q( |4 v2 g6 b! F: G- p7 V
        Lan := rootfolder.Internal.Tools.AOLlanguage;6 Z' q! F8 i3 f; ^
        if current = @.Destination -- else return
! A- g0 F8 c5 A; Z9 k8 ^. C' D2 w% h        then0 I+ v# ]% w; t' |- d) ?% o
                @.Destination := void;; N) H, U: ~2 _9 ~& y7 e
                if @.occupied then6 r7 t' X+ _& K0 [
                        part := @.cont;
! ]+ D5 W0 i2 z8 J$ t8 ?                        @.transpOrder := void;
7 O( A2 y, M; A( F                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 R/ I* \8 i2 W1 @3 P2 Q                                @,root.eventcontroller.simTime);* \! X# [& L3 f/ R$ L- Z" J
                        @.HasOrder := false;
: [* i& b8 d4 D4 T6 }! `3 D                        @.DrivingHome := true;) U( m( Y  D5 y- ~9 T' O
                        rgManager.tryToStartTransOrder;
/ |4 T  ~+ n1 W0 ]                        if @.Destination = void5 c- d+ I1 E* R& o* |
                        then -- no transport order for vehicle @+ K5 L. O1 t' J! H
                                @.Destination :=
% C. T; [1 V/ a) r% o5 `; y* _* L, b. k                                rgManager.nearestFreeStation(@,track.~);
( A* O' v7 t# ]6 w' E) j4 F                                newDirection(@);   
0 u! v2 S) _7 D. a/ J                                if @.Destination /= void then/ m- ]* _/ i7 U0 n5 P0 g
                                        @.Destination.NumReservation :=
* z0 v" S# q" j" {4 v( y                                        @.Destination.NumReservation + 1;( ?; O& z% x5 ?) H3 u# I* ?. }  D
                                end;
6 I0 Y% f' [4 ]) r* O9 {5 [                                @.CurrIcon := "drivingHome";
& X- C' j' z! s4 J                                @.DrivingHome := true;# V% K0 V' I& C' ]! i9 t6 \; n
                        end;
% S3 K+ ], Z( U! S& m                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: U7 w6 w& K6 ^5 X; Q2 f                        part := @.transpOrder;
1 U1 K, t8 n; s( ?8 t; F                        part.move(@);-- load part
& n4 P$ U) p& s. y8 U: D( Q! z                        @.CurrIcon := "load";* M8 r! ^( i  q2 B
                        GlobalDistObj := part.globDestination;
/ A* T- M+ [2 B+ f                        assignLObj := rgmanager.rgAssignL;
! l% i  P) ]$ ^! I. S2 f; v                        row := assignLObj.getRowNo(GlobalDistObj);
# a  ~4 P* v! d- x6 K" n( w                        if Row = -1 then -- since 70
8 t: \9 Y6 ?+ p* q$ c8 U# `9 d, I                                if lan=1 then; @7 t2 h  C( B: w
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' B; g9 N8 j' ]% d6 R* c                                                to_str("in der Andockstation: \"",?.~.name,"\""));
$ S9 h- U2 q0 Y& @0 y8 p) q                                else
2 h& V& B, V/ e3 {( J# v  p' o                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 R! w5 Q) j% |1 r( G
                                                to_str("in docking station: \"",?.~.name,"\""));                               
2 y, S3 t2 M1 S8 U" U                                end;
3 q% k4 T: [8 n( J; O                        else
+ ]: ]3 e# s- h5 [9 l! B- D! B                                @.Destination := assignLObj[1,row];: r' R; [( F+ u* i
                        end;                        8 w; x7 P. e% C- A, c2 H# Y
                        newDirection(@);
3 r0 S; x( C5 `2 |3 P8 Q( c# f                        @.HasOrder := true;
- h6 G. F0 x- Z+ b7 N0 E" I                end;
. s) w) x3 }9 \. _        end;
" F# h9 c7 ]; b# Z( o6 Y  uend;        -- of the method
. f+ V" }* K! o+ B  U* i
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
2 L, M  Q3 a# a! P- x' S! z1 M5 j; C' [8 _/ s  p4 C; |
这是AGV_putin中arrive的method。
, l2 Y7 c' [. k: \5 ^
  U) z) B' j3 V( F, U* t5 a当到达物料速度越高时,这个报警更多,
2 M" f- F; z1 D7 Q# v( F可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
0 {# `$ ]5 \9 f& ^% @5 \程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
9 D2 z- O  M$ Z  {4 s! E! K8 I" y" Z( w3 D2 o
另外一个小建议,就是move,所有的move都可以这样
7 v9 v9 [9 y& p% W5 C8 P4 l. t6 |2 Wif not move() then debug end/ K0 ^5 S, r% ?, m. f' e
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
, l5 l2 u5 D8 w7 E3 Y. N# R$ Lplant simulation中的free libraries有AGV模板,
5 g5 w. y) r6 k/ ]* Z, j里面也有案例。+ I* t( M; c- g0 ?
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。( V+ J4 [1 z4 k6 H
8 [: y# L4 F& u. f) E+ L1 w- ?: }
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
* P5 n) q$ s: g7 \
# u2 U+ z+ w. o- S那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 % Y. d; M" o' P( v0 G% d, G
这是AGV_putin中arrive的method。, u1 x0 K; n, ], X. w1 L: c( S

# S. F: L3 J) v; D. I) ~/ e当到达物料速度越高时,这个报警更多,

7 H  W6 H# C  n2 t4 q4 t" N3 U另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-17 03:02 , Processed in 0.021699 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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