设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6261|回复: 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'
9 O! U; I6 E( k& A( _*/; Q# f& z$ z# J. r
is3 ?) \. \$ {4 J
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' H  X' C) Z+ Fdo
0 a' J, m) M5 ]% N8 g2 B9 l0 ~# t        Lan := rootfolder.Internal.Tools.AOLlanguage;( R5 i! o1 P6 `5 t
        if current = @.Destination -- else return
. [* a6 c2 n3 u# G, k7 p: C. Y        then' C9 W0 T' I/ k* i* q9 z
                @.Destination := void;
. d) W+ p. J" z# F                if @.occupied then0 W2 R% l7 t. `8 Y4 U2 |2 r- R6 m
                        part := @.cont;$ F0 E8 l. l0 E' ]9 b
                        @.transpOrder := void;
$ L. p4 {+ \2 Q4 \3 s) B                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ B" L! L) `; h9 e& \                                @,root.eventcontroller.simTime);
: j- d( g0 o3 }$ {# A$ t3 D                        @.HasOrder := false;) w. q) N% G/ i1 x6 r- @, n
                        @.DrivingHome := true;% b: A, h- ]+ G- `8 q2 i
                        rgManager.tryToStartTransOrder;. U, p9 X4 n5 x: D1 V5 N$ Q( Q1 t
                        if @.Destination = void
0 P. y9 r* ~6 F                        then -- no transport order for vehicle @
4 S, g6 ~/ F4 p6 Q  o  @* G3 ]% C                                @.Destination :=" ~' h7 t) l0 o8 z; I3 }6 T( Z
                                rgManager.nearestFreeStation(@,track.~);1 \* @  ?( ?5 X: U0 X
                                newDirection(@);   
5 t1 O; Q# t: O$ t) j5 M) y                                if @.Destination /= void then5 |+ P  j# B6 C* p3 T4 e
                                        @.Destination.NumReservation :=$ Z, G5 w, ]. Q7 V3 ?3 u' W1 I
                                        @.Destination.NumReservation + 1;7 x" z. s3 Z! m4 A8 e
                                end;
3 g6 O( S0 a# K: d$ [. F                                @.CurrIcon := "drivingHome";
2 c% A+ l, N; H                                @.DrivingHome := true;
- w' b3 Y- d8 _" M/ y                        end;
# T" I5 |9 Q. ~1 D                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ M, _2 W  P& S7 {# \                        part := @.transpOrder;
$ Q+ L( q% ~% W& j; W# o4 W6 E                        part.move(@);-- load part
9 d- @9 T) m1 r0 t8 B& Z/ ?                        @.CurrIcon := "load";) `5 a7 d6 d4 `/ A' K2 R5 W
                        GlobalDistObj := part.globDestination;) Y, O8 T. @+ @" s0 ?( M* }
                        assignLObj := rgmanager.rgAssignL;
4 o+ s& l* {! @( q" S4 \                        row := assignLObj.getRowNo(GlobalDistObj);
& X/ v# _9 d7 H( O  i' u. C/ t                        if Row = -1 then -- since 70
) Z) I& Y9 l! D& }* M2 o                                if lan=1 then+ ~# l$ b0 E2 A' t' X
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 B" c. G6 ~/ ]& V" k                                                to_str("in der Andockstation: \"",?.~.name,"\""));' V3 [" d* o" P+ s, Z3 m. f1 z
                                else
: a, w3 d* |2 x3 B1 l                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 G  X3 O, C) C3 J                                                to_str("in docking station: \"",?.~.name,"\""));                                8 y8 R- n+ A' S/ y  h( \
                                end;! t, L4 X4 |& {& o; o+ c
                        else
9 r' A1 p  a1 k- ?$ X# {$ l                                @.Destination := assignLObj[1,row];
" K) `! ~0 `. o7 }# P8 ?* B                        end;                        - y% v( X  {$ W" p0 W) H
                        newDirection(@);
0 L/ m) J% ]7 X# x$ @) H6 I+ `                        @.HasOrder := true;* \4 ?1 H6 m' `" `% h
                end;% o# z8 C; P! c3 u
        end;9 f4 m: g+ z$ r8 A: \
end;        -- of the method( C( a( u9 q. t5 P: z4 i
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
0 x/ {$ J0 U, f* l' n3 i; P& k( J! x0 L. T
这是AGV_putin中arrive的method。
( G% k  u) z- r  ]% u$ [8 T! Y6 }0 e( X( U2 O' E& n
当到达物料速度越高时,这个报警更多,
+ t. b! z3 J& r' G8 R1 F可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。  J( R) ?5 V4 d8 C. b3 m3 W
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?' {6 [) C/ y9 ~/ w  |$ h, B

; n0 r: R  i/ h6 H9 ]另外一个小建议,就是move,所有的move都可以这样
5 M. n' c( m: O1 P1 o! tif not move() then debug end6 `. R. d) s7 M/ j
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。. ?3 m# X7 A  g4 k9 V
plant simulation中的free libraries有AGV模板,
# J7 @: E! T2 Q0 L里面也有案例。) X5 u. @! h4 u& d4 q
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。' C* Q' y+ |5 Q. r! ?; ^' R
2 ^* c+ |. ~8 s. l. r
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
8 ]9 ^1 S/ P- T% {6 T% d
% |4 H* M5 ~0 n  c! B. F那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 0 c- m/ ~" r1 i& v6 `7 n
这是AGV_putin中arrive的method。8 D9 t! w1 D) {$ Q( b
& J: W5 q- Y0 U6 H& I, R
当到达物料速度越高时,这个报警更多,
7 E. j7 N$ \; Q! h7 L4 o3 N, w
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-27 17:58 , Processed in 0.019138 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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