设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6360|回复: 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 {: [1 A5 O0 T; J! W% f
*/
2 |" {. P3 D, P; f4 C- m& His
% m) y0 _# {7 r  N        part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 Z* }: r. n% S- g: X
do4 _& b) j* J0 M1 }6 P0 q- T
        Lan := rootfolder.Internal.Tools.AOLlanguage;; j7 g0 D  X* N1 a
        if current = @.Destination -- else return  ^9 D) J9 h* t" F$ I
        then
8 H4 r6 o, P' b. I7 [  }                @.Destination := void;/ s+ N9 |7 o* p( d4 n1 g* s! {6 Q
                if @.occupied then
: ]0 G: U. ?3 m+ F( y7 P/ ?7 M                        part := @.cont;
9 T; L% R" H  A4 {                        @.transpOrder := void;; v0 {0 Z, t2 e3 V! s( M
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," S4 U8 D5 `! k1 D
                                @,root.eventcontroller.simTime);
  m. V& a5 D5 ^9 W" B+ y) W+ _8 X+ U                        @.HasOrder := false;' O$ h- ~, G0 U+ \$ a7 D9 o3 H( B
                        @.DrivingHome := true;
# ]3 W, H. n, Y3 K; t                        rgManager.tryToStartTransOrder;
3 z, X/ h8 Z6 Y% ^" b                        if @.Destination = void% Z" c. ^3 A4 N; ?, j
                        then -- no transport order for vehicle @  Q2 |+ t: V& w4 O
                                @.Destination :=
1 k' ?) k! g) y( i7 s7 {                                rgManager.nearestFreeStation(@,track.~);7 Z- U: B1 b+ b
                                newDirection(@);   - W. t+ m1 @- ~) M
                                if @.Destination /= void then
9 f, [) C6 r" L4 I; r* Z) E* S                                        @.Destination.NumReservation :=
, h& K6 g: h3 {                                        @.Destination.NumReservation + 1;
9 u! @, U& F) q( a. J                                end;
2 G8 C" l! w6 B5 z1 M                                @.CurrIcon := "drivingHome";
! d4 ^4 ?, |2 K  c" v6 ~: F                                @.DrivingHome := true;" J0 K5 u* t$ f  `2 o
                        end;
4 g$ Q. D% X) G; }' R: M                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 l, m- C4 D$ M2 r9 p/ ]                        part := @.transpOrder;/ [' o9 K% k0 n+ G  T7 N% M+ W( _8 }  T
                        part.move(@);-- load part3 Z: @2 X% G5 V4 y/ W8 w
                        @.CurrIcon := "load";8 v) @: H* c5 k6 x+ H4 Y
                        GlobalDistObj := part.globDestination;  ?/ G+ r% t4 H  B: J0 X9 \
                        assignLObj := rgmanager.rgAssignL;
4 A7 ]8 m+ h  {0 c, f! V0 w                        row := assignLObj.getRowNo(GlobalDistObj);, @" N7 z- J# G7 v& P  ?* I
                        if Row = -1 then -- since 703 c+ t' T! G, T+ y0 l
                                if lan=1 then: f! S" f5 B7 b/ ~7 O. g" x
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 Q- F1 w0 b( g% _5 O! v2 U                                                to_str("in der Andockstation: \"",?.~.name,"\""));
: ?* ?9 [9 V' f1 Z7 l                                else
* T( N) B7 m0 \. I. W$ y8 I( }( @- }                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
  G; m7 R* t: p% x: A7 e2 h4 ~! o6 C                                                to_str("in docking station: \"",?.~.name,"\""));                               
# @. d  H8 z$ G                                end;7 A/ k8 a+ p4 \
                        else
# R- x) L2 |6 r$ Z9 l' L                                @.Destination := assignLObj[1,row];
2 o% [; ^7 ~" ~: X( |! b# I" a                        end;                       
( {3 B) _% W, g$ r                        newDirection(@);
& w7 f- `- @% k& Z( a7 X- O                        @.HasOrder := true;/ U5 v. b/ _' C7 c7 }9 ]
                end;
* L3 Z+ [" E7 ]        end;  F. r! f2 E, B( d0 A1 d& @
end;        -- of the method
# C! L) `4 D7 \/ n
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
, [( n, g! Y$ L- Z3 _8 n
. Y( \4 v: M3 S* M这是AGV_putin中arrive的method。1 E9 |0 k) B4 G" I  Q5 P5 p
- [/ Z$ e& a. E# ^3 \, a' {
当到达物料速度越高时,这个报警更多,
) w" Q5 [$ ^9 _+ o4 a) H, h9 i0 `可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。( n; A+ c3 R8 Y3 V3 W4 a7 ?; B
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?" n9 Z/ Z: Z$ \
5 ^% B2 Y8 w  V* f' ]8 a
另外一个小建议,就是move,所有的move都可以这样
/ I9 q: E4 x, Z2 F/ c# Lif not move() then debug end
8 Z9 o; ^% _; Y# y这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。& x  s& w, x' r0 R% n
plant simulation中的free libraries有AGV模板,2 S1 C* N$ w3 f! M7 U: }4 \
里面也有案例。
# ?9 l( R$ s8 l/ W% F% I& p我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
! Z: e, g- h9 E9 f8 I% |( M' @! S. [9 f1 q9 v. F( v& \" M; _
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
" g$ ]- A3 X2 z4 F1 }5 |. v7 E2 o0 ~6 [8 K/ k8 q. X
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 - t/ D0 t2 R" w6 ]: W# X0 S
这是AGV_putin中arrive的method。$ A% x1 O, K$ P

/ _% A' R& |- v/ ~  E当到达物料速度越高时,这个报警更多,

3 s" K$ f0 Z" e6 \另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-1 19:12 , Processed in 0.021879 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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