设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7709|回复: 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'2 N! _' q) m  h) H
*/% W5 C* i* {0 V; h6 A" i! ]
is% w" c8 g9 l; {& q
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;. O4 I$ _- f% l1 C+ S3 J( `2 S+ f4 y! [8 o
do1 |) ~; m, q5 C' a! H, N
        Lan := rootfolder.Internal.Tools.AOLlanguage;% u/ U/ ~1 I- H5 r- p
        if current = @.Destination -- else return5 c9 ~% B! D( K# s& Y' W" L6 \
        then
  q* c1 D5 A  }# |9 k! R$ Q                @.Destination := void;& B5 f" L9 u# {  R8 v
                if @.occupied then
4 z# ~9 n& D5 x) c$ x5 ]                        part := @.cont;! X" F/ ~6 o6 Z; l4 V
                        @.transpOrder := void;( O& M. X7 K+ i& W0 n
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ ^3 _: u/ u, |8 O" p                                @,root.eventcontroller.simTime);' I8 Z. g* ^* \
                        @.HasOrder := false;$ d+ Z3 `3 r, u1 }% \7 s
                        @.DrivingHome := true;* Y) L9 l, P- X: Y- n* F
                        rgManager.tryToStartTransOrder;/ f$ k+ j$ v9 r' I+ `  U+ l$ P
                        if @.Destination = void* r' V* x: V4 Q/ O
                        then -- no transport order for vehicle @5 ^  X. ~4 |8 G; Y( V! }% \
                                @.Destination :=
+ w7 q/ ^+ J; j6 v9 ^                                rgManager.nearestFreeStation(@,track.~);$ Y% i3 G6 v. y5 x8 p7 o7 E
                                newDirection(@);   # X+ a$ `. F" f" b2 |) u
                                if @.Destination /= void then
7 t4 @. k1 b  t  N* {* D                                        @.Destination.NumReservation :=; a* q) q- }0 J7 D0 f* Y  L
                                        @.Destination.NumReservation + 1;
6 L2 H7 W( d* l; {& {3 S. e2 V- F                                end;
/ Y  r) l8 I# p# C6 g9 K                                @.CurrIcon := "drivingHome";4 G' p$ B- v: C3 W6 W; [
                                @.DrivingHome := true;
3 Y5 N( z1 ~3 Y% _                        end;* U1 f9 k. l( ?& c- w6 R
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 N9 y0 {1 @4 G6 I4 A9 V1 l+ u                        part := @.transpOrder;
. @' T+ L! D# k9 J+ r6 d$ ?5 G5 z' I                        part.move(@);-- load part
3 ]$ \; O* o* J2 x7 N2 m                        @.CurrIcon := "load";: e& K3 f. |/ G
                        GlobalDistObj := part.globDestination;5 T# A4 u0 w8 E  t  ~$ m, [
                        assignLObj := rgmanager.rgAssignL;
0 s7 m9 ~- s+ U3 w5 M                        row := assignLObj.getRowNo(GlobalDistObj);1 u) Y; E* Q3 X$ L9 [% k
                        if Row = -1 then -- since 70+ H3 a: [5 n6 X
                                if lan=1 then
, d* w) C. M& a3 ?  ]: y! d                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 \* n6 k1 B: d2 Z! \                                                to_str("in der Andockstation: \"",?.~.name,"\""));
  p" I, q$ h& ]& M- r                                else2 v8 n) J& w5 e
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( ?; D6 @& |  `
                                                to_str("in docking station: \"",?.~.name,"\""));                                * O% r  x" B# B4 d
                                end;
# n( J- U; n) z9 z5 U                        else
0 Q/ \; N: K5 H6 C% Z" A                                @.Destination := assignLObj[1,row];
, Z. ?6 e7 ]7 f) f$ u( a/ e                        end;                       
6 u& A: v) J: t2 _/ d# ]. A                        newDirection(@);, a) F2 q! G% N5 y  _; H+ Q
                        @.HasOrder := true;# j3 f  q2 J5 c% N
                end;- ?& _  q& A0 f$ h
        end;
' Q& ?: j2 S1 S/ p6 k1 x, L7 @" cend;        -- of the method
+ _9 `% S5 ^+ b! e
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
3 [! M& h1 s0 g% X' n4 O8 _  [+ q2 c. K0 N7 O
这是AGV_putin中arrive的method。
! c1 d5 ?" G* y; r# l
6 B! b- s4 W! K1 c( X; V当到达物料速度越高时,这个报警更多,
9 N6 \1 E& b; a8 L9 ?* l8 j可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。8 z* [& O3 N; q) y
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
5 @& r1 _/ R9 R
) P2 u0 R: o  r- e0 a1 r另外一个小建议,就是move,所有的move都可以这样
2 i: E% K% R3 d7 @if not move() then debug end
& D/ {# E9 ~: n1 p4 z/ h& i这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。  v) N. |6 W: M( l9 K- G
plant simulation中的free libraries有AGV模板,
. C# y+ D0 J, U里面也有案例。
7 e0 _2 M7 t+ I/ d我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。4 V$ D- w4 w- {. ]8 S2 L
& ?# d9 ?# h7 Z! U! c
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 2 P' a/ f; C5 c
% u2 ]$ A) L+ R8 J
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 % |3 ]- A" q: a9 y; @
这是AGV_putin中arrive的method。
9 f- m0 v& H4 T2 `' |6 ]; \7 l, a# Y' n
当到达物料速度越高时,这个报警更多,

( w( y2 Q; c0 _: w& ~: i5 q另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-25 14:46 , Processed in 0.021014 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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