设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7368|回复: 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'. y' L2 ?1 s, a
*/
* {/ z& u1 o5 D4 |/ Sis' N* s( y% e- f% N' s0 O" ^
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 l& {  T2 K2 u' X, G
do3 E% U, t7 G" P
        Lan := rootfolder.Internal.Tools.AOLlanguage;2 L3 v8 X1 _3 f9 W' x9 H
        if current = @.Destination -- else return
* |( l4 a, G: b: m, I: @2 _        then: _& p; g' [7 [
                @.Destination := void;. j( P6 x* M! Z! ]6 L# r3 R1 V( d
                if @.occupied then$ T1 B9 j, o2 t' e! ~/ U
                        part := @.cont;
& L4 `1 y% |% B# E                        @.transpOrder := void;. f( ~9 G  t/ k( ^2 C
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) i4 p( {5 J5 I4 ]3 e0 M* A                                @,root.eventcontroller.simTime);
9 d, B  \) b, J+ ?                        @.HasOrder := false;/ J3 ^0 i, h3 F. U+ g
                        @.DrivingHome := true;1 N( {. x# g4 _
                        rgManager.tryToStartTransOrder;
  o- F2 _' M/ d& I                        if @.Destination = void
6 [' x$ m. U5 Z3 b4 q                        then -- no transport order for vehicle @
* @3 ^" P# K5 q% v" A' w1 D: t$ D                                @.Destination :=  ]! Q6 W0 I3 k! i+ I- G
                                rgManager.nearestFreeStation(@,track.~);
  S( D0 i# f* A                                newDirection(@);   7 {/ H* z' d  @4 y3 Z8 ]( J' |
                                if @.Destination /= void then
! K0 M7 f9 ]; X                                        @.Destination.NumReservation :=
8 {5 D2 P$ t6 S- E                                        @.Destination.NumReservation + 1;6 X: M' N1 K$ D
                                end;
& w" x( u9 h; R6 P                                @.CurrIcon := "drivingHome";; X) Q/ F7 n' R* U) ^, S. U
                                @.DrivingHome := true;
+ g. B, E: D6 [. E: d! ^, T                        end;
+ m+ [$ h! d( l$ H5 {                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! K/ ]! A8 h! F) d& P5 A                        part := @.transpOrder;
$ r" o- S. s0 [6 H$ e, g                        part.move(@);-- load part* n% F+ R4 |; O8 p2 T. t" U% a
                        @.CurrIcon := "load";0 I6 p* P$ {! L- }
                        GlobalDistObj := part.globDestination;* |! x( |2 e6 B
                        assignLObj := rgmanager.rgAssignL;
! I/ H! ?; |; V$ `2 h* A4 t                        row := assignLObj.getRowNo(GlobalDistObj);
2 j& V5 J( d- u& T4 g                        if Row = -1 then -- since 70
' \, k6 g% S% S2 ~& a                                if lan=1 then
4 f. w, C! {! I' K                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 Z' U. L9 {8 ?. ~2 ]+ I( _- ^; F! q
                                                to_str("in der Andockstation: \"",?.~.name,"\""));$ M6 D) R5 n3 ?1 ?: f# Z/ ~
                                else" t: ~6 n1 Z5 j# a" Y
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. }; c* z, l9 Q' M5 O
                                                to_str("in docking station: \"",?.~.name,"\""));                               
6 S% @! w. h, Y6 A! l                                end;7 R( M! W3 p* V/ Y" c3 }# F
                        else/ w* k2 g" j  V; R8 U
                                @.Destination := assignLObj[1,row];+ ?4 A8 G% ?5 j' I9 ]2 ]$ m7 ]
                        end;                       
$ k! k# Z0 R% C                        newDirection(@);( K6 x$ A. c2 h# k. ]% q
                        @.HasOrder := true;( d6 V: _! l3 R/ b% M2 B3 R& u
                end;3 x" a, j, [6 l* ~: D  `
        end;' ?/ G4 `8 P! ]1 T0 ]
end;        -- of the method
' O2 T# E4 G% Q  L' g$ e/ \2 R: t
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ' T9 C% j& ~* r6 l6 c4 V
4 @3 \! I  t. H  E8 d0 ^8 W- C
这是AGV_putin中arrive的method。8 [0 E& C( E! V

# _! k; O$ L7 j  M: q: z4 Q, J: d当到达物料速度越高时,这个报警更多,
& e: n1 Q! E) N( u) s: V可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
+ |8 ^2 ]% |6 _2 ~# Y程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?- L2 e" k9 h7 K: Z, p
- d4 u2 k+ J9 t  {5 Q* t" t
另外一个小建议,就是move,所有的move都可以这样  @/ f% b& w; h9 D9 C& D+ ~/ n% w# m
if not move() then debug end3 k: L) F8 w' O" {, x) V
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。- h. ^7 Z. q* N+ e) A
plant simulation中的free libraries有AGV模板,# U' o( r& c0 M3 j9 `' W
里面也有案例。
% f8 f& k- H% P8 n3 C我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。( I: b3 a: k! A9 q% C2 N$ [

& G% D3 ^( X. s& o5 e6 q# }我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 4 F; u) @$ T. v- s+ u
# c$ Q7 d9 ^! N' P, ]' E0 r- Y" X
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 2 d7 w: D0 E# }! c( @
这是AGV_putin中arrive的method。
' [7 `# q6 e0 ^/ X; s( O- ]8 K6 j9 l% `
当到达物料速度越高时,这个报警更多,
6 w3 u4 _* d1 D9 y7 _6 L& @- p% s
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-7 12:36 , Processed in 0.017691 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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