设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8216|回复: 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'
* r5 P0 L+ w* v; D  G6 L' D  d) l*/
1 @* N) E5 K9 Vis
  N; d, v$ Q% O3 g        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
  j3 V; J  u7 N, J' s  D/ T( _1 T4 ido7 e2 Z! K  Z8 N/ G( f% Q' Z
        Lan := rootfolder.Internal.Tools.AOLlanguage;7 E+ _" v4 z$ a! S
        if current = @.Destination -- else return
+ A/ K9 X1 R; J. J        then
/ `" i6 E3 a2 g( s0 t8 V                @.Destination := void;+ L2 M6 u# T( Z- \4 Z
                if @.occupied then
. r. Z2 E4 N2 @2 u4 i, r                        part := @.cont;
' O6 ]( @  U6 p! k! U8 Y                        @.transpOrder := void;
6 ^' m7 i, r$ e" e; t8 n$ ^                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," I0 y2 Z: S6 Q6 G
                                @,root.eventcontroller.simTime);- M* V4 {5 R2 i/ R
                        @.HasOrder := false;6 l9 m, ^( p. E
                        @.DrivingHome := true;: K( v0 E9 m8 y% m# R% I% m, o
                        rgManager.tryToStartTransOrder;/ a, o" ~1 ]7 P; t9 X
                        if @.Destination = void5 |7 E+ }( y9 P9 d
                        then -- no transport order for vehicle @
# t6 S% U1 m+ i                                @.Destination :=0 `) Q) [# x4 k. F4 p
                                rgManager.nearestFreeStation(@,track.~);
, Z. X+ o: p# O" ~  ~5 E* h8 F6 y                                newDirection(@);   
/ ~8 O9 ~% p) v% V                                if @.Destination /= void then* c9 V4 }7 q1 R2 O
                                        @.Destination.NumReservation :=. h! B# z) W4 p7 ]* m& X; H4 Z
                                        @.Destination.NumReservation + 1;
4 N3 q- k' n" l& m                                end;
! ]- w$ o8 h. V4 r  U                                @.CurrIcon := "drivingHome";
7 B; y5 X4 k9 |! c; }, q# o                                @.DrivingHome := true;5 L! W% J, S4 U' s. e* T
                        end;
+ d, ?# w5 D. n: ~/ U                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. }" P! t4 j% T8 {( t8 [( c                        part := @.transpOrder;
% C/ l7 ~9 `  v3 z/ V! t; _2 K                        part.move(@);-- load part  }1 m! [- e0 y5 }2 p6 X$ P" e& L# k
                        @.CurrIcon := "load";
2 O4 h/ t0 b# K# m  f                        GlobalDistObj := part.globDestination;
, e- X, M7 T9 C                        assignLObj := rgmanager.rgAssignL;1 l7 a! R9 x( h% p3 g0 {8 k
                        row := assignLObj.getRowNo(GlobalDistObj);1 }% B: c+ I% k0 Q" G" k
                        if Row = -1 then -- since 706 L' C/ c: r. T* `
                                if lan=1 then
# B0 g- o  V$ g6 P$ H8 J                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) E( c. Z$ T. N+ S$ B% a8 Z
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
7 V. r8 @; U* b: P% D: J: t6 h) m                                else
$ a$ P: L( r  V( U1 J                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- F! {: T% ?* g: |2 e$ v, i                                                to_str("in docking station: \"",?.~.name,"\""));                                ( E5 Y) s9 ^! e6 n# S( B
                                end;. V1 Z' J+ t) @2 L* j. w' u4 Z- w
                        else/ p8 t' m& {# O' j/ P5 {
                                @.Destination := assignLObj[1,row];. o7 D% P, q+ S( B
                        end;                       
  u% r: V) @( M) y# Q3 P7 g                        newDirection(@);
& {; z! V- U# M                        @.HasOrder := true;# `9 U1 i: b$ D( E" t/ P9 D
                end;
: c9 M: Y- M! \! _& _& t7 J7 t/ u        end;# z: A5 Z* h* R
end;        -- of the method4 ~, `) z) s- }
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 : ]% r2 M$ b" _

& I: @  v, G4 M5 S& n* r6 j这是AGV_putin中arrive的method。
! F* z$ f- V( S! j# ^* f) x9 o1 p- f5 r5 a( W+ m7 \
当到达物料速度越高时,这个报警更多,4 i9 K/ A  f& x/ t
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
" \% Z9 k1 S" H3 T8 @( u) c" z+ @程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?. L# ~, A$ F+ \: ~. M/ i
7 N: D; {" F9 V1 n. Z+ s8 d2 e! M
另外一个小建议,就是move,所有的move都可以这样' W' G1 ^6 {& g4 R0 }" b& I
if not move() then debug end
: I/ r$ ~# V( K这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。* a2 j! F% x8 q" d
plant simulation中的free libraries有AGV模板,
: O/ N. }7 ^2 p3 u里面也有案例。( w$ e0 H( [5 ^3 V
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
8 J/ s( W/ R, \% J5 O, c
8 V" |" {! B7 m( o- ?) G我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 1 r: f' G- D4 H/ F) ~& ?# H7 a
$ |4 h. c7 G+ M7 R# i) L$ X
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 & k' b$ w' H! J
这是AGV_putin中arrive的method。  y) R. {5 F( d3 v! u
& \  O5 k# p/ k* e- o' [
当到达物料速度越高时,这个报警更多,

4 \( `) z7 F& T另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-21 09:59 , Processed in 0.015466 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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