设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10062|回复: 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', v, [1 e( S  i
*/
/ c9 z! W, W3 ^0 ~! ]- h3 Iis8 Q# O% Y) E7 E" j
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* E" O' X/ l* K: z, o/ T# \* Y% x$ Rdo* V( Z5 v6 _, j! M! O5 l
        Lan := rootfolder.Internal.Tools.AOLlanguage;+ ]% V& Z4 _" ]( x; s, G  O- O
        if current = @.Destination -- else return; K6 F3 f* }! C8 ^- _
        then
0 v7 ?4 ]5 e# t5 O8 e& G3 t/ M                @.Destination := void;
- Z7 _' e  U3 Y                if @.occupied then2 K+ `7 J  h* X# e
                        part := @.cont;! w, R& a- A, ~
                        @.transpOrder := void;9 J, W1 _3 V+ }1 {. F) |
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: V/ W7 J( C' r7 |4 \                                @,root.eventcontroller.simTime);4 i/ ~  o# q0 j9 L! c. y: x
                        @.HasOrder := false;
8 ?4 h+ Y7 Y4 G                        @.DrivingHome := true;
; {. X( Y$ s1 ^' E2 v                        rgManager.tryToStartTransOrder;
# M% V9 g. R/ u- T: G1 X5 S& \                        if @.Destination = void, t9 L" \. r- `, V, h0 v6 |
                        then -- no transport order for vehicle @: P; A/ v8 `! h5 |# O3 ?: e
                                @.Destination :=
5 p$ i# \! y* s( R( f2 ]                                rgManager.nearestFreeStation(@,track.~);( n+ N) f+ y, w+ l( C7 H
                                newDirection(@);   
" B% A' `; g, `' D. A! B' p                                if @.Destination /= void then
: d( R% ~0 z; b) Y* a% w& z                                        @.Destination.NumReservation :=
" T9 L) N% f# E) n# g4 o                                        @.Destination.NumReservation + 1;+ N9 q" X$ j7 W0 B2 h
                                end;
# T7 o# E4 k: V2 g4 {                                @.CurrIcon := "drivingHome";1 g# r1 f) W0 U9 u. ~0 J3 Q. _
                                @.DrivingHome := true;7 y1 k7 f8 [: @5 k
                        end;) V- i& J8 J  s, O
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station* @9 O& y$ z/ L. s, S
                        part := @.transpOrder;' z! ~6 e/ W1 j/ R! L
                        part.move(@);-- load part
/ V! @6 a. A" l( p8 k2 G; J                        @.CurrIcon := "load";
1 d8 }5 E2 t0 ]  O5 i9 m                        GlobalDistObj := part.globDestination;
+ E: p% W1 \. L& N                        assignLObj := rgmanager.rgAssignL;
  i; c  G2 S5 S$ [- F                        row := assignLObj.getRowNo(GlobalDistObj);
( r: e, x: R1 H: a& D                        if Row = -1 then -- since 70
( M; F9 `9 Z7 T; ^: D                                if lan=1 then
: N  V  g! c3 ~8 l                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- w, U" ?9 U0 g# @9 [9 v                                                to_str("in der Andockstation: \"",?.~.name,"\""));
, p7 \, g( ], T                                else
5 c" q; A( }% P" o. H0 b5 K# e3 \. q                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 N1 \6 j# n! X+ P* I* l* e' ~
                                                to_str("in docking station: \"",?.~.name,"\""));                               
+ o) H* N' _: G' g/ N6 M0 B. C7 D                                end;# d  X/ i( X, D" a9 K/ Y% G
                        else
: i9 X+ S# Z7 `0 L                                @.Destination := assignLObj[1,row];
- |- v8 X3 ]% ?0 K# h! U                        end;                       
9 }7 x% w* D2 M' {$ `5 m                        newDirection(@);% w' a4 t& K3 I/ a2 Z
                        @.HasOrder := true;
9 u0 _: s7 i' ~; T; _9 l% W                end;: t9 [- f3 e0 `0 L3 B
        end;% A/ R! y! {5 i1 N3 Z2 b) z5 \
end;        -- of the method+ y1 O( E5 P+ D$ K2 ^7 O
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 1 }- s- j& O9 F

' z0 D: n) F; |  A% n8 Y3 U, v这是AGV_putin中arrive的method。
0 G) B; ?' Y4 a& }( Y) E
* N9 \5 G+ S0 |% @4 ^" k8 m当到达物料速度越高时,这个报警更多," D/ P" \5 Z% z- Z7 V
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。6 l. y( h. C& r% H+ p
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; q; b( c/ G* S. Q) t  E9 O: ^) j

8 X- P3 X+ K  S5 n( ^' z另外一个小建议,就是move,所有的move都可以这样& Y& q$ ]0 X6 o' I( T
if not move() then debug end5 V  g5 Z) j) J
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。+ ~/ R+ q7 N! O+ ~, {8 j! @* E' v
plant simulation中的free libraries有AGV模板,% g3 x! C" A; w7 g" [2 O
里面也有案例。
) R( G* g( ]  J  Y  L我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。/ S2 }1 A. a. T( E! Q' M5 S/ b  O) f

; u: ~" V& f$ t/ \我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 , D1 T8 z& y8 Y  N& L/ ]) i# i
. p" L5 ]1 c  N: \
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
  b  t  C/ N" i! |, N6 ^; B这是AGV_putin中arrive的method。0 E  X+ W' a% o6 X9 v: j2 r4 [* m; Y, F
; `8 J. k: y6 M3 K$ e8 _
当到达物料速度越高时,这个报警更多,
  n! D' w: H8 G9 M
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-11 07:12 , Processed in 0.019105 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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