设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6656|回复: 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'
+ R8 A6 c- E" M- A*/% H, m. ^; p# p  A/ E
is  a0 P$ W% Z0 A' c: U* K
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;! ^' f# b1 o9 M; _6 s  z* P' X$ L6 d
do
. V" y8 U6 W8 V! b. z        Lan := rootfolder.Internal.Tools.AOLlanguage;
& T( K: e# [; d        if current = @.Destination -- else return7 z( e6 {) k; T
        then
- l& w% u8 v8 h9 H, J$ M                @.Destination := void;
0 ]/ {% ~; M4 g6 q, v2 s, M' _                if @.occupied then
3 N3 O$ i3 t6 q' T' ]) ]: }* N+ S* z                        part := @.cont;, Z8 w: H0 e4 i3 c! W5 p# y: s
                        @.transpOrder := void;  e" P( q+ Z4 ]$ Q1 _
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. d% M8 x& s- }9 Y7 W% g  P1 O                                @,root.eventcontroller.simTime);
' Z  ]" L# ?. p) D% H# ^2 M, c- e. Q                        @.HasOrder := false;. b$ s- C; q* P" u. }' @  a
                        @.DrivingHome := true;
4 p# y2 k& V) H                        rgManager.tryToStartTransOrder;$ p* p) m- O7 ^
                        if @.Destination = void
' S' @: y$ f, F                        then -- no transport order for vehicle @
: ~- c& h) m0 u: V' I                                @.Destination :=
- H; `" ~6 m, [; t                                rgManager.nearestFreeStation(@,track.~);
7 }$ [8 N4 R4 A4 V4 V                                newDirection(@);   
1 _' M6 l+ r% X2 Q& a, R7 G  L9 T                                if @.Destination /= void then+ k1 F0 K  g' t* N0 Z2 ]
                                        @.Destination.NumReservation :=% K  V2 ~% c1 ?3 u, T' b6 l! [, P
                                        @.Destination.NumReservation + 1;
% i6 @1 N, B3 z/ ?5 Y. }6 l' ]5 G- q                                end;
% k4 H; Y$ [" O$ }7 a                                @.CurrIcon := "drivingHome";6 J8 ^2 g' F/ |% x) v* ]% L3 i
                                @.DrivingHome := true;3 I4 K: h" A9 g+ H8 \5 C
                        end;8 D) V$ z# s2 M: s% v
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ r4 s  G4 q# v                        part := @.transpOrder;
0 c+ _$ n: M( o                        part.move(@);-- load part
9 i/ q5 i1 M" ]( X2 ]. S: M                        @.CurrIcon := "load";8 w& w1 F* \/ e, q
                        GlobalDistObj := part.globDestination;& ^  s0 K; O! ?+ U) Z/ O3 ]
                        assignLObj := rgmanager.rgAssignL;
$ b( B: z& |' n( `7 B7 M                        row := assignLObj.getRowNo(GlobalDistObj);% }, E. y' z' V' X
                        if Row = -1 then -- since 70
0 k. q' q4 O7 ~, `; N4 o                                if lan=1 then9 W# Q$ [$ l/ }; K! {
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. i- V8 F0 n* g4 \" R
                                                to_str("in der Andockstation: \"",?.~.name,"\""));4 y% O1 D1 c- m3 |9 ^! ^
                                else
( m4 D# g  Z  n0 B  V1 O, a+ b. d                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 S: g7 j' g& F4 G/ g+ \) W* V
                                                to_str("in docking station: \"",?.~.name,"\""));                                2 q8 U/ C$ P7 h% W
                                end;
% e. F) [' r3 W8 F. \  U3 ?8 E5 z                        else0 [3 B* t# p3 G/ z
                                @.Destination := assignLObj[1,row];
. r& |: L( N4 X4 a, V& O                        end;                        / m  `' n% N! Y; G
                        newDirection(@);6 i9 C2 O  K& I$ e! }% G; r" [
                        @.HasOrder := true;
: O7 L# p2 x0 \2 S, Q' `0 D                end;0 p5 ]" G' |- U" ~$ g+ c% J0 n
        end;
  m+ |# E0 V, V) k. w! Xend;        -- of the method
, G3 s" u3 }7 g$ v2 k
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 # ?- K/ Q; C- x6 {2 z; x; F' @
# f3 |4 j( R. X4 e" [3 V. D: _! Y
这是AGV_putin中arrive的method。* Q9 n+ ^2 `! R( j2 @' f" U' H, Y3 q

7 L7 M) j5 z  ]+ M4 M当到达物料速度越高时,这个报警更多,
+ d& L$ K. ]$ b# i可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
+ G4 K( V4 I0 e! V% D3 K& u9 b程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; C3 U) e% _' B* b' E" J2 s
: U9 J: @6 v; W0 c3 v# n  c/ G* H) J
另外一个小建议,就是move,所有的move都可以这样% j! D' k* c/ A6 f- x) o& N) H2 L
if not move() then debug end1 Y& O+ {  S8 `. ]: I' M9 n
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。& X5 O- M, A% b
plant simulation中的free libraries有AGV模板,
4 h3 [, c/ y  l9 k里面也有案例。
+ |# L9 ]; A; ~% g; s3 d: O/ F我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。4 {: w8 p3 x% S  n/ b

- w! e. |: y, p+ }" B我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 + w7 G7 G5 }4 k6 j4 w1 X4 h! [

8 p8 E2 }( ]5 t: |4 f3 F那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 / q6 K* R7 O6 S
这是AGV_putin中arrive的method。: S+ q! h5 P4 V" {: d4 r9 ^' `

# I$ G! m" e5 Y, l# Y: e当到达物料速度越高时,这个报警更多,

3 g0 X, l6 r* X7 Y4 M+ G  n$ C另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-19 04:09 , Processed in 0.025190 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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