设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6008|回复: 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'1 [- h. i( K7 B* X& x+ M
*/, j# |3 S- I5 p+ F' v5 w: g
is1 O$ |! R! J/ l* P
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;% ~/ V2 Z+ n# j  o$ c5 t
do
; _2 v) U5 ^5 o- o        Lan := rootfolder.Internal.Tools.AOLlanguage;
* D* o# Z' E& {- s; T: i        if current = @.Destination -- else return
6 g" g( a2 ~. I8 z" |' |        then1 T7 M4 V  Q" N4 }; {
                @.Destination := void;
& U& W0 g$ N+ Q                if @.occupied then
3 ?' d2 ^; }+ u: |9 n/ h                        part := @.cont;% H) Y9 E) ]6 l3 z/ ~: Z1 p
                        @.transpOrder := void;+ ?$ V. w- C" z6 @8 q% |5 J
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% `, S! Y( w+ R9 X9 J                                @,root.eventcontroller.simTime);
5 r  Y  K  P8 A  s                        @.HasOrder := false;
4 z* k# S9 r$ O: ^9 c( p7 }! A                        @.DrivingHome := true;+ r0 m% ~! y2 V, D* X8 e( n# {/ y
                        rgManager.tryToStartTransOrder;: z3 N$ D% m6 T+ c6 G% U8 h
                        if @.Destination = void
* p, N: Q  k: k; Q& l4 g" W3 {                        then -- no transport order for vehicle @
# I5 F6 n3 l5 T                                @.Destination :=* M4 H% E/ f! Z) A8 k
                                rgManager.nearestFreeStation(@,track.~);
2 j, \/ R) ?8 [0 Q. R                                newDirection(@);   / f; ]# M$ z! o! a- K. K
                                if @.Destination /= void then: z4 r. H6 Z) b+ `
                                        @.Destination.NumReservation :=
" r1 g4 C: F. c- M3 v1 `                                        @.Destination.NumReservation + 1;5 C' W: g5 V- U1 k& r
                                end;
0 b  k! g) c  Y  a2 {' ^                                @.CurrIcon := "drivingHome";
$ {7 J) B: d% _1 ^- t; K                                @.DrivingHome := true;
) I4 J) O9 K0 W  A. B                        end;- z7 O: h% M- i2 I! y( a
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 L( ^; |4 O) N' ~; }* N( u
                        part := @.transpOrder;; U0 O+ }  ~# m/ E: g5 u4 m
                        part.move(@);-- load part' o6 a4 H% c) D+ R1 t
                        @.CurrIcon := "load";% n' A4 z7 f( }  i
                        GlobalDistObj := part.globDestination;
3 f( Z3 G2 ^2 C0 f+ B3 M9 {# i. m                        assignLObj := rgmanager.rgAssignL;2 c5 k' h2 {7 N) K# |  g: h& e
                        row := assignLObj.getRowNo(GlobalDistObj);
& d2 f, n9 S( T; t% ?                        if Row = -1 then -- since 70
9 N( a! c0 p& E3 _2 N1 K4 H                                if lan=1 then$ n! o- G8 I/ O; A4 V+ {$ x- Y
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; \8 X' \/ D, w, d( ]% ~1 L' J
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
* P1 J# ?6 G; R8 e* F/ F                                else
  e0 U% \. h7 v8 K; Z/ H; _3 Z                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 ~1 C7 f, r6 J# ~* M1 z% y                                                to_str("in docking station: \"",?.~.name,"\""));                               
) A/ {6 L! e4 a                                end;
; S# X& K4 E& s& X2 n                        else
; }4 u% @+ M  A% M2 P2 `- j, z' C                                @.Destination := assignLObj[1,row];# E5 d+ ?, V. u$ R, Y2 N' h
                        end;                       
' R$ J  _8 v8 |9 O                        newDirection(@);5 N# Z+ E$ p. I" ~0 v
                        @.HasOrder := true;
+ ^& k7 W. ~& ~$ d7 K                end;% h& B  g4 K- y, T+ ~
        end;: r* r2 P2 X) c
end;        -- of the method
! S! Q# o( n8 q7 c1 N& t
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 " J1 O' |* H& G( d- w* J  k" t

: e( e! l1 G. ^: Z这是AGV_putin中arrive的method。
- ?; V; X. P& d8 z" E% \2 t0 ?' r+ g6 N( k" l* N  x2 p. i+ l7 D7 V: k) f
当到达物料速度越高时,这个报警更多,- P) u% X4 ]. r" _
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。9 M/ f  I) y5 ]; m! I' }
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?# l1 F) G" c9 D1 z4 m

! H" |* {7 Q/ m3 a另外一个小建议,就是move,所有的move都可以这样* x+ d9 C% f; z0 {, F+ o
if not move() then debug end; t. Z  m  ^, |7 o1 V+ l2 Y2 V
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。- S7 [+ j! P, G$ B3 B4 _
plant simulation中的free libraries有AGV模板,& T8 t4 f( B; O0 w
里面也有案例。
7 R; R! H6 V) ?+ a8 ~我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
' l: o3 `  V0 |  D
' e- @. H& |- K$ t+ k% L% m我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 1 u: h4 ?' S4 F
! j1 A' i- \$ p4 O% \/ K
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
9 [8 H7 X* ~, h这是AGV_putin中arrive的method。
0 _9 f8 C, q8 K0 Y/ S# m& X7 m- H9 r" P4 J% T! _/ {4 [2 M
当到达物料速度越高时,这个报警更多,
. F7 w5 K2 r; _! A; T
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-12 16:42 , Processed in 0.025740 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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