设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7211|回复: 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': W( p0 o' Y  Z+ j
*/
" F( \; X& k+ a5 I7 a# w2 }5 z3 n/ M9 ^is
$ Q" m- S# [9 q& ~6 y1 V$ R* }        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" Y8 P8 U  q+ Zdo. L, J6 O' }$ N# |
        Lan := rootfolder.Internal.Tools.AOLlanguage;; d7 V# z5 A8 e8 b$ T" t7 N0 l5 P, Q6 }
        if current = @.Destination -- else return
% x" S- ]3 t) a2 {        then
5 ^" G. v6 q( p1 e& Y4 j' F                @.Destination := void;
4 d& @! j; d- _# \& `) ^                if @.occupied then# U7 e: Y6 g+ }- I: ?& `
                        part := @.cont;
0 y! H8 R( a! |" ^$ S- k5 a8 H                        @.transpOrder := void;0 Z) b2 k% g. X. V
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 C9 N( U, v, L! r7 {, e                                @,root.eventcontroller.simTime);+ A! l5 o2 n0 |$ [
                        @.HasOrder := false;
3 ?# `2 m4 q- u& m& x3 D                        @.DrivingHome := true;5 `6 s8 c8 P; S) w, B
                        rgManager.tryToStartTransOrder;! J: T4 b- z/ u1 e0 }# `- F, ~
                        if @.Destination = void
+ @6 h" n% E, A                        then -- no transport order for vehicle @3 U! ~# `) q0 w) [
                                @.Destination :=& l" c% ?* E1 }8 L
                                rgManager.nearestFreeStation(@,track.~);
0 }- n+ d; S6 L3 W4 s" k, f                                newDirection(@);   
- E8 a6 V0 I2 y: A* T; T                                if @.Destination /= void then
  Y9 M* K( q. P) g                                        @.Destination.NumReservation :=& A* L; J* z  L1 o% k/ S0 {$ j
                                        @.Destination.NumReservation + 1;8 R. b( g2 ^6 x/ n) b9 O: g
                                end;
. D7 A# W, h5 F: q3 v, {                                @.CurrIcon := "drivingHome";* x; l* [, C2 _9 J$ l9 R% v) X
                                @.DrivingHome := true;, n& P% n5 U7 i. F( d
                        end;6 B, J- A- I5 _
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
  ?& r& m, e: d) ^+ K. `                        part := @.transpOrder;
  y( ^7 W! V, q* V4 o0 i4 ?" Q                        part.move(@);-- load part
7 F/ O: w; k8 _$ U9 Q                        @.CurrIcon := "load";" Q9 H% Q4 L! k- B0 Y, ^
                        GlobalDistObj := part.globDestination;
0 p- H. |/ s+ J$ Y3 d/ ^, R- T6 r                        assignLObj := rgmanager.rgAssignL;
# V) H: v0 i" ^) r                        row := assignLObj.getRowNo(GlobalDistObj);
! p  S5 I& ?! W/ X7 u, V7 E                        if Row = -1 then -- since 701 y! t5 ^& y0 P  w' Q
                                if lan=1 then
- S( w/ d+ k1 l3 _3 t                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 f3 w- Q( v1 L0 B
                                                to_str("in der Andockstation: \"",?.~.name,"\""));6 W7 x* R! I" ]' K4 W+ L
                                else5 N+ u" S5 {, E! l3 K
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ U5 _; d, [$ i                                                to_str("in docking station: \"",?.~.name,"\""));                                % S( K" l4 k/ S" p4 W. U+ r7 x
                                end;+ }. \) ]9 V1 q
                        else
6 r- d, e5 }4 _* a' ^! ?7 w                                @.Destination := assignLObj[1,row];- @; j" [. V- T) |$ z) H  \4 l+ z
                        end;                        9 `6 `6 {' R. t. |) r1 a- _
                        newDirection(@);
/ b; U- ]! {+ {9 u                        @.HasOrder := true;+ c8 P# e$ b# E% c6 o
                end;
3 _$ K8 n/ |' u' |        end;4 N2 c) \4 j; |- d
end;        -- of the method
9 t+ k7 g& M& `2 [( m. T
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
4 e% |  |* I+ @7 D% |
; t/ G6 o4 W& A$ L这是AGV_putin中arrive的method。
- K1 N% E$ N6 Q% u. z" f
/ e/ a" [( R, `当到达物料速度越高时,这个报警更多,
' A$ F- A1 s, ^' h1 w, ^可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。( e6 n6 o/ j! {5 S! h
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
& R& a* k" n% P
  Q* k+ A+ i# ^  W+ [+ z另外一个小建议,就是move,所有的move都可以这样. j% @* ]6 q: \$ z. A
if not move() then debug end
& G. m+ Y9 O: j& V2 E这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。$ A6 I1 i6 |. G4 V1 n) S6 f/ y+ b2 u
plant simulation中的free libraries有AGV模板,
& p) c) R, |& F+ J: s里面也有案例。
1 i, q. p- h  P% ]我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
/ o; ~( S& Q1 }% }. C. ?2 w- Z, X! v  J. ^! w
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑   c8 R$ f/ }* h6 m' @
7 o4 Q% e  k3 q- t; x& @; ^! d
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
0 r) A! t& K) N! F) V这是AGV_putin中arrive的method。
- T- `! ?1 O" Q8 D9 r: V/ d+ V/ Z, ]1 T# k
当到达物料速度越高时,这个报警更多,

% e* y- w& N/ `7 d7 Q: I/ G/ ~另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-27 08:48 , Processed in 0.017855 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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