设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7931|回复: 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'
- V/ U+ S# W) B4 y/ E. Y. b" L8 j*/% u, _6 _7 B; ]/ `6 l* w
is2 T4 u, g9 b, T" L% g; I4 J
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 t# S  l9 o1 `: X3 Tdo
4 W# G  B" D5 }! w* n- P% O        Lan := rootfolder.Internal.Tools.AOLlanguage;
6 x. C" H! l9 m8 h- j& C        if current = @.Destination -- else return
6 N, [: K) i' G* f        then1 o2 g/ K! P  Q: |+ X
                @.Destination := void;" z" v/ Y% z! p' s. a
                if @.occupied then
3 I3 Q$ X8 [, M                        part := @.cont;
) o/ K1 C+ J% n# w                        @.transpOrder := void;0 H2 s+ s5 s1 W7 Q! W4 T
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 v& S( \- X2 ~( x                                @,root.eventcontroller.simTime);
) a. V+ S1 `& M) B; D                        @.HasOrder := false;
5 z( e' t+ z+ X/ S7 s9 s: Y                        @.DrivingHome := true;; Z0 L) F$ h- l( l; P( o( {$ x
                        rgManager.tryToStartTransOrder;
9 A: P+ W5 u/ t1 I' \                        if @.Destination = void
; X: s6 I; N* U$ v+ G5 u( o6 Q                        then -- no transport order for vehicle @" U0 J, W3 O; ~2 u# z
                                @.Destination :=
3 O  f7 W) ^5 K6 `                                rgManager.nearestFreeStation(@,track.~);
* @" g" u4 I; Q, P6 o                                newDirection(@);   
/ p$ ]5 f5 K; t/ O$ T                                if @.Destination /= void then
; A9 _- l. _) g2 l  i* c                                        @.Destination.NumReservation :=
& d# x3 q2 N2 m$ `5 g! i. g                                        @.Destination.NumReservation + 1;
# k) u0 A' F, T- A! S                                end;- [# S; Q1 ]" q+ z# `; y
                                @.CurrIcon := "drivingHome";( I% T; i: j9 r' @5 E) u
                                @.DrivingHome := true;3 C4 v% @. B8 W' X, l' [
                        end;
4 Y: A! E. P/ W8 a$ x+ I& W                else -- the vehicle @ is empty, both vehicle and part are in the same dock station' D$ B; t. q. L/ S+ u
                        part := @.transpOrder;
0 g1 w) B1 S% I% E: p1 ?                        part.move(@);-- load part
0 C% t" I; [5 J" ^1 v. V                        @.CurrIcon := "load";4 Q" [0 j' F# _" u8 i. E
                        GlobalDistObj := part.globDestination;
3 p: D# A/ S6 m" x  }) w8 q. X( R% t                        assignLObj := rgmanager.rgAssignL;* A; m& i, m7 i
                        row := assignLObj.getRowNo(GlobalDistObj);
  K8 E6 P2 S6 C- A/ j                        if Row = -1 then -- since 70
- `+ |) B" e# R1 P6 n                                if lan=1 then
  v0 p# T0 H* n                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; H# w" G  Y! l4 j$ K3 ~- s
                                                to_str("in der Andockstation: \"",?.~.name,"\""));/ D+ i- y" A& _# Z
                                else
& k2 Z8 ^: e3 ?8 X/ }3 y                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: c+ l! k" y2 N2 c. k7 D" B4 W                                                to_str("in docking station: \"",?.~.name,"\""));                               
+ C9 [# f# {  ]: ]" i4 V8 \                                end;! ^" T, C% x7 ]3 O( C
                        else! K2 w* k$ @6 J7 q* B2 q) S7 N
                                @.Destination := assignLObj[1,row];
4 y* [, l, r0 L& g8 i- q                        end;                          v- z# K5 \& e4 b
                        newDirection(@);
* x: g5 ?2 ^$ g3 c. G                        @.HasOrder := true;. T* B' H& k; @% U
                end;
: Y: w6 }* |8 k3 J: }  u  R# N        end;$ A; s/ c) |* c9 @) w/ M1 x
end;        -- of the method
3 {* f) g' j6 N# f3 _
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 6 n, G, H- l# h# x( m+ ^

+ a+ N  }' Q; E5 y" [这是AGV_putin中arrive的method。' ?3 [' p  P5 m$ n

. W/ ^; _4 c  X/ H) J  f当到达物料速度越高时,这个报警更多,
' `/ h* E- g6 x$ l& W可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
1 x. h8 r2 Z2 q程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
) O/ |3 Y6 z- T/ N1 c% f. T$ ~5 U# N$ [' P1 n4 g3 R: v
另外一个小建议,就是move,所有的move都可以这样
+ n7 I- `% |( d+ lif not move() then debug end
$ o+ O$ {6 X+ M5 \这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
) s* b  a  ], F7 T5 Cplant simulation中的free libraries有AGV模板,
2 u/ ^1 ?) N- r3 M( e里面也有案例。- k1 [5 R& U+ g* p# O) B) M2 O
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。! ]9 r* b; r+ P

4 W. ~- J0 Q0 Z( f# n) J# x7 g6 C我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 8 r6 Q' T1 p7 \7 y9 {# ?) q# p
4 Z. R* a1 U  ]# O
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 / y9 @) Z4 D4 l# R  p
这是AGV_putin中arrive的method。8 T, h  ]7 f# O! p0 B8 @. T

* d$ ?2 s8 t9 `! F. I6 [* O; e当到达物料速度越高时,这个报警更多,
# C' e% F( @# A) g
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-6 06:22 , Processed in 0.018818 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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