设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9717|回复: 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'
! r6 V6 z! E3 f$ {*// e3 L9 f% B2 j: F
is2 Q* b  }+ j! }  d5 a
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% G5 G& a; A8 O# sdo
! k# _( N% A" H9 |3 d        Lan := rootfolder.Internal.Tools.AOLlanguage;
  w  \7 J9 }( s        if current = @.Destination -- else return' T( ]; J! v8 t1 x
        then
2 \/ P6 H8 c. Y- K  c4 A# U) W                @.Destination := void;$ G9 y( r/ m7 Q6 h8 s
                if @.occupied then$ A$ H1 ?: [& F9 T
                        part := @.cont;+ }* o0 r; k( t# P: J; b
                        @.transpOrder := void;5 g! K" X4 l- ?- v* V
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ a' J7 \6 l/ F  r' Y, f. J                                @,root.eventcontroller.simTime);* C9 Y- l( |+ b# s3 X
                        @.HasOrder := false;
* c. U; e% o3 M6 l8 Z. c                        @.DrivingHome := true;
' d6 J& D' y4 F, R: c: Z( R4 [                        rgManager.tryToStartTransOrder;! h4 G8 z. k) P$ v8 y2 ~& o
                        if @.Destination = void+ R' L  o' y6 x7 j
                        then -- no transport order for vehicle @2 z2 U: m5 w. l3 n! p
                                @.Destination :=
- K5 v: |! D/ Q2 d) V                                rgManager.nearestFreeStation(@,track.~);
* z: a; _; Q1 v8 A                                newDirection(@);   + _2 q7 y6 V: l
                                if @.Destination /= void then
0 c9 S* S( N" a; a                                        @.Destination.NumReservation :=/ ~2 i1 Z  s7 H2 T+ r
                                        @.Destination.NumReservation + 1;. A; S( ?5 ~% W8 ?1 I' q/ |
                                end;
0 \/ J# ^; k% G) C$ \                                @.CurrIcon := "drivingHome";
. \1 p7 A: S0 i                                @.DrivingHome := true;
4 M1 k, B# R8 f5 }+ \) y2 n/ {7 r                        end;
" H8 J2 p% I* O( A/ y                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( I: e! \4 c! L% \9 V( h                        part := @.transpOrder;
. ~+ S' h- I6 ]6 s% y                        part.move(@);-- load part
2 c3 B9 m( w# d& J0 a8 U8 u( X                        @.CurrIcon := "load";! L2 }. `1 b) V3 ~! M( ]
                        GlobalDistObj := part.globDestination;  F. i) J2 h* U/ }: z. N4 @
                        assignLObj := rgmanager.rgAssignL;
; {' s, p7 h* {5 V8 W                        row := assignLObj.getRowNo(GlobalDistObj);
) N  I7 S! @$ Y# N0 v                        if Row = -1 then -- since 70
5 m" l  Z. m' i3 F8 R                                if lan=1 then
! V( i. g' g8 O5 x                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 Y2 r9 `8 T+ @                                                to_str("in der Andockstation: \"",?.~.name,"\""));5 Q5 R: _3 F, l& G
                                else
/ _# z9 f3 |+ \* ^" k: {                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 U8 V; s" a/ k' l" y& ^2 |
                                                to_str("in docking station: \"",?.~.name,"\""));                               
/ D% V6 V' T) E' X  a+ B                                end;
7 Y1 L4 D; l' H                        else4 W0 w% j- N( \, M3 J! c
                                @.Destination := assignLObj[1,row];
6 B+ h. M2 `8 E; ]  P                        end;                        6 C8 U+ f# [& p/ r8 {4 w  M% \' @4 p
                        newDirection(@);
1 o; C! d1 p# g: m% ]: T                        @.HasOrder := true;
0 D1 a$ H' d9 p                end;6 U* T3 P7 G% O; d$ ^  d
        end;3 A/ T3 O2 w1 y2 |. x  f! i  K; ]
end;        -- of the method( n/ {" K& t5 u2 W1 o4 n& X
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
' \& E# v  n7 }# U! C1 \3 O8 V8 g5 C4 E  o3 Y+ e. \, L. P* @" }
这是AGV_putin中arrive的method。
' g, q7 h* w7 h/ [2 x( P* X* I9 H
6 m# E- ]# |# h1 B0 G0 D* {当到达物料速度越高时,这个报警更多,
/ N9 I8 P& H; |0 I9 ^+ Z3 Z可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。: X, w4 ^- Y; j  W8 K
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?9 r" J: c, A3 Z: V) [! x* I6 \4 ?

+ F% d  H  e" u/ t* l4 i' B另外一个小建议,就是move,所有的move都可以这样/ ], p2 S9 B6 N! ]
if not move() then debug end# C* x! \( R' v7 w, _* M1 `$ O# J
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。0 \: @+ d1 I& V0 L
plant simulation中的free libraries有AGV模板,  D' ?2 D9 U5 K- t) T% E% f2 n
里面也有案例。& Q) Z. q% o1 s) _  C( b
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。& l( a) g9 Y. U+ S, d2 F/ }8 V

: }8 O( g: Z: F我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 f0 `2 t1 w) |: V1 Y. N" ~' t0 T9 @+ o  U7 z! Q, ]: ~% Q
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ; _' w* X4 L  [6 U- X
这是AGV_putin中arrive的method。  h* e2 S1 w/ e0 A6 R7 W2 a

  e/ w' z9 [1 I3 ~2 K* s7 V7 B) i当到达物料速度越高时,这个报警更多,

+ R. b5 @7 w* s. `8 U# C另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-20 02:46 , Processed in 0.017409 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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