设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8787|回复: 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'
' e. K. y2 q+ l3 U; H/ B$ ]*/" [& o0 f8 L8 A% W+ x4 [7 n# I& a  y
is$ w0 O( C) e; i2 A
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 O& t) G" |* x8 p
do6 M# C' d+ C2 C1 r- \
        Lan := rootfolder.Internal.Tools.AOLlanguage;
. V) C1 s; Q8 r$ s, Q1 Q; R0 l        if current = @.Destination -- else return
* A8 r1 V: ]9 m/ p! V2 h: d( x1 O        then
! W3 k7 A2 y3 k& Q. o, W: Q                @.Destination := void;3 y" R( G1 ~% n  q- _2 I9 c
                if @.occupied then
* n# Q0 j  W2 v                        part := @.cont;
3 h. I  U9 n. d! E0 t$ ?                        @.transpOrder := void;" R  V" l0 a4 }
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( D2 K2 _. J# B: ]* U+ [. Q
                                @,root.eventcontroller.simTime);7 b' Q& r4 T+ H' `; c
                        @.HasOrder := false;
+ b0 I! d2 p  L+ N8 I0 V                        @.DrivingHome := true;
( Q% ^7 E  `& y, Z5 m                        rgManager.tryToStartTransOrder;* p) E1 s; g& v6 y
                        if @.Destination = void# K- _8 q; Z: f' P0 {! f, m8 X
                        then -- no transport order for vehicle @0 }2 @3 r4 O) d3 X- u1 l
                                @.Destination :=% R" W6 T0 o2 `) j
                                rgManager.nearestFreeStation(@,track.~);0 K' T; \6 h# G! S
                                newDirection(@);   
3 ^$ ?5 r& ?! e5 y                                if @.Destination /= void then
( G: m- E# z: ?0 y, o3 P                                        @.Destination.NumReservation :=) F) p+ Q* @1 F  M; r: S
                                        @.Destination.NumReservation + 1;
- ]3 ?3 N6 ]8 R* s/ c3 q9 E2 h                                end;) K3 L$ a, d* u0 R! }" M
                                @.CurrIcon := "drivingHome";- B! Z7 c$ U" O1 f* M% p, F# t. `( a7 |
                                @.DrivingHome := true;4 T0 ~8 v/ e5 h: i
                        end;3 {& z# f  }1 C, C# [) X3 D2 {* R
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station" R5 l. A1 X+ [
                        part := @.transpOrder;3 a' Y, v' Y* `" a
                        part.move(@);-- load part+ t3 n/ D3 F  ]
                        @.CurrIcon := "load";0 h# |" O& D2 \
                        GlobalDistObj := part.globDestination;! A% K$ J$ x  `' t
                        assignLObj := rgmanager.rgAssignL;% }( H  n# {( ]: v
                        row := assignLObj.getRowNo(GlobalDistObj);
# ?: g8 x. d% b% E' X" d                        if Row = -1 then -- since 70+ W4 I5 U8 V# S
                                if lan=1 then7 ^2 m: p6 d: g$ t0 v
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 H/ R% j% s6 ~- j  u- f+ Y                                                to_str("in der Andockstation: \"",?.~.name,"\""));
5 f3 k+ v  e2 F# Z2 T# |                                else9 A, b6 P! F' n& f
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: B: R/ e4 Z7 a& H% U* n  y- R                                                to_str("in docking station: \"",?.~.name,"\""));                               
1 T4 k3 M- B' e                                end;
  N+ B2 n6 F. u/ @  J                        else
3 o% V$ ?& Y  p7 x$ q: I                                @.Destination := assignLObj[1,row];" t: r7 I4 M5 v1 w4 {9 Q
                        end;                       
% s/ k6 x& F! y, P( l6 `! s                        newDirection(@);$ v. D5 L8 s7 ]6 q
                        @.HasOrder := true;
, K* Y( h; @0 l+ s* v                end;
7 J" ^  i( u# x2 l9 _" [1 n$ N3 q        end;7 P: `5 O8 T' V: F, y
end;        -- of the method, A1 `$ h9 d2 O+ g5 l$ r
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
' r5 {$ m" ?5 H3 N" T+ B% Z9 r4 y+ i& T# u* u, X
这是AGV_putin中arrive的method。
3 V( J( _, U* U0 j: G) z
* x. `2 d* v7 R3 K! i- ~. t6 R; I当到达物料速度越高时,这个报警更多,
, l3 d# Y# B3 O, ~1 M' m$ Z可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
+ G7 O" w$ K" [程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
' g& w3 r* a' c$ h/ C7 J- c) @+ E" j! u6 }& i
另外一个小建议,就是move,所有的move都可以这样7 p+ \- |5 |/ A+ i/ ?& H
if not move() then debug end
6 y. W' {& a+ I, o9 u* J这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。% e* f/ s5 V/ ?" J
plant simulation中的free libraries有AGV模板,
6 f- D) S7 G  x' w里面也有案例。% ^& k2 i: ]: J9 s! p. C
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。( g1 Z- B' t9 K0 s) ?
* J; O; d4 ?4 @3 S+ |
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 2 K  W# g3 s# K7 `

) s' a- J) @" F* C) z那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 " W. B( A" X. w  `% [* O* ~8 ]$ Q
这是AGV_putin中arrive的method。. `; Q' a: g( S5 ^( ]' }
! h* O- X: H% Y* Z' d+ y6 K
当到达物料速度越高时,这个报警更多,

+ K7 H( ?. d/ {6 B8 [另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-26 03:34 , Processed in 0.017725 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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