设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8653|回复: 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'
" x8 c# f, T. ~) `*/+ o9 E+ o: Q3 \6 Q6 e- k# [2 p
is! S& s$ v9 B# K, U
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;& s$ u: T1 Q" {/ L1 ?
do; d* S8 g/ [4 O; e3 u
        Lan := rootfolder.Internal.Tools.AOLlanguage;% s$ K9 W3 y% z: T
        if current = @.Destination -- else return5 G7 L. Z; ^% M2 H
        then
& s' \" Y; {7 m5 m; [# q$ H                @.Destination := void;
$ C8 t$ ]7 E4 o& x9 b8 N6 d                if @.occupied then5 d3 A, ?. ?1 c$ R8 p- e1 i
                        part := @.cont;. r; E0 L! m' B  K+ J( m
                        @.transpOrder := void;
! ]& E$ t) u; _5 I- T                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. U9 }5 y( I% R, v2 _; d                                @,root.eventcontroller.simTime);
( D# a0 r8 G; C8 _2 j8 B( e                        @.HasOrder := false;
2 I9 ~# u5 j4 c# @5 h/ E                        @.DrivingHome := true;
5 @) T2 H3 i9 @- I/ Z$ T! [  l                        rgManager.tryToStartTransOrder;
( M* {7 a, ?1 S) E0 w                        if @.Destination = void
9 @8 B6 V9 R8 k. K: \9 ?8 q4 `                        then -- no transport order for vehicle @
4 w9 x. R) x2 T$ F1 J8 }/ c" d9 y, _                                @.Destination :=$ n; p3 |1 |) a: c% a" ?2 q" s  u4 q
                                rgManager.nearestFreeStation(@,track.~);
* ^$ W' D* W' D: d4 z                                newDirection(@);   4 v1 J+ L; p- D, g* }
                                if @.Destination /= void then8 v9 ~  A$ U: S2 }
                                        @.Destination.NumReservation :=
* S; e  x$ V- A  L8 ^                                        @.Destination.NumReservation + 1;
5 F5 W; f9 k) E' R1 {- w                                end;* H5 Z+ w) o& @$ j6 l; g1 k' g( P2 \
                                @.CurrIcon := "drivingHome";
! h+ i  d4 {+ m0 N# D5 h                                @.DrivingHome := true;. x5 C3 b0 t6 d: B: U5 w
                        end;6 X% a# n, _6 {+ r( E
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 k6 J% E. w& H1 ~: d
                        part := @.transpOrder;
5 V! x& `# h) B* O                        part.move(@);-- load part! c7 p$ V2 j7 L& @9 o2 v* h7 v/ C
                        @.CurrIcon := "load";
# [0 B/ X# y2 m- ]# T  P                        GlobalDistObj := part.globDestination;
( f2 ?; p8 `9 i( h. B' c                        assignLObj := rgmanager.rgAssignL;' h/ X# B2 C8 V8 O$ L3 |2 S5 E
                        row := assignLObj.getRowNo(GlobalDistObj);
1 q  L' O, {4 x0 D; M  n% c' M                        if Row = -1 then -- since 70: `+ X' t6 Y- P. D2 Y8 i4 \
                                if lan=1 then
1 y! [) S$ ^7 {, Z3 o4 X/ E6 D                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& l/ n. `, n- K3 V' H# M                                                to_str("in der Andockstation: \"",?.~.name,"\""));7 e( |1 H, l8 Z! z9 j
                                else
% n8 _# V2 |2 T$ T1 S0 w                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 W  C. W- T# P( S, D; f                                                to_str("in docking station: \"",?.~.name,"\""));                               
5 g7 u  R. J5 |                                end;5 ^$ [9 z% k4 r8 M% i  @5 d( Z0 }
                        else: [2 T$ o8 e4 b% n* H2 O
                                @.Destination := assignLObj[1,row];3 |2 r; Q0 K9 X5 n
                        end;                        % q( U9 b. x; V2 b0 @7 V4 ~4 V
                        newDirection(@);
1 x! e0 E# h7 d/ W                        @.HasOrder := true;/ s9 d& f0 S* E1 i; W0 `: i
                end;
' f3 x2 O2 x% l4 Y" v$ w5 R) z        end;
' r+ e0 X. N9 \end;        -- of the method+ Z4 \: B! ?* J! M  Z6 o
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
# A% Z2 j+ q) l4 C0 i3 o  [* ]- Y) b% y0 K, {
这是AGV_putin中arrive的method。
! r& s& @) F# s! H& x
: d' N+ g- g. S% {" k. ?当到达物料速度越高时,这个报警更多,+ ]1 U( D' W7 p/ z& w
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
3 X2 S0 W$ r2 f程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
/ M) P9 X; B: o6 H
9 E5 R' Y" y4 f/ W4 d: p! S/ X另外一个小建议,就是move,所有的move都可以这样+ g' L3 n: l( n6 ^" H
if not move() then debug end& Z* C* m* \1 T! c
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
9 h0 W# V% V. d4 Iplant simulation中的free libraries有AGV模板,
! F# Z( O# r/ d- ~里面也有案例。3 ~8 `: O0 g$ U4 M
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。" v2 _2 t6 U- l  k2 n$ P; f- \

. {5 y! [% s4 C0 [# E# Y我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 9 Q# m# t2 d% j1 a' Q, Z; R% o6 {
$ t0 {6 F3 q* ^* |  T, d
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
: U. T' A% ?3 R; w( Y( K这是AGV_putin中arrive的method。
5 B! [) h9 h1 K/ d1 ^" L7 C1 E4 n, p' b9 U2 K2 @
当到达物料速度越高时,这个报警更多,
( s# F3 |9 c; ~/ D+ ^  \
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-18 03:19 , Processed in 0.018727 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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