设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8551|回复: 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'" r+ F1 _& z- Y/ A0 H0 \" b3 {- e
*/7 h: f7 x  g: [1 n* Y
is2 l" W9 a  r0 O9 I
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;% E) ?6 d1 K+ ~7 v. Q' K( S
do
% q" z/ E$ {) c% Y+ E        Lan := rootfolder.Internal.Tools.AOLlanguage;
! h# o& l# X, p8 `. p" l        if current = @.Destination -- else return
8 M' }6 Z+ E) K4 v; M        then
; ^0 @0 x% I9 \8 J( e* w                @.Destination := void;' K# D& G, \' i( P; b# a" r9 O0 b5 s
                if @.occupied then6 s9 }, d6 d/ y5 A
                        part := @.cont;
) {. f0 R, e# T                        @.transpOrder := void;. L) I8 \0 _8 X' t8 ^6 e
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) j3 d& n0 M4 \7 q
                                @,root.eventcontroller.simTime);
, i1 ^. C8 \3 L                        @.HasOrder := false;
* `6 n& t9 i2 P3 S                        @.DrivingHome := true;7 F: Y$ t% h* C8 S! m3 v
                        rgManager.tryToStartTransOrder;% u* N% ^" i# E$ |( l% c
                        if @.Destination = void
4 [  Y6 q/ \2 }# a3 `( z/ V4 w1 D                        then -- no transport order for vehicle @! O3 r; O- i# T8 C' h
                                @.Destination :=% J2 j1 y5 A8 N: ]
                                rgManager.nearestFreeStation(@,track.~);( P- X6 L& g! n9 v7 |
                                newDirection(@);   
! [* B) m# P: q+ P3 `                                if @.Destination /= void then
' ?6 V$ {+ u( J; U                                        @.Destination.NumReservation :=
% H0 B, r/ Q4 l! B# F' V                                        @.Destination.NumReservation + 1;
, o, F% X9 t& A% q! U" k0 i4 v) E# q                                end;2 ], M4 z: @8 j* y+ n! ]$ m
                                @.CurrIcon := "drivingHome";
1 a3 A5 L& a7 k& b                                @.DrivingHome := true;
8 U+ d/ h  N) d7 v! o* O                        end;
9 Y# {7 K2 V1 v7 [                else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ t" V! r/ W7 `; B& w
                        part := @.transpOrder;& w% |6 W/ ]0 O6 V1 p( k0 x: R
                        part.move(@);-- load part
) Q1 q# q4 N7 h3 Y                        @.CurrIcon := "load";. N! u5 A; n0 Q) v9 F4 ~' W
                        GlobalDistObj := part.globDestination;  N2 ^, y1 w; m+ l! n0 Y1 O* `
                        assignLObj := rgmanager.rgAssignL;
& h4 q8 E, Y6 |/ x: c. M                        row := assignLObj.getRowNo(GlobalDistObj);
/ C3 o( P- U- Z' F3 w                        if Row = -1 then -- since 70, j4 G4 y( O) ?
                                if lan=1 then
5 R0 P, `/ w  j/ U. ~; U                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 Y2 L! A5 c. o( R0 p# M. v. j9 T
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
# v& s8 b, l1 h                                else& H5 E) c; T" a- ?
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! t) i  j0 _7 B" s  U
                                                to_str("in docking station: \"",?.~.name,"\""));                               
# @: U/ n6 L" `$ J$ ^+ G& Q: ]1 `                                end;) m" C5 ^  h4 ~; ~# y2 {( @
                        else4 U2 d5 _% @, u5 e/ n0 d# q$ q
                                @.Destination := assignLObj[1,row];) S& ^& v/ ]$ Q
                        end;                        5 T* k$ X1 J! S6 q3 ]- F
                        newDirection(@);
9 z4 ?! S) d2 w  c5 Q5 P                        @.HasOrder := true;
0 A" ?6 H! u  F" O& {7 H                end;
+ z) V$ G0 l/ V- l        end;9 V/ K, [0 E3 e9 b0 G# z6 ^& P# F) L
end;        -- of the method# Y+ s3 t5 J5 S! d
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 - |+ l0 E- @; B. \9 G/ E! R* }6 y4 Z

& f/ h1 J! P! S2 Z" M) h这是AGV_putin中arrive的method。
  k5 X8 K' t" J. E; H0 ~) J" w' H% P; j8 H* J' _+ {' L
当到达物料速度越高时,这个报警更多,8 q, T  `9 i; C4 I, \) }
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。' u/ p0 Z# w/ W. x( v/ t  M
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?. t" f. \# s; p

" f7 U7 }5 j" J6 S另外一个小建议,就是move,所有的move都可以这样4 I- c) M# T3 j6 q' \) v7 B$ M# _
if not move() then debug end
% V3 ~: \+ W* k( Q1 ~这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。; B0 e1 E, p7 q8 G2 A  I1 x
plant simulation中的free libraries有AGV模板,
  F* E; h  O6 b% s里面也有案例。) b+ O0 c) o; m, ~; }: Q" X
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
* r$ l+ S2 l8 m/ R5 h
. V! I5 h5 c1 ^) ^, Y. S0 z7 C我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
; V" V0 {5 R- K1 h. N( W2 u
. c5 g7 d' L6 Z2 P8 n, K那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 1 J  I. L/ O8 P2 h
这是AGV_putin中arrive的method。
  R4 g0 g; x/ S) F3 R1 C9 q
( d/ O5 n# i9 b7 Y1 D! ~当到达物料速度越高时,这个报警更多,

6 b! ~: F7 E- Y3 Z8 v另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-11 03:15 , Processed in 0.017619 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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