设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8947|回复: 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'
4 `, l% U% l& e  \- c( c/ r*/9 m! l: x0 q& e' Y( Z' q. W
is
4 a( K) B9 E  s0 u  s; z" K1 q        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 N& b/ w- m, ydo
# V" Y9 x7 k- f& p! e8 r% I        Lan := rootfolder.Internal.Tools.AOLlanguage;
; X0 P. q/ K6 [! n8 O; C: t4 F# N- Z        if current = @.Destination -- else return
: u; a0 \" r3 p5 z        then
  H) v  c1 z; g( q2 M                @.Destination := void;
/ a: Q2 u) h* V7 b: i                if @.occupied then
) u* V* Z8 h  ]% i! x                        part := @.cont;. \8 [8 z1 a9 x4 T8 y- O
                        @.transpOrder := void;# X2 Y# a( d% Y5 E8 j& |
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 o2 b* Y: X6 G                                @,root.eventcontroller.simTime);
1 |# y, ?+ n- D$ J                        @.HasOrder := false;
& f- S4 v! h9 c                        @.DrivingHome := true;
% Z- V& L# ]/ B" c! |                        rgManager.tryToStartTransOrder;! O: i5 U; g2 X; L( T
                        if @.Destination = void+ e1 v$ P' V" p: l
                        then -- no transport order for vehicle @
, v$ \% x0 l, E6 }# V' j                                @.Destination :=9 G/ {+ U2 M6 T( l7 I; N( ]
                                rgManager.nearestFreeStation(@,track.~);# I) G$ d4 H$ P' {4 A3 M0 O+ K
                                newDirection(@);   " m+ H- f: L: Z8 p% }: C5 ~7 \
                                if @.Destination /= void then. X6 p% B9 S+ p  H! s
                                        @.Destination.NumReservation :=
* \7 y' U# x4 @2 K                                        @.Destination.NumReservation + 1;4 W6 x3 L4 n$ V  X3 Y
                                end;# I7 B) _; |$ X1 |4 J: X
                                @.CurrIcon := "drivingHome";" I& w+ t- N3 y6 C9 t/ w
                                @.DrivingHome := true;1 M' p7 R+ c4 U5 ?2 [$ `7 R
                        end;$ ]! ~6 G  P& ?
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 y, O/ g, f9 B0 H7 u
                        part := @.transpOrder;
9 ?& E, h+ Q1 _4 e  X) ?+ b                        part.move(@);-- load part  X6 R9 a- P/ n- T5 F
                        @.CurrIcon := "load";. i* [* U1 j4 g: E
                        GlobalDistObj := part.globDestination;0 f8 U+ }  ~$ X- c, E
                        assignLObj := rgmanager.rgAssignL;
( H3 i# p; Y) B" X: P                        row := assignLObj.getRowNo(GlobalDistObj);
. u( L+ ]2 K* ?3 R                        if Row = -1 then -- since 70
3 {8 q: r! l; d2 I                                if lan=1 then
. T' C5 _: f8 I4 G% A1 j1 q' r                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 C' R! c! ?( `0 \* t                                                to_str("in der Andockstation: \"",?.~.name,"\""));
0 l( e: O3 `$ b9 T$ n# ~" P                                else' F$ l9 x7 J* x1 g; D$ G8 W; j
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* O6 q+ t: e' X" l# p                                                to_str("in docking station: \"",?.~.name,"\""));                                , \: `0 B' |" X! M; ~7 E0 F
                                end;, F: E& {5 V- ^. q" W- {* a
                        else7 G- K4 h- `( e  K7 W) ^
                                @.Destination := assignLObj[1,row];
4 F% k' `  P: V6 f1 g0 g0 H$ A                        end;                        ' r& H( f" J0 r% |% [4 a1 {" a
                        newDirection(@);
: L; C& z5 }- o$ T                        @.HasOrder := true;: \* \" D+ ?- X1 c2 m  R# E$ m. H
                end;9 K% K! k. A1 |% W' P. m5 ?
        end;$ e: e+ r' G: {) ?
end;        -- of the method
3 d8 {" G: j! M8 q  a5 e6 i
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 1 `; T# a2 k' `( ?& w
$ n$ J) `3 i5 S
这是AGV_putin中arrive的method。' x! M  j+ W) `

- Z+ Y: K. B; O0 i! ^* G当到达物料速度越高时,这个报警更多,
8 X7 v% x0 t% _% D$ `1 l可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
; p% E# }: C. A9 L3 x6 z# }程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
5 z- H6 l. m" m4 ?$ x, c  X  B; s9 U7 P
另外一个小建议,就是move,所有的move都可以这样3 a, x% ^3 {  p& {8 A( S! K
if not move() then debug end5 X' v1 l/ b8 J# T" J
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。9 i* x/ r% u: ?' ?
plant simulation中的free libraries有AGV模板,
1 q+ T# ^- y4 F1 Y% ~" t) K: L0 v里面也有案例。
( G5 r# T4 h2 }0 @( {我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。, t  Z' r3 F: Q$ d4 @

) o& c* E" G8 i: ]/ Z我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 Q7 m% D+ p. w' Q8 e. v* Y4 R, c: p) a
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 & p+ f6 F  o+ o" ?( c
这是AGV_putin中arrive的method。$ V: W* X# n" H1 x* P( Z& \
# r4 S, |2 k" i/ j
当到达物料速度越高时,这个报警更多,

* o8 \' C- l& Y( ?另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-5 19:16 , Processed in 0.018077 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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