设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8553|回复: 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'1 w7 e2 S  F2 T
*/
4 ~: s5 q) k; j$ N1 Jis7 M9 ]7 h1 z1 c: w- g
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 S2 i* i9 M* j* H/ u0 Tdo% [. _7 _. m5 s7 P0 z/ X
        Lan := rootfolder.Internal.Tools.AOLlanguage;
4 Q; G3 [) V1 }6 c        if current = @.Destination -- else return. r7 i2 i- @. V5 @: z
        then5 [, \% I2 @9 G3 V' u) n5 ]" s
                @.Destination := void;/ x* a- s. Y7 G; g# `$ ~
                if @.occupied then: C' P" V7 j% N9 ~' h) |- U. G
                        part := @.cont;3 U& {7 i9 ^0 [
                        @.transpOrder := void;
: `% L" j; y5 S7 A$ _                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: O/ e5 x/ ^) b/ \8 Q1 c                                @,root.eventcontroller.simTime);
4 H  }/ u( X2 v- L, Y                        @.HasOrder := false;
6 s8 Q* D) t2 Q% h/ l% ?                        @.DrivingHome := true;! K  H/ t% _) }- w2 t2 i. y
                        rgManager.tryToStartTransOrder;
0 ~: n2 ^/ A/ d  G4 }) R. y                        if @.Destination = void
/ P: d% S% d2 z6 N- n                        then -- no transport order for vehicle @
: e7 n, M0 `+ K; C) ~) [1 [                                @.Destination :=
$ z. Z& ^/ o. f( u& w, H                                rgManager.nearestFreeStation(@,track.~);! n$ A: b( D1 y) [9 j! ?/ }7 U
                                newDirection(@);   ' j4 S; F5 ]! z; F/ X
                                if @.Destination /= void then* A9 i, M( t$ B0 |" R2 v( O
                                        @.Destination.NumReservation :=' k. }  T* x4 D# @! T5 v
                                        @.Destination.NumReservation + 1;- T  v5 P" K& l  {/ @& J% [, S
                                end;
, l  S$ \+ `$ i: }, o) z6 h( l                                @.CurrIcon := "drivingHome";
, b; E" R/ J) H2 h# \                                @.DrivingHome := true;  W3 Y, v- L( T  T, x" h0 O
                        end;
) F, x* C+ d6 M6 m$ f! d                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 W( p  H2 U. g. a                        part := @.transpOrder;
6 g4 E$ H7 c3 D* Y$ T! P) m# ]                        part.move(@);-- load part, O7 ]  `4 q0 M0 v6 q5 u
                        @.CurrIcon := "load";
* T( i1 W4 P' h9 ^) |                        GlobalDistObj := part.globDestination;
" d. G2 Y* |' R( i) c                        assignLObj := rgmanager.rgAssignL;
. [) n! a: {+ X2 b                        row := assignLObj.getRowNo(GlobalDistObj);! |3 G1 M+ l0 o& n5 K
                        if Row = -1 then -- since 705 T( w' x/ P! v4 P) `1 @( Q
                                if lan=1 then1 E; y6 l4 Z: d5 |9 l) A
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! p. C$ q- m( H, k9 M4 P% `
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
8 |4 w6 @* _$ c9 y. \                                else6 L. `% [2 r6 ~2 Y: V/ E
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& ]  A% k/ W* k% |
                                                to_str("in docking station: \"",?.~.name,"\""));                                8 [. u8 u$ E+ |- R. o9 I9 t  B
                                end;
4 `% L8 M/ i, \6 J" p: I. o% @1 X$ ^                        else
. k; O3 J- i8 l                                @.Destination := assignLObj[1,row];/ m; S8 G6 u5 j. U) m( s( o' b
                        end;                        $ g4 _( d; g) N3 x. f! _
                        newDirection(@);1 Q0 ?# }5 V2 c& Q; K
                        @.HasOrder := true;2 `/ K5 s& c- ~. F7 I
                end;1 u+ d  |4 R1 m( V- Z: F& h( ?( U
        end;; C; z+ y% D5 j& _1 r5 g
end;        -- of the method8 B5 Q8 W  w: l% M
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 , p" z/ H* J: h  r9 }
1 G' I# d! ~; p; |- H
这是AGV_putin中arrive的method。
/ c* e3 E- e8 ~; d8 p( [4 a
4 f" h8 N" X8 X  k7 I, |5 A当到达物料速度越高时,这个报警更多,
+ \. B/ j, k0 N1 {; z" p可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。" Z$ m9 G+ Y+ ]0 u8 t
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
' s$ r6 Q. N4 k$ q. D' E/ @2 t; f3 E8 c2 C- J. k. l
另外一个小建议,就是move,所有的move都可以这样* a  d* M+ g+ ]( m* y
if not move() then debug end6 g9 l. O* I9 P1 z, m! \
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
& }+ R& y2 _; ]2 u3 {plant simulation中的free libraries有AGV模板,
2 t& N: ?. O" [1 l6 X- A- M9 {里面也有案例。0 R  u2 O2 v4 ^& u7 O# m' {
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
) V* j- L% L3 _$ F+ q9 k/ A
+ @1 f/ `; D! l* n我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ) f3 k( x" j! [
% o2 m9 F# K0 L$ k4 B) P3 `' w
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
  p9 h! [* O' r6 K5 n. B这是AGV_putin中arrive的method。
$ J0 E1 {6 N" X9 T: W+ k$ d. p0 V( W* ~4 _. v2 Y3 a6 P( l
当到达物料速度越高时,这个报警更多,
" L0 l  B( [' F
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-11 06:47 , Processed in 0.015142 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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