设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9909|回复: 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 U, j& }4 V6 g+ j* ]2 N+ V! n3 J*/" S, B& ~# e% }. Y7 [" ^
is4 S( q1 x8 C5 v/ Y
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 U4 {! u1 D2 v0 s
do3 Y0 m6 p+ d& X! }3 h
        Lan := rootfolder.Internal.Tools.AOLlanguage;
7 h- A6 j2 F. r2 m' [" g        if current = @.Destination -- else return
% G1 y$ R$ M$ e- Z        then7 s) @' R' @1 S& M. B7 V: c
                @.Destination := void;' j) }& W7 r9 K) d' p
                if @.occupied then
# g: l3 C6 a% N: ]$ b' K                        part := @.cont;9 |6 K( y1 X8 ^/ p9 m0 e' R
                        @.transpOrder := void;
1 x+ K. t8 z3 p4 W6 v                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( \' F; _- c# y4 ?# ^) @5 {0 D
                                @,root.eventcontroller.simTime);2 r. x& U/ K, ^# [
                        @.HasOrder := false;' M( ]4 R* q* K% Q# M  _% M1 ^2 w
                        @.DrivingHome := true;
( v9 T1 g' D/ c" v# ]% f! `                        rgManager.tryToStartTransOrder;
! S- h* y; o% |* h* V- o4 Q                        if @.Destination = void$ Z' g; ~! ]2 S5 \6 X/ |
                        then -- no transport order for vehicle @
3 u8 y# \6 ?7 Z$ ~& p4 u                                @.Destination :=
8 m( v7 X' ?1 z! ^  I                                rgManager.nearestFreeStation(@,track.~);0 V& i$ N6 u* M4 W9 t) m1 r1 q; w
                                newDirection(@);   
6 {* g0 O, l% l+ P# t  T/ @                                if @.Destination /= void then
7 t) ]$ m+ c) [                                        @.Destination.NumReservation :=
7 g4 E% z9 j! `                                        @.Destination.NumReservation + 1;
3 ^. w. C' I! Y                                end;% M; j/ `% B- P
                                @.CurrIcon := "drivingHome";
7 B# T3 T( k  a. J                                @.DrivingHome := true;9 V. J# w% a2 C  ]. o
                        end;  l  \0 a0 W2 a) `2 u: B) u
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ @7 S8 ^: [9 M- R4 s
                        part := @.transpOrder;3 Y: |& \. h4 L# Q$ U0 _
                        part.move(@);-- load part
, E* {1 }2 L& n+ O4 o" I3 `1 E                        @.CurrIcon := "load";
; B3 x' F1 W& ]/ S7 H5 U5 m2 |                        GlobalDistObj := part.globDestination;" N+ N5 D$ U, x1 e9 n
                        assignLObj := rgmanager.rgAssignL;" N* D9 q7 T3 r7 A0 \7 P9 c+ |( w
                        row := assignLObj.getRowNo(GlobalDistObj);
) G. C; e- d5 ~/ ^& e. k$ H! {                        if Row = -1 then -- since 70* Y% p" Z2 _& }& [4 x2 c/ m9 U2 }. V
                                if lan=1 then3 v$ h5 @& S! ]) i5 X
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' N" e. E* t1 ?- J                                                to_str("in der Andockstation: \"",?.~.name,"\""));
  r0 \7 v" |3 k$ ?0 o                                else$ _6 `( S* i3 |+ D! X+ L: P
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( j3 y9 k7 n- A! }' P
                                                to_str("in docking station: \"",?.~.name,"\""));                                + n: f% T5 ?$ f+ w) H: }
                                end;+ x7 |: n: ^$ V8 p
                        else
  q4 L7 G4 G. T  o( d                                @.Destination := assignLObj[1,row];- o! ~% z  \! X% E4 Q7 N& F
                        end;                       
0 \+ q  Y+ k% J8 }: q) c0 e: ]& j                        newDirection(@);
2 u0 @1 P$ y6 o/ c" |                        @.HasOrder := true;
5 m: j; ]. _! F. Q, c. V                end;
/ ^6 w) |& u4 P. t( b6 x, Q6 l        end;
" w! ?8 u% |! c  W% Yend;        -- of the method
: ^0 g7 L: q, F4 `
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ( t) r6 [$ U. c6 V$ d1 V3 C
! E( n) y4 a. _2 v, V9 p4 @
这是AGV_putin中arrive的method。1 c3 b+ t" X4 q* M1 B
( E% v& b* y; h3 |: f  |
当到达物料速度越高时,这个报警更多,! k+ Y3 m+ b" ?$ v" P% l' U9 ^% D
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。1 \8 w6 ?; S# Z  U' Y, a
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?, K' Y# o8 _  r! T, @

/ O5 y* d$ f* b4 `+ d& g" H, Z另外一个小建议,就是move,所有的move都可以这样" o9 g, p4 J# ^& Z8 Q& A* ]
if not move() then debug end$ k* x8 v8 a$ K! z) b
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。/ ?' K- U- s! X+ }' H
plant simulation中的free libraries有AGV模板,! J7 ~, [/ g* D* C: A. m
里面也有案例。6 |9 b9 e8 X$ \8 H- p
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
5 j: Z  h' w5 [' O) t+ |- {+ Y
- Y: O2 o0 s' t) Q, P0 E我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
4 G3 }  H  A. ^0 J4 k. r6 K& u
, j- X0 n2 H9 e; F: ~0 Z4 D那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
8 G( ^. P+ O7 e. ^, c这是AGV_putin中arrive的method。
# s5 ]3 @3 {& C( ^2 }3 V3 D' M% q/ ^" D3 ^6 Y0 U) H
当到达物料速度越高时,这个报警更多,

- F0 _1 F% |, Q9 f- s另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-2 01:39 , Processed in 0.038420 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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