设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8333|回复: 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'# u+ e' L# n* |3 |6 {
*/+ c( I$ q* ^9 F3 p) T7 q+ c
is
8 Y' U% x/ d2 J1 y6 |& O8 b2 t        part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 k" {0 ^# w$ p; A9 X2 [# |" r
do( C1 O6 s4 w" e1 |0 ~# O
        Lan := rootfolder.Internal.Tools.AOLlanguage;
) F0 l! U$ ], ?$ v        if current = @.Destination -- else return# L, H) U  V6 ~" w3 t
        then
0 f) p( J; F* F                @.Destination := void;2 d+ F! T& G5 m  H* v
                if @.occupied then
4 L% Y! J4 Q6 X( _. b8 h                        part := @.cont;
6 Z" a: m3 K! t. {8 s. \* B                        @.transpOrder := void;
1 W/ Q0 J2 c. F" S                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 L( Y2 c0 ?/ m+ O, F( q                                @,root.eventcontroller.simTime);
7 ]* Q; C6 S2 @0 D3 \9 h- a                        @.HasOrder := false;) |: @6 L: ~! u, o( I0 X6 Z; h
                        @.DrivingHome := true;* ~4 }  P0 ~$ T+ S
                        rgManager.tryToStartTransOrder;6 I9 x2 o1 I, U, E
                        if @.Destination = void! B- }9 a, A8 J: W) S0 f
                        then -- no transport order for vehicle @
  z& Q7 w6 L+ D, f0 s, U& Q                                @.Destination :=2 t% i! N8 Q3 I5 `8 q
                                rgManager.nearestFreeStation(@,track.~);
$ }1 `! \4 z+ c                                newDirection(@);   
$ R- G; O5 Z1 i; ]* G                                if @.Destination /= void then
$ k" A6 a+ |( h1 w- _" d% w6 [( ^                                        @.Destination.NumReservation :=+ x( s0 J5 y: O% W% @! b
                                        @.Destination.NumReservation + 1;
- t; r4 Z8 I" r) t& {2 l9 K                                end;
4 o9 t- o$ A3 e; |6 ~5 @5 J                                @.CurrIcon := "drivingHome";7 L$ M6 }( e8 ~3 b9 Q1 h9 x" {, h4 P
                                @.DrivingHome := true;
7 R5 C& A  t% N! F" b% e                        end;( ]3 o: T1 L- e4 A9 I- \# Q
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% y' m/ Y6 Z9 R. w7 @% ~$ x                        part := @.transpOrder;3 q' M! r+ d) r- _, f* M7 M
                        part.move(@);-- load part7 x+ u' [( Q, y" o3 E
                        @.CurrIcon := "load";9 b. u9 q: K3 b- L
                        GlobalDistObj := part.globDestination;
, B5 d# Q8 m7 `+ _+ F2 i% H7 L: Q                        assignLObj := rgmanager.rgAssignL;
! _9 ~6 B/ D2 x4 q; S                        row := assignLObj.getRowNo(GlobalDistObj);& q; i- y6 p2 n. L* @7 u
                        if Row = -1 then -- since 70
% x$ F4 k. e8 s0 ~6 h9 ~( u% s                                if lan=1 then3 Y2 X! E$ }8 [' N
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# Y7 L# G$ Q& p4 l9 i5 J- T- L4 l                                                to_str("in der Andockstation: \"",?.~.name,"\""));
6 S! U: a4 h. Z. |" x9 K                                else+ v, y- n2 m5 R% q4 e
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 @+ D$ R- D8 e
                                                to_str("in docking station: \"",?.~.name,"\""));                                / d+ q; F. @4 ~' C* G4 t
                                end;
# v4 k5 S' E9 b$ r) k; Q                        else
4 P! a, a% R: R/ q                                @.Destination := assignLObj[1,row];! C# M3 j" ]9 y  F
                        end;                        8 q5 @  `6 n: C9 ~
                        newDirection(@);
; G7 e1 ]" t0 t( B- Y* u7 D                        @.HasOrder := true;+ A0 ^2 z. b7 U- r
                end;
! ^! j9 P' v  h        end;; V* Y& d! A& f# b
end;        -- of the method, U- x6 u4 D9 [- t1 q$ ^5 o* X
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 9 b( ~! v* G: S. `+ ]
  [# Y0 y2 [6 e" Q" n7 M
这是AGV_putin中arrive的method。5 i" V3 N+ c7 v
% V" L  N6 _- k7 c
当到达物料速度越高时,这个报警更多,' l+ S$ H" z- b1 I) H$ v9 i6 y
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
2 K0 [6 c4 ?2 A" F8 S3 C程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
* z3 t  C2 G' E3 H8 |5 y: _& n! ~" V4 k% Z) c% I  F
另外一个小建议,就是move,所有的move都可以这样" V( \" u7 ]) n! a! W  L1 g/ N! j
if not move() then debug end0 S$ H% W7 \# q% y% P
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。* _# U* X  U4 \! J" a. G
plant simulation中的free libraries有AGV模板,
+ v5 [% N9 Y9 _6 S8 d) [里面也有案例。# T8 g; q. y6 x
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。8 B- n% f. L/ o9 H3 v/ I+ j  ~
, O, V% k9 z. M) a6 a: \
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 q$ A- U6 a; S4 y1 t0 j% ^! }, b$ n6 J
/ Q+ u' L( ^* W# d0 [7 T) j那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 & u' @9 Z  f" [7 V
这是AGV_putin中arrive的method。* N* c9 e0 e  D- U" \
" T) T% w8 d, b
当到达物料速度越高时,这个报警更多,
! n) E# k& \0 ?, I' z
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-28 10:00 , Processed in 0.020520 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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