设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6827|回复: 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'$ X. b+ U2 l6 H' c" Z
*/8 }1 U" y) T: y8 n3 c7 P
is
: q% R$ |" V* K) I. ]  a0 [9 @        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# `/ E* P: f, k/ j& d; ydo
" v" a6 ^% |$ `$ E: y        Lan := rootfolder.Internal.Tools.AOLlanguage;
/ p5 T& R) d. U- d& z! ?6 Z0 o% v        if current = @.Destination -- else return
! ?2 N: ]  }' i$ {4 u, b        then0 z% n6 P5 P$ ~8 T
                @.Destination := void;
. n9 f( \& _, o6 h) ~, C- ?                if @.occupied then. V+ K" B9 P0 Z; o3 r3 A
                        part := @.cont;: E6 e2 k5 s5 W$ }5 A7 q4 e2 H+ X
                        @.transpOrder := void;3 ]9 l% f2 w( }& ~% m
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( B8 {% s( e( k
                                @,root.eventcontroller.simTime);
2 L% _4 E4 j, I7 a# J                        @.HasOrder := false;6 w" {9 j4 X" M
                        @.DrivingHome := true;9 U7 x& l/ o2 ^! K1 N( w2 ^) l) U
                        rgManager.tryToStartTransOrder;
/ @- x3 {: a; e" H                        if @.Destination = void  e/ M/ v) o4 ?3 i1 k% z9 t9 `" M
                        then -- no transport order for vehicle @/ O0 b; p0 T! d7 z. ?
                                @.Destination :=
! c' V) j0 I- s0 Z                                rgManager.nearestFreeStation(@,track.~);
2 A. R9 i, f# E* ]" G5 q  E                                newDirection(@);   ) G) l9 z* w  B8 t0 h! P' @: W
                                if @.Destination /= void then
" n2 ~+ ]+ \" {% T+ S' X                                        @.Destination.NumReservation :=& A' |+ S) e' H0 S. o
                                        @.Destination.NumReservation + 1;
' E- F' [0 c. Q% ]% o                                end;
: h* n1 k+ D% g) c0 u! M/ B                                @.CurrIcon := "drivingHome";$ q4 K, t) n7 Y0 V4 s% O
                                @.DrivingHome := true;/ B$ \3 z  s8 c+ c  N& S
                        end;! w; c' W5 l+ k% H( b
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 L" d. {+ X- P% q
                        part := @.transpOrder;
9 g& E% k1 m4 L# H* ^/ o, }                        part.move(@);-- load part
2 A2 r5 M' k9 R8 z! ~                        @.CurrIcon := "load";- I' x6 S9 `1 K( c3 K1 R
                        GlobalDistObj := part.globDestination;
3 K' D0 d  q0 j' n% T                        assignLObj := rgmanager.rgAssignL;) N* w; R  \8 \- k6 I
                        row := assignLObj.getRowNo(GlobalDistObj);# n6 ?4 D. L& U9 E+ p' c4 M
                        if Row = -1 then -- since 70
. D  @  N& ?5 \8 d$ }; c, i                                if lan=1 then, \8 I0 [5 k: A' z/ L( d, N
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 w! O1 E. H' {6 ?# r8 ~) T- t
                                                to_str("in der Andockstation: \"",?.~.name,"\""));5 Q5 i: b8 Q: }% ~  n2 }
                                else
# k4 K: S) e, N) D                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ \  v& z6 Y' E" j0 ]6 J' l+ ]4 Z" E
                                                to_str("in docking station: \"",?.~.name,"\""));                                ' {; }5 s( j+ D  B! S( [& a6 [# C$ n
                                end;- w, g/ Z- I8 s# y# i
                        else
  e( c6 n+ k, ~0 x( o0 D* q4 d" [                                @.Destination := assignLObj[1,row];
6 U0 G; u% l3 H+ r# m* r" \8 R                        end;                        ' e8 _2 W1 f6 P, V: d
                        newDirection(@);
2 O4 d3 W& I8 |( b5 f                        @.HasOrder := true;
* \& z- k6 p) i8 C9 s1 m0 D: K                end;1 Z6 s" c' J8 l2 j; s
        end;
. ^3 s1 R0 l7 X( Q$ I* p1 Y- P$ r& U- kend;        -- of the method
" z4 }' m5 D2 H; }3 \: v) E: Q: ^
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 4 D5 {! f' K1 G$ d! S

& A/ z4 u8 z4 m这是AGV_putin中arrive的method。
5 @) d- m+ |, q+ H- E8 t9 c3 c7 f% `+ b$ Q$ b
当到达物料速度越高时,这个报警更多,
9 D3 r+ r# P& w可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。. [7 h% J' q. V
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?9 ]. W0 K  C' D; A! L
* J4 C) }. j; @! ?
另外一个小建议,就是move,所有的move都可以这样! ]% r3 ?' g+ F4 V( X
if not move() then debug end
0 d+ y$ i3 C4 T$ B5 Y' L& F$ [这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。3 Z+ q$ Z8 |1 ?. `3 y4 `3 ?
plant simulation中的free libraries有AGV模板,
1 o) O8 f' [) `& }6 b) q- _" p" B里面也有案例。
# ]# K7 b$ G! }+ p我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。6 b; p. N8 |8 ^- F1 ^

" W# W7 [5 u' E! f我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
, [( Z, b' i! x1 |/ ]8 l$ A  q
( x$ ^. f  ^- [* `/ Q$ F& S: O那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ! V% s5 X9 \/ d4 |- z3 Z* v& }5 b
这是AGV_putin中arrive的method。; e' T2 Q. t: W, I

- M% x, ]5 t( ]6 f6 q6 c当到达物料速度越高时,这个报警更多,

4 @! `+ \& w: k9 Y: r, j: b3 \3 \另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-1 00:51 , Processed in 0.019926 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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