设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9800|回复: 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'
6 Y2 h6 v1 e& E' `: F*/( B" P6 b* N, f. m0 T  I6 o
is% z  A2 {% h) ]% E. G
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 w4 W( R0 l6 \7 ]
do# R6 O# v$ N1 |  S4 q4 b% {0 H, g
        Lan := rootfolder.Internal.Tools.AOLlanguage;3 Y4 d) H( h7 {  V
        if current = @.Destination -- else return
0 `- `( w( p6 u5 h( u! \" Z4 l        then
! @3 e* J" W/ ]( l2 O                @.Destination := void;9 p8 m" T% N2 _. \
                if @.occupied then4 \: [  q% v: n. l
                        part := @.cont;
) \0 l& A' g. w) G' V                        @.transpOrder := void;
8 L/ g4 n/ a9 ~& W                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 l' D! a, S/ a+ k( z6 W                                @,root.eventcontroller.simTime);
( }$ E6 a: T7 }8 w                        @.HasOrder := false;/ v& R2 I% I6 j2 N: r  c& @
                        @.DrivingHome := true;
& ^# U% U$ F+ m, D  P  Q                        rgManager.tryToStartTransOrder;, l. U$ X! }9 I4 F
                        if @.Destination = void
! u# K9 t% }4 z                        then -- no transport order for vehicle @1 K$ I( ^; d. S5 z" z
                                @.Destination :=' x1 V0 T+ L% T5 J& L; k
                                rgManager.nearestFreeStation(@,track.~);
5 S+ F& R: j6 L                                newDirection(@);   
# M; Y2 i/ ^. v% \& I                                if @.Destination /= void then
4 p& ^6 q9 }2 J& c, N                                        @.Destination.NumReservation :=
+ u2 e* {  u2 {                                        @.Destination.NumReservation + 1;3 x  Q% d$ {9 g' ~: u: _$ ~7 L( n1 a
                                end;
" |/ T8 B- c! b3 @                                @.CurrIcon := "drivingHome";
  s1 O4 `: l* T2 W9 a                                @.DrivingHome := true;! Z4 `' m. _1 Y" |/ ?. Y
                        end;
4 }4 Z/ {) ?- _  J                else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 ]% b  C4 e" ~
                        part := @.transpOrder;2 H3 y" X& ^0 x3 T$ k  ~/ q1 b7 i8 _
                        part.move(@);-- load part& l% @6 |! E+ C% q
                        @.CurrIcon := "load";
2 a. |6 c% H6 y. r                        GlobalDistObj := part.globDestination;$ h3 q  P, ~- k9 ?6 c) v. D
                        assignLObj := rgmanager.rgAssignL;" j2 A( [( p9 e$ H3 ?
                        row := assignLObj.getRowNo(GlobalDistObj);
# X& r* w5 w" _& X; a                        if Row = -1 then -- since 70; o  J/ J& f! h# c. i6 R6 _1 g- p
                                if lan=1 then
6 |* ?- @' ]6 b+ v, ]; _                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% f+ U% b* x0 v( {: n                                                to_str("in der Andockstation: \"",?.~.name,"\""));
1 M' L/ l1 E7 U* s% t                                else* W# ^& m- M4 V1 }1 [: T
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 P; f" M( T, _, E; Z9 l- H+ x                                                to_str("in docking station: \"",?.~.name,"\""));                               
# D* R; q: [5 D6 g; \  e                                end;
5 H" M9 X, T# J5 ]% v                        else
( G  r) J% T1 B4 }$ V3 p' V                                @.Destination := assignLObj[1,row];
1 I% F) M4 \5 F& D. h/ F6 \                        end;                        ; i0 R6 D& s& a
                        newDirection(@);
1 D3 E: e9 s- E                        @.HasOrder := true;
7 L. a- \3 I) U% H9 X' Q                end;3 f2 h* _$ h1 I7 }
        end;
' L2 P# ]! v& eend;        -- of the method
, h# l. K" `/ L6 z2 ~
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
/ G+ t  ?% X/ |% B  {+ W. L* r5 e2 K. p
这是AGV_putin中arrive的method。
" F: n& [" o  ^$ n& g) Q+ m6 o; v! c+ j0 V3 c6 f
当到达物料速度越高时,这个报警更多,
; r* ~) y7 ^' N. e' ^9 t1 o. [可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
$ `: |% T# l6 s, c程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
5 Y. w0 x. z3 O6 h. y' d2 ~$ c5 Q, \/ i/ V' B& K2 u, Q
另外一个小建议,就是move,所有的move都可以这样
0 N/ i5 L+ u! S& Aif not move() then debug end& J- ^8 q# @3 f) |% `- ~
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。8 l2 p" E$ {6 a( j0 ^0 V
plant simulation中的free libraries有AGV模板,
) X4 v' q$ k- x! w* r, ^4 t里面也有案例。$ Q/ i9 \6 W" f
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。6 f4 N! `8 c" r, Z; T, C% O; l
; k# n: B( Y6 p5 T# D
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
- T. x$ c3 E/ e9 r9 M  N* p9 W  o$ ?9 i0 h9 h8 n7 k6 e, x0 K( K
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
9 u7 y2 {$ Q' {这是AGV_putin中arrive的method。# Q; ?9 r( f9 [. V) }

# p. t9 B* I- ^  {当到达物料速度越高时,这个报警更多,

, b& D; r+ f9 l另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-26 02:12 , Processed in 0.017281 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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