设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9702|回复: 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'
! Q" ?1 [' V8 r( `3 ^9 a. o$ \' A*/
/ ?+ w8 `& a4 n+ s9 N$ n# Tis) x, g( E, Z% [
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;- |0 L8 N, r* u  G" r! [
do
9 N" ?7 S+ u* @5 e        Lan := rootfolder.Internal.Tools.AOLlanguage;
: O3 J9 G- _5 D+ M        if current = @.Destination -- else return
+ M1 i: B, \9 g6 k0 j        then, A* a  b. V% [! z7 o' L0 y
                @.Destination := void;( X; K( a9 v  M
                if @.occupied then+ w3 ~( s, m& i. a
                        part := @.cont;
7 A$ ?3 N! L2 \5 D                        @.transpOrder := void;
, D. X' z% g( d2 `" G: c                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; \+ H4 v# ~7 W9 O+ V* s                                @,root.eventcontroller.simTime);
1 E  G# Y% T1 a& K) }4 I8 _, W& h4 O                        @.HasOrder := false;# J. @1 z( j3 `( C' d
                        @.DrivingHome := true;! O  s/ d( V( z- C& |
                        rgManager.tryToStartTransOrder;$ N& h) x- y3 H) n# g0 ~
                        if @.Destination = void
- _( p& A, P! j5 c5 u  x                        then -- no transport order for vehicle @$ P0 r0 c- J* {% U( h$ f8 A" f; r
                                @.Destination :=
7 A6 f! q9 J* r/ m/ T6 U4 D                                rgManager.nearestFreeStation(@,track.~);
: A& C% s6 `2 G& U( ]                                newDirection(@);   ! ~. j/ T# Y) K4 Y1 ~* g
                                if @.Destination /= void then
+ m0 J, P: ~' l8 @* H* K  L7 g                                        @.Destination.NumReservation :=# `6 ^* T4 R2 L& V9 V
                                        @.Destination.NumReservation + 1;. _7 L* e9 Q# Q6 |
                                end;* A& M5 Q7 x5 p3 [. j( Z
                                @.CurrIcon := "drivingHome";
8 }- p1 P  M6 y4 A$ F                                @.DrivingHome := true;
) x4 X4 L5 `5 S/ I) F2 F                        end;/ m7 n3 b+ W: J2 |, H: v9 r2 {7 V
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station) j8 ^; y2 m' i' u& \5 f$ @+ Y: n
                        part := @.transpOrder;. E2 B* E8 y/ W% I; Q- I4 B
                        part.move(@);-- load part
$ Y' W5 U& x, s  f, t/ W2 h                        @.CurrIcon := "load";
" ~0 I( ]' u3 q: F                        GlobalDistObj := part.globDestination;$ [7 A- x- @$ s" b4 {' t3 M& F1 G
                        assignLObj := rgmanager.rgAssignL;
1 o) i7 g  J# a" ?) ?: {+ A& K- o                        row := assignLObj.getRowNo(GlobalDistObj);
' ^) ~4 Q. Y" _) p: L                        if Row = -1 then -- since 70* z9 M: q* g; L$ A
                                if lan=1 then
2 }" C$ `( _: Q2 W  K- w% l4 S                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 I6 [4 n  O" S                                                to_str("in der Andockstation: \"",?.~.name,"\""));. b! D  \$ p  R1 }9 m  L. o
                                else
  L9 d/ o! v, ?9 J                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: B, G" q7 k" A5 |                                                to_str("in docking station: \"",?.~.name,"\""));                               
% }9 o7 y6 R2 m% A; o: d                                end;! l* N2 z1 `7 b7 s. h7 Y& D
                        else
5 }' _: N4 d1 n7 l: _                                @.Destination := assignLObj[1,row];3 u/ U1 o9 ~/ ?6 I  @7 |
                        end;                        ! ^: j( V4 B* o3 {; k- b( ?# F
                        newDirection(@);5 }; n$ J/ j% H6 q; O# y2 V, L+ y
                        @.HasOrder := true;
; ~, X6 K1 I1 T3 a2 r                end;
, @9 F' x  L- j8 P. h        end;& L9 v3 P3 w5 T. y. R! F8 t
end;        -- of the method
% J) I# C. V9 }! P% v
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
9 Q% M: V0 R' G1 C9 X3 F2 t( P1 `) O. ?8 i, B) d
这是AGV_putin中arrive的method。
3 Z( [' `! }8 y& Z+ t
1 X* ~# u/ A7 h4 W; u# F' d当到达物料速度越高时,这个报警更多,
5 F$ ^5 l2 ~9 ]8 d可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。, G- y$ s0 U5 Q- t3 d" h- Y* M: l
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
. ^! E0 ~; q, _9 k" x
0 w2 [) c: u. i& ]2 M0 \另外一个小建议,就是move,所有的move都可以这样
/ G) X! k8 \& V( Yif not move() then debug end6 x1 b6 ?% ?. L8 A& H
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。# T4 Y, w3 E( k' a* b3 s8 D  p
plant simulation中的free libraries有AGV模板,& x0 B8 G, m$ G4 ~% V
里面也有案例。) H' Z! G5 S' S4 D- j+ z
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
9 M+ q' O5 N; L) N0 Q; h, p. u; ?5 B+ _; X( m$ p7 W
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ! I9 g: U# b7 ~. w
* _8 s1 [! E' g- T8 J
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 9 Y8 m" ~# h- X1 z8 y; d" B+ U
这是AGV_putin中arrive的method。; C9 |- P4 r, F! u" L
/ r& C, W+ f. A+ K; ]
当到达物料速度越高时,这个报警更多,

! I3 `: O+ f% [1 {& @另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-19 04:52 , Processed in 0.022107 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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