设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9083|回复: 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'
3 Q' L! q: c& U, M% {  H*/
; w5 w# A- ^* _4 ~is
2 V1 k" G( U% c0 {3 J        part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 X0 @; p* U; q( y8 Q( P% a/ _
do
7 F8 M3 Q$ v  N        Lan := rootfolder.Internal.Tools.AOLlanguage;
/ c6 H4 S: _  F- @. ]        if current = @.Destination -- else return
7 p$ ]" g/ {: i: a+ @2 p% x0 L        then
3 U! J/ z" ~  U+ R! g$ L, r+ V, G                @.Destination := void;
9 [7 X# P0 P- w  J* M" a8 f' _0 z                if @.occupied then9 c/ v9 T& v! Q) p# v
                        part := @.cont;# K. Z1 v# R- D: `6 J( b
                        @.transpOrder := void;, n4 T$ H" i  H" @: b% \: t
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 F3 C& Q) ~( G$ ?+ m
                                @,root.eventcontroller.simTime);3 E' I" O( w  g* _3 T2 t7 i' j
                        @.HasOrder := false;* j) E+ Y" {2 z) z0 H
                        @.DrivingHome := true;
( O, j  C  x% [& B9 r                        rgManager.tryToStartTransOrder;
$ _) {) c! y. a' \0 p                        if @.Destination = void
* K1 J- C" G/ d                        then -- no transport order for vehicle @* ]% e4 [) s3 ~6 S; F
                                @.Destination :=
" l" \# z3 u+ M4 ~                                rgManager.nearestFreeStation(@,track.~);5 a4 K  E4 @* }8 h- p4 b
                                newDirection(@);   2 F7 l8 s7 M' F! i+ w
                                if @.Destination /= void then9 i1 u8 `; c% D/ z- A* h0 u
                                        @.Destination.NumReservation :=
6 i" H$ |6 u( m0 P1 E/ n+ Y, H                                        @.Destination.NumReservation + 1;- P' C  B& L# v# N8 o4 K3 F
                                end;. |# x9 ]% z1 {" M7 ?3 J# a
                                @.CurrIcon := "drivingHome";
0 G; L+ l- E: Q. U  \8 F- g0 K                                @.DrivingHome := true;
7 B- {) R4 u) A! g                        end;5 x! X% |, g% s" U: R
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station( _- z* Z/ ~4 n8 S. x  s  G3 {* u
                        part := @.transpOrder;3 \, a! I/ y) X" H- [1 @% V( [
                        part.move(@);-- load part
. X9 T/ t9 T2 U; G) S( p                        @.CurrIcon := "load";
2 ]9 B. a% B  u5 _                        GlobalDistObj := part.globDestination;
5 q6 z% m! d- e                        assignLObj := rgmanager.rgAssignL;
8 T$ d4 c8 V0 e$ n8 y8 h+ I                        row := assignLObj.getRowNo(GlobalDistObj);
. o/ s! \1 {+ k' @: f. {, }5 O2 A# }: i- c                        if Row = -1 then -- since 706 j' W9 u1 ]3 j6 z
                                if lan=1 then
* [6 o2 U, S4 n7 r9 p9 y8 P                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! L/ F# J! I8 b  ]6 {                                                to_str("in der Andockstation: \"",?.~.name,"\""));! Q/ a% h& x3 y( B* S+ t1 J3 X
                                else
* `3 |. ~+ t& y& u( V                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' x! [, v! _  {/ S* Y% B. \                                                to_str("in docking station: \"",?.~.name,"\""));                                $ Q! n4 o4 E7 a7 `
                                end;. z  T9 w' \! {9 F2 g
                        else
! u- i6 C# l4 g# s; f, K* ?) E; o0 F                                @.Destination := assignLObj[1,row];8 D$ \1 }1 [, V: I3 W: `
                        end;                       
( M& y, X% B% j% d) _5 t# M8 l3 f                        newDirection(@);
1 i+ K  u8 ~0 |                        @.HasOrder := true;
' q! n, U* T' {, {& G* `* ]                end;9 b/ H$ R! [; L! h
        end;( u% M- ]" t) S- G! c
end;        -- of the method
' J# ~5 A- H- `  v
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 1 T' C% U% K: q0 N1 S+ s
: d( ]/ |  P, J# X! L7 J2 {% o
这是AGV_putin中arrive的method。& J  Z# h* O' \

3 L2 B) |. B9 O& F1 f0 m' ~2 u& f当到达物料速度越高时,这个报警更多,
9 |  E1 E" E6 {) c6 P' t. s8 x可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。6 X' P/ s3 I4 p
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
9 f0 U+ f% W& _5 Z: B* _9 }3 ~0 \" Y/ x1 R- g
另外一个小建议,就是move,所有的move都可以这样% {* q! @8 O/ o4 D& r" p# b
if not move() then debug end
% W6 _9 w6 s1 ]0 B这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
' g5 `2 m  y* W5 a- y9 K; u  yplant simulation中的free libraries有AGV模板,  ]( \0 i/ }9 E* K& f
里面也有案例。" ~$ g- {$ [' ^- I2 t4 v; X6 b
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
( j) f1 F; k, K9 v4 l. I; d  L2 E2 Q6 r* _. C" L/ U6 f' H
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 H" e2 [& W- W7 D2 V) v+ i! Y& U/ H/ r, F( d/ |/ \3 l/ {. I2 M
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
4 |9 q1 G" q( Q$ [+ K/ E这是AGV_putin中arrive的method。
3 `8 v4 \; d  m% m& J1 U- d3 n* Y2 O: I4 g: C7 }& h
当到达物料速度越高时,这个报警更多,

4 L3 L' Q) Z" u+ B/ a" z6 N另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-12 14:20 , Processed in 0.016872 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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