设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7769|回复: 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'
. u1 d" M9 t- @*/
" O9 _2 v. p5 F- F, [is+ x- J9 i- Q) @( c8 `. G$ R4 G
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 C* Z. C, Z( a) F- B$ U
do
6 v/ Q& w( M# E1 r; S        Lan := rootfolder.Internal.Tools.AOLlanguage;
1 }! ^) c0 W  S        if current = @.Destination -- else return4 X! ^2 F: ?% m% q7 ]" q) T. g( E/ S/ X
        then9 U7 C+ p2 l8 q& S' E- ~9 G& Z, p
                @.Destination := void;- M1 t% A* _3 o0 }2 B( v
                if @.occupied then
, x+ v# d9 L8 D& c) c8 e4 L# U2 M" F/ V" Q                        part := @.cont;
3 Q4 @+ c# r5 H4 E                        @.transpOrder := void;
/ N$ c6 s& {- p! k                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! E" R/ R' P3 u" h5 D
                                @,root.eventcontroller.simTime);
0 \6 s( |0 ~7 S! E9 {                        @.HasOrder := false;
& ?/ L: }0 I$ k8 n& @' Z1 c                        @.DrivingHome := true;) @8 H& e2 g* m, Z: ^" Z
                        rgManager.tryToStartTransOrder;
* x  S/ w, B, w- J- {; o                        if @.Destination = void
" F$ r/ D+ p; n: \" k+ Z; h                        then -- no transport order for vehicle @1 `' z+ B6 u1 l& f1 K; e( @
                                @.Destination :=
1 s. I; e+ t9 `7 l! O/ @5 t- Y% ^6 L                                rgManager.nearestFreeStation(@,track.~);
. x% \  ]0 p6 }3 g5 z! {                                newDirection(@);   
# y4 h# k' n7 F6 h% P  T/ |2 H                                if @.Destination /= void then
9 u' ]8 W' s) i  d4 G                                        @.Destination.NumReservation :=" g# i+ B5 G/ z
                                        @.Destination.NumReservation + 1;
- T. N5 J/ A2 Z9 O                                end;% R5 O. T0 I# f, U. j# E; s# A$ e
                                @.CurrIcon := "drivingHome";
% L2 {. r3 K, w& y0 l. R; W                                @.DrivingHome := true;
+ [) S5 I1 ~' j1 D                        end;
: B- [; L7 h+ D( `0 E                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 S- R* c$ L+ _+ k9 S                        part := @.transpOrder;* t  B0 }1 u  k9 v
                        part.move(@);-- load part6 N: C0 Z$ p( m7 _) O8 W4 w. {; o8 o
                        @.CurrIcon := "load";7 E! V" R* e& i: o
                        GlobalDistObj := part.globDestination;
- g1 Q7 T$ G3 ]# M* w( O! d7 Q                        assignLObj := rgmanager.rgAssignL;
: ]. X0 Y  d# z                        row := assignLObj.getRowNo(GlobalDistObj);8 z! U! m: C' E. r
                        if Row = -1 then -- since 70
$ u8 d: |5 w+ x4 S1 d+ b% `                                if lan=1 then
0 {/ _  p$ O3 ~: s                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 h. Q. h" v& E                                                to_str("in der Andockstation: \"",?.~.name,"\""));
3 Y( f  l) c1 |8 D+ @                                else8 S0 u# t7 y& l+ K
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 b! C% c6 y  A( J1 ^1 i  E
                                                to_str("in docking station: \"",?.~.name,"\""));                               
& a) J9 u$ `( \& K                                end;
. i1 x& C' |; o/ R8 X* ^                        else! s9 j7 Q0 U' m$ ~4 m
                                @.Destination := assignLObj[1,row];
% @) v5 c7 t" a8 u                        end;                       
3 _1 z( g: Y3 x8 N' Q: V                        newDirection(@);% C3 k; L' O. q$ O
                        @.HasOrder := true;
. t  C4 I6 e7 r/ \# q                end;
, t1 r) h9 T: u+ f        end;
2 U- f: T) l" `end;        -- of the method
1 {% X3 X" \! i2 v# R
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
* Q. _! x# g# O. W3 E: J
! T; m' h* A* Q% p8 T  p0 _9 l这是AGV_putin中arrive的method。: i7 [% V/ |7 v% c' G
4 X$ d& d' Z% Z+ J/ {9 T: t
当到达物料速度越高时,这个报警更多,+ {" n7 h5 H& r  e
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
7 W9 [4 O' {  J' P& v程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?' ~8 G; X6 {( M% l$ @+ s9 n4 Y
& U) ?4 X% J( Q. |) v
另外一个小建议,就是move,所有的move都可以这样
7 z/ \6 E7 H# b9 {* Vif not move() then debug end$ m2 e1 _( L) f8 L% h
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
7 ^" l) L+ g" Z5 Z7 F7 q3 [9 K7 Mplant simulation中的free libraries有AGV模板," V" C+ K0 ~+ i, u* q# b
里面也有案例。
, {* m, H0 @  F4 Z! d( @, q% R我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。5 Z' O& ~1 Y/ M% ?* }# B
& L0 _7 Q6 N! ]; F
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 . a5 {" Z. j+ y- C5 `  \3 [) o& V

  L, a- S8 D/ @! F那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
  p4 P! }: P3 D这是AGV_putin中arrive的method。
9 `. L' K" F: i/ b+ P
) t1 ?5 J5 w2 ^8 {1 f6 o当到达物料速度越高时,这个报警更多,
3 K( r0 u" p' b; E: R
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-28 16:57 , Processed in 0.017302 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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