设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8881|回复: 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'
! X+ i8 ~0 B; p3 T*/  P/ k( V3 b1 L( q
is; W  B' Y. U" D4 s. ^' y8 ~* `
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;# [- E& a5 d& D) o
do
0 v! V8 g8 V0 q% `% ?        Lan := rootfolder.Internal.Tools.AOLlanguage;8 p$ Q' ]  W& D# J! m% P
        if current = @.Destination -- else return' b+ {4 F$ O- d* C) z3 z& o+ i" F
        then
, Q8 H/ I) G3 g" i+ c! u                @.Destination := void;
# Y8 \" y! F  C% A2 `% f                if @.occupied then
7 B) Z" y5 V8 n  c) V) o& e                        part := @.cont;
/ V2 \: B1 [; j: V/ a3 v                        @.transpOrder := void;7 Q( R2 G, h+ d3 ]* R; z
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% G0 u) {) ]2 {2 J6 {, M, a
                                @,root.eventcontroller.simTime);
% c& w: P1 i" k, F                        @.HasOrder := false;
1 X4 j! S/ [: w3 A" c( N5 ^0 _( _                        @.DrivingHome := true;
0 A& d, Y& {1 S! E! U& ~9 ]                        rgManager.tryToStartTransOrder;/ b3 g8 s" T" e. B( u
                        if @.Destination = void
: A% i4 |+ D: C# S8 ]                        then -- no transport order for vehicle @
6 j- G! B) j7 L/ M/ J; `                                @.Destination :=
  O; N- y  s+ ?# o9 @/ R                                rgManager.nearestFreeStation(@,track.~);& Q* `$ Q% A2 o/ }0 i% I& `
                                newDirection(@);   
# H0 j6 E$ L7 p+ ~/ ?) D                                if @.Destination /= void then8 h4 t! y/ i5 @# `! G" t
                                        @.Destination.NumReservation :=9 {+ ^0 z8 p/ i- T" N
                                        @.Destination.NumReservation + 1;
7 a' x$ S6 H% V9 F                                end;& W1 W: n) k5 |5 O; G" X6 |) J
                                @.CurrIcon := "drivingHome";
7 x6 S3 J* U: D! Y' [4 S                                @.DrivingHome := true;- t* L( L% Y8 F2 I2 B
                        end;/ m2 V# g: [& r4 t. t+ o
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; b% f* L8 }# m4 ]' t; l/ f0 j& {                        part := @.transpOrder;9 {; m, w" X# P+ s' m. ]" @" G
                        part.move(@);-- load part
/ t$ J, \5 n8 D. _7 e7 [                        @.CurrIcon := "load";& R) r- U+ ^  W, b2 E
                        GlobalDistObj := part.globDestination;  ^0 y& y% d2 v" b; ]0 @
                        assignLObj := rgmanager.rgAssignL;7 ~7 J  J# k, w
                        row := assignLObj.getRowNo(GlobalDistObj);, K8 H5 b% |& S. |' j  E6 O
                        if Row = -1 then -- since 70
: U8 v. f' O& U1 k6 n; k# h$ \. u                                if lan=1 then' x' p3 a" i8 U2 X3 w
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 E! u0 Z6 x: c) b$ {  N                                                to_str("in der Andockstation: \"",?.~.name,"\""));
# C& V) h) C4 c  g- J& a8 l" w                                else
3 i4 K3 g/ `3 t  W. J                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 C. K9 h& J0 L6 ^. E' b' _& @% G; q                                                to_str("in docking station: \"",?.~.name,"\""));                                5 i  Q4 z$ @( V: u
                                end;
& A/ J# @  T4 ~+ ]$ B3 j; z- X                        else  A, [4 R9 \9 E9 c8 D
                                @.Destination := assignLObj[1,row];
- S# W4 F7 n& M1 C                        end;                       
& [4 l/ N$ K6 |) f6 i) w                        newDirection(@);" l* y* |# Z' {9 q6 E% V
                        @.HasOrder := true;% |  |8 C! ~) Q/ S7 s7 N
                end;
- }- J; ], Q; \4 k; }        end;; c& z) F  e; c( w4 V
end;        -- of the method2 ~1 u0 M: P# K, r
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 / R- _* C* e: F2 n8 F3 @  ~

6 M) I7 p& s' i& ~/ M5 C( v这是AGV_putin中arrive的method。$ u6 c) }: K; j4 T" ^
3 T2 ]3 q. ^" L
当到达物料速度越高时,这个报警更多,
* V  G- r' B" N! i: _' \' q3 R可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
/ I1 v$ e2 y  z1 X) Z' V程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; X: G: N* \  T4 \
" z! |4 [; M& W
另外一个小建议,就是move,所有的move都可以这样
5 ?5 p1 E, s: [% d5 f1 `if not move() then debug end
3 U; z, v% Y- J  `- C4 o0 z' M这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
* }8 ]( t6 ^" Q9 p/ Uplant simulation中的free libraries有AGV模板,/ {% H2 [' l3 H- p- t$ c- Q
里面也有案例。" u. w" }( {+ C6 G" q; w
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。5 V- }7 h+ }7 r$ N& R

/ @1 Q4 y  P" `% l5 A8 w我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
! ?5 d3 I, n( p/ O5 ?. g0 J) P  ^7 c0 y4 O
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 6 @6 {" P* x' n9 Y
这是AGV_putin中arrive的method。
* o3 t6 u5 S# Z5 k/ |5 E# ^* @# b& Y) J* ?3 J# K0 Q3 N
当到达物料速度越高时,这个报警更多,
2 O/ Z6 z! P2 ?
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-2 03:04 , Processed in 0.017114 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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