设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7369|回复: 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'
* r2 C6 W6 i2 X( e; R*/4 |- X3 L) J! i! g. [
is5 A/ T2 C7 p3 L' N& O
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, I' \6 G; Z4 Q' X3 Bdo
( \2 l/ ^5 {) a        Lan := rootfolder.Internal.Tools.AOLlanguage;, _" `" f( k+ |: `+ S( _
        if current = @.Destination -- else return& b2 {' W2 W" e; ^! j
        then9 C! y; n4 P6 t$ S
                @.Destination := void;- }3 v/ o' W5 r2 d' {
                if @.occupied then/ w( E2 Q, O: O/ s+ V+ O
                        part := @.cont;# Z- o" d" H4 z
                        @.transpOrder := void;
: H6 Q$ a7 i. ^; U/ }8 z5 i5 t                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,  u, w0 _; s9 r1 C" n
                                @,root.eventcontroller.simTime);
  l# O, h! f' y! \                        @.HasOrder := false;
- h/ Y1 }6 I; ?* ~+ [                        @.DrivingHome := true;! |, r1 X" d4 e' a6 m
                        rgManager.tryToStartTransOrder;, n. I( o7 P, b- T- K- m0 K0 s2 h
                        if @.Destination = void, d+ Y6 P+ U" V- G' n. n# M
                        then -- no transport order for vehicle @
% b2 Z- A4 |4 n7 F                                @.Destination :=
! u. y3 x& O6 x! K- l& w                                rgManager.nearestFreeStation(@,track.~);
& m# `7 N7 t2 R7 X! s  t. e                                newDirection(@);   
; s# t5 M: [4 _. V: C. z7 y                                if @.Destination /= void then. i& @6 I- h5 Q0 O0 h
                                        @.Destination.NumReservation :=
# l- c* @( W7 w5 z/ K, r                                        @.Destination.NumReservation + 1;; c8 g5 J# Z* c% S7 s# R% h
                                end;
; k' O7 u2 W# B! U( l                                @.CurrIcon := "drivingHome";0 V$ m7 j6 V" S, Q
                                @.DrivingHome := true;
2 e# X) y  H  G- h- p9 K3 Y                        end;
3 v# N. B. B3 L7 `* R) F                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( q( k4 H3 }, Q8 s" b3 A# c                        part := @.transpOrder;& g# ~  t/ |2 W: R7 a9 `
                        part.move(@);-- load part, n" N( m6 i3 Z- s1 _9 i1 ?
                        @.CurrIcon := "load";7 m4 \  G1 ^; R6 H# k% ^) J( ^) q
                        GlobalDistObj := part.globDestination;
/ ^; d; t+ q, _6 F' U2 s                        assignLObj := rgmanager.rgAssignL;
* d8 [, \+ u2 l2 F+ [- X                        row := assignLObj.getRowNo(GlobalDistObj);3 G; D8 Z; T: ~
                        if Row = -1 then -- since 70
8 o# f5 i) U6 t* S$ j' b" Q                                if lan=1 then( O8 Q% z# _4 g4 u4 s
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),  a, H% x3 _0 r+ M, d& L8 T% T
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
' H: I% N& Y2 Q                                else, x( h1 l' Z, U3 O' R) B( k8 u  `9 n. x
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 k$ j1 h0 o/ o
                                                to_str("in docking station: \"",?.~.name,"\""));                               
! P9 H: q( H1 V( s                                end;# N0 }2 ?( @  U( |5 g& V# ?
                        else1 s' J5 i) J/ `; ]* ~$ B! S- o: P
                                @.Destination := assignLObj[1,row];) h) n- M) @. ~9 `) l. L7 n
                        end;                       
( ^- V3 S/ `6 I; V- {3 p; P4 u                        newDirection(@);
4 u& O  ?7 T4 s5 o' f" ^% P% l6 |6 H                        @.HasOrder := true;
$ i% W8 {' i# h                end;' P+ q% h+ J; M2 B& C  U3 }8 V
        end;& b1 X9 i9 f" t$ j$ t: }# o
end;        -- of the method
, W% q+ `) ]- r
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
" w' @7 U5 l2 {
# E! R4 x# e6 s这是AGV_putin中arrive的method。% h% ?+ {) W2 C: ?& E4 ~

; p" O0 F" }2 q* f4 _3 g+ t1 M7 G% w当到达物料速度越高时,这个报警更多,
* C% B* k; O5 c) L1 X5 m可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。' @6 X" W+ H) ~. z
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
. G( y0 `: w9 [" D1 c- Z; p' C: }2 Y# ^6 l
另外一个小建议,就是move,所有的move都可以这样
/ o2 W! d3 {- a4 C2 m  ?; @- p0 s, c4 \6 w1 ?if not move() then debug end
: Q- n) `2 H  z- Z3 k& }1 T; e8 i这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。) _& Q! U1 _" t: T/ |' A
plant simulation中的free libraries有AGV模板,
! j3 ]9 s# ^& g) L: u里面也有案例。# C- ?- u, k3 [" V# F; j
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
6 p1 r, j+ v" c* }
5 `: C# S/ D/ t- F2 q! L我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 4 k: n) ]. |: w8 S

! s; \+ r3 x( W8 z那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 & B% _7 E5 B# |; w
这是AGV_putin中arrive的method。. N7 I/ ~) }9 c+ {

3 p9 {2 T4 p# F3 j# p当到达物料速度越高时,这个报警更多,
0 ~0 z' b; |  @. |( _! H
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-7 17:41 , Processed in 0.018294 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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