设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9849|回复: 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'% _" u4 t+ ~& F5 l# h; k
*/7 \4 H* V2 [4 Q, u* n/ r
is/ |5 O4 F6 n& f" ?
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 L* W- Y& W2 a  r
do  D& T" q! b2 K, ^/ d3 I7 l7 t; D
        Lan := rootfolder.Internal.Tools.AOLlanguage;8 z4 f/ r& g+ w5 d
        if current = @.Destination -- else return; l2 l7 d) F7 n, k1 N
        then
4 P* q, F6 c* ?                @.Destination := void;
; s: ~" T- V; K# L8 _' o( Q                if @.occupied then! q) u7 E9 k! N8 c6 ?" q5 N
                        part := @.cont;+ u8 N# [/ }' ^. I7 Q( Q
                        @.transpOrder := void;3 D, {: r. D+ d3 S4 V6 F5 H8 d
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 Z5 Q  c3 f6 y& c3 K
                                @,root.eventcontroller.simTime);
6 Z; Z0 Q7 e- }0 S+ A; [4 l) W                        @.HasOrder := false;) e- w$ C7 ?( _* Q# h
                        @.DrivingHome := true;
' W+ z+ Q/ F" t: _8 c                        rgManager.tryToStartTransOrder;
3 s: a# h' D6 W" u                        if @.Destination = void/ j) {. C. i2 t
                        then -- no transport order for vehicle @
/ X. F% i  V9 \* ]6 z3 {                                @.Destination :=
. k$ K8 P8 Z* Z5 @$ I$ n9 j/ u! Y                                rgManager.nearestFreeStation(@,track.~);9 Q, I1 Z# b" B& B* f/ Z  k& r/ s
                                newDirection(@);   7 o; ?. z% d$ A- k! z2 o6 `
                                if @.Destination /= void then
" m/ _  x5 I+ Q                                        @.Destination.NumReservation :=2 d* A" r8 I3 q7 @7 Y# ?
                                        @.Destination.NumReservation + 1;
% w/ T3 R& b9 c% B- f! J8 Z, k, v                                end;4 D# M- Z, `5 L' ~  L' p
                                @.CurrIcon := "drivingHome";
6 W( S' V+ l- s                                @.DrivingHome := true;2 J; V' U  l  r) d1 C% p$ b# d& S
                        end;
$ U. [+ D( C# c7 N: @                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" s3 A- b* P0 w& p! j: H" N                        part := @.transpOrder;
9 s" i/ c# T6 |! |- f                        part.move(@);-- load part
  t5 F* t5 u% b- U& n                        @.CurrIcon := "load";
' D# N5 h% B" E: s4 D                        GlobalDistObj := part.globDestination;4 N' E2 Q, t; s* }
                        assignLObj := rgmanager.rgAssignL;
* Y0 M% Q/ s& i! @, R                        row := assignLObj.getRowNo(GlobalDistObj);4 C0 ?' c( p; r" f! I6 c) W3 Y
                        if Row = -1 then -- since 708 p: ?& @3 n4 `3 w2 w' d
                                if lan=1 then
& ~0 u8 y5 Z- u0 M3 J; V+ c                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 W- ^7 J/ x: b) U9 E* @
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
# z7 w9 [4 K# ^& x( ~  w. s& a                                else, Y+ D# L  T" c
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 E/ F. f) k5 u9 x, w                                                to_str("in docking station: \"",?.~.name,"\""));                               
3 Z: `  z. n4 Y* [$ a( b0 `0 }: p: V                                end;+ X9 ^1 l( q: N7 {0 e
                        else
5 g" \, H4 Y' ^                                @.Destination := assignLObj[1,row];" u1 {+ b% g3 l8 ]4 M
                        end;                        ; [5 @& ]4 ?5 X" w# y6 e. d: F
                        newDirection(@);
* O! M4 c9 I$ x, [" ?0 ^                        @.HasOrder := true;
  s4 ~0 N5 H; I. @; [1 \) h7 E                end;
3 [  m" J; o3 F- c; z        end;
& u* r3 O( O1 o) M2 W- n( Aend;        -- of the method: w5 `7 m7 A/ ]+ }
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 $ j' g! r- @' \( c4 _& ^
; X9 W2 L+ }0 t$ @  x; K
这是AGV_putin中arrive的method。
5 T& Z( Y5 `3 T9 {0 ~, p. _
8 J7 H0 {3 B. X: {% x当到达物料速度越高时,这个报警更多,
. C% s+ C( Y2 `8 j! z( A7 }5 A可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。3 P* W2 S- ?* ?( c! X0 `
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
+ y+ c3 K! f$ D) M0 E' ~& @6 z9 Q' V2 `
另外一个小建议,就是move,所有的move都可以这样" c1 B, C5 v+ H/ F  \
if not move() then debug end0 ]8 f/ t3 b/ Z+ @/ k4 S. b. u
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
& w4 m0 h6 I8 y: d% hplant simulation中的free libraries有AGV模板,
; P4 R" o7 ?+ ?3 F, m8 [5 u2 Y里面也有案例。
) I! E; d1 E: Z8 J. Z我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。) M0 l' {$ V. P, l, N( i7 R7 a+ N
2 B1 c4 F  u7 m2 r1 B/ X- y
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 & d' l+ n) D* t" e

0 u5 x4 |. r" n; ~  x0 k$ T- _) x那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 " m! B4 Z+ q: ~0 e5 k9 _) n
这是AGV_putin中arrive的method。8 v5 U/ j6 z) i6 M0 o8 j. U

; `, n0 J& M. x1 N7 e# S  I# }* M当到达物料速度越高时,这个报警更多,
. k+ m: H% K- s3 I
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-29 02:58 , Processed in 0.018612 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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