设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9820|回复: 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( X7 M# t/ F1 u7 G. _*/: \! @' \, n+ [9 ]; D* a, u
is& E3 L% _* `" y6 _- x
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;" g6 t9 Q; |7 {! l5 p% X% X
do# i2 v) a5 {" u6 R7 V. a
        Lan := rootfolder.Internal.Tools.AOLlanguage;
; M9 K3 `( i" i5 W$ ^( W9 B        if current = @.Destination -- else return* E7 |% |) M. J4 T' y
        then
2 X( x8 p% h; Q2 R                @.Destination := void;
% Q6 b/ A) k) r/ n$ T1 g5 L: O, Z                if @.occupied then. C1 N: I6 B( X( @( c! R# m
                        part := @.cont;, p: f! D3 C7 U  A) F: A0 ~
                        @.transpOrder := void;8 `8 n, s2 O+ Z; G
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 p7 `. N' s" c. t. q! L" V                                @,root.eventcontroller.simTime);
" E1 R1 G5 I/ W* i                        @.HasOrder := false;% T* n5 {' W4 R# Q+ X. t
                        @.DrivingHome := true;
; U" F4 w# m, |" J                        rgManager.tryToStartTransOrder;- H, o# L3 m- x0 a
                        if @.Destination = void' L) j! E6 U6 s  w$ W
                        then -- no transport order for vehicle @' _" O4 V5 r( T! d' t
                                @.Destination :=
$ Q( b4 q- Y' ]9 i- R* d$ p                                rgManager.nearestFreeStation(@,track.~);
1 w# V% T' T& V1 R5 g! N$ J7 V* {                                newDirection(@);   4 f) V$ W8 I4 i' g( Z
                                if @.Destination /= void then
2 v. L9 [" {& M( w# N5 F3 {                                        @.Destination.NumReservation :=0 B3 S- q6 H4 D, ^0 Z( w
                                        @.Destination.NumReservation + 1;* Z* Y+ k  u! p0 {7 W% u- e7 h
                                end;  m; i5 \9 H" S8 G
                                @.CurrIcon := "drivingHome";
; g* S! h- _7 a) _% J. y                                @.DrivingHome := true;
/ N6 M* M+ z1 s                        end;
. ]& y8 ?- t) A4 @                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 u. V+ m: O4 g/ P                        part := @.transpOrder;
/ E' W1 B- E+ W/ e& T+ f                        part.move(@);-- load part8 j1 F4 C' ^/ j7 \& B
                        @.CurrIcon := "load";) D" m+ p$ Q8 \
                        GlobalDistObj := part.globDestination;
2 g& V' A4 L& ]" Z/ o2 I                        assignLObj := rgmanager.rgAssignL;9 {+ `: q* q: F5 p9 f
                        row := assignLObj.getRowNo(GlobalDistObj);
" k$ P2 ~, A+ V  F% J& q. I6 @% G/ Y                        if Row = -1 then -- since 70
! }. W) y" Y& @; L% b                                if lan=1 then% q% m9 t5 o+ m5 ^6 S/ S
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, N# l9 r, @  j' n
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
3 r+ y, |/ S! ^6 B9 _  v' q  Z. X4 t                                else
9 u. O5 Y2 Y6 _* p3 D; T  n& Y! g                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. Y) b. |, P+ E5 N5 y6 o9 I: m
                                                to_str("in docking station: \"",?.~.name,"\""));                                2 J' a) \* W; f0 |* i- S6 G
                                end;
( T! w0 ^2 @2 J& S2 `                        else
+ \- ?, k3 p1 j' A& E' u5 v1 `  e                                @.Destination := assignLObj[1,row];: a/ j. u2 R' _: I" ^
                        end;                       
% d& U+ [  ^' M. s                        newDirection(@);
. x8 @+ z4 Q8 M  d7 j, d) |                        @.HasOrder := true;
% e. @. Q1 B9 U# H                end;
5 G" G. Q8 X4 s: V0 g4 h. h        end;* G2 p7 l! G, v( b
end;        -- of the method
& v" f" O' ~5 o
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 + O! P9 ]  J  F) o3 x8 a

: _  V3 U/ Q4 N9 F3 n, a这是AGV_putin中arrive的method。8 g' V, s! h( f2 t, n

. t3 h' S2 }5 ^5 G9 e8 e$ Z4 A4 N当到达物料速度越高时,这个报警更多,% F2 k, B# m( `) V% i
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。$ _& J+ Y( e! P) R/ B' X' _
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?+ X! a3 E/ q9 ]# P9 E5 j6 e0 p

8 R0 s% {4 P5 @5 q! k另外一个小建议,就是move,所有的move都可以这样
! Q6 b- Y$ {( O1 W9 Uif not move() then debug end. c2 M- s6 N: c0 x, A# |$ |
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
3 B3 ?7 r6 _6 Aplant simulation中的free libraries有AGV模板,
, Y5 o! C5 r- q里面也有案例。
( L1 B( P1 w. O: T0 K: `我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。3 N3 {( t$ v8 |1 c: @) G$ y5 J8 d/ \, C

! S/ B8 a7 s1 J& T我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 " g4 w0 y+ D  |+ B+ E
7 H% }- G" V  G4 n
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
3 m6 E# |; k5 X6 l% V8 @这是AGV_putin中arrive的method。
1 T' p( f+ ~6 D; d4 y; X7 C* p
+ l1 c& K( f* x! P4 W* l1 F( q. X/ i当到达物料速度越高时,这个报警更多,

/ s( [2 X# o. ^0 P  O另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-27 09:54 , Processed in 0.018512 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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