设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9327|回复: 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'
6 W% j9 B+ W% a*/1 ?+ B& G5 @9 f+ s
is
2 b. j  Q* N# _: f- `; t        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: h5 E+ A! N0 ]do
! \8 _; C1 o" F3 E: m        Lan := rootfolder.Internal.Tools.AOLlanguage;) I+ }* w5 q! K9 Z; l
        if current = @.Destination -- else return0 y8 a2 U; P# l+ d
        then4 l' h7 u/ z3 k) m
                @.Destination := void;7 Z' j! |1 j2 u/ ~2 g
                if @.occupied then
* N. l* m/ s7 E0 j! C- z8 P; I& |                        part := @.cont;/ x: y9 N* X% `; {4 l
                        @.transpOrder := void;
: c1 {7 y6 \2 J) K+ c/ [                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 Q) s. ~" c8 L9 @6 p
                                @,root.eventcontroller.simTime);
. L- X; ^8 e, Q: \" i- v% U) z                        @.HasOrder := false;6 U7 S7 X- n' s$ Z1 T% V
                        @.DrivingHome := true;
& _2 Z& @  e: u5 R* W9 E  P. c  U                        rgManager.tryToStartTransOrder;
. _  Y1 j) ?; P  B3 @; U* j9 d                        if @.Destination = void
$ `! p. I5 H& Z3 H: @                        then -- no transport order for vehicle @
" j7 N/ _8 Z- Y$ ]                                @.Destination :=
3 d/ S2 e8 E  L                                rgManager.nearestFreeStation(@,track.~);
  A; L9 d7 W- L) U0 B- ?                                newDirection(@);   
/ ?4 o7 B) u; _) S8 S4 X                                if @.Destination /= void then
, \6 N# F; h, M2 l7 J                                        @.Destination.NumReservation :=" g! ]+ k5 ?& a& x! h) W; A
                                        @.Destination.NumReservation + 1;/ {) U3 _( C4 E- m
                                end;
: c% n; n4 R; h/ D7 Z5 ~                                @.CurrIcon := "drivingHome";+ g  ?3 b5 `7 h6 `- B
                                @.DrivingHome := true;# {, H3 L2 }. u% r$ r
                        end;
& N( d% x7 W/ m3 [                else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 J/ v& \, |2 ~# U: X
                        part := @.transpOrder;
9 l4 D# X$ z) O* P" F. Q3 _# A                        part.move(@);-- load part
* V" F% W" L% z                        @.CurrIcon := "load";$ }/ `" g8 r: S1 d% R2 E  g
                        GlobalDistObj := part.globDestination;
. s% i" P. V1 g$ s: |% m                        assignLObj := rgmanager.rgAssignL;
# j! |+ E- l5 a- v                        row := assignLObj.getRowNo(GlobalDistObj);& a- i' O+ w' o  x* u
                        if Row = -1 then -- since 70
0 |; I( w1 @! Z" y6 v2 k                                if lan=1 then
+ S7 R5 {4 \& E2 U% \                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' a  O  y! k. u                                                to_str("in der Andockstation: \"",?.~.name,"\""));
" h4 m3 V- x7 B                                else
0 w$ z! w0 U3 n9 j- T6 I! w! ^                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! L" I6 o. g& Q8 K; C
                                                to_str("in docking station: \"",?.~.name,"\""));                               
; l5 A# D/ {2 D  l                                end;
: Z9 h  x9 u; `3 r& |8 V1 b' [& H+ O                        else+ K' e! k) b6 ^( q3 B5 |2 `
                                @.Destination := assignLObj[1,row];
4 a$ F% q4 K6 h" T) M) E                        end;                       
' j2 R1 `0 i$ O: p) f& k' L9 ?" x4 m                        newDirection(@);/ X! K: h1 {% Z) Y4 n( K
                        @.HasOrder := true;' ~& T# p1 Z  T
                end;+ I2 I+ L5 s( D' Y
        end;
% `' m1 ~3 }) q7 Q! H. _end;        -- of the method
* Q  [0 i9 Z) f9 q, I$ t: I# }
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ' P4 W9 a; u1 T+ }3 s! L
4 Y8 r' E8 j' l- Q$ F
这是AGV_putin中arrive的method。4 L; t- Q( Q3 w

7 Q8 T. V% m) O9 @' R当到达物料速度越高时,这个报警更多,
5 E- Z7 P/ J" Q2 C# ~9 `. d3 J可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
7 M; [: T( d- s0 y7 c( X: L程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?. q, c/ O; o7 ^! v* R$ E2 a! Q/ ]0 }

1 @. y3 X+ }0 O  B6 _2 w" }另外一个小建议,就是move,所有的move都可以这样2 J' A9 u) x6 o$ l; x# ~
if not move() then debug end
) A% F% @* l( S$ y! W2 b  N这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
/ f9 r2 Y) Y5 B; X% V- v3 `plant simulation中的free libraries有AGV模板,
! q9 H0 r/ N: k; y# Z里面也有案例。& ~; j# [7 V: Q- J) |# e) p
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。+ W" K) M& _* g: E% Z! d; L
5 A- }* k; G, Y% s9 `* R8 ?
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 , z% `* y  u2 F) R4 q  G$ N& P' X

' K! l& X* \3 v5 Q: A那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 7 W0 T& j8 u9 E; R9 S: g& K
这是AGV_putin中arrive的method。
9 ]; l2 y: v4 h8 J6 }$ [& P' Q) S" A3 W. B" @
当到达物料速度越高时,这个报警更多,
! X4 G/ r7 C9 F8 H, J2 X$ c
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-25 14:07 , Processed in 0.015318 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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