设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7575|回复: 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'
5 j% H4 v9 y, q* h' E*/
! U% S" A* R, D; \1 G( ]is
  s/ t. ]: f. \: w        part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 S- s; {- B$ C, x0 e0 e- f$ e
do  c/ @& v- h% M$ y, W0 O; w
        Lan := rootfolder.Internal.Tools.AOLlanguage;
  @' h$ @1 G5 c        if current = @.Destination -- else return
( ?- H- |! j9 V7 q        then
; N; S5 \+ y) ^: D+ i                @.Destination := void;
+ K8 s/ |6 T: }( `                if @.occupied then
, r9 U$ I1 `: y2 o: L# c2 q                        part := @.cont;; D# c" U: j: V
                        @.transpOrder := void;! Q$ z1 n. O& }# Y% Q, j! h( w$ |9 b
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,  t  n" l& X! Z2 P
                                @,root.eventcontroller.simTime);
; F: s. ~9 c7 t, Z# L                        @.HasOrder := false;
- z5 e( O' W' D6 j0 K  u6 m, `# w                        @.DrivingHome := true;+ K: V4 D' Q% Y6 n8 [# b& `
                        rgManager.tryToStartTransOrder;
- N$ M" @% {4 ]1 [4 f                        if @.Destination = void
4 Z1 i6 g/ P7 \( q+ z& |0 H                        then -- no transport order for vehicle @
- w5 s" q  U3 \' [                                @.Destination :=
" s1 a+ D7 `5 S6 v( b( C                                rgManager.nearestFreeStation(@,track.~);
" c% G% b& f5 W3 F( m9 h                                newDirection(@);   . Z/ f; d3 Z6 G8 C3 Z+ s
                                if @.Destination /= void then$ H! \; n1 b3 Q( G
                                        @.Destination.NumReservation :=
; o" n; F3 T  P3 G# a, @% M                                        @.Destination.NumReservation + 1;1 P8 x8 S$ z  p- ?: W& Y$ j$ {
                                end;
2 `4 c: b' z& C5 m# V, E                                @.CurrIcon := "drivingHome";$ @* t8 w- ]2 O
                                @.DrivingHome := true;4 ?( Z; a) b  m1 ^* \2 h
                        end;
4 T+ v6 n9 v/ P' w, V" R                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ a8 m5 Y6 r5 t% Z                        part := @.transpOrder;5 t$ \0 |( t- I& f" _( ^
                        part.move(@);-- load part
0 A' N% u: ~, v4 ~1 f. I                        @.CurrIcon := "load";
; r0 X- A5 }& Q2 L/ q) o                        GlobalDistObj := part.globDestination;& Z! {4 F1 Z; ]# h( V
                        assignLObj := rgmanager.rgAssignL;
, \" G' T# u0 D: J8 x8 s                        row := assignLObj.getRowNo(GlobalDistObj);
) J' T" ~+ i8 U# m  E$ T- j                        if Row = -1 then -- since 700 d0 K' M- z2 h0 `& l0 `5 ?6 D8 f
                                if lan=1 then4 p4 y( V" m4 {
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, b) I! ?5 m$ t0 G
                                                to_str("in der Andockstation: \"",?.~.name,"\""));  R* u- \. _: m- O5 Q; F1 o
                                else- {6 S2 E, Y8 Z! K5 q
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 A1 C5 ^' ?# |/ Y                                                to_str("in docking station: \"",?.~.name,"\""));                               
' V$ U1 `, f! V  E4 }- w; F! W! q                                end;
4 B6 z' I! ^& J! f! \) J1 T                        else
: R$ `( G! A: s; ~' @                                @.Destination := assignLObj[1,row];0 Z1 w5 K0 u/ d- m
                        end;                       
3 T& U7 Q4 [$ @: l9 f" H9 D                        newDirection(@);: H* s. Q) E) B/ V
                        @.HasOrder := true;
$ e* m: |5 Q. t; h  @% V+ c                end;
* y0 w) ~& ^' H$ {% d- h; y        end;
" M) G  L2 A8 |! Bend;        -- of the method
) ]! ~. J0 ?3 s; A; @* L$ @
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 7 i/ M- z+ _' M; z) L5 Z: E2 w
+ N+ [; a8 p5 \4 [
这是AGV_putin中arrive的method。
. q. Z8 u7 O% M( k( m) a  l4 t! G" N
当到达物料速度越高时,这个报警更多,% Z  Y( J5 ?4 I( @3 _
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
: h9 L- k9 s% f: w0 O1 Q- g程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
3 \" S* N0 F! U% G
  i! F. y1 \) ^: r4 w* [另外一个小建议,就是move,所有的move都可以这样% H! l, y3 y. b4 d
if not move() then debug end
6 _6 ?2 k6 x/ u/ j这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。5 {" J/ l) e$ l7 N6 n' i! o% I
plant simulation中的free libraries有AGV模板,
" U8 y9 v& Z& W1 N里面也有案例。# o5 ^" Q* i8 @) r* u
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
4 B& R7 ?7 k8 O! k6 Q+ K
+ Y2 N  S6 c4 U- g我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 1 Y5 Z8 c/ I+ j, C

6 L0 V; l3 Q) Y8 U4 M( j那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 7 c, q( }( ^8 I9 C& `! |
这是AGV_putin中arrive的method。" V  @5 i6 g) Q! q5 o4 L1 F  Y

" \8 S* S; ^# z& h, x  Y) ]; y2 N当到达物料速度越高时,这个报警更多,
$ U. D) O# F2 V/ D; V2 I  d
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-18 08:24 , Processed in 0.018510 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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