设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7851|回复: 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'; I5 j1 F. U" J
*/9 u2 J! c) \6 R, j# o( W# t
is" e4 F7 F0 Q- ^/ p0 [0 z' b
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. B3 c: I7 n3 H7 R: ~do" V) Z1 i0 \1 e  N) j" d5 ?- T) @/ u
        Lan := rootfolder.Internal.Tools.AOLlanguage;
5 L9 B% o" z' T! V        if current = @.Destination -- else return
& D% T" w6 a+ {        then
0 e# r0 E$ p. Y                @.Destination := void;  v  r3 T" A3 x& P; b! q8 y+ m
                if @.occupied then8 O  t3 U; y3 B8 H8 T# b; U
                        part := @.cont;; u2 v0 ~! P; k1 {9 h+ r
                        @.transpOrder := void;
+ E6 }, H! z0 T9 g                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# C' r8 y2 z$ j" A/ ]6 P" J. Y                                @,root.eventcontroller.simTime);/ d6 Y  b3 a: I
                        @.HasOrder := false;
5 \; g1 A* ^' _4 h) j) @                        @.DrivingHome := true;
( N! [  a. a2 F2 c) h* J6 ~" ?                        rgManager.tryToStartTransOrder;& E  z6 O7 t- q* H/ |8 @" O
                        if @.Destination = void8 n& v% h/ c: O
                        then -- no transport order for vehicle @
* b9 V: f$ r5 V# j                                @.Destination :=
" v- v, y5 k* M& I# B                                rgManager.nearestFreeStation(@,track.~);  {8 f; {$ ?+ }! o  d! a' c  \
                                newDirection(@);   9 U, ]5 p; ~9 d
                                if @.Destination /= void then
& I5 Q) w  u4 r4 R+ ~                                        @.Destination.NumReservation :=
# H0 N+ r8 |" Y+ D" N5 G                                        @.Destination.NumReservation + 1;+ J4 [% P' X4 ]1 h  ~  r  }7 U
                                end;4 O" }4 z# G# m0 R3 P
                                @.CurrIcon := "drivingHome";
: @. r* J$ J  E/ C( P                                @.DrivingHome := true;
6 e: ^$ V- ?+ j/ _                        end;
+ A  K0 h& l0 i                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% u4 }9 t4 b* M+ ]( m                        part := @.transpOrder;
. x  h; X2 ?$ S4 C                        part.move(@);-- load part
1 e: i0 c6 X6 S) X                        @.CurrIcon := "load";
; ^% w1 s; U: H4 e+ K1 [                        GlobalDistObj := part.globDestination;: e0 J, V1 e7 L, L! j
                        assignLObj := rgmanager.rgAssignL;
7 _0 J. R- W- U3 g% i5 L                        row := assignLObj.getRowNo(GlobalDistObj);5 a1 l) {7 ]1 j! P1 s0 u
                        if Row = -1 then -- since 70
1 b$ U9 c+ p' s0 Y  P9 [' s/ p6 x                                if lan=1 then5 U* @$ `+ J1 i  J( g: T& v+ |8 u# n1 A
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. Y7 e( C! j' f
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
4 G4 P, v5 K: q- p8 E                                else: @/ m9 n; r4 |/ T- b, z
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' r+ C: o( i, w  U/ l0 k                                                to_str("in docking station: \"",?.~.name,"\""));                                5 `* ~; L4 q, \/ L- Q
                                end;: B5 U2 w, I6 y6 s) J
                        else$ c2 p, Y3 i: ~
                                @.Destination := assignLObj[1,row];
* K. r- Y! a0 T1 U3 T5 ~3 D: x                        end;                        $ u: Q! L+ f( [* Y/ a6 l  B
                        newDirection(@);
/ @5 Q3 g; r: F* |                        @.HasOrder := true;
8 V3 z$ @. w% W- O2 [3 _                end;
* Z+ e$ ]# b2 [3 A7 X0 ?        end;
0 M( r) x4 E! q$ Mend;        -- of the method
  S1 l9 l3 h, Q$ y) U8 a2 s. m/ D: P$ {
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
$ E9 ?- x0 Z/ G& y) H9 R5 j& r. h3 }4 j2 H
这是AGV_putin中arrive的method。7 T8 e+ L! R! A

! M" w% R8 L: T& N+ L' m当到达物料速度越高时,这个报警更多,: e, H1 P( B: n/ r
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
# d  v% G. x! [程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?6 _& y5 A6 C% F# m

0 V4 S9 [, |* Q! }% m另外一个小建议,就是move,所有的move都可以这样
) y% Y* D, b! s9 Nif not move() then debug end% G$ z- w1 r) F& _! H2 b  W
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
, ]$ v8 D( c- k7 tplant simulation中的free libraries有AGV模板,; b2 R: w# G+ v& N4 @
里面也有案例。) Y! S! \! S7 e* D( p, R
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
7 p& K4 b3 Q' H6 y8 I! n/ v0 E* |! f# K9 L
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ( c1 ~/ A! k; m! i  m, g$ l
8 P/ d2 M) ^0 m# }; \# p" z
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 $ A+ Z2 t/ p4 t5 U
这是AGV_putin中arrive的method。4 ], y, F( S; N! N

9 e. a8 n3 w% R6 l  n, a  g9 f* S当到达物料速度越高时,这个报警更多,

& q8 d# s2 Z; Z/ t另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-1 19:52 , Processed in 0.016248 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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