设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7485|回复: 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% c' Z  M- m& w4 U" M! U*/" l* g3 ]; H9 C! j4 [/ P
is
, Y  u! x  h: H% Q, Z" p2 X        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# o  b  Z  J  w& K  `do
% j+ j: V; x( C# a- @  k7 b- A        Lan := rootfolder.Internal.Tools.AOLlanguage;) E9 l! W/ a" W% a' ~. H2 _  V. s1 T
        if current = @.Destination -- else return
+ |& m1 \; _2 V3 t! V        then
  v5 p* h) K2 h                @.Destination := void;
- b% v4 x. g" j6 e% x5 h                if @.occupied then* }8 q; x  A* M0 p
                        part := @.cont;8 h3 R- L; W% w6 A# e: j
                        @.transpOrder := void;
' s, e) I( f- i5 o! d                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% v" T4 E5 L* M/ D                                @,root.eventcontroller.simTime);
1 W6 x, `" q$ j8 Q: L                        @.HasOrder := false;4 `/ ?$ ]0 P% d7 d
                        @.DrivingHome := true;: V$ K$ j; y6 j
                        rgManager.tryToStartTransOrder;7 J" V8 C9 |+ Q5 a# N
                        if @.Destination = void# G0 |' m( p. A" A
                        then -- no transport order for vehicle @
; r7 ?+ m  u: m- r. i' O# F) i                                @.Destination :=/ J! E$ G7 U9 r% Z5 ?6 g! P3 h
                                rgManager.nearestFreeStation(@,track.~);# R, ~$ t6 @/ a' \
                                newDirection(@);   
6 p6 q4 c) t$ L" |6 v                                if @.Destination /= void then
! j/ c9 o: q& v                                        @.Destination.NumReservation :=
* D/ I0 o4 n* w5 A% E5 Y                                        @.Destination.NumReservation + 1;6 U/ I" v, t/ }& Z: j* Z6 I2 b8 R  a
                                end;
% R2 U$ Y: f: l# |# l2 b                                @.CurrIcon := "drivingHome";  h( ^" D# O; ]- Y! ~" g
                                @.DrivingHome := true;
/ \# f4 V. A& D# M; b                        end;
: v4 x* u0 O# B  i                else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 w* J( v! x3 d/ ]# ?
                        part := @.transpOrder;
' b5 Z9 y3 _8 X' [                        part.move(@);-- load part
+ b- [3 ]. `! d  G& k                        @.CurrIcon := "load";$ s2 r- L$ S6 Q- ^
                        GlobalDistObj := part.globDestination;1 O& g( d, }. s: B& Q+ R% f
                        assignLObj := rgmanager.rgAssignL;
' S3 b' E( F7 g3 V4 J. b7 y, i0 C& _                        row := assignLObj.getRowNo(GlobalDistObj);% }5 }6 C% _# ^3 [
                        if Row = -1 then -- since 70, e# s3 E$ B% O4 C
                                if lan=1 then$ V' k, O! R0 v7 T
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 m% l' _) n' I6 c7 }; ~
                                                to_str("in der Andockstation: \"",?.~.name,"\""));8 j: ~7 {6 C5 l' {* e" f
                                else
% H5 |. Q2 v9 X5 I0 D                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: K& `7 n3 y% Z. Y
                                                to_str("in docking station: \"",?.~.name,"\""));                                ) P8 W' {! S  n. \
                                end;8 C! V- [# l+ c3 [7 {7 r$ n2 ^
                        else, f# l1 O! ?6 H: j; i
                                @.Destination := assignLObj[1,row];) A3 Z. ?0 J& L- _
                        end;                       
; Y* ^7 s7 A* g% P2 T; \- y% n                        newDirection(@);4 V% p) o  _' V0 \5 j& ~) I1 U
                        @.HasOrder := true;
8 O! P" a& o4 t7 N3 a                end;0 x$ L3 D/ G% B% J6 P3 H2 v6 ?( x
        end;/ x; U9 v  _# V  b" ?
end;        -- of the method  l& J: d+ o/ y. [( e1 J/ b
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
/ x3 t* f, x$ d* G/ I4 G7 [; E
5 ?: m* R6 m) R# B7 g; W, b( h这是AGV_putin中arrive的method。
. O9 V$ d2 g, X# l( b
& f: A3 Y" X/ u当到达物料速度越高时,这个报警更多,
5 K3 ?9 p. I+ ^6 @) @# h# [可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
- C, s% @3 \7 p3 b! |* O. |/ f程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?  \- L% T7 d2 W4 A/ z0 u' o
  y6 Q" Q1 x5 d" W  s, Y5 x5 N" H
另外一个小建议,就是move,所有的move都可以这样( Q) S5 u& E- M! z+ `8 x( r, T% B
if not move() then debug end
4 L& a8 N  ~& c8 ?$ Y6 M" F9 |这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
3 q7 z' D. G  G  ^- Y9 |, iplant simulation中的free libraries有AGV模板,/ O. p  x. e7 W. r: T0 N
里面也有案例。9 s& q6 }- O* W9 K! m+ W& a3 U6 m
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
+ r. n; j+ A9 N5 V: X) m6 |; z1 b# e/ ^; _& y- D' H! a  h
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
: w9 [  t; k  f9 C. c7 M: n# C6 G* \2 e8 `/ T6 A
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
. J# N3 F. B4 ]这是AGV_putin中arrive的method。
4 |4 u. n1 G  a% b1 g
" s) r( j1 J! q7 I当到达物料速度越高时,这个报警更多,
6 o& O1 |8 `2 E& j! @. d
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-14 10:07 , Processed in 0.017638 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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