设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7073|回复: 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'
, O: `2 s$ o2 a0 \9 x*/
. D1 f2 a2 Q, s3 L9 Y5 `is- C, R7 W0 N0 s
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
  m% V9 y" g+ d; H2 D) k, ldo
% a' H+ [' f( |4 J7 Q; g        Lan := rootfolder.Internal.Tools.AOLlanguage;# I! x/ K$ \  |! {; d2 o5 Y
        if current = @.Destination -- else return1 Y* T* j; c* x
        then$ N) c2 F6 F! |" I
                @.Destination := void;1 D4 a8 Y3 ?+ u1 s; u/ b
                if @.occupied then
" p" N/ Y0 B+ x4 e                        part := @.cont;
! F4 H& y2 h' W                        @.transpOrder := void;0 ~. O- N& \) e1 l7 E2 s- S+ l: {5 b
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 r+ T( i3 [; S9 Z. A- [
                                @,root.eventcontroller.simTime);7 T6 U5 ]+ L/ Y9 b- W
                        @.HasOrder := false;2 X& }+ h! N7 O' L
                        @.DrivingHome := true;
" ~+ w! o, S$ }5 e' t                        rgManager.tryToStartTransOrder;
6 m$ D# l& [$ g1 u                        if @.Destination = void3 k" U5 Z7 o1 \8 y4 h0 K
                        then -- no transport order for vehicle @0 C; P4 g7 d7 W/ T& a
                                @.Destination :=1 k: p" D# }2 g# _, H
                                rgManager.nearestFreeStation(@,track.~);! o7 u+ z+ `. b5 Y
                                newDirection(@);   
" G; l; D/ W5 ?- l7 u                                if @.Destination /= void then
% Z8 C/ \* {- u: g. ?) i                                        @.Destination.NumReservation :=
) ?( u6 N$ x/ L0 x9 B/ @                                        @.Destination.NumReservation + 1;
. P7 W- l8 w2 h  w/ L% d; i% [                                end;
6 m% n( F9 _) J" E; O                                @.CurrIcon := "drivingHome";3 f# T) s/ \2 {/ p- p+ y' R
                                @.DrivingHome := true;0 S2 F9 }& l  o
                        end;+ i% x" Y/ z3 {7 s- a7 c
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& f* u) g6 x* n9 d7 m% Q0 H9 Z5 v                        part := @.transpOrder;
/ i/ `, k2 s* F  B# [5 `                        part.move(@);-- load part& ~' ~  E4 Q- E* l2 ?8 p1 k9 o* a
                        @.CurrIcon := "load";3 z/ n- [  J, F/ N. S+ e- j4 i& f
                        GlobalDistObj := part.globDestination;
) E- t, S. i0 }0 L                        assignLObj := rgmanager.rgAssignL;
% ~0 ?( t7 j2 t$ E5 M& L  T                        row := assignLObj.getRowNo(GlobalDistObj);
  W( L8 {3 Z# V7 k1 X( X% v& x2 {7 ^                        if Row = -1 then -- since 704 P; f( B! H5 Z& z- w4 S; Q
                                if lan=1 then: R: J/ R2 t, N' w
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 R$ I( a0 ?' w( F5 ]                                                to_str("in der Andockstation: \"",?.~.name,"\""));
7 Y: N( M2 }$ d$ j, u4 i4 H. x; `                                else4 p2 Z7 N; }' Q4 U7 f! E
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- d, ^% X/ f1 K1 Y7 k4 R
                                                to_str("in docking station: \"",?.~.name,"\""));                               
$ y9 H/ D1 C( ^) u2 B* l                                end;
9 m* I# H  b' ^* B' h                        else' L. F. p& K; y* ~8 ]+ |9 P
                                @.Destination := assignLObj[1,row];
) o" m, y" x+ \4 u0 c: a( \/ r1 d                        end;                       
% t& X9 L+ G% I1 K                        newDirection(@);3 g! u* }- Z$ C! B! p: t; R
                        @.HasOrder := true;
. p* ~9 e  S5 N" a* ?8 [  g! c% s                end;
0 Y- r2 x0 z& E9 X$ O( w; X8 Q3 }! u$ ^        end;# Y4 e' _2 c8 N% Y0 I3 J7 O7 q
end;        -- of the method: |1 ^2 H+ `/ t; P- `# D
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
% @7 s- ^# d3 M- m5 {$ F! K9 \/ s
" t$ ~4 J5 Y" Z( U这是AGV_putin中arrive的method。! u' o* k5 s; l! Q2 \% S% A- I
1 ]/ P" n9 C6 G& p8 a8 M
当到达物料速度越高时,这个报警更多,, S! n8 c8 `8 C2 j( m
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
: n: B% D9 o( \5 d程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?) B, \' Q0 }# ]- v  p" F

3 q6 k7 w$ g/ {8 W8 ?( H8 F# G* F! f另外一个小建议,就是move,所有的move都可以这样
6 h- v" P7 g$ u, T- E: |# rif not move() then debug end) l. U8 C. L$ z& H9 A/ S
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
* }  s- F: m$ \% G4 B, C3 L; C& \plant simulation中的free libraries有AGV模板,. ?9 `( k5 H' B* F) k5 d7 f+ n: I9 c5 w
里面也有案例。4 p: i2 a% t7 O0 q- I9 O, x& [7 x
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
8 N1 A! @" V$ f9 F; V
# S2 F( G' V; a$ Z6 k: j" o我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑   V! G7 o" R7 C4 S
4 Q6 @& {5 C( S- ~" d( K
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ( y, n( u2 v  D- s1 n2 U
这是AGV_putin中arrive的method。
) x; X' T! I5 Y) n3 ]0 W/ ?7 P3 z4 r! y, Y$ A; b
当到达物料速度越高时,这个报警更多,

5 w8 Y- K$ [2 e4 C( G另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-15 01:38 , Processed in 0.029816 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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