设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9139|回复: 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'
! _  P/ l( [1 ]& X7 S*/! o6 O0 {$ D( r; T4 Y. z. B$ ^' I2 U
is; t# ?5 D& q  _7 [! e1 e/ d4 H
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 i5 ~+ B9 m5 l8 ^  }  m
do
( J; w6 u: Y5 F2 g! u% r        Lan := rootfolder.Internal.Tools.AOLlanguage;* K" p" R; ?# p4 e7 p9 V( M
        if current = @.Destination -- else return
$ Q* n* }6 {2 d; g* ]8 D        then
9 M# K9 t$ u2 F: w. Q& K                @.Destination := void;
: y& x0 |% H) I# @) e4 R  \, o                if @.occupied then
  W1 \) D9 t4 m' N5 G7 g                        part := @.cont;% H* d% j" N, F( `9 t+ T
                        @.transpOrder := void;
; \5 \. c: e; ]                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% [* [/ c4 `. G1 a                                @,root.eventcontroller.simTime);' q6 W4 H. z; k# C
                        @.HasOrder := false;
7 b# B" K, h* m  S, F7 v: V                        @.DrivingHome := true;
% T1 A8 M8 @  A5 v5 _/ h9 I9 F                        rgManager.tryToStartTransOrder;# u" w4 e% W/ p3 p
                        if @.Destination = void
; {/ y# O' Y0 d- A9 J4 v$ T; Z                        then -- no transport order for vehicle @0 {, c2 F. U; C2 T2 s  {
                                @.Destination :=
4 [% X: V- B% S+ S! u& I% Z                                rgManager.nearestFreeStation(@,track.~);
" w4 K7 O. V, K  S                                newDirection(@);   
8 I& G. ~6 D! Y+ b3 |( T                                if @.Destination /= void then- Z* X, M0 S* E4 ~: v
                                        @.Destination.NumReservation :=; i+ K2 h/ ]% v' V, ?& C
                                        @.Destination.NumReservation + 1;; {% O& h8 ?: A8 p2 y$ U0 Y. a
                                end;* H5 g9 g! {  T: R  a% N
                                @.CurrIcon := "drivingHome";
$ l2 D5 ~2 T1 l+ f: S, s                                @.DrivingHome := true;1 U5 J( Z+ u% B' p9 Z
                        end;
! P% S9 l9 w" U                else -- the vehicle @ is empty, both vehicle and part are in the same dock station% Z3 ~+ m8 o' N" A# E" F
                        part := @.transpOrder;
6 P  h1 t- S( \5 d; L; @# W+ r                        part.move(@);-- load part# K1 V5 U; L  r: A
                        @.CurrIcon := "load";
2 `+ c  R/ T9 `5 A. r2 n) l                        GlobalDistObj := part.globDestination;
4 u: g/ l+ s9 y                        assignLObj := rgmanager.rgAssignL;
- G6 P6 b# \/ p+ J: `9 H2 N5 s- R                        row := assignLObj.getRowNo(GlobalDistObj);4 j! t2 s# J6 T
                        if Row = -1 then -- since 70
, ?2 e3 x( W# Y                                if lan=1 then
# I  x% d7 ~) s! c5 X                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% H! X$ ~8 ~- {& H# Q3 Y+ E* D                                                to_str("in der Andockstation: \"",?.~.name,"\""));! E! m5 M0 T8 G- Y
                                else
+ a1 \/ q' M2 M" o                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ Y% H" C( x! {( A- @                                                to_str("in docking station: \"",?.~.name,"\""));                               
! _1 p7 P0 K" N3 v4 U3 \. W% \                                end;$ w; I3 g7 D6 w, E0 F
                        else
, e! j  U( i  a% ?, @                                @.Destination := assignLObj[1,row];7 L3 S$ u$ C" H8 U5 L
                        end;                       
* y3 E" |8 d- Q# n8 e7 m0 E6 c                        newDirection(@);
! j/ R* C) W; u, B0 x  U. C9 V& ?                        @.HasOrder := true;7 k$ U3 p  A' ~& U+ t( I' ]$ B
                end;9 [1 L$ Q  P% q0 U2 k% M
        end;
) Z. W( j2 z$ ^+ }6 m! Zend;        -- of the method: ]! n3 C1 j% w. t; i. n- M
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
9 i' T# z. d* V: S; _% k- P% G' u& T2 Y0 s3 \. _
这是AGV_putin中arrive的method。6 |5 N% Z0 X$ T

$ ~$ Y6 \" p7 w5 M! v3 Y8 s" g当到达物料速度越高时,这个报警更多,, ~5 x: \$ Z% ?
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
4 Y/ H% J/ q3 y5 |程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?6 [. K8 ]$ y# |" T: H5 L
/ y6 l8 D+ O( f! `1 P) h" Y
另外一个小建议,就是move,所有的move都可以这样
0 x5 l  y$ `0 U; f; tif not move() then debug end
# b! _& N$ U7 r这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。9 A9 Q. ^  ~6 R. V0 Z8 F/ R
plant simulation中的free libraries有AGV模板,8 U2 l' w5 E+ O5 m
里面也有案例。
) \" `* o, ^" X: g% `" c8 u我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。. K0 u4 A, k4 N  x

( M" b. Q) Y8 \# \* w我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
7 y/ w+ j, \  D/ @
- F, o/ M$ B$ e1 b2 [那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
3 j, X( e& G0 ^, Z; c这是AGV_putin中arrive的method。
: u. `; F* k# [4 V: {$ t
9 p  j, G$ [# j) n/ W# ?5 T当到达物料速度越高时,这个报警更多,
/ v* p( }, J9 \! n
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-16 03:59 , Processed in 0.018276 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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