设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7543|回复: 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 |$ c. X/ q. C3 ?- h*/
+ n9 C5 U1 B$ q- q& O6 tis& ]/ r' g3 w8 v( y  b( J! d& l9 [
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;& F4 ?. T; ]& c% A) r1 k6 f
do
9 D1 l3 H& ^2 f. z        Lan := rootfolder.Internal.Tools.AOLlanguage;
9 ~+ n5 V4 E8 C' q5 |        if current = @.Destination -- else return, |! B( m* n! Z9 U
        then$ {' q, Y0 V# q  U2 e
                @.Destination := void;: M$ x/ m2 Q! j
                if @.occupied then. K$ c" N. F' i
                        part := @.cont;
( k1 n9 j# e1 g7 p                        @.transpOrder := void;
3 J1 Z2 w: L$ w5 ^) r8 n                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' Y0 L) X: G9 R* h0 F! [
                                @,root.eventcontroller.simTime);
; [, [! e9 k/ p/ C# d2 `1 X                        @.HasOrder := false;
% ?1 v! Z- w. u: s" M- A7 G3 K" {4 E                        @.DrivingHome := true;, d4 I* \. y4 ^3 |( \9 H
                        rgManager.tryToStartTransOrder;  ?* x+ e$ f; R% J) X' }5 d
                        if @.Destination = void; Y. `1 c1 V/ R" A. l; W
                        then -- no transport order for vehicle @3 }6 _* I/ g. A* m  o) V/ ?
                                @.Destination :=
1 I" P: m& y8 D5 U- U; R                                rgManager.nearestFreeStation(@,track.~);
7 T3 p9 r- h5 w; J# s                                newDirection(@);   . ~" n+ M. t' V; c) |& v
                                if @.Destination /= void then
3 n1 {: W4 J6 W                                        @.Destination.NumReservation :=
, P& ~2 k8 e/ q# J, X                                        @.Destination.NumReservation + 1;
8 }; o0 s9 L# W2 |3 ^" M                                end;8 w, w/ T- k* l4 g) a
                                @.CurrIcon := "drivingHome";3 ^# a4 X, D: i! e* I7 |
                                @.DrivingHome := true;: A$ v- R: i- |0 A2 y; `
                        end;
# i/ ]6 J) h! t7 H                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" E1 V9 F# l) o2 O6 A8 e/ U                        part := @.transpOrder;
& @5 N% Y- w7 e, z                        part.move(@);-- load part! o) y% s( r; o3 o( G
                        @.CurrIcon := "load";
" v5 ?: b; ^* _% t1 d, T                        GlobalDistObj := part.globDestination;
$ b! m' l+ H( i9 v6 ~, |, _. ]# {                        assignLObj := rgmanager.rgAssignL;2 L" E: W! i. Z
                        row := assignLObj.getRowNo(GlobalDistObj);
3 C; A3 P( U! {, j# {5 a/ p! U6 H                        if Row = -1 then -- since 70) u- i) a$ E, G- o  B2 |: a
                                if lan=1 then
4 E. O3 o5 U, m9 [                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% @6 }; O& z) ^/ r3 ]                                                to_str("in der Andockstation: \"",?.~.name,"\""));5 z! [2 l! Y+ f6 x. O. K' l( H
                                else
6 u! P& P- T" Q4 K9 W                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% x6 |7 [4 y5 \
                                                to_str("in docking station: \"",?.~.name,"\""));                               
. T5 |7 V* ^; L! O                                end;* G# Q# [" a6 z# o9 }
                        else
/ N/ G! S) U8 B                                @.Destination := assignLObj[1,row];2 e. w/ z5 v( q+ T/ M* h) n
                        end;                       
, ^, t3 @9 ]8 x; G                        newDirection(@);( [1 W+ b, z  }5 n) e. V
                        @.HasOrder := true;# @: W% z/ r! L1 L. r4 D2 r* Q0 [
                end;
: \# m! U% Y0 f# }; R8 I( r        end;
6 y7 `% W$ `1 pend;        -- of the method
* ~. B: \9 ~' e
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
+ S7 o% n9 n- `, X
* ?/ {6 A3 ?6 d6 p! T0 i2 Y9 B这是AGV_putin中arrive的method。
6 d9 ?7 Y9 |, B3 _- T& i' B
( B9 d" l8 p3 M- c8 R5 y; N当到达物料速度越高时,这个报警更多,& ^$ C  t0 @5 Q& y5 m$ f
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
/ P4 s; t3 ^# B& j0 p, k- Y程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
8 N4 {6 y; P* Z4 ~
5 i: C2 z. j$ W* C: ~& w另外一个小建议,就是move,所有的move都可以这样
& I* p, C0 w5 M  qif not move() then debug end
3 x, T9 B8 f- ?$ C+ }. Z这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
. Z" ^; X5 P  K$ [, tplant simulation中的free libraries有AGV模板,! }5 e! s4 `$ ]# e5 l$ c
里面也有案例。
% o( V* Z# P: y$ O; e0 |; L我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
' K0 U/ t1 _+ z, ^- [, D/ y, w) f; Q  m* L. s
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 . c1 o/ ?( o2 f8 ?6 d# i) z2 n! [1 D
0 o" l( L0 l/ F* z4 I
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ; l! ]2 F+ o0 C3 |7 N
这是AGV_putin中arrive的method。: c9 c2 E; a  U# R& f
$ E+ |7 m7 H/ F/ {
当到达物料速度越高时,这个报警更多,
. n: Q$ d4 ^4 L4 I3 b% G
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-17 05:52 , Processed in 0.019104 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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