设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9597|回复: 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'2 z  G5 g2 g& L, m. R  R( M
*/
/ [; t+ A; n7 `7 {2 H& x& lis. V% x6 y1 ]  ?  u2 W
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ X- M$ L) i$ z3 z7 A+ H/ G% i
do
$ A8 h. e" ?/ o% _, j- A        Lan := rootfolder.Internal.Tools.AOLlanguage;. A8 |5 t7 ~& [3 S- q( |3 o
        if current = @.Destination -- else return4 }! b. H% j: V! o( z# O$ I
        then
- G1 y4 I$ o9 f% N0 J% B+ @, k                @.Destination := void;( ?' t8 [# w# {4 f( F
                if @.occupied then* i* w% e1 l* P! ^$ O' p
                        part := @.cont;
1 y7 Z1 K0 Q: Q; T& V% ]                        @.transpOrder := void;) F4 H' U& S+ S
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; w2 M, H3 `+ n" l  C# K3 \                                @,root.eventcontroller.simTime);
3 N4 P$ f- X% |5 U/ V+ m9 O                        @.HasOrder := false;: [' f" z2 ^6 o+ X; f5 C
                        @.DrivingHome := true;, P7 N) W0 ~" Z: r% S9 ?
                        rgManager.tryToStartTransOrder;2 [5 L9 d6 W3 K0 m7 \3 j; B3 R
                        if @.Destination = void
) A2 s2 W* ]9 I* |0 R6 W+ v+ u' l                        then -- no transport order for vehicle @
" I5 Q+ u& Q3 P2 ?& l; k# X5 h                                @.Destination :=/ c( _! b* Y3 s7 W+ G
                                rgManager.nearestFreeStation(@,track.~);
1 {1 W( Z- ^/ {; Z                                newDirection(@);   
+ y# Q8 x0 O/ Z2 v                                if @.Destination /= void then
1 |1 W. r9 s' k; i9 L                                        @.Destination.NumReservation :=3 D: L+ z$ c# Y2 z( G) o) v- l
                                        @.Destination.NumReservation + 1;
# O6 F6 k  N# S/ Q# @5 |# A4 X) w                                end;4 A; k4 {/ a! o7 `2 E
                                @.CurrIcon := "drivingHome";6 E) {8 `5 V% v. o9 ~
                                @.DrivingHome := true;
' C. u* r" y" ~% X! d( Q4 O                        end;
9 |( i$ a- y% C! X; [                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 Q& K2 k1 T  w- m8 B+ X                        part := @.transpOrder;
! E" m8 u) j( J                        part.move(@);-- load part
1 k9 `7 |. b5 o8 H# @" K  r- w                        @.CurrIcon := "load";+ `1 B) v; V6 L# n# V7 M
                        GlobalDistObj := part.globDestination;
* S0 t& s4 B2 q, b                        assignLObj := rgmanager.rgAssignL;5 O# j. O: X. f/ }2 u0 a# K2 E
                        row := assignLObj.getRowNo(GlobalDistObj);2 }2 O% y: P, ~6 f; n: u2 @- J
                        if Row = -1 then -- since 70
. q; t' q, J" a                                if lan=1 then6 e$ K( ^8 p+ z9 S. Y4 x
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( D. z! G4 }) v
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
# i  I. h9 R0 D3 o+ g                                else# A/ X6 V* E1 t. T9 E
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," h; L) t/ N2 {* |5 S# J6 l
                                                to_str("in docking station: \"",?.~.name,"\""));                               
. i  V" ]4 {, N5 |1 r4 U- h- o                                end;
8 P8 B, U3 m+ u# `* p                        else! u) o# ?( \& ~4 D4 G) h
                                @.Destination := assignLObj[1,row];
1 v; x  w! X& O! w7 T7 f% _                        end;                       
0 }. t& P2 e5 _! p& X                        newDirection(@);! X* B: @6 ~7 h; g. S9 e
                        @.HasOrder := true;
( ~& X! d3 ?! r6 p" o7 C                end;" X" g3 u% B8 v" g  `$ a7 J7 g" O
        end;
7 P1 l0 x; h( c4 p0 T" Cend;        -- of the method
% \; ^3 l$ H7 V  U& c
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 , l* Z3 V- Y0 w/ I

2 Y$ }1 ]4 o4 e这是AGV_putin中arrive的method。
. ]! s5 D4 ~' B8 O0 R; |" F  B
8 S9 P+ ^0 [3 K0 H当到达物料速度越高时,这个报警更多,
' l5 S/ Z; k0 m% T  C可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
1 A) `/ B! x+ g: O1 E' k7 ~程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
. x0 }) c$ l" T4 [% M0 z3 t8 V) o3 \
/ O8 e/ w) G& Y! u$ C7 D/ @8 L$ `# L另外一个小建议,就是move,所有的move都可以这样
, k9 a$ [7 j( L# Z* s/ P# Q2 e+ Z6 {* Mif not move() then debug end
' G6 \5 C9 h$ w6 z; B2 d" B  P这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。2 c: [9 c. N7 X1 B# n- t) [
plant simulation中的free libraries有AGV模板,
# F8 j" r8 u% B里面也有案例。
% U* S3 ?  }+ r7 B. r; Z) s; ?我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。2 w7 Z# M' O# k9 }0 l2 A

7 v- P3 e7 c# ~7 T我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 2 G% `3 p7 o0 V5 L0 U, T

( @3 V- _. R/ I+ v- |那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 * A. ]; `9 C- m; E( t
这是AGV_putin中arrive的method。; l% _% e8 x% X$ B7 @$ i( y

3 I, E3 ?1 t9 J0 \当到达物料速度越高时,这个报警更多,

5 F6 j7 [6 r! g1 u4 Y$ S! t另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-10 19:11 , Processed in 0.015080 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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