设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8138|回复: 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'! t3 R( u) R4 {; ?
*/
* B4 P/ h* }: Gis4 {0 i6 j4 a& {4 g: h" _% v( [
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;- g4 N& \* R4 g. P; W$ R
do+ a5 K! g: f% m* T$ }; ]
        Lan := rootfolder.Internal.Tools.AOLlanguage;
8 {  d7 G; z5 j& E# @) `        if current = @.Destination -- else return% n( u. R0 f7 q' `% S0 @
        then
- _' [$ O1 [% i" M  h0 ~                @.Destination := void;6 U' P. c" c0 \/ i9 y& o
                if @.occupied then
0 e+ Q5 E2 \! D  ?$ g5 n' N( o                        part := @.cont;" d: }9 o6 R: n2 a) Y' V
                        @.transpOrder := void;
( G7 U' c3 i' `* _. Z' O                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 s* {1 _: }% L! C
                                @,root.eventcontroller.simTime);4 v5 x# ?" M1 X0 y
                        @.HasOrder := false;
7 z4 R% \  Q  G# ?- K                        @.DrivingHome := true;
. W9 V& ]# V$ z! z2 ~                        rgManager.tryToStartTransOrder;
& T% ~1 p' X9 S3 M; v, V, y2 Y                        if @.Destination = void
3 V1 z/ e4 [7 s2 J0 c! K                        then -- no transport order for vehicle @5 N2 o; o$ b3 h$ E
                                @.Destination :=9 p! v$ v& d! M
                                rgManager.nearestFreeStation(@,track.~);: M2 U0 U% c' m" y$ }0 W% i
                                newDirection(@);   
) k/ b# y, d! K+ e  B3 D  a                                if @.Destination /= void then: J) i) @  i. I$ e' `
                                        @.Destination.NumReservation :=) n7 ?1 B+ Q% O5 `# u' X! j
                                        @.Destination.NumReservation + 1;
* `% p7 f1 X0 Y0 N! t9 p                                end;- A# `6 y1 O; s0 l
                                @.CurrIcon := "drivingHome";
' U2 |# W. \) Y! D' `                                @.DrivingHome := true;- W/ L- A# r$ A/ z
                        end;$ \/ E1 s0 a) p* D& ?
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. X1 P1 f" L+ X! L& I! M0 D                        part := @.transpOrder;/ ?# M+ \2 q, f0 G
                        part.move(@);-- load part
  L7 ^  [8 q5 z7 ^* {8 O% @  f6 R  m                        @.CurrIcon := "load";" ^. |" G# M* s8 K8 `+ L4 F) l9 J
                        GlobalDistObj := part.globDestination;
7 F% D5 I- w. n                        assignLObj := rgmanager.rgAssignL;
/ B" k* Q, g; K" j                        row := assignLObj.getRowNo(GlobalDistObj);5 A9 ?3 q( d$ \
                        if Row = -1 then -- since 70
& C6 D: L: T* c. w                                if lan=1 then
5 l; W7 U  ], D( w9 n) r                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 E5 Q$ H& l; `% ]
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
. y+ J8 X8 h1 \7 O                                else
- g" h5 V' t; V& B5 p% \                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! s7 K* E7 x1 M" N
                                                to_str("in docking station: \"",?.~.name,"\""));                               
3 J; }8 a  x5 o# S, c: P* G                                end;$ S+ k$ ?( _0 Z/ L
                        else
6 ?, o  ?) Q4 j( d: y* H4 E                                @.Destination := assignLObj[1,row];# N! @/ n* K) g" n
                        end;                        ! v) O. @' f& ^+ I/ E
                        newDirection(@);
9 |& L, m1 p- o/ D4 U0 L! A- [                        @.HasOrder := true;/ Q& q- r- V( u2 j
                end;/ `& N; X" _, Q) {8 Q
        end;
. M, Y7 K1 w) v0 L4 ^+ r# T3 @end;        -- of the method
$ p- d  w. \# N9 [; E
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
( L4 p, Z) s6 x% H0 W. Y
6 k# Z& W, e# h, g4 d8 R! W% K0 o这是AGV_putin中arrive的method。
* P1 A3 h5 p9 \1 \: ^) ]  K0 J! f* l  I7 I, W0 X$ E" d6 }
当到达物料速度越高时,这个报警更多,
% J4 _9 e& c& x2 v1 \可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。. g. [* e, F1 y0 j/ _& Y$ F
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
: s' O( _# m4 C4 U( P% {: B. C! ~' C& P! Y; x6 a
另外一个小建议,就是move,所有的move都可以这样
$ ^3 w* y: {3 ^4 pif not move() then debug end+ B) P- m; l  T- R& Y! X% `* @
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。. Z9 j5 F% v: k
plant simulation中的free libraries有AGV模板,
9 E2 m+ n, i; q里面也有案例。
, G7 g% {0 w/ `2 W# ?) j$ s: w我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。, C4 G! J3 G+ `, F

. x8 i; ~7 ]% ?* O5 ?我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 : s, T* I( o4 f! D! p; p8 \' H$ F

$ h  Z. C% \% v* y/ c- \那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
) k; b, N* \' M3 j( e  u这是AGV_putin中arrive的method。
: O: }+ m* L1 m" ~3 Z7 X! n7 ^; H# ?- d3 f) T  U
当到达物料速度越高时,这个报警更多,

; B5 s# x' ?, r6 [$ }. Y+ ^0 X另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-16 20:09 , Processed in 0.029214 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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