设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8315|回复: 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'% v- ?+ n: n( \: A& Y6 P
*/
  k* d; t& y! e# jis% t0 M. ~7 J8 ?0 K" J9 w/ C) X
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& p% W/ F$ @( Ddo! u4 g7 J5 f+ d- V5 G  o# G/ T" w
        Lan := rootfolder.Internal.Tools.AOLlanguage;
  W8 p. o. W8 M( {3 u        if current = @.Destination -- else return
: w5 A% I) ~( A, m        then7 M$ c: H0 Y2 |4 x7 z7 |
                @.Destination := void;
5 y4 ]7 J3 ]- d5 a9 Y+ }                if @.occupied then
7 A) K5 U+ e; ~4 A$ F/ }3 ?5 u                        part := @.cont;
  @5 D! f# W7 f9 b* Y                        @.transpOrder := void;
3 p' h0 `, K7 ~( R# M+ f. ]9 P                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 u7 I6 K7 ~1 O7 y                                @,root.eventcontroller.simTime);
9 ?) {5 T: S  r9 Q( Y                        @.HasOrder := false;5 j5 Z9 e4 ^0 a8 B
                        @.DrivingHome := true;
" @" A6 V$ ^/ m  K6 {0 o                        rgManager.tryToStartTransOrder;
0 E1 p8 R- @8 h$ h% Q                        if @.Destination = void8 n7 K" D/ {& n5 A
                        then -- no transport order for vehicle @: _$ u, I, m/ X6 h0 F7 v
                                @.Destination :=
: f! k" K' j% l0 s9 @* e                                rgManager.nearestFreeStation(@,track.~);
/ m: I3 J! `6 R9 b  H5 p                                newDirection(@);   
9 {# o, A) m$ x4 [# d1 m                                if @.Destination /= void then3 C9 B2 ?- Y: F! w1 {" O$ t
                                        @.Destination.NumReservation :=
$ ?" ?. x+ r: P% W" Y! M8 A                                        @.Destination.NumReservation + 1;
( u: w+ [1 {) b1 s: x4 E- P) s                                end;
0 L; e, J. s- \( P1 ^                                @.CurrIcon := "drivingHome";! [. b0 z) W4 D+ ^4 X9 a
                                @.DrivingHome := true;% A, _6 x5 i2 }* t8 A% B
                        end;! d. [; @( r' X6 E$ n
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 C$ p$ i8 f1 B* K" P
                        part := @.transpOrder;
& U1 z: ~$ i7 l& ~% T. d                        part.move(@);-- load part
8 g  E0 V) x2 r/ v                        @.CurrIcon := "load";
. g( M4 v" {- J. m                        GlobalDistObj := part.globDestination;
' Y/ [2 ~# y# `; p                        assignLObj := rgmanager.rgAssignL;
& H2 A' B3 g9 ?3 A8 g+ y                        row := assignLObj.getRowNo(GlobalDistObj);
8 _1 R6 f8 I  d8 ]                        if Row = -1 then -- since 703 t/ `2 \9 m: `! M, k
                                if lan=1 then1 }2 r: Q4 }2 T" s8 M* ?4 D) g
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( w6 _( B5 R  Z% u7 s% e& j7 d
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
6 x% S4 u7 a8 P  S5 @4 o                                else
7 ?8 U8 q- l$ L( r% f' m                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ X" `5 x# P6 \+ W' d' {
                                                to_str("in docking station: \"",?.~.name,"\""));                                : z5 s# r9 ~0 l/ x. q6 s
                                end;4 i5 X8 ]3 p  ?" |& x( |0 O+ X
                        else
# L: q. X3 t! B  s* B' S$ T' d                                @.Destination := assignLObj[1,row];
- m( ?1 g* Y. ?4 L/ {  A) {; |& F8 h                        end;                        $ }* @: `4 Y" W9 s  L1 D' b0 S6 P
                        newDirection(@);
: p" ^( a& X2 J                        @.HasOrder := true;
) |2 r2 _% {) T4 h" _5 E                end;- {( ~1 n6 j( m
        end;' O( Q5 B& m- Z# r/ w7 z  ~! @
end;        -- of the method/ }2 F- B1 k2 k. |8 E# D( o
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑   K5 x/ g1 A" o/ b- O" D

0 W( r/ `/ \" J, I这是AGV_putin中arrive的method。( l0 b3 C6 L* e9 Z

4 l( B/ J. y% x  \3 D, Q: u当到达物料速度越高时,这个报警更多,
4 P, L) U% M9 x! S$ r可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
+ {2 f" [+ B! F1 S程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
# N# U% [5 t* p! ]+ U- u( r) {! E9 w  z  l0 {+ |- g
另外一个小建议,就是move,所有的move都可以这样2 x5 G  X( u* O. w
if not move() then debug end3 u+ n7 C8 ]$ n
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
# y1 Q3 ]% t0 v7 uplant simulation中的free libraries有AGV模板,5 Q) L0 i) |" T6 t, C  a- X
里面也有案例。3 u* |1 X4 i' x- A* V  J: f
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。' _  x% ]) {9 k+ o! s2 F- W

7 \0 R& a! j! S% R& n' g我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
0 q7 ^. T8 n" m) U- N& F8 e$ O$ g8 I/ f8 A4 q' O. q" s
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
9 \! @* x. p4 i  L- g这是AGV_putin中arrive的method。5 |  T. s- W. X5 Y! G1 U8 P7 E' E
8 ^: B* F: |8 K$ [% ~# j
当到达物料速度越高时,这个报警更多,
: u4 s, Q4 |8 j) H+ L
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-27 10:42 , Processed in 0.018460 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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