设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8287|回复: 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'
3 G$ V) e1 T$ H+ D- `*/0 \% z" f% X# g8 F6 Y! s
is$ s; y, u# R  X0 Y" F/ k! c
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 O  z- _5 _3 ]4 B; @1 Tdo8 |, I& k$ ~- w3 O% w
        Lan := rootfolder.Internal.Tools.AOLlanguage;, w4 ?, @8 A3 g1 _, U2 e* U
        if current = @.Destination -- else return
2 E! L8 s' b- g3 V; Y        then
7 r* @/ r2 Q& M2 s                @.Destination := void;
% X# C2 y) t9 e2 d. {% r                if @.occupied then
8 H8 |% c4 }9 g; L/ X5 P- m% J                        part := @.cont;
+ p- r9 A1 A' D' `                        @.transpOrder := void;
0 b" ^9 l3 U0 b                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% X0 z& x2 |4 r; b; J8 y                                @,root.eventcontroller.simTime);
& j2 c) S; G" f4 M/ _7 S                        @.HasOrder := false;, }' j5 u7 p. d# }6 \# i
                        @.DrivingHome := true;1 p4 Q) r' U+ E
                        rgManager.tryToStartTransOrder;
/ S* ?6 {+ Z  b6 H$ ~; f+ O1 d                        if @.Destination = void
/ i! R  v1 U' ~" }- e' q" n1 S# S                        then -- no transport order for vehicle @
- w$ l# j& i; o- T* w+ [                                @.Destination :=6 W* j. m6 @1 ?4 f9 i% F
                                rgManager.nearestFreeStation(@,track.~);, r2 F# L1 I; n- g/ a
                                newDirection(@);   
8 e% W+ R9 q8 K1 z9 I2 I3 d                                if @.Destination /= void then- x; E( `5 G7 T+ b* `
                                        @.Destination.NumReservation :=- [' m) M5 q7 F; B% d' N
                                        @.Destination.NumReservation + 1;
  W' C. Z6 ~$ ^" x( o% e% E                                end;
7 b. T6 U4 h. X$ J8 F                                @.CurrIcon := "drivingHome";
% {) j5 i% T  n+ I  f/ N                                @.DrivingHome := true;
" {. v4 C0 X* l/ \3 M7 E5 {                        end;$ X& D2 ^  z/ V' F7 n' W1 _9 k; ^  A
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" M7 Y0 w# K  @- E* c/ Y7 v                        part := @.transpOrder;
$ r* X: Y! ~' F                        part.move(@);-- load part7 h0 [. G% z( n8 E, n4 A& `2 W; L
                        @.CurrIcon := "load";/ ]# O, E$ |& o% H2 d, [
                        GlobalDistObj := part.globDestination;7 _6 O; n+ ^5 d: I
                        assignLObj := rgmanager.rgAssignL;
  K" t4 I# [2 f6 w+ x                        row := assignLObj.getRowNo(GlobalDistObj);. c2 y7 m' ?2 G0 l3 A, h
                        if Row = -1 then -- since 70
" I. G% S2 g7 W1 s5 S% F- S                                if lan=1 then. F- T4 S/ H( |6 I: z8 G6 H3 K
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 K! C( S9 C1 j9 H9 w& Y$ O
                                                to_str("in der Andockstation: \"",?.~.name,"\""));& q2 f/ j3 j4 p6 z
                                else
& ?2 a) a: i: C3 N# m                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: |5 j3 a: `7 l3 O; P. @7 u  z3 Y
                                                to_str("in docking station: \"",?.~.name,"\""));                                ( j. G; c& N) P* f% ~" [/ W
                                end;. p+ N' q# M& Y( K8 w  @' j
                        else5 z; Q% t& c+ `# \3 s
                                @.Destination := assignLObj[1,row];1 f/ G# M2 L0 q& ^6 \/ _4 A
                        end;                       
  O5 ], I1 F# ~* L6 w* j3 G$ i                        newDirection(@);
% _* P* {, M5 O. b( y                        @.HasOrder := true;% G0 N. v( h2 _# u+ ?7 h
                end;* H7 c8 P% k1 p& g0 m- j2 D4 d5 b
        end;
. R- J: `* \: Y  ~$ {" }9 p3 fend;        -- of the method* z" r, m% ]* d  {' _3 P/ O
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
4 V$ f, ]& A2 }* X7 }: _) ]
& s- d. F& ?. ?( q! Z. [这是AGV_putin中arrive的method。
. N: e4 G, w$ s, D5 ?& T0 ]
4 |; }4 M* F6 q6 T当到达物料速度越高时,这个报警更多,
  r+ ^! V/ S  Q7 x可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
; p5 _+ M- m" R) y# Z5 p. M$ ]) G程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?2 z5 S9 e0 N7 V8 v

& A" u8 V9 K5 I* _另外一个小建议,就是move,所有的move都可以这样, g1 i" ~7 f) ?9 X+ P5 j$ O8 }
if not move() then debug end
3 b9 h4 Q2 @8 O" }4 J这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。0 O3 L& e( u- J% R( P" ]$ K3 W
plant simulation中的free libraries有AGV模板,
! h. r( P9 g0 g% ^0 G* c里面也有案例。
0 N& Q- K7 @3 E- V0 V9 i我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。. H4 f6 d2 ~: d0 B4 {; q
9 ]! E! b  s0 N. y
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 0 n) O9 J3 z( [; w9 o' `1 q

" a0 ~. `9 \! A4 Z9 Q: a那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
2 ~3 F: i2 B- I; d6 }& r这是AGV_putin中arrive的method。
" f3 g# n' ]  K- u) {% t6 \, s- b: |# ]! z5 c) i* o
当到达物料速度越高时,这个报警更多,
% W& Z# r* y0 D& L5 U* e
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-25 11:20 , Processed in 0.016933 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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