设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6161|回复: 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', r* o3 I9 `2 [) ~2 @9 @
*/
; Y7 N( v! \4 z$ \% Tis
% d0 k0 a3 h4 w1 N        part, GlobalDistObj, assignLObj:object;row,Lan:integer;, p$ e: n. c5 K2 W' @( W$ l
do
. m+ w# O8 T* ~! \, J# m        Lan := rootfolder.Internal.Tools.AOLlanguage;
& n. `/ w3 q8 i) P% f# ^        if current = @.Destination -- else return
# ~& N- ?# Q; t2 W" s9 d" F9 t        then) V; V  `# S2 o( ?! J
                @.Destination := void;
' }3 a+ r( x- N1 ]0 U& a                if @.occupied then
. L% O5 V+ u& e0 G" z: G- B                        part := @.cont;
- C4 f! o0 g/ Y- I1 m2 ^5 C/ T                        @.transpOrder := void;
6 y* w9 l1 _# j; h7 f# o                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* h$ f5 g  Y3 y5 A# R: \2 D
                                @,root.eventcontroller.simTime);1 Q" j3 {4 y! M& ^( B
                        @.HasOrder := false;, D4 x( {4 H5 ^/ u/ n$ H5 i  r
                        @.DrivingHome := true;
! K9 Z* B2 P4 L6 u1 q! o                        rgManager.tryToStartTransOrder;+ x1 L$ c; n8 S4 K, e
                        if @.Destination = void8 s1 q; u: x3 X
                        then -- no transport order for vehicle @
# J8 t3 x7 t6 Q' ~( `  q( r6 L                                @.Destination :=% t, W: e& [0 t5 K/ ?' c9 `* X+ y" L, t+ Y
                                rgManager.nearestFreeStation(@,track.~);
* [) e" D% ]( U7 \3 u' H0 z                                newDirection(@);   7 ~- Y  Y6 J" g! V0 B" }- w2 k
                                if @.Destination /= void then
8 {# b0 c) w3 {/ g8 w                                        @.Destination.NumReservation :=
+ x7 {1 `0 M: E                                        @.Destination.NumReservation + 1;9 O. f4 q4 o, K! Y/ ~2 y
                                end;
. y6 f. e$ B1 s7 N: N- q" s- q                                @.CurrIcon := "drivingHome";
  B9 w9 P! L1 m2 {                                @.DrivingHome := true;6 H/ a* Y3 V+ E: _% f' |0 G
                        end;
+ Z% a* r6 y5 B0 b                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" Q4 F1 u8 S8 t                        part := @.transpOrder;. F2 x8 u* A) ~" o( h
                        part.move(@);-- load part& n" U2 S7 ^7 h! H
                        @.CurrIcon := "load";
" A: @! C4 f4 c' q# V$ z                        GlobalDistObj := part.globDestination;
: h  s. r. \, Y! o                        assignLObj := rgmanager.rgAssignL;
5 f; J) I* h- W# \* q+ l  _3 ]& F                        row := assignLObj.getRowNo(GlobalDistObj);
- W! T# s1 ^4 X2 R5 u: J% G                        if Row = -1 then -- since 70
9 g3 e3 A; x  {. n) n: @                                if lan=1 then8 J, j& i4 @; ]+ Y6 [/ w% j
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. z' K. M  ]4 }( F( f7 F                                                to_str("in der Andockstation: \"",?.~.name,"\""));
: `0 E5 A( [4 t) Z" B                                else8 n" f. Y7 G+ A0 ?- A
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 z5 M& k( f- _: ^7 s                                                to_str("in docking station: \"",?.~.name,"\""));                               
) p; ?1 I8 d3 M! [+ u( X; _5 u                                end;6 g; g3 n9 d) A7 o7 Q) X
                        else
4 c  W' x5 z1 {+ {, K8 d                                @.Destination := assignLObj[1,row];' |) q% U/ b1 {' ]
                        end;                        + ~+ @. P8 c# _+ ^! B& ~4 l' m
                        newDirection(@);
7 A1 O. C) Z1 x  F8 z: E! g                        @.HasOrder := true;
5 `, T) _# {, ]7 @# Y/ ~0 a1 u% J                end;
5 j- S$ O2 T; w( F        end;
4 `1 p9 W: k( V: ~end;        -- of the method: ]7 v' M0 f- I) t) E
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
) y1 V/ R. ?5 v6 n+ c" F" S$ f) |* w- g9 |# A/ U' X) g  H
这是AGV_putin中arrive的method。
# q4 U5 j  ]# _& s' U( J& Z7 Y) R7 |: D. X4 k2 b5 w) {
当到达物料速度越高时,这个报警更多,
; q9 @. U9 Q3 \3 J$ ?, s6 _可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
. W( T$ [& u; W3 N程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
$ N; `! Z& w$ Z9 P% A2 l; w
8 R6 a. a  z2 D! o- l# ~另外一个小建议,就是move,所有的move都可以这样: j  B+ h9 K$ o
if not move() then debug end
( Y1 c: {4 |. S8 u2 C% X这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。8 u) D; [. t2 o- G- L
plant simulation中的free libraries有AGV模板,
/ t0 M3 M* ^- t里面也有案例。
% n" _7 M6 Z' ?5 {8 u我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
/ r5 L9 h  n/ t4 a4 |
1 V: I! \6 ^& I" ^; R( k我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 2 T# c) s+ j' [3 T2 T. |6 b6 c
1 Y8 F; W  z" \! H' x5 q, l* }8 q
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
8 f5 l2 V9 b/ D/ P这是AGV_putin中arrive的method。
' C( g3 A  k! I2 b/ e5 r1 e; G5 P: v* A0 K5 M. o1 e  _) q- D$ l; Z& C
当到达物料速度越高时,这个报警更多,
& A, R0 }7 u& I- ]3 |. q3 d# F
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-22 06:21 , Processed in 0.017549 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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