设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8630|回复: 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 R7 l- @9 @# H8 V9 R0 z9 }/ Z
*/% g1 H) F' b' c2 W
is
9 X% s* L( V7 `) d$ d2 Z' G        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 D( N) b$ [: I; F9 ], J0 ?do
3 n, S9 m! `2 S" x. Y        Lan := rootfolder.Internal.Tools.AOLlanguage;
( D" [1 M) j$ M$ I        if current = @.Destination -- else return
7 s) V/ V) X/ r  d/ |5 S7 W' g        then: V4 ?7 z; O! L% N
                @.Destination := void;
- U* j( }" s' C' S' i+ U                if @.occupied then' M( w$ q& S: m7 L2 y( ]* _
                        part := @.cont;0 J8 a! i6 }8 Q. J
                        @.transpOrder := void;  y: W4 u% }* m* f0 I; Y  Q5 ?6 M, T
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) Z: j) j* m% C1 A8 B                                @,root.eventcontroller.simTime);! _0 A! [" d8 G! S" x
                        @.HasOrder := false;. Q2 B% x5 r- ^0 ~+ a
                        @.DrivingHome := true;
9 I, j4 y/ t2 b, \/ D0 T: r                        rgManager.tryToStartTransOrder;  |: V- X  V$ v" n; C8 }
                        if @.Destination = void
2 J( a# L, S. X* F                        then -- no transport order for vehicle @
1 L1 C8 s5 k$ {/ @- F# {6 D0 [                                @.Destination :=
! `; W! _6 p4 X                                rgManager.nearestFreeStation(@,track.~);
3 D5 E5 J/ t; E8 F* \; y                                newDirection(@);   
  O9 P7 H$ W+ j5 c9 t                                if @.Destination /= void then+ `. L' Q. D$ X
                                        @.Destination.NumReservation :=6 ?3 Y8 R0 K* z6 L
                                        @.Destination.NumReservation + 1;
7 `) y# S# m0 p& B                                end;! w1 P1 G2 }1 N( D. p: B
                                @.CurrIcon := "drivingHome";
4 U2 C* @" W$ m$ J% }                                @.DrivingHome := true;
$ f$ q! _( a: C# Y                        end;
! Y9 U% a4 B3 J                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ a4 f* y- ^" h                        part := @.transpOrder;
) g/ c: s, J, k# }: o/ Q                        part.move(@);-- load part
  F1 F# e, ]7 t$ ?                        @.CurrIcon := "load";! f. Q9 x" L/ P( z& o) {4 v& ]
                        GlobalDistObj := part.globDestination;
% |/ [9 F4 b" j! A5 f                        assignLObj := rgmanager.rgAssignL;- d! N5 L$ ^! x! C  c- i6 c0 j  R
                        row := assignLObj.getRowNo(GlobalDistObj);
. O' Y7 T- v, z8 N                        if Row = -1 then -- since 702 D1 T4 S% B; @/ w
                                if lan=1 then
& @0 H+ m. g" y6 b4 |4 ?                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 @6 J/ y4 O7 f% g9 a
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
7 m! a# p$ f& O  L                                else
6 l! [0 q, G5 I# q: @; Q. k* s  c                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 l' P/ o8 f5 B
                                                to_str("in docking station: \"",?.~.name,"\""));                               
2 X; q2 o# C5 J9 L" c                                end;* T. L/ s6 C) M5 n1 ], c. f1 f+ \
                        else
3 X3 Y, R; {' I% n9 O9 g' y$ m                                @.Destination := assignLObj[1,row];& A# u1 f3 B2 k, G
                        end;                       
3 F& y- i: }" D9 k4 d! l7 b9 R5 a                        newDirection(@);5 K4 C' y% V3 }" U: m( c" v( m0 R
                        @.HasOrder := true;6 C+ c: o: p/ Q5 Y8 x
                end;: L; \4 s  T2 f9 Z$ ~# q/ b
        end;8 P# D+ t* Q3 V" N4 |4 s7 d
end;        -- of the method1 M' B4 r# P  U
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
+ H; ^  C8 V  L3 J) I' F
' q6 ~- ?% P$ C0 e9 w; I0 a这是AGV_putin中arrive的method。
8 |" S8 m( u% Y; I
0 y8 D% S% v6 N9 ]0 d8 @当到达物料速度越高时,这个报警更多,
' m% P" [! t* C可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
2 p: j3 K( ^" t# v7 W程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?$ p9 z  f4 E$ r& s, z9 v
" V! T# }' R6 u$ Q
另外一个小建议,就是move,所有的move都可以这样3 l7 `# b  P$ s" u7 a3 b, z
if not move() then debug end5 T0 H& g" W  {; i" ]& m# s- [
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
+ K+ ?4 m- S" P$ }plant simulation中的free libraries有AGV模板,
6 ?$ z8 C+ O+ i& X0 s1 y) ?里面也有案例。+ U" D- Z# V0 s* d
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。( M/ F: O. j0 K" ]  x; @- [
( u) ~1 _+ k$ F2 M" g3 E" t
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 # L. r) [5 Z# r# }  z+ W8 q

4 ]9 R+ j( K2 g% n那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
  B% ?) j1 b5 A" y; d8 l这是AGV_putin中arrive的method。) u$ E( @7 r0 D* e3 S4 {) i# [* E

$ l) y% N1 s2 w+ J8 Q4 ]) y当到达物料速度越高时,这个报警更多,

$ |' X1 g% v( O% M) M) S另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-17 02:01 , Processed in 0.018374 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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