设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8434|回复: 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'
9 S! p* `" C+ `. O, r*/
2 j, v7 Z$ j8 [( r4 Tis& v8 O. j9 C8 O) p% D
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- N) m/ E1 g! [+ L& s' Q6 _% ~do( ?5 ~$ D2 ^, N" I  ?2 j
        Lan := rootfolder.Internal.Tools.AOLlanguage;+ D) y  ?+ E3 h  a
        if current = @.Destination -- else return
( K4 b+ S1 ?; K. m+ b/ k5 i        then
9 H) D; o9 D- I8 P& \% h3 D                @.Destination := void;
# g- v5 J" C6 S: f! h                if @.occupied then
: |0 r. y2 [; b                        part := @.cont;
. P2 ?6 \0 t1 C( I% S# [% g                        @.transpOrder := void;' G' B5 z8 {* D+ u
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- w+ J& @: [* n: \* J0 n
                                @,root.eventcontroller.simTime);
  S# N; h+ }7 ^/ p. O- E4 V                        @.HasOrder := false;
3 ^1 k$ G2 v+ b. Y& p8 ]3 @                        @.DrivingHome := true;% u' R0 h( {1 O4 r: m
                        rgManager.tryToStartTransOrder;% A1 h. l( a4 W& ?
                        if @.Destination = void8 t1 T! F. m3 R3 i4 y, F" U
                        then -- no transport order for vehicle @
5 K. f+ Q$ O+ L. f) \                                @.Destination :=; C. d+ N' v1 x8 j
                                rgManager.nearestFreeStation(@,track.~);
$ o1 S% A" ]/ G" m( C4 r; O0 h                                newDirection(@);   
8 W+ s0 e1 D. e; F' j" b0 V6 Q  u+ b                                if @.Destination /= void then
# S7 @* V- P) ]. }  t6 d                                        @.Destination.NumReservation :=0 S; ^5 V% F( y- ~
                                        @.Destination.NumReservation + 1;
1 c! `  k# ~" j* R8 ~                                end;
7 e7 Q* ~2 j# x1 r: u/ M4 t                                @.CurrIcon := "drivingHome";
' Q. q5 v0 B4 k0 T                                @.DrivingHome := true;2 p9 O4 R! ^, x; b1 @5 [
                        end;6 a, G* K5 n- I0 a1 g* |& u
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station' _1 R! K  g7 D; r# H) l7 }* j
                        part := @.transpOrder;  f# B4 I% g- w* D; p/ ~, O! E
                        part.move(@);-- load part
' A% X1 A+ J' g7 K- e7 d                        @.CurrIcon := "load";
0 `& n, j( y7 n0 v5 z9 D                        GlobalDistObj := part.globDestination;5 u" O: x/ f6 d1 G
                        assignLObj := rgmanager.rgAssignL;
- k# Z7 ~- f5 h7 @                        row := assignLObj.getRowNo(GlobalDistObj);
1 C/ Z! {2 T9 ^8 r8 X4 Y                        if Row = -1 then -- since 70
# v% h7 V; o% t                                if lan=1 then- y, O% T& s5 ^6 G/ y
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! l# d. P8 Z# H7 s0 C
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
# ~* V1 D! N/ \+ c                                else0 {( ?# H8 \! Q
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ e, Y1 ^/ @+ B" k: y! k
                                                to_str("in docking station: \"",?.~.name,"\""));                                - E5 p/ ~4 t2 M& R; b
                                end;
0 d! U/ }( b# t' M1 S( @; @6 }- d0 v                        else
5 D! y6 ^0 @( G: y                                @.Destination := assignLObj[1,row];
1 B1 y$ |3 k6 {* U' F+ |1 T' O                        end;                       
  e; F  R7 d! A4 }$ k                        newDirection(@);
: T( b) A$ r8 |( C# a: k                        @.HasOrder := true;& j( z  K; P- [9 y3 J
                end;" N" `4 m! D# Q4 U3 }0 T
        end;3 V, ~3 J& D5 p, A9 P' }
end;        -- of the method
+ ~/ P- A4 v5 z8 m, x
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 , O, m: P% t, g

9 R1 `! C* R0 {: `3 k9 B4 S这是AGV_putin中arrive的method。9 i8 x( O3 p6 D7 y  \

# u2 A$ r* u  [当到达物料速度越高时,这个报警更多,
9 H1 p7 j* p- o( \1 c4 }可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。$ C- t7 w' h" w' `" d
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
, |( Q# a' U8 K6 o; R# p8 x+ Y4 l  V$ s( }9 H9 g
另外一个小建议,就是move,所有的move都可以这样  `4 c' m: D$ i0 A
if not move() then debug end; O) a. c0 A/ Z. ^0 k/ M
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
) ?, S/ S! k( o6 \2 J% a! j* cplant simulation中的free libraries有AGV模板,
3 q* K- u0 z  [. N8 b; v! {里面也有案例。
2 V" b! A- |% S" ?& z我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。% o2 N$ h0 h+ a1 f3 G: [

2 k) `" X* S7 Y4 V( o) ]$ i我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 / }3 m4 J6 U* r" D

! P+ ]+ L, O+ b- r# q那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
( p3 T, q' B$ \8 E这是AGV_putin中arrive的method。, T7 H& p4 F6 {* S
5 s, ?1 e' N% a2 B
当到达物料速度越高时,这个报警更多,
4 W$ x' a4 Q0 C, Y# E& L. [
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-3 18:17 , Processed in 0.017275 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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