设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9249|回复: 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'4 W( f* Z% `6 X; f0 {
*/
" {8 A9 w: u7 r- J6 dis7 g0 V# ?6 W( i) ~' H
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 a- D2 ?: Q9 P; E; j+ `2 ?/ ^do
  L% n6 i2 _* v' U) K! L% Z% |5 ~        Lan := rootfolder.Internal.Tools.AOLlanguage;
( c& i: }. H6 a; X: E/ t: i        if current = @.Destination -- else return
6 A  v& z5 b2 W        then0 ^1 i7 t& I& I% ?" F
                @.Destination := void;- }/ W2 K' u4 J9 b5 {
                if @.occupied then. Y2 c& z3 F5 q8 e; \
                        part := @.cont;9 N% d* J6 E6 b! \. R: Q* c+ F: b
                        @.transpOrder := void;$ Y1 _1 }1 M# K  T* ^
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& Q/ u& l4 ?" I# u8 Q, z# K3 o                                @,root.eventcontroller.simTime);
1 R, w# _( D" z# e8 j4 I$ e' m                        @.HasOrder := false;
) f! q% ?, J! Y. k8 J5 o3 L: H                        @.DrivingHome := true;
9 \7 D' U) c8 {# G8 y4 n& \# L" W5 q                        rgManager.tryToStartTransOrder;
, Q2 T! O  x* E4 c5 R                        if @.Destination = void1 h% Q9 L8 E" G4 e4 `1 V9 q
                        then -- no transport order for vehicle @1 W/ Y7 q) ]! z! D5 }3 ^
                                @.Destination :=
8 |9 H" H/ p1 A7 e* {1 W( q                                rgManager.nearestFreeStation(@,track.~);  @6 U$ _, H+ h% ^
                                newDirection(@);   + l" ]  x2 [$ P' d3 R; t
                                if @.Destination /= void then% S! h. D% H7 P( @7 }  e6 l
                                        @.Destination.NumReservation :=5 ]* G( s% l* z
                                        @.Destination.NumReservation + 1;( S: G, y: [; r- H: t5 f) N
                                end;
4 b6 Q1 V7 {+ n* f. Y                                @.CurrIcon := "drivingHome";: m2 Z( N! x6 j2 V: m
                                @.DrivingHome := true;4 Y" h) p  X/ }$ J7 s6 f7 c
                        end;- y/ u2 }5 |' ?: c/ b
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 V$ U6 f9 Z# W# k                        part := @.transpOrder;
6 n/ d( ?3 ?' l/ m                        part.move(@);-- load part" M$ U- @+ A) P% A  \9 S" f9 Q, K
                        @.CurrIcon := "load";
" j8 a5 u  V% z0 Y7 \                        GlobalDistObj := part.globDestination;7 d0 c4 l$ t" T; I& }* _' R0 H" S4 |( z
                        assignLObj := rgmanager.rgAssignL;
! u4 L& N& n7 o3 R                        row := assignLObj.getRowNo(GlobalDistObj);* ^- U8 n1 Q4 Y+ m
                        if Row = -1 then -- since 70
9 w2 ]) Z) E9 t3 \7 P  c                                if lan=1 then
5 |+ t. i, v7 v* U2 I7 b6 Q                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! B. o$ s  m) n6 Z- g2 O- b
                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ ^% H9 c+ U& e3 c& l' r/ c
                                else' ^& {6 e# j' t/ m
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 J% F, C" o) M5 X* A7 N9 C: p                                                to_str("in docking station: \"",?.~.name,"\""));                                : p) S5 p! }2 `2 w' @
                                end;6 I6 g1 ?) K7 Q( g
                        else( X  T7 G% Z. {% v5 S  w# I% k
                                @.Destination := assignLObj[1,row];$ X# [6 E! q3 E! }( D4 }
                        end;                        3 V8 h0 s7 p8 _$ ?7 G, G* r6 N4 Q
                        newDirection(@);
* |- y6 o% i+ e2 a% [& e                        @.HasOrder := true;: R  W# ]6 J3 O
                end;, X& `" Z& l) j' g" W4 @0 H
        end;# x* I3 K6 O4 x
end;        -- of the method- d9 z7 c* j; f9 W
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 4 J0 q& T; I+ |3 m; Y" x8 e
1 C# E: b4 Q# F4 ~$ b2 v9 K
这是AGV_putin中arrive的method。! E; v/ j* n+ q7 f4 V
  @- @- X  [& m: O* B2 s
当到达物料速度越高时,这个报警更多,
# L4 P- N3 t0 ^7 P! r可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
, A) e! l6 `7 p7 t, H3 i6 M7 T/ Y, H程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
1 ^* A1 d2 y  H7 k; J* K2 W& l. c2 e' y% z' f
另外一个小建议,就是move,所有的move都可以这样! K1 i# b0 k7 M0 ^% k& L% [
if not move() then debug end$ }/ r/ S# Q2 I9 Q* }) |
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
4 d  ^/ R! ~- j/ r# d' E4 Yplant simulation中的free libraries有AGV模板,; g. M. t' \6 U7 D+ A
里面也有案例。% v% x! M2 h  m% U
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。: q$ U$ j0 D  o- @
+ a' g5 R! C3 {" x1 b9 M
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
. w! `7 Q1 X1 \8 N1 R4 [4 p
' a) t4 g' W- K% }; i9 a; c. ~. J那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
7 {* V9 S( p7 p- X# ~4 p2 ?- o) {; ~这是AGV_putin中arrive的method。' A, [/ v& X+ m+ x/ t

" q  d+ K9 n0 F/ {当到达物料速度越高时,这个报警更多,

0 f$ }9 X+ f0 K/ c+ q另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-21 04:46 , Processed in 0.018601 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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