设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7083|回复: 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'5 e6 t8 H( Y/ ?3 {" ?0 Z5 G
*/, q5 }, g, ^1 Y1 E, p" T
is
. x  v6 U# S8 i6 t        part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ K" a7 X( i. s3 Q9 `% F: W
do
  h, @6 l/ G/ \  H, q. j        Lan := rootfolder.Internal.Tools.AOLlanguage;6 L; V# l( n" Q# W! h, ]- y% J
        if current = @.Destination -- else return
2 s4 s8 y! K, L) O        then# T8 h4 O, a9 g) o5 m1 J. m
                @.Destination := void;
. c1 x) [4 m9 G6 ~                if @.occupied then
# p/ m1 t" f# {% z* S                        part := @.cont;
) b0 y$ ^3 ~( z& c3 @- }* r  O                        @.transpOrder := void;" |3 V$ P+ Y' {" l4 q
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: o) C9 c, G! d" }8 I                                @,root.eventcontroller.simTime);
& ^/ q+ t( }% V# F5 B                        @.HasOrder := false;# y5 d7 `  b1 Q( [6 v) `* L" Z
                        @.DrivingHome := true;
3 b2 M2 U: A- T! z& A6 n" o( {                        rgManager.tryToStartTransOrder;
0 D- ?& L4 n0 f& e2 @5 l                        if @.Destination = void
, k+ V! N, K- d5 U                        then -- no transport order for vehicle @& f# b% H6 ], h, J/ V* G- `; y) R
                                @.Destination :=
! P! v) ?, I  |, l5 m8 E: s                                rgManager.nearestFreeStation(@,track.~);
, N' b0 x! e" i9 G6 `: D                                newDirection(@);   
; R% O4 q, B& s) w1 ~  i% K                                if @.Destination /= void then
8 J+ h* I% O% H6 j- g; R: w/ s                                        @.Destination.NumReservation :=
' T) s3 u. {, F, ~4 F6 l                                        @.Destination.NumReservation + 1;
7 u: @1 r0 |" R" a, D7 p# r                                end;1 i# f; y" C% K' g! B* C3 o
                                @.CurrIcon := "drivingHome";
% N# |! }( {6 ~( f6 O                                @.DrivingHome := true;
( G6 l) n- J0 ~9 @" l                        end;& E' Z& x: j% G; Q) Q: s$ Z
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 r7 _: w3 e7 m6 N2 f' N0 o
                        part := @.transpOrder;! x) u) m8 {$ {' U2 k6 A
                        part.move(@);-- load part0 ]" d) D1 W0 g( C# ^. r7 a2 v
                        @.CurrIcon := "load";
  k) _& `7 C0 G& T5 F9 x$ I' c8 r                        GlobalDistObj := part.globDestination;1 Q. i9 t; p5 ]; C" M  A6 q7 O: y
                        assignLObj := rgmanager.rgAssignL;
  J# y  D2 ?0 j: c                        row := assignLObj.getRowNo(GlobalDistObj);( P% h" z5 f* y3 `2 Y" T
                        if Row = -1 then -- since 70& S1 ^! }( N" v3 m; W  `' j3 e/ n
                                if lan=1 then
$ ?: W! }* H& v5 r                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 I2 |. |5 O( q+ U6 o3 E
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
6 A- c/ v6 v, z! a( s4 w& ?                                else
$ k5 _7 B7 ?% q6 I9 ?8 w8 @: Q0 y- K                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' s4 Q) S7 H: ^9 j3 _                                                to_str("in docking station: \"",?.~.name,"\""));                               
" T- F* s2 C) h6 P/ M                                end;% m' C8 B% @- |$ Y$ w" B# ]
                        else
6 X( X/ ?( Q! z0 [, g+ Y                                @.Destination := assignLObj[1,row];
- ~: G7 f6 e; V( f                        end;                        3 Q9 v8 B) L3 c" [7 ~: t
                        newDirection(@);
. V& L4 e6 r' e9 j( k                        @.HasOrder := true;) O  d: y! `8 y% R0 x' s
                end;
9 g5 E  ?! j4 q        end;
, Z2 b/ l" _7 W; O5 v5 N' ~end;        -- of the method
; y) g* W7 B  V1 H5 c' w, L' c
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 . Z  v/ i, V. D. y+ M' T' t  g+ }

! `7 F* Y; ^! q这是AGV_putin中arrive的method。: Q# {, `  I  K0 D6 M1 J, ?

5 P" `) e* Z! C当到达物料速度越高时,这个报警更多,, P! ]; o" w; r$ @% x- H
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。( k8 H* @; n* w: w
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
5 u& @' t1 d6 r0 J$ V
* X+ \- O/ c( A+ n5 H另外一个小建议,就是move,所有的move都可以这样& }" `+ m1 Q1 W2 }
if not move() then debug end
( J  O5 g# W% S这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。; E8 _5 n& y& ], v# N* S
plant simulation中的free libraries有AGV模板,
) X% g* p% [0 x7 v) Z! Q5 _里面也有案例。, b( h' T7 w- C& T) I
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
. k, B2 W( [! Q3 V; K  D. l8 d0 |1 z) J( S4 Z; ]' }$ c& U- k, e
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ( t+ H2 r& I. C4 a
6 @1 M! R7 Z8 ~" W5 w* D( t
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
5 L5 t' |$ Z6 f4 i这是AGV_putin中arrive的method。
, W- S) B) u6 J: I! ^' W
* a4 t2 ~* Z% @- M) X( z当到达物料速度越高时,这个报警更多,

8 n: `% O9 }2 ], `- Z6 ^3 a另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-16 00:21 , Processed in 0.018767 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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