设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8626|回复: 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'
0 L- a4 N  _, I" [*/
  m0 ^& W. H1 d" D2 c$ U2 ]0 tis4 v' v* l: N9 b8 |) ^0 G. _* e
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 a  x' n! ?9 L1 x+ ado% h6 l: e' T, G) @
        Lan := rootfolder.Internal.Tools.AOLlanguage;
$ p6 H" [: P8 o8 O! `        if current = @.Destination -- else return
% l0 y- m9 @- @$ I$ b+ O        then0 {! B% Q# n" J; Y% ]! {  ]9 x2 w0 S
                @.Destination := void;
- }# Z5 }2 R9 H- K! k                if @.occupied then' l. u  B$ D" P+ Y' z; q2 m, i
                        part := @.cont;
. f) ^0 _0 Z# R9 L& H: m) K3 q1 r                        @.transpOrder := void;
# o: ]' f' ]2 P; r" {0 A1 l! K+ k                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; e* R& u' L0 J) M( v. T4 p3 d1 H                                @,root.eventcontroller.simTime);7 i+ n- H, _7 A: D3 ?
                        @.HasOrder := false;
4 g1 r- M& N$ W0 s  A% a. s                        @.DrivingHome := true;
, e1 C# J, N% Y' S* v+ s                        rgManager.tryToStartTransOrder;
2 {- b1 w. r: S+ M( a& H% B% X                        if @.Destination = void
" f+ P" m4 w# v* V4 z7 E                        then -- no transport order for vehicle @
" C. k  X# o( y- b" O9 T- w                                @.Destination :=5 a" y% z, H1 R, D# H
                                rgManager.nearestFreeStation(@,track.~);* h, e- V# s3 b3 i+ a
                                newDirection(@);   * b7 q& Q/ G3 G7 Y0 ~' L
                                if @.Destination /= void then. c+ a5 N' A; }8 r
                                        @.Destination.NumReservation :=
% y1 I+ G0 ]' _2 \                                        @.Destination.NumReservation + 1;
( M2 p, `& }/ l  b( k) J" c                                end;1 p% E% d$ _# d
                                @.CurrIcon := "drivingHome";
! d+ ]1 v- D0 F* s9 ^" @                                @.DrivingHome := true;
/ V5 I% u; X7 c* C/ _$ S                        end;
# I; q$ ?. T+ Q+ [                else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 ~( o$ t3 h6 ], f
                        part := @.transpOrder;* O% \+ ~2 p6 W: H; {" f8 ~
                        part.move(@);-- load part
# h! r2 ]# n4 g% }* h( B                        @.CurrIcon := "load";: V5 m, ]5 _; Y% p' ~7 q' V
                        GlobalDistObj := part.globDestination;7 j# F2 a% q) y. V1 |
                        assignLObj := rgmanager.rgAssignL;1 `/ g  q$ k& ?1 X; Y1 A( d8 G
                        row := assignLObj.getRowNo(GlobalDistObj);4 ?8 Y9 }' x+ |  p/ E+ J7 C: W
                        if Row = -1 then -- since 70( r; A, H, g2 b, m$ v5 m, V  k
                                if lan=1 then( E+ M2 O* Z+ p$ Z
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: D: O% o3 d7 t" A$ I: J0 f8 J' N, W! [
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
- L8 x% q; x* B3 N; K                                else8 q7 v' x1 R$ q( k8 M* v' l
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 E( l5 J4 Q# H' S. f) F  F                                                to_str("in docking station: \"",?.~.name,"\""));                               
2 j- O& |# }  b, a& b# `, _4 P                                end;
" j0 g8 o& a' _# r; Y                        else: o; I- F  v* P! `& B7 F' A- R
                                @.Destination := assignLObj[1,row];0 M% ?; {3 }8 ^) d' n6 F, X
                        end;                       
7 o% m4 w" f; u; n# k3 s                        newDirection(@);
* a4 K0 v2 g- \/ @                        @.HasOrder := true;
- }6 S  p- z. v                end;/ }8 H" f) J. {; y. b" ?/ {
        end;
2 [0 q% D! Y+ U* }% A$ @# fend;        -- of the method
8 O/ _6 t) |  b
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
% Q8 f4 K& h, j) B5 f8 j0 Y3 n, U: v% H3 k, U, }1 m. l% d6 p
这是AGV_putin中arrive的method。
7 e6 R) R: y$ k5 y5 e( {
& J: d7 a8 U' x; Z. I: P; k当到达物料速度越高时,这个报警更多,
. K* P, l2 [3 K, x可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
) m  G) x) K7 r8 w2 E$ m程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?+ h- _6 V9 u9 p

7 D4 U2 T( V0 a  @另外一个小建议,就是move,所有的move都可以这样( `) l9 y* o! o" d/ o. s+ C
if not move() then debug end
7 B* ]' e. y$ ]* E2 `* T这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。+ y2 M0 ~! `6 {  k7 |- |. c
plant simulation中的free libraries有AGV模板,7 h; a. G/ V4 }; t
里面也有案例。9 g, |- Y5 u4 N; ~
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
$ y7 `$ I1 M& D$ O0 E2 c; S2 r/ X' a* m
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
+ L, h) o1 Y( [+ V, [
. s1 y3 A3 D5 T% w0 n那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 2 X+ v" b4 P/ y) h& N4 X
这是AGV_putin中arrive的method。% Q' b2 j- |0 P2 v" c  }; V. e7 [) }

2 ?5 F6 i3 y! c. P- r当到达物料速度越高时,这个报警更多,
. b' D+ [0 Z# `9 G
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-16 20:06 , Processed in 1.533443 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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