设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9431|回复: 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'
) Z7 M/ o, S$ o+ a, @3 f# z5 K( l*/+ d1 C6 p+ H& j& V* P
is
1 i# f4 w# R* J. E$ E% ]        part, GlobalDistObj, assignLObj:object;row,Lan:integer;  K6 p+ M- R6 ^9 T  q+ p* n; l
do4 u6 M. X/ a7 u  P) e) R( ~
        Lan := rootfolder.Internal.Tools.AOLlanguage;
: h; [! s0 I, A        if current = @.Destination -- else return
& [/ L% C$ _' V& j7 [% H: x        then
+ b  f; D6 G0 }/ f5 Q* ^, \6 ^                @.Destination := void;
) Q/ l/ T9 W! {( |                if @.occupied then
3 i0 g+ ]/ L' L8 n; o" k                        part := @.cont;
& _2 s  x: U% _! h$ h8 O                        @.transpOrder := void;& Z, V  a6 F/ V* [7 ^
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: y) E& l: Q# o3 A! m: ?' A2 f
                                @,root.eventcontroller.simTime);: t% {: I* K$ w5 Q! ^
                        @.HasOrder := false;- ?* g* F+ Q  y( X  H5 c
                        @.DrivingHome := true;3 Z# [- J; s% _& C
                        rgManager.tryToStartTransOrder;9 f* {8 R7 g/ J% A( z, K' g7 B/ l- `& H
                        if @.Destination = void
+ a' K+ P: S- \. b& m* ^                        then -- no transport order for vehicle @
9 l& t7 h$ f8 `& W/ s                                @.Destination :=8 F3 Y# C4 Y4 [
                                rgManager.nearestFreeStation(@,track.~);
6 y* i  z3 g# _) x' h( L& M* i  M( Y                                newDirection(@);   3 [) B9 t6 {& M, B
                                if @.Destination /= void then+ P+ \3 M3 \% I
                                        @.Destination.NumReservation :=  q6 S4 }& z" L' n
                                        @.Destination.NumReservation + 1;  o' o7 R( }! g6 ?3 J
                                end;/ }, B: f/ V+ j1 `* i  k4 j
                                @.CurrIcon := "drivingHome";3 c3 W7 P" R- X
                                @.DrivingHome := true;
7 ^: g' p5 Q1 n/ G4 ~0 H; @                        end;
' c( p  x1 E, i0 G; O                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 W3 U0 F, s: \                        part := @.transpOrder;
1 t- b) o' d: s' [% m' K                        part.move(@);-- load part- z2 {  u+ q% |
                        @.CurrIcon := "load";1 p; p. b. U( C! H0 k, ^6 S
                        GlobalDistObj := part.globDestination;) f, w5 G1 F$ |
                        assignLObj := rgmanager.rgAssignL;. \- E6 h& a/ t1 O
                        row := assignLObj.getRowNo(GlobalDistObj);
( F5 f' y& ~( Q+ C8 R                        if Row = -1 then -- since 70
; o; {8 u& h4 h7 g! Y" W( ~                                if lan=1 then
. b" A9 n; c# O4 k                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 p4 Y8 J9 i* h4 M
                                                to_str("in der Andockstation: \"",?.~.name,"\""));- x6 K- O3 z! M4 n1 n* y- B0 X3 r
                                else
# Q( H. E8 P% A" p5 J! \  }                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ E" _) T* T' p& f6 C                                                to_str("in docking station: \"",?.~.name,"\""));                                9 {. ]6 d* ~+ y4 j2 U
                                end;  M& y: `  G% q; Z. i2 M
                        else5 h  i5 G, X8 d0 o# z
                                @.Destination := assignLObj[1,row];2 p- w5 j, f, c4 y
                        end;                       
6 X5 d( \" |4 B2 `/ V# |. V' K                        newDirection(@);
" E& x: D: @; U8 x# M/ z4 o                        @.HasOrder := true;0 l" n. u( i; f1 N* D1 S7 w
                end;. X7 M) B# x8 F! O5 V5 q: P! d3 N5 g
        end;; a1 Y0 A3 A0 l; P
end;        -- of the method
- S6 _% F: c5 X4 V7 ]% p
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 5 i% L# K1 R& H: A
' V- y! P9 Y9 d: k9 Z
这是AGV_putin中arrive的method。3 W) ]' h( S! S" ~/ U% r8 R& n

" c) Y1 ?. q9 q当到达物料速度越高时,这个报警更多,1 y( N6 k: z7 T( O" g
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。/ ?3 j5 O% ]. b
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?2 b3 z3 E4 y$ j: F" C$ ]
; n% v, r, Y7 ?2 y8 x  ^' T1 f
另外一个小建议,就是move,所有的move都可以这样
% F" F% h9 `  S) z4 C" }0 qif not move() then debug end3 |0 J; ~5 ?4 l9 B& |; ^) w
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。+ e, d- Q* ~- O3 Q7 _
plant simulation中的free libraries有AGV模板,
* m' P4 i  s  D7 C里面也有案例。
# f! z, D, \: ]+ g0 a) u& V' g8 u$ M我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
; p$ [& g! O; f+ j( Z( @3 x+ _
. `/ T& J1 z+ u我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 # s8 U8 G  E# W& P  X6 \* S: v* J
, _. B; p  o) [5 ?- F
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 + h2 S- K* F) d3 x! C4 W
这是AGV_putin中arrive的method。
- q% l( n2 O3 l7 i# L3 T7 {, _" K7 `' G
当到达物料速度越高时,这个报警更多,
( i! i! q6 t; @6 N) k
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-1 00:07 , Processed in 0.016243 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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