设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7488|回复: 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( z2 F3 x5 P1 y! d
*/& i" t* ^$ X7 e4 s0 @
is; r8 _/ V+ c4 g! n) z
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ O. h! z1 S6 odo
$ K7 I' b) E$ M/ c# g: m! H        Lan := rootfolder.Internal.Tools.AOLlanguage;# e5 r5 h+ r2 J. Z4 g0 R
        if current = @.Destination -- else return
  M. V4 s8 T4 q& F8 [) a        then
! q, U: J3 A2 F3 }# O                @.Destination := void;1 X% w# E5 Y: Z; e; G0 I. x3 A
                if @.occupied then; G; S% e  \6 I0 V3 {; u
                        part := @.cont;# V6 e( C4 V% b
                        @.transpOrder := void;7 l' Y2 j9 l/ L3 z( p9 m! P
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% \0 A. X( L: q3 A& e                                @,root.eventcontroller.simTime);' Z2 U# V% A* ?4 q! D  Y6 S5 p# z
                        @.HasOrder := false;: b2 g6 B, b8 s- u! A) q- J
                        @.DrivingHome := true;8 }& H) x$ h* G. U' F; z
                        rgManager.tryToStartTransOrder;% {, i# n8 x( V) Z, ]# d/ w6 G+ }
                        if @.Destination = void
2 v* p# c6 Q$ X8 a' Y: W2 d) \                        then -- no transport order for vehicle @
3 H6 U3 o- ?0 M, R- r                                @.Destination :=( ]9 G. t$ ]& R; z6 l6 X1 j
                                rgManager.nearestFreeStation(@,track.~);
- U, M, {9 M: b$ |                                newDirection(@);   9 E  g$ ]# Y& q: b6 T3 d3 A
                                if @.Destination /= void then3 \, f5 A3 S# M6 y- E- Q
                                        @.Destination.NumReservation :=
0 T; M1 M& W, V  h+ s7 O! ]) W$ ^" y                                        @.Destination.NumReservation + 1;
* C5 C$ e4 `* h2 ^; ?3 `2 v" {* d                                end;
/ s* H( h+ ^& J& m& q                                @.CurrIcon := "drivingHome";
; y! a. v7 z. \, M# j                                @.DrivingHome := true;
" _; B1 l# m: `                        end;
3 N- w% h0 Y* a# d: h                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ U" d. e2 F7 |                        part := @.transpOrder;
; e7 V+ Z. P* @                        part.move(@);-- load part' C( V- D, t9 l! `5 ^4 w; v# G
                        @.CurrIcon := "load";
4 ?$ H& O4 b0 Q( L% C                        GlobalDistObj := part.globDestination;) e: e0 z7 d1 G( i: r0 ~: H
                        assignLObj := rgmanager.rgAssignL;
4 \! \) @' N( J6 S                        row := assignLObj.getRowNo(GlobalDistObj);# N5 c* ~5 V  x$ r" \
                        if Row = -1 then -- since 70; o: F! {2 k% y
                                if lan=1 then
  P$ ~# N0 g  b/ ]                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ j7 N$ \( w' A% e# F8 I
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
7 K" j3 K" D$ i. ^# D8 x; H. e                                else
% Y6 w" C3 n3 ?                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 t, Z6 \% f8 u; o# m3 _& s. S& N2 _
                                                to_str("in docking station: \"",?.~.name,"\""));                                8 R0 @, d6 e; e* S, w* Z) O! I  d
                                end;
2 B1 \: v( [4 k6 ]0 J                        else4 U% x9 [. s/ N2 ]
                                @.Destination := assignLObj[1,row];. I" `( }) s3 v$ G6 r) v" W
                        end;                       
& x& {& z4 \& d2 E6 H+ V                        newDirection(@);! R& D* p0 L4 W
                        @.HasOrder := true;
. L* {9 p2 S( n                end;$ `; q$ Q1 b  ?! ]" |% S! w  y
        end;1 x9 z* X  ?$ Y6 G- r
end;        -- of the method
1 {  l% n* T: a: l
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
; n! X* @  k( n7 ]9 n" m* `8 @/ K" H- L. m6 y
这是AGV_putin中arrive的method。
" n9 q- n: m9 c8 x
9 n0 D' r# Y2 `3 U当到达物料速度越高时,这个报警更多,
+ n* \% q: ]* Z! ?) u可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。0 }7 s: r7 A3 h) h! E! s) Y
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?( F& L% e$ d$ C' j& q& Y* X
' ]% M" a0 Q" M) u( X' G
另外一个小建议,就是move,所有的move都可以这样0 f/ M0 y$ }( o2 A1 z$ ~
if not move() then debug end: s! n. l- L. D) j2 N& w' f
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。+ C% D/ G4 N( R3 i& @
plant simulation中的free libraries有AGV模板,' n- Z% Q! R2 ^) `) A4 f3 H4 _$ J1 B5 @
里面也有案例。
0 K3 \4 P1 ?8 o% P' E9 R9 o3 X我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。6 \( c! t" F6 W& _
- {1 m$ D% e8 k7 y5 ^
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
' c% D) b7 i# E
8 F0 J! B7 x9 z( m  r那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
, d9 C$ H) D* m+ ?9 W2 G7 K- }这是AGV_putin中arrive的method。
  @5 m9 o* k$ Z
8 s+ [4 y( L- f" X当到达物料速度越高时,这个报警更多,

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

本版积分规则

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

GMT+8, 2026-4-14 11:35 , Processed in 0.022080 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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