设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8849|回复: 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'( Q: a1 q1 U/ T. X3 ^6 `% P$ S5 T
*/
2 b6 k* j. Z3 c5 Qis
5 i0 c$ V; i; O9 t0 f# I1 C        part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 Q  s& r% [% |* Y" @$ a
do
: ^0 @- Q* y+ f* ]0 }- B! x% e        Lan := rootfolder.Internal.Tools.AOLlanguage;
* v/ m( }/ A4 R: q        if current = @.Destination -- else return
, r; x  f4 p& `- O        then! K9 `# J5 J8 Q8 ?0 Z0 h& g
                @.Destination := void;" _; a. _2 _1 i) j" U  F/ O' b
                if @.occupied then
' A" T: a* k0 c- }8 M                        part := @.cont;
$ o& ]! S. t  `, H4 V0 b                        @.transpOrder := void;: u0 T7 n9 p' G/ a4 g# k
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ b- I7 @& X+ R9 a                                @,root.eventcontroller.simTime);' g  e* c' J+ Z" X4 d
                        @.HasOrder := false;& f5 ~( _+ D4 I6 I/ q
                        @.DrivingHome := true;2 J* ?& m* R9 d
                        rgManager.tryToStartTransOrder;
* }2 J6 [; _. l                        if @.Destination = void- Q0 X: k4 ~% [# o6 e6 w
                        then -- no transport order for vehicle @
. q4 k; F' `: }                                @.Destination :=/ J7 h- l7 q8 v$ e
                                rgManager.nearestFreeStation(@,track.~);
% q( @' }  C& [1 `                                newDirection(@);   
/ U! L+ z# H9 u) T1 ^                                if @.Destination /= void then7 O) \6 h) j; U# G1 V% X3 n
                                        @.Destination.NumReservation :=
7 o* {) m4 l3 w& @; f3 T, R                                        @.Destination.NumReservation + 1;9 w& O3 a( m) o+ \- {( }8 u. L
                                end;; E) r% j% t% f. R+ P" D
                                @.CurrIcon := "drivingHome";, n- k2 M' l8 l3 x. m
                                @.DrivingHome := true;* j& G# J; i) p
                        end;
3 n) x; G( l8 V                else -- the vehicle @ is empty, both vehicle and part are in the same dock station. i* l; I! d8 M) y$ P* s
                        part := @.transpOrder;
5 [3 x  S8 M! t  x+ g                        part.move(@);-- load part
1 ~: s1 Z$ ^' B; L7 a/ m                        @.CurrIcon := "load";. U: m5 A# R2 K# X. H
                        GlobalDistObj := part.globDestination;
3 D- J+ M7 P3 H. c# |, {6 R                        assignLObj := rgmanager.rgAssignL;" |- T) z/ i0 S& g- z5 i3 j
                        row := assignLObj.getRowNo(GlobalDistObj);- N( F  k/ Y4 _4 l# T
                        if Row = -1 then -- since 70
0 G4 U2 ~9 T. K% E! I  m+ h) D                                if lan=1 then# Q7 O5 e( m4 o1 r$ L
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" m& [7 ?! J) _' Q8 N5 M$ h                                                to_str("in der Andockstation: \"",?.~.name,"\""));
; R. |* @5 ^" u, {8 r2 J                                else
* n, F" V0 _$ f1 b3 |* x                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ E" S( z- s# `' Z                                                to_str("in docking station: \"",?.~.name,"\""));                                # ~# N  O/ ?. Q. n% \, Q/ h
                                end;
' z2 w8 x7 q2 B# b* Q' g( J                        else
' j( H5 y9 p4 n5 W                                @.Destination := assignLObj[1,row];. O8 C; S3 ?3 g: b3 ^
                        end;                       
$ H3 h, G( B9 i2 H) |- w2 A                        newDirection(@);2 `! r; W' D; |3 d1 q5 P
                        @.HasOrder := true;0 }4 }# E5 Q0 l- H! B6 ?
                end;* X: U: u8 ^! p! f- l  l# y2 _: o' w4 m
        end;" R5 N2 S4 [9 w8 }6 H0 ?6 a3 F
end;        -- of the method, M7 \4 a' I* O# ?& n2 v
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
' K- O3 l* u( b9 g1 F; x
# A7 r4 P& K* C4 S1 y这是AGV_putin中arrive的method。% }. T% F, S$ c1 F4 \! W
9 G) O3 c# k  A6 S
当到达物料速度越高时,这个报警更多,
+ m0 F1 L& j+ L( {可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
, K$ Z% o  }' T程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?% L! E8 d* l- W+ Y% I
2 q, X9 E' P: e" Q" w) N& ~& v
另外一个小建议,就是move,所有的move都可以这样' ^, J1 \2 X  \$ X' J
if not move() then debug end) t) S* i: ?- y: Q
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
. \) u- I( I0 s2 Yplant simulation中的free libraries有AGV模板,
$ L# T0 b. Y( L# g( O里面也有案例。- ^# s, D. j( C6 [
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。! X6 e% \1 U6 x

" g1 W1 B. e7 b7 Z& m我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
0 @% d$ r1 ?  g5 H9 ~) I7 v: L
" U/ w6 Z+ b+ X3 p8 T1 O; N1 W! u; {) U( O那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 . q. l- I1 F+ K% h, V9 @" B
这是AGV_putin中arrive的method。, [1 a0 L! x) ~6 E- I8 K* h
/ N# S/ Q) n; p
当到达物料速度越高时,这个报警更多,

6 n$ I/ p& c7 S. [1 m2 V, H另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-30 01:28 , Processed in 0.014611 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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