设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9325|回复: 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'
: G7 H& \7 Q, d/ m7 M$ ?, A*/
4 E5 r- n8 K3 r+ y3 ]' [* Ois. K9 |1 G3 A4 M- |
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;% ]: N0 x2 _# y" ?: v: A
do" E; q& V+ b5 B2 h
        Lan := rootfolder.Internal.Tools.AOLlanguage;+ J/ X$ v0 @; H$ t
        if current = @.Destination -- else return( h8 D' A2 g" V! Y. N: I
        then
/ D: x2 |( L" ^( M                @.Destination := void;1 P0 S$ @: P+ A% U8 k9 B
                if @.occupied then3 n5 z3 `* a9 B
                        part := @.cont;
& z2 Q3 ^6 C% F7 E" x- y% _                        @.transpOrder := void;
1 w0 W- U  f) G" n+ I                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 F; Z1 v" i- F4 k) p: E  e9 f
                                @,root.eventcontroller.simTime);, v$ \, e; \% b3 u7 [# ?7 Y$ Y
                        @.HasOrder := false;
) ^6 `4 h- n# [$ T4 J                        @.DrivingHome := true;
3 o8 J1 |( s4 O6 b                        rgManager.tryToStartTransOrder;
7 ~1 M: f6 @' K" D3 |: t# P                        if @.Destination = void- O1 u6 ~# Q8 Q
                        then -- no transport order for vehicle @
/ i# c5 \/ w+ F, ?3 x: Y                                @.Destination :=
9 \2 M/ ]& z" ^" q* U                                rgManager.nearestFreeStation(@,track.~);1 L2 P7 }% _0 v  t4 @4 `8 M
                                newDirection(@);   
! Z1 e. V: K6 f' W, M                                if @.Destination /= void then9 r/ J3 V) H) g
                                        @.Destination.NumReservation :=! \* l. V. O( g9 k/ Q8 P
                                        @.Destination.NumReservation + 1;; b( ]/ o! h6 ~+ J
                                end;
, P; [: f$ z2 l                                @.CurrIcon := "drivingHome";
* z1 E5 {: U7 c" J- ~                                @.DrivingHome := true;
- s1 @: _( T, P: B! q                        end;) q  C0 R" E4 B: ]
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station& `; H# K' q/ _% ?9 f
                        part := @.transpOrder;8 a1 g; s" q" B. o
                        part.move(@);-- load part) K9 j! F% i7 S) {' V8 X
                        @.CurrIcon := "load";4 o+ N8 i4 x4 P: M% _! K
                        GlobalDistObj := part.globDestination;4 g/ X5 f( z; n
                        assignLObj := rgmanager.rgAssignL;
# J  S( a' e! Z$ n0 N2 i4 O                        row := assignLObj.getRowNo(GlobalDistObj);% M* V( u  j: q4 e0 @* `
                        if Row = -1 then -- since 70* G4 K- h: k& }2 U( I
                                if lan=1 then: n* o, M2 D3 h: w
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* Z+ V( t- Q+ y                                                to_str("in der Andockstation: \"",?.~.name,"\""));3 Y3 I" X: C* p- O+ e8 _. ?
                                else" s3 `0 d( |8 y! P6 q
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," e7 x: g, q2 d( c. W2 F2 J- B
                                                to_str("in docking station: \"",?.~.name,"\""));                               
+ _, v3 m  V& x( n5 j+ i& _                                end;
( F( S0 S. r3 p                        else! D8 o7 _* p9 t. S( X/ S8 ~
                                @.Destination := assignLObj[1,row];3 E% N; e8 ?) u  E
                        end;                        4 v7 c5 j; O3 T& `. i0 u. S
                        newDirection(@);
3 D. S. x0 Q7 J6 o( b                        @.HasOrder := true;" G9 n+ ?7 T9 x$ x; s' ?4 j8 `
                end;9 ?( W7 ~$ Z: n, a  H
        end;8 Y1 ]- R, Q0 @" n% D. W$ _8 y9 R
end;        -- of the method2 n) n6 A7 ~3 d( a6 m
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
0 N  ?  \9 q" }4 C0 b3 W: _! O$ H* N3 {! l# D
这是AGV_putin中arrive的method。
4 G8 M4 M9 @6 g+ m* g+ @6 O# K$ m' t) [
当到达物料速度越高时,这个报警更多,9 F5 @! r0 H- o: @
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。) q5 n$ W* R1 U# x% F! y
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
- L* l& ~2 |, F+ C  ]' H. `2 o
: T$ c. _0 g- g7 j% @4 b7 `* g另外一个小建议,就是move,所有的move都可以这样5 o  P& @0 |8 |. ~
if not move() then debug end0 m4 j# o' p; P' t  _4 V- B. q
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。! d/ p0 j% `/ P6 i8 S. ~2 i7 e
plant simulation中的free libraries有AGV模板,
* c) T$ @3 j+ K& }9 G! q, B里面也有案例。
; V2 o5 E4 ^* x  }: m, r4 h* Z我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
& N4 O: ], `8 b0 X- @0 j
  P: i+ ~" P  u: H) F; [$ p我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ) i& z8 v* w! n6 ]: ]1 K# t! h6 h

* i$ V: h) P/ ]4 q+ _那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
1 V! f( u7 x. X3 q这是AGV_putin中arrive的method。, L; l. V: \5 D* p) d* ^

; U0 A) E, \: ^当到达物料速度越高时,这个报警更多,

) Y1 Q; B% b4 e, g: r另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-25 12:35 , Processed in 0.015622 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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