设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6681|回复: 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'
! B" v6 a3 U( ]5 s7 T*/
5 w: ]' u( u' D5 K) a5 Ais) s  z1 n/ B/ g8 D, B2 E
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ b$ A0 M/ H5 ]9 X. l- `" h
do
9 ~$ O  W( O) p. Y* s        Lan := rootfolder.Internal.Tools.AOLlanguage;
+ I  h8 w: u9 I8 z/ b( E        if current = @.Destination -- else return
5 C! ^: g# c4 W) x4 z        then
! M$ G1 C+ O+ A  O  \# N/ H8 N: F+ h# R                @.Destination := void;' |( Q. L/ d$ n3 K  S' `8 {" G" b
                if @.occupied then7 w! A( }# `! U. M) o& I+ c; i9 Y
                        part := @.cont;/ \- @: d9 g. P* }5 ]- B
                        @.transpOrder := void;8 t, {- c) b' s' p( B
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ ~6 B7 f' y, d$ O3 K$ S5 ]
                                @,root.eventcontroller.simTime);
  ^0 k4 N! f0 E. n                        @.HasOrder := false;
' F% c1 ~; |- q, \0 m                        @.DrivingHome := true;
2 b) J* q3 \8 z  L                        rgManager.tryToStartTransOrder;* D& L6 F, S1 W/ W" G
                        if @.Destination = void& M" P* Q8 c7 F- f
                        then -- no transport order for vehicle @
5 a1 @  L& x* L$ `                                @.Destination :=
* t$ J: b  }$ j5 C; g+ y                                rgManager.nearestFreeStation(@,track.~);0 p$ c9 ?1 L/ |% C$ I6 V
                                newDirection(@);   ' c5 ~9 g/ c% x+ p- s, ]
                                if @.Destination /= void then! J, B' H% J% R* x3 d" F
                                        @.Destination.NumReservation :=4 a9 X: r5 _2 N& l+ H. Z0 o  t: S
                                        @.Destination.NumReservation + 1;5 q  O8 Q- T1 x# I
                                end;6 }+ {# i% l6 t6 [
                                @.CurrIcon := "drivingHome";
+ }+ G+ ^( Y* n- p. k, i                                @.DrivingHome := true;" L* K- y7 V0 J( e+ m
                        end;
2 e/ i0 b+ G& G, a5 W+ L                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. y' I: a0 T3 ]0 c9 c$ t! g: ?                        part := @.transpOrder;
8 u2 f; [1 I! m0 M# l                        part.move(@);-- load part
! q$ N% V, l7 I4 y& ]+ @8 h2 N2 l                        @.CurrIcon := "load";
# R; D2 J7 [& T8 s& p( z                        GlobalDistObj := part.globDestination;- C, N) H( r: o
                        assignLObj := rgmanager.rgAssignL;
0 S/ V( M$ }4 D1 [" z                        row := assignLObj.getRowNo(GlobalDistObj);
5 P# b1 ?7 A/ v) _! x; P8 }                        if Row = -1 then -- since 70
" o: h: {; B  s+ b9 {* L                                if lan=1 then
  m+ @) K/ i2 q# _* j                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 @' X1 e" u& O1 u                                                to_str("in der Andockstation: \"",?.~.name,"\""));* c) o( L9 J$ o: U; D! e1 W: E9 W
                                else2 }! K, o" ]: w* u) W. p: x4 m' |% C
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* u1 _0 r3 j& D                                                to_str("in docking station: \"",?.~.name,"\""));                                3 t# P# h4 [' c6 O# _
                                end;
+ N% G( G+ S" Z4 A5 g% G                        else
" @( G" m: ?$ Y& M" W9 E3 W                                @.Destination := assignLObj[1,row];
; Z6 X6 F" D/ v7 K& \5 W% t! j                        end;                        * ~& ], X; s9 F
                        newDirection(@);2 y" G5 E- V; v/ y% w* S; `
                        @.HasOrder := true;7 M6 [$ s2 p5 N6 h; d$ d7 b: R' j; D
                end;
) z8 g* B3 M7 Z1 {        end;
8 J. g* Y* [8 b4 `2 e- q: F. d: {end;        -- of the method  y+ K: _- i: v' I1 N
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 + M7 i+ w. F" S
# V, S- u5 R& g7 w& ~
这是AGV_putin中arrive的method。4 J$ e& P: Z# Z9 @; ~7 B

% f; c1 A' N9 Z, J6 S* y# S7 x' m当到达物料速度越高时,这个报警更多,
& A0 k+ i/ h% G/ F9 j. Z可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。' L0 y8 U; S' W2 S+ _
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
8 t% y9 A( A  v. t/ k- A% L( v: w
& j' m; z: [: Z8 @( ~2 g& ?另外一个小建议,就是move,所有的move都可以这样
. k+ q% X3 E; Q3 E! t( `if not move() then debug end
" `( c7 c. L. ~& L1 Z' X% C这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。! A& _& d  g# l
plant simulation中的free libraries有AGV模板,* m) G6 P: n1 u; O
里面也有案例。4 U- w) \3 K1 q5 }5 j  t. T
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。  S. o2 O7 J$ b% k+ {1 e
' w) E' a+ g) F8 |2 P3 J- N
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
4 \; B* Z1 y+ f/ I+ B3 Y) N" q
9 L$ Q2 j1 J$ N! n; R; Y) a' r% I那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
) {, o6 t& o. S- V8 j2 d这是AGV_putin中arrive的method。3 V& l4 M$ S' [, O/ p$ D

* h# D7 {& B  p当到达物料速度越高时,这个报警更多,
8 F3 u' Y7 k9 s9 ]$ }( d, }0 f
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-20 14:46 , Processed in 0.023603 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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