设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8624|回复: 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 T! W1 Q' E. R
*/& y2 u' x8 L) y, ]' l3 u5 y/ k
is6 Y) A# ^% u$ B# }
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ d) T' ?2 H1 a2 G) T2 ], r
do% _2 C& b  H, r8 l
        Lan := rootfolder.Internal.Tools.AOLlanguage;3 y. S* Y/ i$ ~+ s' |
        if current = @.Destination -- else return# Z7 G9 f" R9 A4 g1 g8 @
        then
# U3 U! U5 T. y+ x; X% ^; r                @.Destination := void;/ e+ \0 ^2 K/ i( }1 f0 C6 [
                if @.occupied then* k3 y7 [9 \9 x( f) ~8 e
                        part := @.cont;! }& I) d" C% \% }* U$ J. \) w
                        @.transpOrder := void;
! Q( I  [% @, }2 C$ _6 _& i# F2 U                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 w2 G* b. C( C- I- L- P5 W                                @,root.eventcontroller.simTime);
, I  s0 X0 f4 p0 o1 @7 y                        @.HasOrder := false;  q. |2 }* t; N) B1 k/ A
                        @.DrivingHome := true;
- E9 z  S! g! j. M                        rgManager.tryToStartTransOrder;8 u& F. w9 p* i. c" b  ^; H& p; \& d/ u
                        if @.Destination = void
4 }  r" N) R. _  D' I9 q! ^# D                        then -- no transport order for vehicle @( P  b& F' w! ]
                                @.Destination :=% o3 v% J& G/ y
                                rgManager.nearestFreeStation(@,track.~);1 t; {- c& D9 r! J+ p3 L
                                newDirection(@);   
! F5 {4 \& g% Z+ Y' n- [                                if @.Destination /= void then' c0 \( D6 O# x5 ^1 ~4 P+ n4 y
                                        @.Destination.NumReservation :=; P9 D6 i) D& d- c* ~3 k
                                        @.Destination.NumReservation + 1;
8 \! ]$ g' v: j6 D0 n% J  l9 ?# {. @                                end;" d7 W; c, S' T  T$ R  A* Y! x  a& A
                                @.CurrIcon := "drivingHome";2 j+ T$ c! ?" E
                                @.DrivingHome := true;
, K  L& R: U. |5 @- W3 p$ U                        end;# U" N( O# C0 ~1 G* f$ S3 H
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. }9 ^) {3 w8 C( X9 \7 l- _, g                        part := @.transpOrder;
2 y1 H) h* P5 N4 A                        part.move(@);-- load part/ F& S" q+ O6 P
                        @.CurrIcon := "load";
- V! h9 r+ n4 f/ ]8 h  h0 x                        GlobalDistObj := part.globDestination;
' n4 o4 a* C6 m8 i" _  y$ }                        assignLObj := rgmanager.rgAssignL;
/ r$ z. o9 J& F                        row := assignLObj.getRowNo(GlobalDistObj);
0 P4 U+ Z2 h) i. B                        if Row = -1 then -- since 70/ C, m* o! ^+ @5 b. k# f3 l
                                if lan=1 then
3 B" S, ]9 G# ]' S$ K) t" @                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; B5 A* m/ E  V: U
                                                to_str("in der Andockstation: \"",?.~.name,"\""));5 [1 c1 }# j8 L  P, b1 E1 @1 L
                                else
  h$ ]1 j  I5 H) M9 s                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),  B4 K2 K/ R* Y
                                                to_str("in docking station: \"",?.~.name,"\""));                                ) d  |! f7 ]& V
                                end;
8 j5 t, x- s6 N% H+ K. G                        else
; V0 H' C3 X$ h( m" y6 v                                @.Destination := assignLObj[1,row];
  _: l1 E5 `+ i                        end;                        . g' {3 h1 C2 E% l; D
                        newDirection(@);
9 R* R9 k" F' v  Z% |0 m6 i                        @.HasOrder := true;. ~1 w; B& i# ^# s0 O8 g
                end;5 b# ?5 l0 U; p2 i6 k
        end;
4 _# D9 p, L$ f; {8 H( \end;        -- of the method
( z: c! N8 Y- v4 y, h" a& E
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ; v: }! T# L$ u' s" r6 r& l$ U

# d# d. J2 M3 f" ]这是AGV_putin中arrive的method。
8 a( O) c& C! c3 Y
6 p' ^0 T/ ]' l" Y0 l/ f' g( f. w当到达物料速度越高时,这个报警更多,: F+ y( o8 g' {* G& f3 W) [
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。6 _( C. U) O, i4 U# J  L# O  U
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?, ~/ Z7 T$ i: x6 X1 Q3 b

2 U0 V7 Y' m! T8 g% T- F6 E% d; L另外一个小建议,就是move,所有的move都可以这样" W4 k( H" d* j& O  [8 Z0 N
if not move() then debug end! a0 B  D, b/ T& D; S
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。6 N! g: L5 }  X- c4 ]2 b
plant simulation中的free libraries有AGV模板,6 O- L1 ^1 p% f( t# ?
里面也有案例。  e; K# C+ `, S( E: d  u6 R$ t
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
0 d  P$ k7 v3 b! b; f' v2 t7 V3 L& h/ E. a2 A" e7 Q
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ; g# ?( w/ ^# _) Z+ _% ~
+ W( `7 Z. x+ t7 S4 ^6 a0 _
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ( N# g1 h/ Q! y
这是AGV_putin中arrive的method。  }' I' ~" c; O8 g; Z8 l

3 M* p/ E. N% H$ G8 A# N当到达物料速度越高时,这个报警更多,
2 y6 T, a4 V: w2 B( z* d1 }2 t! M$ s
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-16 14:49 , Processed in 0.015387 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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