设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9390|回复: 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'! Y% p$ Z- u/ E$ C2 R1 R
*/
9 [  Q- G3 N9 J8 O' ~is
* k& w" c' J  i, ^        part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 r5 L2 Q6 r. l$ Q
do( V, W- G  z; X0 m% E
        Lan := rootfolder.Internal.Tools.AOLlanguage;
4 D& a+ \" C$ \' z! ~( [2 V        if current = @.Destination -- else return
* V7 c4 `$ C% K        then: C1 s5 @" b& a% r) {
                @.Destination := void;
: |/ E3 T6 ~8 e, F3 C4 g                if @.occupied then* G' q' t; H  I, P& d. Q
                        part := @.cont;
6 l" b, N- I6 o( C, N0 N                        @.transpOrder := void;
4 p/ [9 J4 q8 a1 y6 L4 e2 j. c                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& b* ?" ^3 `8 S9 B- ]3 Q7 Y                                @,root.eventcontroller.simTime);  o7 w+ U, z- Y3 {) W
                        @.HasOrder := false;- `0 \/ x0 L2 `- q
                        @.DrivingHome := true;2 C' A% o5 r+ E/ f* N, K9 I6 [
                        rgManager.tryToStartTransOrder;
* ], I% \# N7 x) y3 g, T# R* R                        if @.Destination = void; I6 w1 D5 f9 Z+ O
                        then -- no transport order for vehicle @' ~4 ~# V" }9 b$ n
                                @.Destination :=
. C( ]0 T! R$ w: a+ w7 `3 k; B0 ]' L                                rgManager.nearestFreeStation(@,track.~);
2 H+ ?9 R. |  \+ n& D4 \9 A: P) H* Z5 _                                newDirection(@);   2 M; ^# Y0 I; r/ C4 S7 L( _, s
                                if @.Destination /= void then
  }. W( v# p6 Y' A                                        @.Destination.NumReservation :=+ H. y3 l, C) L0 n( K) D
                                        @.Destination.NumReservation + 1;
! Y# m. w  @6 }7 e                                end;% o5 B8 Q0 `% m, O6 h& d! ^
                                @.CurrIcon := "drivingHome";
( @4 a1 Z& `! ^8 f                                @.DrivingHome := true;4 p) |! ~/ t1 C+ ^" A6 @* ]
                        end;7 H( O: K% o8 e( G* g; }7 b5 s
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station; j, \; J5 W* O# a8 h+ I5 n
                        part := @.transpOrder;) a/ n& W: z3 d5 y
                        part.move(@);-- load part9 e' Q! O8 y3 E  _9 C
                        @.CurrIcon := "load";
. H! N5 x- n9 K7 p4 B" F                        GlobalDistObj := part.globDestination;' J9 x, o9 ]& j3 {
                        assignLObj := rgmanager.rgAssignL;
7 O7 D3 L0 W$ l/ n6 @                        row := assignLObj.getRowNo(GlobalDistObj);
# |+ |/ _- Q! H& p                        if Row = -1 then -- since 70
+ {0 e" ?  V4 M( @* u                                if lan=1 then9 n4 i4 D2 t, ?
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 C0 K( A  d& z' c% Y9 Z/ p                                                to_str("in der Andockstation: \"",?.~.name,"\""));
0 b9 c3 P3 N0 [) X" G                                else& W8 d: G' Y+ Y2 d6 n$ l
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 h2 O* e' b" H' |: P7 R5 N
                                                to_str("in docking station: \"",?.~.name,"\""));                               
* Y9 X) K, e1 h, o5 G* F                                end;$ F; f* H  A7 [0 `( c0 ?% K# x
                        else
0 i. r' y0 x  [! `                                @.Destination := assignLObj[1,row];
& P, O) I6 T1 Z, g) Y, e                        end;                        . v7 \$ a0 s+ ^+ }+ I( Z7 b8 g
                        newDirection(@);
2 G* A3 ~8 T# X3 ?& N                        @.HasOrder := true;
' }  }. J( o/ a0 m8 f! D8 o6 T                end;$ D( z' W$ e6 q' j/ z
        end;
/ ^" B% X' H  y3 Qend;        -- of the method9 k8 N: x$ ^2 ^1 y/ h+ G3 Q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 " Y& o- R( l2 m1 Q

8 ]; t# w- I' I+ V# H这是AGV_putin中arrive的method。
' T. ?2 y9 F2 A' k0 o5 l5 Z
9 |' q& V/ a3 Z当到达物料速度越高时,这个报警更多,% A$ \8 O5 K" {
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。' M( ]& V2 }6 J/ q5 d
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?9 H0 G& [5 d' ~$ I' A

& p) Y* X2 o! Y. _1 Y$ X另外一个小建议,就是move,所有的move都可以这样
# b( x; u7 @) r9 ?+ g; d6 U8 l; cif not move() then debug end) h) K( t, L0 F" u4 `. ~7 |
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
/ V  I1 r% \5 ^' ?" ^/ T9 ]plant simulation中的free libraries有AGV模板,8 R9 {% v. Q% \" b  K/ F
里面也有案例。9 T/ p% p1 g5 S* _; L& W0 M
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
7 Q$ f% V3 K! Q
, A9 z9 K- c% Z  @7 C$ J8 N6 G我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 @% h) G$ u7 h/ [& v; r
' V8 p+ i9 ~3 u- ~& F那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 1 s( _) I# g; p8 `- A- x# D
这是AGV_putin中arrive的method。
+ p$ ]& \9 c9 I+ q% b1 P+ u2 _- o* F: ~$ J
当到达物料速度越高时,这个报警更多,

+ P/ L- b  S% M1 s! a另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-29 19:31 , Processed in 0.016448 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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