设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7227|回复: 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'4 ?; }8 X4 X# B$ @
*/# W- y+ M6 e( f$ }+ b" h# c
is/ W9 S6 c  \; d2 G3 Q; V. C/ x
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 z, f( b" C! S! l' n
do
5 w4 T% a" [# c" O        Lan := rootfolder.Internal.Tools.AOLlanguage;
! X: j5 X3 O4 O$ ^6 @4 _        if current = @.Destination -- else return$ W% h7 v) J: |' c5 u  s
        then
3 i3 M5 F+ i- p6 B( w3 G/ b                @.Destination := void;4 U, @: }' A- d3 L0 k7 o
                if @.occupied then4 V2 b8 b( Y5 A/ i9 W6 w
                        part := @.cont;6 \9 e  g) f7 b( n
                        @.transpOrder := void;0 ^9 M. }( F" n+ L0 K9 R. j
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& }8 `* R6 j6 [5 f5 Y) I: r, I$ x' W
                                @,root.eventcontroller.simTime);7 M' A. s$ v, u+ }! O3 F
                        @.HasOrder := false;
' B0 l1 r& x! R! T  h$ v0 l                        @.DrivingHome := true;5 b; N) h4 \! a: A
                        rgManager.tryToStartTransOrder;
& f! `  }' k' \( g/ Y& @6 V                        if @.Destination = void: F) x, s" f+ v# }' `
                        then -- no transport order for vehicle @' O" p- t- l5 l; s, |  c
                                @.Destination :=3 ^; Q) D7 O) m& D
                                rgManager.nearestFreeStation(@,track.~);
+ W  l2 \# ~" _                                newDirection(@);   4 S# @8 m, D  }0 J( X
                                if @.Destination /= void then
1 K9 K# A2 ~" F3 C/ W                                        @.Destination.NumReservation :=
; }6 R  }. }1 J# O% g, M                                        @.Destination.NumReservation + 1;
8 w: A' P3 R0 C8 O1 p! c7 t                                end;
" K& P9 m/ ^. s1 K/ e                                @.CurrIcon := "drivingHome";! n# K2 X5 P6 g
                                @.DrivingHome := true;1 o/ J; o  }+ K; @% M2 ]
                        end;0 Q  S* \( c' A" W
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# @) x* @; D& C1 E$ U$ O5 m" v9 P                        part := @.transpOrder;! ?, L9 G& B/ Q' E6 ?2 {
                        part.move(@);-- load part
" ^+ i. o7 i3 _: \' ?; m                        @.CurrIcon := "load";
% U6 e( n3 \5 V! W, r4 l                        GlobalDistObj := part.globDestination;
0 \$ \7 H/ P; m  h                        assignLObj := rgmanager.rgAssignL;) n5 D9 `# J! G9 R& ]/ W* {, A9 [
                        row := assignLObj.getRowNo(GlobalDistObj);0 j2 |+ N3 i% O, r' g- b) u
                        if Row = -1 then -- since 70! ]5 R6 j$ S3 i" x
                                if lan=1 then
6 u6 B1 q$ l* O                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% w* K8 V, b, Y, ~3 o2 T) V                                                to_str("in der Andockstation: \"",?.~.name,"\""));
! ^& u! N1 l) \! B) n" N' D% Y8 v                                else
' T- L; w6 t- z* I! p) i3 u9 U' M                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% F$ r) L- d: O  |
                                                to_str("in docking station: \"",?.~.name,"\""));                                # F# l4 H: B, H- @1 z
                                end;/ K, z/ Y8 ?6 {# g9 P8 k$ r
                        else' x7 h  @' Z( X' a: T5 q5 k1 d
                                @.Destination := assignLObj[1,row];
. \5 Q6 ?2 A2 O# Q9 v: s                        end;                       
2 i( t8 Y/ \3 w& F! q                        newDirection(@);  C7 B7 J- o, h1 V# x
                        @.HasOrder := true;
$ Q  f- Q6 k' a, ^) \$ x                end;% C9 C! F3 o2 \) N
        end;
7 X4 Z+ g3 b" b  j) ?. m+ Uend;        -- of the method; x- V4 d7 `* E5 z# x/ T. Y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ) ?2 K$ b7 l! v+ E
! v, a! S" Y; D+ y  b+ x; c2 z
这是AGV_putin中arrive的method。* P2 w. b# ]6 C
2 B# m; T0 R' a1 f" P$ s3 M2 E
当到达物料速度越高时,这个报警更多,
6 A+ I. }: S% \7 }4 W可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。6 M8 ?/ G+ j% d) I0 n9 s7 E: K: I
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
2 i, G. d/ P0 e
% p, O% D# |% g1 c4 }2 ~/ X+ `. b& Z另外一个小建议,就是move,所有的move都可以这样
) `  F) |7 y3 A. {& u( L, L7 z) tif not move() then debug end
7 P3 s/ T. n: i7 }1 |9 D9 i这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
8 \& O  X' L' J. Jplant simulation中的free libraries有AGV模板,2 P. |# W8 W# _: I" `
里面也有案例。
" {. k3 N) J, n: C/ I: h我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
3 p" L& w9 ~: n9 `  q% `, S9 \$ i6 ?( g  m5 V
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 6 j/ w4 W  h- m' ^( `; g
: G/ ]- `8 }& {  v+ g, T
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 & ]4 Q$ o! `7 a4 M" W
这是AGV_putin中arrive的method。7 A. s' \2 n/ c' \+ T

/ N5 l6 e0 o" [, y4 }; y, r当到达物料速度越高时,这个报警更多,

- \0 f! c/ `% b5 f9 @. s2 ~0 W# ?另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-29 01:13 , Processed in 0.025119 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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