设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6743|回复: 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', i) b, Z4 ?$ h+ Y0 P
*/* |1 U/ q) u$ |3 e' M- j# I+ R
is
. ?& W! ^3 `. Z+ ~4 E9 J7 L        part, GlobalDistObj, assignLObj:object;row,Lan:integer;) y4 l# o1 b$ m4 k$ N2 n6 {4 M
do; U3 e7 H0 E. h& O
        Lan := rootfolder.Internal.Tools.AOLlanguage;3 s; n8 j, Q$ f( G/ O
        if current = @.Destination -- else return
1 r/ u6 n% [) y6 ?7 ]: m        then
% Q4 [) ?: T+ u. P! x                @.Destination := void;/ G4 f/ I, q3 H0 h* q
                if @.occupied then
4 q; A/ Y' W0 y; O3 f5 G1 X( H                        part := @.cont;. ~/ b3 J8 K/ G& H
                        @.transpOrder := void;* |& K( C7 w% J
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ S) A+ v' W+ X' n! z! G& u% R
                                @,root.eventcontroller.simTime);# O  ]% ?! S. P- Z0 F
                        @.HasOrder := false;: b. O6 A' _3 |- x- c# R
                        @.DrivingHome := true;: N0 O" Y( A6 Z; ]6 u; l, E/ Y% S. h6 k2 ~
                        rgManager.tryToStartTransOrder;2 ~- ]2 D2 v( c, q0 W
                        if @.Destination = void
/ C( N, q4 f5 u% b: z6 P  \                        then -- no transport order for vehicle @
5 T& v  @% m! B; n& E# [                                @.Destination :=& q; i( i2 x+ N3 {+ ?( ~
                                rgManager.nearestFreeStation(@,track.~);3 x# R4 L! A8 [5 ~0 p7 t0 f
                                newDirection(@);   
; L, r% M4 p  i8 B. e. t                                if @.Destination /= void then, m+ {4 t, b4 l9 |2 R0 _' c( W. W. P
                                        @.Destination.NumReservation :=: ~, r6 B. a+ L' ~5 w. ^
                                        @.Destination.NumReservation + 1;: A- U/ |% @* G& p  p
                                end;
: A  O' @! g& v$ w* u                                @.CurrIcon := "drivingHome";* D  D3 v  a0 I
                                @.DrivingHome := true;
7 }' \, w9 K- B! c                        end;
( K1 G. q# ]4 Q* [) L% {                else -- the vehicle @ is empty, both vehicle and part are in the same dock station, }; z  p+ ?3 |1 s) d
                        part := @.transpOrder;
1 k% a) P  }% I; n                        part.move(@);-- load part
. I5 V4 h1 e, D" n0 l# w  z& X                        @.CurrIcon := "load";
. F+ W, b! u! M$ _4 p0 c3 i                        GlobalDistObj := part.globDestination;
# A; h6 \7 d9 q/ `2 X9 k& w                        assignLObj := rgmanager.rgAssignL;
' K6 H- v/ |$ r0 m. J$ ?4 F                        row := assignLObj.getRowNo(GlobalDistObj);0 y8 w$ {7 Z' m( J2 E
                        if Row = -1 then -- since 70  T% P, K! V1 M$ i: w; h+ _
                                if lan=1 then. V8 Z4 }, a, h) m
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 ?2 V1 m0 n# \
                                                to_str("in der Andockstation: \"",?.~.name,"\""));7 N) S  b# n2 G+ \! K
                                else2 \  \6 P/ `/ w1 Z# _2 _# j( ?  }
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ M: u6 B0 g0 [) v                                                to_str("in docking station: \"",?.~.name,"\""));                               
: F! [& A4 u4 |1 E                                end;
$ s/ ^: i4 M8 [                        else) E: E4 t- W! H  |) V
                                @.Destination := assignLObj[1,row];6 z" B8 P- S: d' Y- @
                        end;                       
5 Q8 F" H6 g; L3 l( `  i$ @                        newDirection(@);  L! s" ]( O/ B0 n$ O
                        @.HasOrder := true;7 V; \6 V% Z4 i- }! G) J3 X
                end;
4 l! k. g+ R8 S. f$ a$ e8 w        end;
! [+ R# R% ?9 i: p7 [+ Y& ^end;        -- of the method1 ^3 v  Z) w. z! }# D, N% l% ?
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 " H. @4 w3 R. r& l$ ^, I/ P
& i; Z; k# E" o; y3 F. f
这是AGV_putin中arrive的method。* n  r/ C# l+ |$ W  ]' i. o6 w
: X! u: j. c8 [
当到达物料速度越高时,这个报警更多,
6 V. t  s7 g! x可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
, s/ q& K4 d( l0 i6 f程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?) K  P# K' m9 J8 V
. q/ E! q' S. t4 S. H
另外一个小建议,就是move,所有的move都可以这样2 D+ h' q! o8 ]; x0 W
if not move() then debug end1 a" C. D4 }7 V
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。; u  z/ S0 G  w
plant simulation中的free libraries有AGV模板,
2 V. }% P0 k/ s7 Y5 S2 F; A里面也有案例。
  m7 s$ @( A9 {' V; R, T& V我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。( Y4 c+ v. p: K+ ^0 m* c# @, ^: f
8 _- m6 C- _, c) S( J, l
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
- U" U2 H, M; q, R6 V' C/ Y! w0 b, O: ^1 O
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
. k. w% ?' V4 y% Y2 N这是AGV_putin中arrive的method。
9 F1 j, ^7 E0 _% f. ]( w& @! @  V, u) ?9 s" {; ?0 T% @
当到达物料速度越高时,这个报警更多,
5 A' K7 e& m# h
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-24 01:21 , Processed in 0.024270 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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