设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6925|回复: 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'
0 D5 g( B% ]3 d3 R*/* c8 J' ?+ T( j4 v6 z
is
; u! \$ o) K& \+ t        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! A+ D# F* r1 c# c2 ]do9 K8 h: R# c. d9 U! R5 Q  g  y' z
        Lan := rootfolder.Internal.Tools.AOLlanguage;( `9 v+ T7 R( H
        if current = @.Destination -- else return2 q) _5 d- b0 c- c! I
        then/ S* ^/ x4 K$ s9 Z8 T  E8 _$ z
                @.Destination := void;# P& _5 _' d3 I0 O  k! l" w
                if @.occupied then
" C0 ~8 \4 F' T+ _% p. d                        part := @.cont;! L. v/ X/ p* a) Y: }7 C
                        @.transpOrder := void;% O1 P- I# P4 I( r' v4 K4 _' N
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 @$ f) W% ~, r  j
                                @,root.eventcontroller.simTime);
- H# n* Z  C' x% j/ g                        @.HasOrder := false;
: I' m* l( ~8 e8 q1 i                        @.DrivingHome := true;% x/ }: V/ V2 n4 Y( {1 k
                        rgManager.tryToStartTransOrder;+ K1 X/ Q7 }' n; A; C& R* f2 m
                        if @.Destination = void
4 E: n* x9 M, d" g                        then -- no transport order for vehicle @
( m. v& }' d& p7 V7 V1 Y2 o3 }6 u4 p                                @.Destination :=
# r& P' Z6 c( M! E                                rgManager.nearestFreeStation(@,track.~);
8 l5 V! }6 N, ]6 W9 o$ u8 L                                newDirection(@);   , m/ u  L9 I( O+ \! D. W' |
                                if @.Destination /= void then; n) z8 T" o- G& k' m9 n2 v
                                        @.Destination.NumReservation :=" Y* e6 a( l" J8 O; m4 o2 b/ v
                                        @.Destination.NumReservation + 1;
/ e! c' M5 K, w: d- Q, @2 U                                end;  ^1 j# w: ?5 j! a. I5 a3 U0 w! V: A
                                @.CurrIcon := "drivingHome";
% ?: u: j" w3 c/ I. F. p                                @.DrivingHome := true;
) m! b6 V' l& D$ b                        end;+ ^# U" G7 @6 H; [
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* B4 E- w- {, C' x) c                        part := @.transpOrder;! B: Y# L4 M- x- `% J5 Q* j
                        part.move(@);-- load part" t  q" \/ e! B7 [& H$ c. E
                        @.CurrIcon := "load";
- i( n, w4 \9 k8 j* a                        GlobalDistObj := part.globDestination;
' w6 d# m  u8 e1 k' k, v6 L                        assignLObj := rgmanager.rgAssignL;) v2 a3 z4 x0 ~" L8 e
                        row := assignLObj.getRowNo(GlobalDistObj);
+ a7 f3 n; k7 p* y9 _                        if Row = -1 then -- since 709 T; k& O' A/ \8 r
                                if lan=1 then
: I. w) S5 Y( l/ K, S                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ _; U3 ~8 _4 [) ]                                                to_str("in der Andockstation: \"",?.~.name,"\""));
! ?8 k( g' {7 N- Q                                else$ \8 u4 s1 P# h& i
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) a3 S. t7 m) j& u
                                                to_str("in docking station: \"",?.~.name,"\""));                                6 ?" q) w0 c5 r; b' v: w
                                end;
! o  {* q9 P2 L% O7 W                        else2 [( X8 {. d$ V: f+ _
                                @.Destination := assignLObj[1,row];9 t8 [1 e# Q6 Y/ R3 ?4 G/ H# R
                        end;                        ! k7 U8 S7 A4 l! y6 h3 p, t5 r! |! }
                        newDirection(@);- E  \! \4 W( M
                        @.HasOrder := true;
& f1 {4 A* A; j8 k                end;
+ o$ f5 B- \3 W% `7 a        end;1 M. I. {* G% n) Q5 _* w
end;        -- of the method
) w: j" x# }9 X4 P
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 & W0 H1 S5 N" k- p

$ C6 M$ V3 l# y1 F! s; D这是AGV_putin中arrive的method。# P3 i3 I4 \$ g9 y# P
. ]) k# D; U' g' ~7 B, p
当到达物料速度越高时,这个报警更多,% R7 i8 n) H1 w; b/ k# e
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
0 X! R' R  W# r% v1 [: s; T程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?% T; {! H9 g* f$ k% Z6 `+ L. n0 g

5 `+ v7 G& U3 Y) v: O" q另外一个小建议,就是move,所有的move都可以这样' K+ O' p) N- |( l8 n0 ], `
if not move() then debug end1 P1 D$ k+ a2 T2 r+ T
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
7 q% ?% t* x& m: ~- H& ?) n' Aplant simulation中的free libraries有AGV模板,9 L4 c7 ~* O+ ^! ?2 o
里面也有案例。5 T4 ^9 P0 [' ~* n7 o9 A. T
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。9 M! j( q# V  q- A. E: d

1 N# c" D( h1 A6 _我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 2 U$ g' }* t" \

3 {& G( S3 A5 Q那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
7 a3 K) ?0 {7 c  X* |# y% y这是AGV_putin中arrive的method。
# C3 V, d, A, x$ r9 \4 y; b/ H4 E
  p% _6 [# f, G, w7 R当到达物料速度越高时,这个报警更多,

2 A- K9 _$ T8 X9 p另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-6 20:54 , Processed in 0.020288 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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