设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8276|回复: 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'
, M6 t; j$ Q$ E( @*// l* z" V$ g) I9 x9 o
is: R; V5 N$ I$ x& X
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, ~$ @+ _" n% u. J9 Ldo( o: a1 @( b4 O
        Lan := rootfolder.Internal.Tools.AOLlanguage;6 k, n: |' v: T/ a' ~, q
        if current = @.Destination -- else return# h4 I1 l4 ~+ r9 x  x
        then
# u8 @' T. P( |$ {7 B) S                @.Destination := void;
* o4 K5 {1 J6 w! H                if @.occupied then9 l* K. C2 B, c2 e7 H9 I; z$ J
                        part := @.cont;* _% ]8 C$ h/ b( k% F
                        @.transpOrder := void;; f1 ?# \9 |4 B. \& K! I3 p
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 u  c, s4 Y  Z! w, X# ?                                @,root.eventcontroller.simTime);
$ g# M. f0 H) u- f; \! G* R) ], L                        @.HasOrder := false;& Q9 f( A/ L( f) `: u
                        @.DrivingHome := true;
' g& k3 W% q% C. p+ J6 {$ I' P                        rgManager.tryToStartTransOrder;* M, }3 g$ l' y' Q9 i
                        if @.Destination = void8 M8 z' o( }; ~9 d- p
                        then -- no transport order for vehicle @
' V2 y3 f1 T: \' o6 V                                @.Destination :=
2 e% V+ e0 u& n9 m                                rgManager.nearestFreeStation(@,track.~);
- @, C3 t6 _& @7 T$ ]' F" q; M                                newDirection(@);   
! I  ?9 ~: J; y5 m( }+ k                                if @.Destination /= void then
; z/ b6 x1 L& u7 g: N: M0 ]- a                                        @.Destination.NumReservation :=7 V3 ^0 ?* W& R3 Q
                                        @.Destination.NumReservation + 1;
: S) U$ f% X& @& v0 d+ z# r                                end;
$ v" P2 U3 W; Y1 _0 f0 Q3 U                                @.CurrIcon := "drivingHome";
% j' k& T# _3 Z) U3 Q! X8 D                                @.DrivingHome := true;# v5 A0 M% g  G* t  k
                        end;+ W7 s  A: u# w$ t$ q( Y
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% M. `/ p! y0 f9 u                        part := @.transpOrder;; y0 S9 B- [6 U
                        part.move(@);-- load part
0 @6 p( c' r$ p                        @.CurrIcon := "load";: m' p( y3 X* g0 W8 V' c9 ]
                        GlobalDistObj := part.globDestination;/ Z1 D- O6 o1 d
                        assignLObj := rgmanager.rgAssignL;
3 o9 h1 C3 ]% }                        row := assignLObj.getRowNo(GlobalDistObj);
6 d, F1 L) g! X) h# @* `. t$ B                        if Row = -1 then -- since 70
5 z5 L) P# [* a" c+ J9 n1 z                                if lan=1 then
8 f# B# E/ [) q3 ^" j# u                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 A+ Z3 |! q; Y; S0 n                                                to_str("in der Andockstation: \"",?.~.name,"\""));
4 l: S" w& W: X9 p5 I, `$ F" _/ _                                else+ }5 r' i& g9 x+ b/ t
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" D; ?# i# D2 K3 Q* r4 N                                                to_str("in docking station: \"",?.~.name,"\""));                                ! v( C/ E0 h# e; a5 h
                                end;
8 r1 G9 s# x* _( t4 t* J' ?                        else
- k) L6 i6 B" A/ h                                @.Destination := assignLObj[1,row];+ z: o+ K9 P$ s6 V* z# ~/ U
                        end;                          \, L: w6 \5 f8 r( g" q% }
                        newDirection(@);9 |, i* S" c5 w5 C
                        @.HasOrder := true;& U, _& X5 N2 C
                end;
! F3 d. S+ X- l5 \        end;
/ m4 @$ r7 D+ P5 Hend;        -- of the method7 e% H# e  A  h9 k$ Y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 4 B, B6 |" m4 T9 U# A+ W  ~- U3 d

% ~# t0 |% z5 \! e$ U6 _  o这是AGV_putin中arrive的method。- o5 u5 m: G$ ^/ @+ s" _; f8 y

8 Q/ {5 K7 o: m6 J5 @* E. P当到达物料速度越高时,这个报警更多,
- {2 r# O/ J- y+ X/ l0 o6 |* U6 s可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。6 p. }0 X& w2 _2 |# y4 B) E
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?& B' y2 E4 |$ I' b
+ \" R8 O. _) j; W/ r- |
另外一个小建议,就是move,所有的move都可以这样
& Q* ~$ o! r0 I1 F/ yif not move() then debug end2 s! e3 |0 R/ b. Z4 b8 V, o
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
9 F! ?& Q% S2 G/ v6 m+ tplant simulation中的free libraries有AGV模板,
6 Q. C+ ]; r) G里面也有案例。
. S% q! H# _: _% @3 A1 j7 g我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。8 |: w  g& f# r" M/ L7 r  C+ p, f

( u* [, M5 ~, }我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
0 M+ L+ o5 v0 f9 Q4 Y' U" C. |! y( s8 A8 X1 ?- @' w) K# e5 a1 N, p
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
3 g; m" W1 L  U7 o这是AGV_putin中arrive的method。0 l, |" {- M0 P
* c! p: g5 S: P& y
当到达物料速度越高时,这个报警更多,

. G0 J/ o, _: @8 I6 c7 O! e$ x另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-24 17:40 , Processed in 0.026118 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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