设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7786|回复: 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'
- g0 v2 M# j  F1 z*/
' @( A) F$ M  u' }6 R4 l3 M! ~is
8 n6 X( {& d& x$ y- ~5 }8 Y        part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 z6 ^8 l0 S, L$ v  J' n% C' ?: I
do. g/ f7 H+ H! g8 C# m- d
        Lan := rootfolder.Internal.Tools.AOLlanguage;
2 ^$ S9 f& c8 F. r        if current = @.Destination -- else return/ o5 w" E  |5 w1 \0 b1 e
        then$ @! e4 Y" x# |% A+ z! f1 F! Y
                @.Destination := void;( }: P' b: @& I' t9 B5 j5 ?
                if @.occupied then
5 P: p% E4 j4 S1 Q6 ?9 @                        part := @.cont;: Z: V; X% G5 k
                        @.transpOrder := void;
$ B- ^7 ?2 t% I( `( S                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! U7 ?! G5 P9 T: d, c                                @,root.eventcontroller.simTime);, T, {- b, g. s6 V+ w" L( y8 R
                        @.HasOrder := false;  T" v' @% ~  v; V1 t% u; o
                        @.DrivingHome := true;
- i; t3 |" r' w* i7 ~/ X) f& g                        rgManager.tryToStartTransOrder;7 n1 d9 d( V3 R. ~" f
                        if @.Destination = void. |' ^7 k# K# Z5 y5 N/ M
                        then -- no transport order for vehicle @
1 l" h5 g- |9 Y9 |: X                                @.Destination :=; E- [( q( R- G5 K% j
                                rgManager.nearestFreeStation(@,track.~);
+ {) ^" @& Q8 ]3 \/ O                                newDirection(@);   3 _! J3 r) R5 m0 a9 j
                                if @.Destination /= void then- Y  X* M4 k% x" j, z0 V
                                        @.Destination.NumReservation :=# a" B2 M" }5 T' f5 \- A) P
                                        @.Destination.NumReservation + 1;
" Y: M, V9 b$ R* z                                end;
* O( a& [  O6 Q# S* W$ E/ `; D                                @.CurrIcon := "drivingHome";
/ W  q) d  U& f                                @.DrivingHome := true;: _9 _- ]5 ]" M$ j' i1 x
                        end;& x$ J; D( [5 f  d! x, h) ~
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 Y' J- M/ q; _# y                        part := @.transpOrder;
0 v; F, @; @1 L% J9 ]                        part.move(@);-- load part1 c' B1 ^6 g* W3 ?; b* B
                        @.CurrIcon := "load";- ^% t5 h. M- u
                        GlobalDistObj := part.globDestination;
8 O( g! W" l* X2 X2 |                        assignLObj := rgmanager.rgAssignL;
+ K1 Y) o0 J9 h3 j; f                        row := assignLObj.getRowNo(GlobalDistObj);
! M9 W. F' r5 l( [$ r. l  N                        if Row = -1 then -- since 70! b8 a: i/ v6 c0 a
                                if lan=1 then
8 O; |% v! Q7 c! l0 e8 W                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 p" Q9 J# N* b$ l& }                                                to_str("in der Andockstation: \"",?.~.name,"\""));
8 P! Y" d4 W9 N6 h                                else' Q" b& o7 ^) W
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 c- x5 e7 \( c! Q$ i: y
                                                to_str("in docking station: \"",?.~.name,"\""));                               
/ ]* m& K9 \( ^0 ~! ]. S- ?                                end;
; n$ D7 h  c* u+ G# r8 o1 f                        else+ N. e- n# u" o+ a
                                @.Destination := assignLObj[1,row];
# q' s8 N: H) F( {# i) m                        end;                          o$ ~+ `+ _" `- k$ K
                        newDirection(@);
0 v6 B- l% H. A. s3 R6 f0 @, X' g1 P3 s                        @.HasOrder := true;( n! \# {" Q% b+ ^, f; F. D+ C
                end;3 `+ ~' _- H1 n
        end;
' K0 `5 R, P6 T  @, [: y, Send;        -- of the method
9 u1 ?9 o* C" C
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
/ m, L" P+ c" d# y( _& f
  M( K& C, k# f8 s4 \这是AGV_putin中arrive的method。
1 ?" H1 }( c9 z# c
9 m$ X% r6 \) G5 w/ U当到达物料速度越高时,这个报警更多,
$ T) ^' x8 h+ k  t可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
6 M  H0 t/ J* J3 ^程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
* r% F! `; p0 v0 M
: X3 U+ J' {- {# g7 m3 n2 [5 R另外一个小建议,就是move,所有的move都可以这样
: {. z" ?1 K; p: ?8 d) d2 jif not move() then debug end
! ~7 J: c6 M3 U$ |- L* d5 P, Y这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。( ?. T; M2 N6 G! H- M
plant simulation中的free libraries有AGV模板,+ M" q/ j' A) k
里面也有案例。
5 G& J3 F3 p- K" ^/ X我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。6 Z0 D0 S$ H0 r. w/ ^7 c5 N

) m$ _7 u5 F& ^我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
/ y6 _: S0 s0 b
0 ?# ~  o0 \9 q6 W% f  f$ X. o那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 " `) K4 N2 G2 s
这是AGV_putin中arrive的method。$ u/ {  S, H* v

7 ?" z) ~& H6 K当到达物料速度越高时,这个报警更多,

8 O6 L1 d) Z0 ]6 }2 ~1 L' T( I另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-29 06:45 , Processed in 0.016289 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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