设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6087|回复: 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'( U, M9 G4 i' y6 e
*/1 q* z* M9 _" D; Y* @  r/ m4 g4 x
is
9 c6 @9 k* R. @# c; A        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% B$ A% V# e9 ndo( H* P. ~4 ]- {! w* }
        Lan := rootfolder.Internal.Tools.AOLlanguage;
! ?3 ]& f5 F0 U        if current = @.Destination -- else return
. {0 Y3 E) h) G9 g# {( Q4 e        then
6 D/ k9 [& \( Z0 y$ G0 L! B* k                @.Destination := void;
( J# }8 o2 I0 t                if @.occupied then
# h+ p8 f4 K/ I  {                        part := @.cont;
" q; V( ]( M# l2 p* L( T$ a                        @.transpOrder := void;
7 C. \4 _. U+ e. r/ E                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ V. [, {) N( [5 i( _8 F+ |1 R                                @,root.eventcontroller.simTime);% s. S% t# W$ Y+ Q/ J+ f$ P$ X
                        @.HasOrder := false;; N; Z' b3 ^  V1 c
                        @.DrivingHome := true;: R% b' F5 M5 R* d/ z- D
                        rgManager.tryToStartTransOrder;
- T* T. ~6 i/ M$ H. u                        if @.Destination = void* p/ Z8 A$ Y0 Q
                        then -- no transport order for vehicle @1 R# i  q  \' |/ f' `
                                @.Destination :=1 v% i5 Z! C/ [# @2 n0 `% c
                                rgManager.nearestFreeStation(@,track.~);6 i' U- _2 \$ m0 Y' q
                                newDirection(@);   
, s: k; `% x6 t                                if @.Destination /= void then3 [! u# I4 m0 o1 x: o/ Z
                                        @.Destination.NumReservation :=2 o4 R) I8 i1 e  L0 ^! k
                                        @.Destination.NumReservation + 1;
* W; ^. m- u3 H; x! t' t$ t                                end;
+ Y5 q  Q+ X& y& C- a' \  y8 V  B4 F                                @.CurrIcon := "drivingHome";
* F2 m3 @0 X0 N7 J) F1 t; u                                @.DrivingHome := true;! b$ W* Y" L0 M) m4 N% s; t& H
                        end;5 A" a# n2 v% @1 }
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ v# x" W" N7 |& r9 O: j( n
                        part := @.transpOrder;0 l5 T( S7 G9 s5 y, [
                        part.move(@);-- load part
7 ~" {4 j) z0 J, U+ L                        @.CurrIcon := "load";
# B( P' |* f, Y: n- A2 T                        GlobalDistObj := part.globDestination;
' H3 u6 P, C' o+ ~                        assignLObj := rgmanager.rgAssignL;6 s- Z! w$ d- I9 I0 [7 c! N7 o
                        row := assignLObj.getRowNo(GlobalDistObj);
7 K; m  O% \5 V8 {                        if Row = -1 then -- since 70* y1 S, Y: ^8 C3 j. k9 H
                                if lan=1 then9 V* F3 S4 O) F/ |7 I
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 |# j; r; ~" Z- P* ?7 n                                                to_str("in der Andockstation: \"",?.~.name,"\""));
" U9 s3 O  V+ T6 }) A, ^# c                                else
7 i, ~; m8 T0 ^& Z8 I; D* Y. l3 h                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: x+ O) F3 V6 g* n& Q
                                                to_str("in docking station: \"",?.~.name,"\""));                               
) A3 _/ Q% J$ G4 Y                                end;
5 Y0 J9 p& X  a                        else
1 p0 R% B! S. P3 S( O. d9 x                                @.Destination := assignLObj[1,row];7 f0 v& m- O  T% ^& ]( c- Q- z
                        end;                        3 d# O% c2 O+ z0 {$ p" b: s7 @
                        newDirection(@);
9 ~0 @, L7 X* n" u% w1 F! N( i% G                        @.HasOrder := true;$ i2 r; Y- [! L# P' d5 N
                end;3 Q" T: o/ X. @# h/ D
        end;
' r: S$ Y1 w3 u7 t% p9 u' Vend;        -- of the method
$ q4 N( E7 R( j0 k% u8 W
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 - k, ]; G7 A/ m: K1 f4 d

  K- O0 f4 H( Q& m7 t1 r( V这是AGV_putin中arrive的method。" [+ @, b8 ^/ M6 v0 X

0 H7 S" s* C) `  y( d$ d# s当到达物料速度越高时,这个报警更多,& I. z* D% z/ D* e
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
/ |- _7 V) k# e, R程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?" S) J& [, ?) a8 L( U
2 M- t* \% w6 x. w( t
另外一个小建议,就是move,所有的move都可以这样
; d/ K  M) B! g: u# z1 b* {, C" kif not move() then debug end& Q1 |  j3 B- e- x) m/ w. |* @" ?# M( @
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
% L% E; B) d) k% H) c* aplant simulation中的free libraries有AGV模板,5 f3 H9 Y0 E$ M* T) s; [* x
里面也有案例。
5 G0 e# o6 l: U+ q0 g, I我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。4 h/ b6 w3 D2 t0 l% u- Y

1 z# `1 X, X6 x) \; D( B) V' g我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 # M6 O/ O/ s1 i, t, [

% X* I& o$ F% t0 F/ F* @8 D8 {& t那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
2 u' `4 l! l; f( k5 S; Y) N8 b" q这是AGV_putin中arrive的method。
4 m/ ?* D4 t% \( ?! H: O. F5 F. r7 k( D5 B6 D0 T  P
当到达物料速度越高时,这个报警更多,
3 N0 K" h) F9 p
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-17 12:33 , Processed in 0.020056 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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