设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10187|回复: 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'
: }. U+ v9 d0 B6 ?( r( I6 Q7 }$ N- O' t*/
3 t' z* {0 o# _: f/ S& M" U$ }7 ais
1 }6 l6 S+ W5 h* d' Z& e        part, GlobalDistObj, assignLObj:object;row,Lan:integer;- O( J( H4 {( D# p
do
  K# T. ?) b$ D, Z5 R        Lan := rootfolder.Internal.Tools.AOLlanguage;
( i' A! A* h, X  r# H: J/ A3 \# \) l        if current = @.Destination -- else return
+ v& x2 z8 Q0 \1 x        then0 q# N, _2 z* P
                @.Destination := void;
! ?: ~4 Y- u* s+ `- {2 Y4 x( e                if @.occupied then
7 W( e( n' x% F4 f                        part := @.cont;" m! s4 g. x; q( F8 F
                        @.transpOrder := void;2 s. D' _6 n* d' r1 Z! Q
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 y6 H0 o6 ?5 m
                                @,root.eventcontroller.simTime);! i+ P/ x7 i: j* C1 ?, m
                        @.HasOrder := false;& L. z0 s- G7 u
                        @.DrivingHome := true;0 k/ k2 K& ?6 `( \3 r& b3 \
                        rgManager.tryToStartTransOrder;% o& ~0 A& U$ N  t; E
                        if @.Destination = void+ _& A9 G5 P3 t! p( E6 b. j( k
                        then -- no transport order for vehicle @# o2 f1 @- @% l1 X7 z$ m7 g# ^
                                @.Destination :=
, X& O2 l9 l) H) O4 E; ?% U5 |                                rgManager.nearestFreeStation(@,track.~);! y' N& _. j8 \( q- z6 C  j
                                newDirection(@);   6 P" V; A* i# ?7 k
                                if @.Destination /= void then
; _3 V$ R, @, i9 \                                        @.Destination.NumReservation :=
* ~' Y; l1 I, B+ B                                        @.Destination.NumReservation + 1;+ m  z6 y4 `0 Z9 Z& p$ `1 q: `
                                end;
' d% N1 L4 _' a8 Y2 N( `! q/ T                                @.CurrIcon := "drivingHome";9 z: B8 z$ ]- n" L6 t6 V
                                @.DrivingHome := true;7 {5 m6 I% i9 j* l, z
                        end;
) S" ~* K- E6 c9 h2 w* E) [: p; T                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 N, Y' H: F6 k, F                        part := @.transpOrder;
5 |+ E4 \9 K% D" @) o                        part.move(@);-- load part
7 N7 P, y2 O8 Z6 o" g2 F! `! L5 Q                        @.CurrIcon := "load";
4 _( s6 Z8 j, h( ^6 N                        GlobalDistObj := part.globDestination;
0 K. f1 G0 R% _- y; W                        assignLObj := rgmanager.rgAssignL;
* o! W4 i0 b; O- C: `1 }                        row := assignLObj.getRowNo(GlobalDistObj);$ z2 J4 T* t. e" ^4 C
                        if Row = -1 then -- since 70
: r. O! E9 w3 g) u                                if lan=1 then# y: ?/ B8 w% l
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 ^3 v( f7 A9 e7 A9 [
                                                to_str("in der Andockstation: \"",?.~.name,"\""));7 p% i% s9 a5 U
                                else* [7 f8 _1 t5 H) _. |" ^* n
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% B# ^' u* \) T0 d+ D; I                                                to_str("in docking station: \"",?.~.name,"\""));                               
# v4 L" p' X6 n  n8 J                                end;8 n( K- K# s) ?: u: E
                        else7 r- u. W  |* a2 C
                                @.Destination := assignLObj[1,row];
0 y% o+ ?- W; h, |& o                        end;                        2 h* c. ]1 q, h
                        newDirection(@);7 b! z" I& A, m2 q
                        @.HasOrder := true;
- B4 M. K2 U4 F, f8 F                end;! O( Y4 q+ A. {* O- _- r
        end;
9 U+ o- a4 ]% C& l' A% e0 Fend;        -- of the method
" j3 ~+ s9 F; K" Q, Q& P4 b
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 " }& B, y8 L, o/ H' s5 x+ I* L
/ c% T) S( J, J# n0 N
这是AGV_putin中arrive的method。: V, M0 v6 [' s0 v+ s
4 ^; U% `" M. K
当到达物料速度越高时,这个报警更多,
7 G! u' y& P8 u0 ^可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。7 C" u3 ~1 e* G0 f/ }" I# l
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
9 @1 B  v9 v1 T$ l2 B# I
0 l4 I) z  u% t+ F+ t另外一个小建议,就是move,所有的move都可以这样) f& H8 C7 P1 y% M
if not move() then debug end
1 C, S" w2 ?! s4 J/ p这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
2 a" O# \! F- P) N0 I1 |plant simulation中的free libraries有AGV模板,/ X% O2 m( q4 C, c4 r3 D
里面也有案例。
6 E2 D8 h8 m& r7 s我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。$ k; F, u1 H1 G2 g  }# y
: z0 N: A$ f. d4 s; S4 L0 R2 a# u
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 8 l' p# W$ Q. y

7 q8 ?# ^! b& P4 }7 \4 W, [. b那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
6 b8 s+ \) W. b+ D这是AGV_putin中arrive的method。( {. @8 w' \  Z/ `" S, \- j. x1 ]7 Q
6 r$ F; D$ r" M' c9 A
当到达物料速度越高时,这个报警更多,

0 E' g6 |/ q$ [另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-19 01:38 , Processed in 0.014314 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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