设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8615|回复: 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'
5 \3 r/ _9 o* Z- Y*/
1 J$ s8 U! @2 F5 ~' v  ?* ais3 }9 p! T/ |  f
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 X: x$ t/ y/ F) `, f
do7 @8 p7 a9 H$ r3 n" F/ K
        Lan := rootfolder.Internal.Tools.AOLlanguage;
+ y' s* {8 X  F; L; F6 M8 R        if current = @.Destination -- else return
! G2 \+ W& @/ O  o) Q- ?        then: `4 C7 D- I* \) H
                @.Destination := void;
% L, Z- w; V% }: i) i( [. \# r                if @.occupied then5 a* a! b) m) q0 K* p9 A
                        part := @.cont;, ], ?7 f2 B4 \1 Y1 B
                        @.transpOrder := void;7 n% c. f! [8 W0 V: V
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# ^# |8 w/ u6 Y8 B
                                @,root.eventcontroller.simTime);/ L" S, Z( |0 I
                        @.HasOrder := false;+ V3 c/ X+ t" Q/ ]4 M" v
                        @.DrivingHome := true;( _$ ^- }8 W* t; l+ v1 \4 m
                        rgManager.tryToStartTransOrder;7 e+ \, w* H8 t3 j
                        if @.Destination = void
3 ~+ [' M; G# O* d. ], [+ R                        then -- no transport order for vehicle @2 J+ _9 O2 n7 \6 V" s8 s  c4 a
                                @.Destination :=: |4 G% h. Q% {8 I3 T  r
                                rgManager.nearestFreeStation(@,track.~);- x0 C1 ]" C3 c4 C  P
                                newDirection(@);   0 B: A, u" |  r9 N* I9 [9 u- F- @
                                if @.Destination /= void then
* k: u$ |5 h  f5 g                                        @.Destination.NumReservation :=
3 s& L# D3 f) t4 h+ Q$ s                                        @.Destination.NumReservation + 1;
; ]) N4 o1 E  b/ e) W& N                                end;
$ W5 |  U% |$ }9 W                                @.CurrIcon := "drivingHome";
% S3 L* \! r% ?0 e# {0 ~                                @.DrivingHome := true;
) n/ y! o, `" r' D8 {5 G! U                        end;
6 Y: O9 W0 `& s. F) v2 }0 u$ [6 [+ u                else -- the vehicle @ is empty, both vehicle and part are in the same dock station- c% U6 g3 K! E* ~4 l+ J, e- w
                        part := @.transpOrder;( V1 {. d5 V" d- }( w3 i1 ?
                        part.move(@);-- load part4 G7 z3 T8 Y  P" Q
                        @.CurrIcon := "load";
  x4 c% k1 ~7 s  k$ X                        GlobalDistObj := part.globDestination;
! ?/ N/ M9 F7 c% ~, X/ h6 B, R                        assignLObj := rgmanager.rgAssignL;
6 q  L, ]( V. A& Q8 V8 I# u' r                        row := assignLObj.getRowNo(GlobalDistObj);$ w8 C2 S2 k: {& X( W" E+ {
                        if Row = -1 then -- since 70
) D% J* l' P; O! t" s                                if lan=1 then
6 W- n$ j: v, Q9 N: a8 ~                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 s/ t0 z' z. c3 _  @6 M; I) n
                                                to_str("in der Andockstation: \"",?.~.name,"\""));7 M! m7 g+ W: W
                                else
; W# l. A% V- s6 L/ L( F                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 A+ r3 c8 g) z0 t; E  F/ m
                                                to_str("in docking station: \"",?.~.name,"\""));                                # m" J5 a& V0 F2 j
                                end;# o' W2 Y( Y, c: a: Y) t, t2 R
                        else& a0 M0 l7 W: U1 h( y
                                @.Destination := assignLObj[1,row];
* J: m, b# {+ j. m1 l# l                        end;                       
/ i, H5 z) `* }. f                        newDirection(@);. Y+ V  G. D' j: g/ e
                        @.HasOrder := true;
% E* a) C8 u: a- A                end;
8 c1 ~& \  _& @! \& L# o3 ]* K        end;' X2 \: |+ N2 b& r
end;        -- of the method
+ X6 _3 S% ]# I( a4 ?) }5 a% [
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
* j0 ]0 Q2 a0 C1 d# j
6 s: F; z4 e1 f! h这是AGV_putin中arrive的method。
# [; |5 r: U1 u* {
+ n% H6 u$ s" o当到达物料速度越高时,这个报警更多,6 `, F' q& D. z/ r& ]# Z
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。' @% ~/ M+ V% u7 N
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
+ q: t6 H' H$ o% A
8 j( M) U" v# ~4 q# ^+ R; M另外一个小建议,就是move,所有的move都可以这样
5 X- d/ q) S) I' i+ `5 E1 ]0 Gif not move() then debug end! r, C! T" @! a1 A
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
& D# O5 i* A! u7 S% nplant simulation中的free libraries有AGV模板,
+ D" R& f4 y, G& a里面也有案例。6 Q: S2 J0 [1 h( z( P
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。6 o9 {7 Z# O7 t
0 Q' r" J+ C* L+ z
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
) h" ~. J% l, r) d3 @
4 r& a9 |( d7 D9 `" \8 M# R那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
( i5 C+ K& ^% S这是AGV_putin中arrive的method。
2 T* _! r5 s$ {) j9 j7 ?$ z
+ v; s" P) Q# h5 M+ a! ?当到达物料速度越高时,这个报警更多,
' C; Z. }4 y9 ]' T
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-15 20:49 , Processed in 0.015795 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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