设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10249|回复: 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'
- s; J9 z# D  m: o& L; n5 P*/5 r3 ^8 ~  p, D  e7 ]
is
3 k1 f1 w& a8 T& V; \        part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 y2 l" F* b. n9 K- ~. w3 c
do8 W+ T- `, _& U5 D2 |
        Lan := rootfolder.Internal.Tools.AOLlanguage;/ C3 W5 G( P! \+ ?
        if current = @.Destination -- else return
( Z* G; s+ l3 Z7 V- s: i        then
. p8 v* p7 E1 ~! N                @.Destination := void;: Y0 I' w) R1 C* t. ~/ w( g
                if @.occupied then/ U1 n* v( C* j0 j9 W
                        part := @.cont;( `5 [( g8 D) Y& ~# W
                        @.transpOrder := void;; i6 ~: W+ `$ n6 H( H+ Q  u
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 W! I2 I5 ]* _9 `; S3 s
                                @,root.eventcontroller.simTime);
6 C9 f+ `1 K' S: l; e' J                        @.HasOrder := false;
8 L: Y0 C, i6 c% W1 ?2 V                        @.DrivingHome := true;
- ~9 @0 Q7 K& j0 b5 p- t8 K                        rgManager.tryToStartTransOrder;
" g: l( N7 G- l$ a9 ^7 f                        if @.Destination = void7 @! n& L; ~  \! H2 I* B
                        then -- no transport order for vehicle @
9 c% e. I2 e' x/ H; d/ Q, ^- j                                @.Destination :=, f- F$ a$ Y+ ?1 m+ y( T
                                rgManager.nearestFreeStation(@,track.~);
2 a4 i5 g0 T7 w) o/ u0 X                                newDirection(@);   
0 z2 E7 U: Q- {- h; C* |                                if @.Destination /= void then
/ `, z/ N& T8 r' U3 [3 n                                        @.Destination.NumReservation :=
8 |  V. b& ^8 I" y( k7 O                                        @.Destination.NumReservation + 1;
: j5 a5 P. C/ c2 V, v5 O                                end;) [' U7 E1 y+ G+ A8 U
                                @.CurrIcon := "drivingHome";
# \6 k# g( F; }& d, \                                @.DrivingHome := true;
; y6 Y. D1 i/ c# e; Z6 _# a2 u                        end;
2 a7 k. T4 f' `' ^                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 Q8 [9 g- U( ]2 f. w                        part := @.transpOrder;
$ g/ h  q2 N) J8 T                        part.move(@);-- load part
" B- O% n( J0 t* c2 h. }2 ]                        @.CurrIcon := "load";
2 z; x' X  q4 v: F7 k4 y  T                        GlobalDistObj := part.globDestination;+ y! G1 V9 b7 Z9 h/ U
                        assignLObj := rgmanager.rgAssignL;
; F0 B( ]/ }+ u: L. Y$ i$ J! c                        row := assignLObj.getRowNo(GlobalDistObj);
* o, e) Y$ {7 q& J- q- U                        if Row = -1 then -- since 70
3 [6 X& l4 f6 g/ F0 j. y                                if lan=1 then" I6 h2 s: @. B5 x2 e4 ~8 H
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% U% ?# [& `( M7 ?                                                to_str("in der Andockstation: \"",?.~.name,"\""));
! |1 v) {( L- y( y1 m- N                                else# R3 O; c1 L- T$ o
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, J% }+ ?8 n7 D0 T                                                to_str("in docking station: \"",?.~.name,"\""));                                , }0 q5 B: X# f  O3 C5 ]; a0 d3 @
                                end;
! K+ d3 c* ~) A, @                        else4 c' d9 j9 _/ v
                                @.Destination := assignLObj[1,row];, s& U! o" D! G  ^
                        end;                        ( M' z: Y  Z* p1 x, A# N; V/ X
                        newDirection(@);% A5 o3 j6 ~! d- J
                        @.HasOrder := true;/ M4 }9 |: u" n1 G) b
                end;3 _  g# R5 {: T+ f$ s
        end;
8 V0 r2 P6 e: q4 {) send;        -- of the method, I9 G2 u7 T* @- L& i+ H
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ' ~$ \  B% o3 D5 K( o5 h7 d
/ I* [+ B; U' W- A& A
这是AGV_putin中arrive的method。
5 W2 ^/ k, Y. n9 `" |# ~/ q% g+ F) S3 |, U' {: d
当到达物料速度越高时,这个报警更多,8 |# d. e; N, G' g+ R0 o8 `
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。$ O- \4 t5 E: p5 Q5 f8 j) h
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
7 d1 A: o! z, d+ K$ E" F+ V5 \# K! N. g2 [: H
另外一个小建议,就是move,所有的move都可以这样
& N! N+ r3 U+ Q: ~% Gif not move() then debug end! }: l6 F) I$ h: x" U
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
. x2 U: j" s& {$ Z% `0 v( yplant simulation中的free libraries有AGV模板," W; H* L4 X8 [' X& g
里面也有案例。
' J# v, D! d0 M9 e( j我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。: O' b, d4 d$ R" ]% o, O$ Y

- u6 c; i1 p9 b+ g6 h/ @我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 8 S4 @. a4 w* ^
3 E6 \' V- X1 {# y% J. v# }
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
8 w5 U) J# b1 E/ }' U4 Y7 o3 O7 E5 N这是AGV_putin中arrive的method。
  `# }# u0 w7 ~, v8 `' W% J4 Q; l# t5 Z  B3 q, w# ^% j
当到达物料速度越高时,这个报警更多,

! g% _. j+ K: ~  X- U% M另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-22 14:57 , Processed in 0.017988 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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