设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8323|回复: 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'
( B+ i$ u( M! K+ ?' L*/1 R. ?. c# _( P" ?3 p1 X
is0 v  y$ a* P4 e
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;; l4 f) Z) p# \! W/ O& k/ w4 ~
do; ?7 }+ y3 W: [3 s. _
        Lan := rootfolder.Internal.Tools.AOLlanguage;* W9 z5 j; c+ }' o7 w) y" G
        if current = @.Destination -- else return
  n9 b' z2 `, k) B4 q) R        then
% V: w( M1 _3 L$ ^+ U                @.Destination := void;7 x( B3 O' [9 l) G9 u
                if @.occupied then
( j& Z0 r5 F' |7 u. a1 D7 T! ?; T+ s                        part := @.cont;
$ ?0 e; I. P- ^6 l9 l# t. z                        @.transpOrder := void;/ E( u- }  ]4 ]: B
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. C- L$ c9 O2 }/ R/ h                                @,root.eventcontroller.simTime);& p& J. ]: Q; g
                        @.HasOrder := false;
% Z) |3 p' x9 J  `" f4 i- ?- b                        @.DrivingHome := true;2 z9 _8 I8 Z0 `5 O
                        rgManager.tryToStartTransOrder;1 V7 f; @! O" N9 g
                        if @.Destination = void
9 d5 O; q5 o  G; \9 @                        then -- no transport order for vehicle @
7 x% K$ r' O8 {4 e& W                                @.Destination :=6 v$ p  w% E! w: `$ a
                                rgManager.nearestFreeStation(@,track.~);
; r+ I3 ]; G4 S4 H; a                                newDirection(@);   
2 O8 G' D) d& e2 d  `                                if @.Destination /= void then
2 i! [3 o" T% Q                                        @.Destination.NumReservation :=
2 _" X- a& R& `5 o/ ?                                        @.Destination.NumReservation + 1;4 S- b; \; {# z8 K/ V2 s
                                end;
$ f+ p5 D8 J5 ~+ ]) u                                @.CurrIcon := "drivingHome";" ]. e/ C" ]% b! O
                                @.DrivingHome := true;
) K; e* y2 U* K0 i2 L6 _' O                        end;% N% K' ~. t$ M% e- @4 O
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( k5 e' Y: p. V7 y4 h$ w9 A                        part := @.transpOrder;* R* z- E, Z: V! E, B0 V
                        part.move(@);-- load part' @/ k7 N$ ?) f8 a# V4 O0 D
                        @.CurrIcon := "load";
* t* s/ Y' N/ n+ L6 b- l2 P1 Q                        GlobalDistObj := part.globDestination;
  ?$ o( V$ S$ R$ O) L7 d                        assignLObj := rgmanager.rgAssignL;# [* s: j: v- _4 h# N# j& {0 R
                        row := assignLObj.getRowNo(GlobalDistObj);
, _) ~$ u( W0 _! A                        if Row = -1 then -- since 70# @$ h4 u- z9 l% [" \% C
                                if lan=1 then
" f4 B) _' n3 J2 o8 m! r# r7 i                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: T- Y% Q; j3 M% d, }, H
                                                to_str("in der Andockstation: \"",?.~.name,"\""));' Y" Y$ D! W: i5 Z# S. G$ ]
                                else
% q6 p; @1 n( d0 q9 C; ^                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# x4 L: I/ f* B- f
                                                to_str("in docking station: \"",?.~.name,"\""));                                & U& O: h. ^0 X( H) s
                                end;# w6 c+ N$ ]% x. p# }
                        else
. U6 ^$ f" a5 G! U3 d4 T0 G                                @.Destination := assignLObj[1,row];) v' i9 e" j% E, r. W* Q* J
                        end;                        % r' L: M4 p( E/ L+ U1 K+ ~9 N* a
                        newDirection(@);
1 ~/ I6 {& [  z7 K0 m  i                        @.HasOrder := true;
& c* Q. K) t) ?0 B% v9 y                end;$ q% T4 _% a8 \  B! C0 t( n
        end;
/ c( M$ K, [8 A+ A4 _8 [. [end;        -- of the method
0 W2 z& C! h2 b! R8 i* k9 l  W" r6 P
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
2 D  a5 A& T' T3 \" N( G2 R9 }# }- G# e) u: {9 P* E, D1 Q
这是AGV_putin中arrive的method。
, f- G# I, z3 m, y
: H2 ]; S: n. Y当到达物料速度越高时,这个报警更多,
3 Z3 M( E5 W7 q可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。+ E* M. S& s4 G$ [1 v
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?" @4 e9 D; T+ T  }6 n4 k$ P8 p

4 Z3 I9 ?/ i+ a* @& V另外一个小建议,就是move,所有的move都可以这样
7 t. _) y3 c+ a' ?7 V9 N: Uif not move() then debug end
2 d( U5 `, p; E3 Q; m7 c* c8 N' w这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
1 J/ b1 S. c4 X6 E5 f- _; M) tplant simulation中的free libraries有AGV模板,/ k7 Y. M0 J8 ^8 v# t% Y/ s  Z
里面也有案例。+ q% h# T* m$ u$ Y
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
6 F, ~# w0 a! ^* E; N" R# Q2 G/ n) Y. i& {
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 / \, ?: L: C4 T1 R' x6 g, D
9 ~: j2 \% J. Z8 j
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ) _; v7 _9 A! R, ]8 ]
这是AGV_putin中arrive的method。/ X. Z) _! k7 P4 K
* d! @5 X' ~4 `9 `: a
当到达物料速度越高时,这个报警更多,
1 |. r4 E4 n0 Z! A! w) X: P/ u
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-27 20:35 , Processed in 0.018980 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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