设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7962|回复: 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'
: f; e$ e8 V! h1 {7 U  s9 h*/
3 H  g8 h5 q2 c/ \& s, Yis
! r$ }' K$ {0 O3 x  X$ X+ V! t        part, GlobalDistObj, assignLObj:object;row,Lan:integer;( g8 _2 D, o$ M( j+ \, h
do. G: T7 ?; b4 K# r; K+ l5 Z
        Lan := rootfolder.Internal.Tools.AOLlanguage;
) ?  F9 u4 }% Z2 j! e! y        if current = @.Destination -- else return
& T0 P( a+ r% ^7 P# @* [        then
( W5 e% u1 O9 G- J' [" I4 @                @.Destination := void;4 W* A" J1 X: }$ Q: `. |3 b) u
                if @.occupied then0 h! Q9 L. Z. V9 K4 [. ]2 D4 F
                        part := @.cont;
, }; n: c- x' h' i+ S  X- E0 b                        @.transpOrder := void;
7 n4 R8 O, r- w" O7 j                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& T, D2 m1 B  ?0 X                                @,root.eventcontroller.simTime);
, Z0 @9 a$ E; c$ `" _+ N                        @.HasOrder := false;
) E( F$ N9 e$ h$ e+ x8 E                        @.DrivingHome := true;! v% O0 u4 X/ Y; C9 `2 p% A
                        rgManager.tryToStartTransOrder;7 P# H0 [  c" O! U  \
                        if @.Destination = void
9 y% ]4 T9 \) R7 u                        then -- no transport order for vehicle @
4 d7 g1 [2 s5 s- @3 S  z! ]6 }                                @.Destination :=/ C2 A/ x1 y4 j8 T
                                rgManager.nearestFreeStation(@,track.~);
3 o1 t3 {9 |  q3 @* W$ H8 I                                newDirection(@);   ! Y9 e1 j) l) `& c
                                if @.Destination /= void then  \: N; U5 ^: L" V
                                        @.Destination.NumReservation :=/ ?/ o$ S- ]$ D+ Y0 O
                                        @.Destination.NumReservation + 1;
2 s' N. _2 C3 ]! g6 x+ ?, q                                end;
7 u9 g4 ~7 S/ ]- w/ C                                @.CurrIcon := "drivingHome";
  ~; [+ H; B; M& s) w3 }                                @.DrivingHome := true;# N% Z2 L. k% T, s- l* {9 X
                        end;
3 z8 m1 I- X: h0 V; W  `                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
  V" ^7 [: \7 t, ?# {                        part := @.transpOrder;7 D" A5 m; i  k2 J1 k1 K1 ~9 `
                        part.move(@);-- load part
# @, `3 z& b$ g                        @.CurrIcon := "load";
; |+ c: m. c- u7 r                        GlobalDistObj := part.globDestination;
. `. h4 p1 {) Q# ~$ h3 K% q                        assignLObj := rgmanager.rgAssignL;
+ \/ J4 v0 S8 Z3 G1 T                        row := assignLObj.getRowNo(GlobalDistObj);% T2 m# t7 O6 o4 d
                        if Row = -1 then -- since 705 B+ G! Y1 y4 m* A0 v0 ~; i( [
                                if lan=1 then
$ w' e5 h2 d- h& C7 K8 L                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- _3 _- c% Z0 P: x5 h                                                to_str("in der Andockstation: \"",?.~.name,"\""));
+ U' C- T4 e* a5 {) D6 D                                else
" B6 h& n& e% s3 o! ~: O                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 \6 u$ Q1 E8 q8 s  Y( j0 h                                                to_str("in docking station: \"",?.~.name,"\""));                               
0 @$ C0 \4 ~6 T/ m1 J                                end;
' ?) Z4 l  L- S' S% }2 I                        else
. L% K' N. h6 p2 h# p% l  K8 N                                @.Destination := assignLObj[1,row];% W1 |& r/ x; v
                        end;                        2 ~7 V& I! |! Z
                        newDirection(@);3 B! `5 `* h( D& Z
                        @.HasOrder := true;
) P0 D6 Y0 B" C) `                end;
( b8 @* t- i7 p0 f        end;
6 h* {% z& E7 {# Y# {end;        -- of the method
( f8 b+ o& y# M2 l6 ?
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
0 B! P. `& [! O! |. U. t) [4 e( s( h3 {
这是AGV_putin中arrive的method。
* W3 ^# N' j8 q
5 l' k4 u) t+ V# a当到达物料速度越高时,这个报警更多,. r$ z7 I( H( M4 ^+ ^# o  p
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
! E( j5 x! D8 D3 x程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?% X6 J6 [4 x8 P0 ?7 K
8 X+ D% m0 J8 u& W' o2 l. m% u
另外一个小建议,就是move,所有的move都可以这样
6 }1 S, h2 p, [if not move() then debug end
2 U7 O1 W- R6 @0 i- \$ q这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
2 W& W8 e% I8 A+ _7 T2 Oplant simulation中的free libraries有AGV模板,
$ l1 w$ q0 T+ T9 G+ C6 D" X# h里面也有案例。* I: L$ Z8 H9 P) G4 x3 `" [: I/ C9 R) U
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
" i8 W( A9 \* t  ?8 }, _: q# N7 }% l! f: u9 o
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 1 D2 h  ]  Z5 q  n

9 O* p! c! {3 L6 k, A" d那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
' Y. z) @3 b3 A9 q这是AGV_putin中arrive的method。
6 s4 r, R$ \/ u7 T  B! }6 t$ p7 M  a9 H
当到达物料速度越高时,这个报警更多,
% e8 N5 L9 f1 t+ B" W" m/ V; e# U
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-7 22:24 , Processed in 0.021184 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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