设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10154|回复: 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'3 j; U2 o8 @% C( ]9 T" l8 M" o4 u
*/1 M. p3 d5 M$ E/ l% J
is  u' q; h+ P4 G/ p, y; _
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;" J3 {& l4 {3 P3 g
do$ e- h6 U! h3 E
        Lan := rootfolder.Internal.Tools.AOLlanguage;
% s3 k; @/ L! w5 ^: N5 e, P( Z        if current = @.Destination -- else return
7 ?+ l/ z9 M: A0 l3 j        then8 w7 }! ~" s/ [% f! T8 ^% K
                @.Destination := void;
6 `, ?, s- c5 i- R  H                if @.occupied then4 H+ o4 @6 ?+ b) ]  [0 j& x( ~2 c
                        part := @.cont;% L; {' _/ G- L6 l3 A1 `( d- L
                        @.transpOrder := void;2 o1 h8 n- _, q- N  {* |5 b8 k3 }* W% z
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( y" e/ ~2 F+ V) o
                                @,root.eventcontroller.simTime);8 A* {* v" X2 w2 w& a# w
                        @.HasOrder := false;/ N) p# W3 m& z( x$ c
                        @.DrivingHome := true;2 w* u. q7 s$ u8 w- g
                        rgManager.tryToStartTransOrder;. o' R. g; W0 {, `( Y/ B! s: c' a
                        if @.Destination = void
9 _+ I, i6 m1 Z0 o1 U1 `3 z                        then -- no transport order for vehicle @9 d: d6 v8 F. O8 `$ O4 c0 l
                                @.Destination :=9 _* L: G* p5 P1 d( H( W
                                rgManager.nearestFreeStation(@,track.~);) c, G* P; `+ M7 ~0 Y' h9 M
                                newDirection(@);   
! `* j& E' u8 ^* H                                if @.Destination /= void then
$ _* z/ W; |4 W) V: F  l                                        @.Destination.NumReservation :=
/ R  P' i% V. }5 f                                        @.Destination.NumReservation + 1;
" A" ]9 e3 l2 S& \2 f( M6 S8 L% h                                end;3 y- b# \; l) u$ m
                                @.CurrIcon := "drivingHome";$ Y; K& S% W) M5 g, Y9 g, P! F% Z
                                @.DrivingHome := true;
* Q5 w8 I( E  e; `- ~% d; S. h                        end;
" @/ U9 k9 F. `+ S7 I                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; k, M  a, \  R$ I+ _                        part := @.transpOrder;4 Y" h- h8 d* Y, ~3 k+ [: }
                        part.move(@);-- load part. S8 j, \+ v' S  }: t% ]
                        @.CurrIcon := "load";0 }; R. L& ^* G( b' P7 ]
                        GlobalDistObj := part.globDestination;/ t2 M; G% @9 s0 @7 y) C$ C5 }7 o
                        assignLObj := rgmanager.rgAssignL;
1 s' n6 Q# G2 L                        row := assignLObj.getRowNo(GlobalDistObj);, c& j& T6 M1 [
                        if Row = -1 then -- since 70% x3 W# H* N6 Y6 @
                                if lan=1 then
% E( ^, S' ^2 T. @0 y: v0 R                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 L0 v5 x4 o  S# P                                                to_str("in der Andockstation: \"",?.~.name,"\""));
, [% E7 x: [$ r2 G3 c4 F1 M1 J( _# ~+ b                                else! ]. K$ x: }- r2 `" z
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 w" [5 C% e9 J: G5 K! b
                                                to_str("in docking station: \"",?.~.name,"\""));                                3 [1 p7 V' Y, T8 I' z5 A7 O& L
                                end;
% P7 Z# D1 r& I0 @, x                        else
/ K& R8 N  D+ Z; M2 T8 `! v) ~                                @.Destination := assignLObj[1,row];- U+ T5 D* V+ b9 d
                        end;                       
) K: o( p/ Q$ z                        newDirection(@);
4 a- z& d; |8 `9 k$ G( C: ^7 \                        @.HasOrder := true;
4 o) j& x/ I& O0 Y1 {9 {1 y& o* c                end;. H/ V  f0 O, N  h. ^7 k9 ~+ K
        end;2 H* C2 S; U7 R
end;        -- of the method
* C4 S: a  {6 d! E. l, {$ X  D
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 $ @% Q4 X8 D, M! ~4 g: Z+ Y
, m  w' e, S, y- a
这是AGV_putin中arrive的method。
" y, i4 z9 {7 F3 v2 O
& b  y  y! d" c% _+ C' k6 E/ m$ _/ N当到达物料速度越高时,这个报警更多,
' N- M& |4 k6 t' ?' q1 C2 e可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。( q3 A# P' W) P' J
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?) |; O* M5 b: ^% u, z2 f
# F) e1 s& F- n. }2 O
另外一个小建议,就是move,所有的move都可以这样9 M/ |/ d( e/ s" o9 V$ I9 R
if not move() then debug end
- s# r4 b& k. X. b& b( u" @这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
1 F/ N7 q; l& i5 B+ U4 Fplant simulation中的free libraries有AGV模板,6 Z$ b. z6 _: k3 q( T( G
里面也有案例。% A, x4 X; T; x) M4 `
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。+ {3 K2 Y) p( I; C$ K
" v+ M$ |9 ~/ _0 {% {
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
* ~# p# I$ p( E* C, I0 I
, l- ^5 t- R7 g+ L" Y6 ?  N' X0 ~7 p那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 8 [- g& Y2 `* u& r
这是AGV_putin中arrive的method。! ]- c! z1 T. N  E1 F

+ h) L/ u. V& e2 L0 t当到达物料速度越高时,这个报警更多,

$ U9 p$ T' c! b/ r) K. t9 g另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-16 16:15 , Processed in 0.019547 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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