设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9349|回复: 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'
! n! K1 w, h3 W*/
: f2 d- V) p. I5 `is; w" p; z9 a6 J& l) y
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 _& _& H% x8 q: M6 X+ X! }# z
do4 @7 M* {4 b' [7 A/ a* n( s
        Lan := rootfolder.Internal.Tools.AOLlanguage;
7 R6 G1 g6 `3 _0 x        if current = @.Destination -- else return0 I5 T: \/ n$ k$ j1 }: w  s
        then
' Z  Z( M5 T1 N% q1 s. F                @.Destination := void;; h# {6 i3 l& J" w5 Z% X
                if @.occupied then
* h( Z4 V% L* ?( `) L* C                        part := @.cont;6 ~  M3 f, E8 o; Z% [+ x) K, K+ j
                        @.transpOrder := void;+ C' i# F6 e8 e: {' _  ^$ o% X
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- i8 n% q6 _! g# f3 B% l                                @,root.eventcontroller.simTime);$ z/ P" n: I+ L, ^0 _3 ?
                        @.HasOrder := false;
5 h  d5 H9 s. N! S' X                        @.DrivingHome := true;( z( c  Q' |/ q! m4 s3 }* \
                        rgManager.tryToStartTransOrder;
6 t' \# u' v  l" I: n+ d) z8 W                        if @.Destination = void
+ p1 }: B6 ~2 K$ O. K7 Z                        then -- no transport order for vehicle @
1 [$ Y0 t+ v0 ?                                @.Destination :=
) i- g+ d+ ?9 E$ N6 p                                rgManager.nearestFreeStation(@,track.~);4 r" n, \& w! R
                                newDirection(@);   3 j4 H2 I2 r; c# \- O) O2 d
                                if @.Destination /= void then8 z* J$ n$ K9 F8 l0 C( p0 R
                                        @.Destination.NumReservation :=
7 ?# E; {' `3 d+ e, v" d8 m                                        @.Destination.NumReservation + 1;
. o+ [( W) P' F' L                                end;
( s" `, H$ `! o0 C4 g                                @.CurrIcon := "drivingHome";2 d# u- M7 Q/ Y' g
                                @.DrivingHome := true;
; g$ F6 `! y  F* E% A. {; G7 @                        end;
, Y0 I  E; J1 _+ O0 ]                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; g0 c0 D* T0 V" e& f8 T7 k                        part := @.transpOrder;
2 N7 u# R8 n$ O  L% e4 h                        part.move(@);-- load part4 P. b6 Y  N, D  Q& c2 `
                        @.CurrIcon := "load";0 W7 R2 A- ?! y" r# [- z5 _) b
                        GlobalDistObj := part.globDestination;% j( Q4 D3 _, V: ^( H
                        assignLObj := rgmanager.rgAssignL;
2 C8 p+ N! W7 r6 X4 D2 w" o                        row := assignLObj.getRowNo(GlobalDistObj);
, b7 H! f% \4 T                        if Row = -1 then -- since 70+ ~0 z6 F" a3 I: u, }
                                if lan=1 then
; Y  w3 N, ^# q, u& {                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 v! V% ~. `1 ~6 y# n                                                to_str("in der Andockstation: \"",?.~.name,"\""));
8 ^( @* |) N) ]                                else
# b( \& @% ]2 W% ]                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 o% Z( u& M8 |( g, w& g                                                to_str("in docking station: \"",?.~.name,"\""));                                ) E3 l8 j2 x' _( \+ `* E
                                end;* G" K* Z1 i! d0 M
                        else
+ ]# n* y( n4 P3 I' c6 n- t: ^                                @.Destination := assignLObj[1,row];
: ]2 U2 P* u4 ~. {4 r                        end;                        ' L; \4 _" U* s( U
                        newDirection(@);
8 a* R5 K' \5 \: K# H8 s                        @.HasOrder := true;5 g3 u" }3 F2 }5 @
                end;; T; z& R4 y% e/ v
        end;
+ A& j/ D2 a/ Hend;        -- of the method
* K* h/ s( H# D1 v
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
4 d3 s8 r/ A& L* P7 ?- B7 K+ E
" e' ]! ~: e9 l) H5 O+ {这是AGV_putin中arrive的method。% @; i. G, F$ s6 g

" l; @2 f* m) w; d4 J当到达物料速度越高时,这个报警更多,5 o3 @7 a2 Y* u* s" \3 A
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
! A0 I3 t5 P6 v' g  L& _程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
& u. N& T  G) S- y% e- ?, Y5 ]  N8 c  g( D
另外一个小建议,就是move,所有的move都可以这样
' R# M2 [% [" oif not move() then debug end
, y0 d# E! e& Q4 m5 T8 p5 v7 |4 M这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
% t9 m9 ~( |: k5 f# r- {/ @plant simulation中的free libraries有AGV模板,
8 x: j! W; x3 M, u) b里面也有案例。
4 H' r5 K2 g% T# }7 s: P2 j* ~; R我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。$ s( z3 E) `/ H8 \
$ L$ V/ Q3 Q, c1 s1 b
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 8 J$ \9 P9 {6 R: H, M. {

( ~/ m* |/ j5 ~% F" B$ P那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 . g& ^0 {/ l& E& Z
这是AGV_putin中arrive的method。
" N. R1 O" Z$ U! G6 E$ e5 d: {; E6 Z- B# s) g9 `
当到达物料速度越高时,这个报警更多,

* l+ ?7 |& T5 i! ~1 C另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-27 01:07 , Processed in 0.021855 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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