设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6869|回复: 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'0 {( @: t2 R1 ]. _# ^( M
*/. c" x8 u- Y+ I5 |$ D
is) X; `4 b; R5 s6 y3 `8 O
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ c! k1 H' v" p3 a
do
( R. j& @+ v3 A        Lan := rootfolder.Internal.Tools.AOLlanguage;) D. ]4 k0 `3 ?( T) j- ^# p) F9 z0 Z/ K
        if current = @.Destination -- else return
# L) ^% T) ]( ]- S( |0 b% j        then
# V& R0 b* K3 [                @.Destination := void;
; _& I, \, B5 U" f0 \                if @.occupied then
5 w7 I3 S! h2 M$ z! t/ O6 \                        part := @.cont;
6 b) K) C* |" E- K- l                        @.transpOrder := void;9 L$ T2 o0 Q5 b* u' @9 O) S" L
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 n. a% }8 W. r  z/ Q* i& ~                                @,root.eventcontroller.simTime);
5 l2 |# f$ v3 B$ A                        @.HasOrder := false;$ s& D, e  l( c# z
                        @.DrivingHome := true;" g/ S: z& F; I
                        rgManager.tryToStartTransOrder;: X/ P/ s3 H# Z/ e  {
                        if @.Destination = void
% k7 K2 [5 ~3 {" I5 l7 {                        then -- no transport order for vehicle @
- {: @2 J6 e4 l1 m! Z, `- C                                @.Destination :=2 H" q5 E- r- r4 ]+ T
                                rgManager.nearestFreeStation(@,track.~);
+ ~  L' ^$ W( |                                newDirection(@);   
; h/ s/ {# p, P5 L                                if @.Destination /= void then. e6 B. ]5 B  S! @8 S( r
                                        @.Destination.NumReservation :=/ N8 p! Z: X2 W6 i( b( ^
                                        @.Destination.NumReservation + 1;
4 ?+ Z- t- E/ g+ E                                end;; r/ s' {3 B5 M5 d" P, j" N
                                @.CurrIcon := "drivingHome";
3 ^1 q4 a  ?( I5 G. e/ c. `                                @.DrivingHome := true;
6 i& K7 H7 {& p3 C                        end;
0 x" P* b1 v9 _3 G3 ?1 ~                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* E4 H7 m; V- y5 n7 m                        part := @.transpOrder;
8 @* e9 g7 t/ k                        part.move(@);-- load part8 i/ B) p6 e! m) h0 h% K/ B
                        @.CurrIcon := "load";0 w; F/ Z  P% A
                        GlobalDistObj := part.globDestination;, }' r% x+ C5 e- P. F
                        assignLObj := rgmanager.rgAssignL;
! \+ i2 d$ B! H- W9 k                        row := assignLObj.getRowNo(GlobalDistObj);
0 [+ K  R' x7 y4 Y5 s9 f5 K9 Y                        if Row = -1 then -- since 70
% B7 E) L# m5 |3 Q2 V                                if lan=1 then6 w6 ~1 q- C  x8 Z! G  x
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 b% p' z# w, [. r( \$ y                                                to_str("in der Andockstation: \"",?.~.name,"\""));7 o9 Y. ^1 v, Y2 v  D6 O
                                else6 p4 U2 x0 e* @# ]8 Y
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 c9 Y. @0 b) T" t* k9 `
                                                to_str("in docking station: \"",?.~.name,"\""));                               
& s6 H) A& l6 `                                end;
' i7 K! [* ?+ B, ^  I, q2 I                        else  t) l3 {7 L( }: `+ i
                                @.Destination := assignLObj[1,row];! z7 b3 {7 Q  C  J# ^2 A& u- T& O; V
                        end;                       
- S  F+ D% X; F, q" ]  n# X( ]                        newDirection(@);
" ?6 p: f* C7 J: S- t) g, p                        @.HasOrder := true;, g4 a0 S8 o# w. q& {$ }
                end;
5 v+ V' y: o0 O# s; _: e0 R5 r: h0 K        end;+ H! s6 o- s8 m* {$ b  d* S
end;        -- of the method
1 O( w1 `4 J) T) p% }
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 7 ?$ p" T, {; @' M. z9 r

4 r1 C4 F9 b4 S  `/ }这是AGV_putin中arrive的method。5 {: D& o) y9 P+ F; S. q
# Y; ]: r1 C4 E! j& T! Q! R: S7 E7 z
当到达物料速度越高时,这个报警更多,: o# h9 k! \" o$ `9 t
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
  Y$ G6 Y/ M9 J程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
7 a+ E8 b8 t9 n) L- M2 G. x" @: D, y: c7 x2 H
另外一个小建议,就是move,所有的move都可以这样
* c# P. o% F3 n, T1 l& }if not move() then debug end
# b1 F' |& q8 Y- `2 I9 h这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。$ f9 w* L7 b& p# Y) x9 R% n
plant simulation中的free libraries有AGV模板,
4 H. Q! c; o; I5 n里面也有案例。# l: I& c9 g% w' i2 M' q
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
4 x/ {2 i$ O; c* N" h7 h
" S. F8 {# I1 a" }4 \/ P$ S" P我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
7 b0 E* F; [8 v6 p+ c3 V- f3 ?3 g
. n. @) o1 I0 T5 L3 [那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
" j$ J$ s+ |3 L* L这是AGV_putin中arrive的method。
) R- w$ o) r9 {
- V7 o- Z* r1 `! g  _% a5 J( J+ o当到达物料速度越高时,这个报警更多,

' K2 y( N3 n  q另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-3 20:42 , Processed in 0.021053 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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