设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8561|回复: 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'
8 v0 ^1 e9 E( y5 _. c% a5 L0 d2 m! ?*/5 u6 ]8 X; p" u* @' q4 b1 J
is* J; F: E7 ]" o" I
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; `5 D6 k% b+ Q* {do
! `+ a+ U! X" j0 u        Lan := rootfolder.Internal.Tools.AOLlanguage;3 u. c- V) ^3 r3 g- e
        if current = @.Destination -- else return
) b1 J" I6 Z: v  i9 c        then
$ g5 G$ @9 [8 [8 \$ X                @.Destination := void;' z# U- o2 f; k8 g: r$ B
                if @.occupied then' f* f1 F' T! J3 I* z
                        part := @.cont;4 V- Q# m0 e6 L& u
                        @.transpOrder := void;- h( O2 N) n" S* N# S3 G- V* n
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ d. `# |' ]$ T, W  |/ U                                @,root.eventcontroller.simTime);
. m# O( \" @) O/ o                        @.HasOrder := false;4 T; ^* c& ~6 E. K3 ]  [9 q% h
                        @.DrivingHome := true;6 a0 j3 e  n( t# m1 o- f" f4 C! E+ s
                        rgManager.tryToStartTransOrder;
7 G# c2 N6 P4 C- f' J. ?: y                        if @.Destination = void
5 s% N( M5 ]2 Y# N- F: D& T                        then -- no transport order for vehicle @5 [3 K. g1 U+ c/ @  i, [4 E  s
                                @.Destination :=! S2 S& g0 F$ k9 j1 L6 C3 @( d
                                rgManager.nearestFreeStation(@,track.~);
( b1 V  _# i, X$ o                                newDirection(@);   + P2 g8 [" f  S" i
                                if @.Destination /= void then  a# N* q- k# k: ]
                                        @.Destination.NumReservation :=6 O/ D& `  R" p1 m" z
                                        @.Destination.NumReservation + 1;" f) \4 Z; m  J7 y
                                end;
, l6 `# o0 t/ h. l' @# Y  k" \                                @.CurrIcon := "drivingHome";3 W! L) ?( ^* _) Z$ _
                                @.DrivingHome := true;% G+ b# J  H& z! a- {
                        end;( o9 J3 O  Z2 j& ^) F; O6 h
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. D' d. N5 p8 m/ \- w* h  K  ~                        part := @.transpOrder;# P' r+ U; t$ ]) H. ~  g/ a2 O- X
                        part.move(@);-- load part
$ w- Y% W9 I3 _3 Q                        @.CurrIcon := "load";4 Z; [( j# e+ s3 S) w) ?9 f
                        GlobalDistObj := part.globDestination;: g& d8 t1 }- k+ n: U( t/ ^
                        assignLObj := rgmanager.rgAssignL;7 c: H; b! _2 H6 ]
                        row := assignLObj.getRowNo(GlobalDistObj);
$ F/ T, |! s# u7 C                        if Row = -1 then -- since 70$ T' ^7 t1 a/ j8 ^& ^" C
                                if lan=1 then  s5 \1 Y. B& i3 u6 s  `
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) S6 v6 z& P0 x/ T/ v4 S$ p. p1 Y                                                to_str("in der Andockstation: \"",?.~.name,"\""));
( ~! j( o' I/ R$ p                                else8 D. S( }3 V0 V6 ~
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 e& B7 \8 z+ p3 N( G
                                                to_str("in docking station: \"",?.~.name,"\""));                               
& a4 j1 n( s: V. z3 n  S                                end;- }4 i4 ]/ z" j9 y
                        else' e! a; E& o1 u) ]) Y. e
                                @.Destination := assignLObj[1,row];! f% x" y3 _# F) f: H1 ]. R1 z
                        end;                       
8 n$ I+ K/ X- A4 M" e# s8 |                        newDirection(@);1 c+ r; p, K# r0 \
                        @.HasOrder := true;7 l! r# c" n( a. _1 P6 ^7 U- N7 T
                end;
4 n! {7 h3 X( J        end;% w# [! U2 o8 d, e; s
end;        -- of the method
! H9 u/ {+ I8 ^( o0 @
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
2 f$ c- [) k$ y0 f% V, }1 l; j% c8 i+ E6 m
这是AGV_putin中arrive的method。7 S) H$ G+ T' v' A+ ~, l
4 V( H/ A8 ^: ~7 S: }. I& C1 Z
当到达物料速度越高时,这个报警更多,4 V/ }8 j; Y! n- u& G# `% V1 s
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。; p% L! I* A$ g, r, |# ^0 K
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
- L# r& F6 `0 l$ F! h) N4 ~8 I& L1 @9 S2 Q! t
另外一个小建议,就是move,所有的move都可以这样! d3 M! O/ L& f1 F; C0 k7 n: F
if not move() then debug end
; f; r2 T' Z( J" D这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。$ ~2 ~3 b0 E. z8 k  x+ i
plant simulation中的free libraries有AGV模板,
; t+ E# A& D8 D( v5 @' K里面也有案例。- t+ c- S) Z, J: I9 j. T, [, P1 L
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。+ X0 R2 ?! b4 e" n) \. y! R$ B

& d1 }3 r* b# D7 v- ^- i" m我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 : o# y. h- D" G5 l5 x

3 ~6 |# m+ B1 n. L/ q, D3 F那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ! ^$ f  K7 x! @- |% W5 k
这是AGV_putin中arrive的method。
, o8 K7 x, q7 ~' ~# T; L
$ r/ ]) J" u  L! V( v! F1 k当到达物料速度越高时,这个报警更多,

& N; w' U: s8 ?; ?另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-11 21:46 , Processed in 0.014596 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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