设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8639|回复: 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'& I+ N0 b! U# \. p- h/ B/ R0 @
*/
  F' y, w3 E4 f) Lis
1 g3 ?9 r8 K6 k! y        part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ v; Q( r1 {" X, \, ]
do$ c/ ^- K% Z  U2 ]0 ?' _/ N
        Lan := rootfolder.Internal.Tools.AOLlanguage;
3 S" i# i& o  f! S        if current = @.Destination -- else return" @  U6 E- n5 w9 z. c! g; W2 R9 j9 _
        then* r6 \) j: L* b( M2 Y
                @.Destination := void;! P. R' o4 T: A0 v- t; i
                if @.occupied then' h& L" W/ |* w/ I
                        part := @.cont;! b: ^1 x) L" l: [, \* A
                        @.transpOrder := void;
5 |! ]; ^' E% d                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ K0 K+ C( J8 ?7 z                                @,root.eventcontroller.simTime);
; C8 a# f0 i7 M' v, V  j7 {8 ^                        @.HasOrder := false;
( G+ l/ |2 Q2 X" c# l. `9 ~                        @.DrivingHome := true;
" F$ {0 f/ b% K# R" d. r4 ?7 G2 E                        rgManager.tryToStartTransOrder;/ v4 \% C/ F% Q+ [8 m
                        if @.Destination = void
" h# S& i& K0 v8 ?                        then -- no transport order for vehicle @
+ v9 u& }+ ~) h                                @.Destination :=1 f# S5 T! T6 h3 `
                                rgManager.nearestFreeStation(@,track.~);
; w" [: j( O# P0 s                                newDirection(@);   
6 R, B, q9 C* r. Q# A                                if @.Destination /= void then
8 t" g6 ~- I. p4 ^6 f/ q                                        @.Destination.NumReservation :=5 a! s# c: b+ H$ z* J, O
                                        @.Destination.NumReservation + 1;
2 w3 [* P1 B7 F4 n, q                                end;$ f0 i$ q1 Z% l. v$ i( [9 B' t
                                @.CurrIcon := "drivingHome";
4 _" L. @0 b8 J8 @# |                                @.DrivingHome := true;
+ }5 ?1 i5 V. z/ T6 p% m; }                        end;
7 @1 U0 t% h( f7 ]8 L# [                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 E# `6 E; ?6 s$ ^- C4 l% O                        part := @.transpOrder;
; y2 N9 U, l+ [6 E4 K                        part.move(@);-- load part
# |* x; A) t1 V9 P+ k                        @.CurrIcon := "load";
0 _8 U* S: S1 j& [( v* G* w7 Q# ]                        GlobalDistObj := part.globDestination;
- B$ D* g: |# G( D+ g% `/ ^                        assignLObj := rgmanager.rgAssignL;% p/ p& H8 M* t) L4 A4 \1 D& c
                        row := assignLObj.getRowNo(GlobalDistObj);/ X: E: H- C, D  M8 ^6 e) [! D) u+ \
                        if Row = -1 then -- since 70
- d- ?7 d; m. r6 p% j5 `- G                                if lan=1 then
9 ]' F. c6 ~: I1 a0 ?  w% C                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% e; h& C& r/ L
                                                to_str("in der Andockstation: \"",?.~.name,"\""));2 ]! X4 e- x: Y7 K/ k7 ]) @2 ]
                                else
3 n% ^, V8 l1 y                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 Y2 F/ [; Z* ]! U                                                to_str("in docking station: \"",?.~.name,"\""));                               
! S, H. t2 V, m) C" Z' X                                end;
2 q  T2 `- A6 D0 ?& G                        else; a# t% ?) {  m" \) X
                                @.Destination := assignLObj[1,row];+ @6 n! X3 x  h# L
                        end;                       
* j  j" s: v  z  C3 X& ^                        newDirection(@);2 z6 D  X/ d. Q: V% {
                        @.HasOrder := true;
1 p, U4 z" G3 H2 L                end;% H! f/ X9 ^0 l+ v  `  V. x
        end;3 I, W; ?# b$ q9 k6 n6 F
end;        -- of the method
; |6 Z% x7 m4 h/ V
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 * x! x/ J, U. L" q3 r- G8 M5 F
+ l; k2 X- r  n# k, R' J. n
这是AGV_putin中arrive的method。9 U# ^; K: X; |6 z# ^  X
+ a& ]+ o9 N' d1 U8 |8 j
当到达物料速度越高时,这个报警更多,* J, O8 A9 E- n% `) O1 @; B
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
3 f1 X, F3 q0 @程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
+ @0 U- _9 y* f7 O8 N; Q& G3 N. F9 j
另外一个小建议,就是move,所有的move都可以这样
6 d2 i9 }" k3 @if not move() then debug end
4 b0 ?- l8 ?: P8 R这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
( \! Q: H( m& ^) Nplant simulation中的free libraries有AGV模板,
  Y! z3 v* W5 g3 x0 t, _' s里面也有案例。; o& Z% ]8 R2 n$ Z3 o9 e* x
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。9 I% Q. J( N+ j, y% e

4 T" v$ @" C1 f! V. B我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
: r. q& K" h: ~+ ~4 X& i: z
9 ]5 A; l: o4 V" v那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 5 R& L" S" e0 |
这是AGV_putin中arrive的method。' [0 \  P" _5 {9 f8 O4 T1 X

6 X8 i) n9 r2 w) w% x# N6 S# r* Z当到达物料速度越高时,这个报警更多,

; A4 ^; Q1 Y. x, w另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-17 14:54 , Processed in 0.016705 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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