设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9561|回复: 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'
: G% i* C' h( a: {  v*/
& J7 m5 {) Z- D, X4 _' uis
; h+ U2 f& \. \: h5 k# H        part, GlobalDistObj, assignLObj:object;row,Lan:integer;! ]; l1 c7 L+ }$ p
do6 n* {, i; w; |0 ^8 r% \
        Lan := rootfolder.Internal.Tools.AOLlanguage;1 v' k/ G7 k2 F) O* J
        if current = @.Destination -- else return" s: C. f2 _2 V' m
        then9 ^' }* |5 @/ K' S/ @( U3 w1 J
                @.Destination := void;" |  n) c# w: ?; {
                if @.occupied then
" C+ J, c+ A9 W4 b1 A2 p/ n                        part := @.cont;
7 Y2 u7 ]* _+ F. ^7 r1 g% a                        @.transpOrder := void;
7 }# _  L$ d$ C; Y                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 ]8 o. X- T2 ?) `
                                @,root.eventcontroller.simTime);
  |, y7 q; ^$ K" F5 A                        @.HasOrder := false;1 K, \4 {7 f$ u" q) k) m* ]
                        @.DrivingHome := true;
/ h# `  B$ k; h9 F                        rgManager.tryToStartTransOrder;# o  m9 \2 Q3 `3 ^0 y% _! K2 z
                        if @.Destination = void
0 F8 l& F% a% F6 Y- S1 h. K* y4 f                        then -- no transport order for vehicle @
. c9 @4 C  b# F, a6 l( c5 O                                @.Destination :=* [( O( k3 Z  _1 o
                                rgManager.nearestFreeStation(@,track.~);
4 e  h0 l4 h1 E& G: |* R" }2 V/ y                                newDirection(@);   
" h9 K. e* i& ]' O  ]                                if @.Destination /= void then
" Y0 i! T$ M. D7 V6 p+ N                                        @.Destination.NumReservation :=
, G) O+ L% J& q3 e; v) P) X                                        @.Destination.NumReservation + 1;8 I2 P+ Y# U  U' c4 ]
                                end;0 J; y3 K4 p% ?9 p4 p6 m
                                @.CurrIcon := "drivingHome";
  k+ i, P( [) V1 ?" \( T# P- Q                                @.DrivingHome := true;' c6 T* m4 ^. Q* b/ x5 X: T
                        end;9 Z& @% D) I4 Z8 C
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; P, @) q+ v4 S: n/ K9 t4 O3 R2 v( ]                        part := @.transpOrder;- Z/ J, ^8 Z( D$ \, d* f4 ^
                        part.move(@);-- load part2 D* N2 M0 V1 `, {& \/ F' G+ |: Z
                        @.CurrIcon := "load";* v' X9 [; ?2 q" a; d" ]
                        GlobalDistObj := part.globDestination;
+ x: \3 T- `, J7 Q5 d; Y( H% }                        assignLObj := rgmanager.rgAssignL;
. c0 t5 w% ]6 P% Z& A6 F                        row := assignLObj.getRowNo(GlobalDistObj);9 G" w. O$ Y# a) c% `2 R
                        if Row = -1 then -- since 70
  N* W8 E' V, |" r7 R6 G                                if lan=1 then, ?  W# F7 F* r: m' ]0 @* n7 A
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
  b. {8 y( Z$ ]3 x- ]                                                to_str("in der Andockstation: \"",?.~.name,"\""));2 R8 K. ]+ N4 d4 G- [' U* ?
                                else& V2 s& p7 Q" b  o- y; ]
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. ~1 A: |- t' B+ u8 Z2 o( Q7 J% G                                                to_str("in docking station: \"",?.~.name,"\""));                               
* o, b3 |7 X. a1 u0 s" c                                end;: Q+ d7 f8 F, P$ K$ I1 s9 p
                        else, @5 ]1 Z" K! C, J$ x% X
                                @.Destination := assignLObj[1,row];5 y0 k) o$ n, l  B
                        end;                       
" N* Z8 _/ I, E+ V1 A+ L1 a                        newDirection(@);4 K3 ?5 |" `- ?4 G
                        @.HasOrder := true;, }8 y  `9 W' S' t! Q
                end;7 c0 i% x7 S  f0 d) g& Q! t
        end;1 h. i: c3 h; A: Q3 t
end;        -- of the method* ]7 i. L8 \# d! u
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
& m% ^2 @4 g, R: A- K! t8 g  ~% z2 d" b* h& W! ~' S* y' t
这是AGV_putin中arrive的method。% H& F1 i7 \# ]8 Z) V& f: z1 R8 V

/ G# ?" K% ^- r* }; {! Z2 I4 E当到达物料速度越高时,这个报警更多,- t0 N3 {! M/ B! Q0 `; _# u
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。. j8 l- z6 v4 q9 U8 x6 ]
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?0 V$ y  w! z1 K7 k/ S8 x( _

3 Z( g) T2 N- }6 R* u6 U! J% F另外一个小建议,就是move,所有的move都可以这样3 Z- t3 V& U6 W& U& |
if not move() then debug end! I* Z, f3 U5 i1 G
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
8 W/ }0 N: t$ m* U* Y2 splant simulation中的free libraries有AGV模板,
) b. K. Y4 u8 k2 G- t! w里面也有案例。. Y* X5 c( h, A
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。" F; V- p: _4 Y8 {* @- v
+ ]/ h" @5 f) Z- ^  p- v& D+ J1 s6 F
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
; g% Z1 V) k" d  }; M$ l
) E' X! {  W0 X/ h: R( t那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
4 ?3 w, l4 c) s, F- @这是AGV_putin中arrive的method。
5 u7 H9 X0 }4 v8 [. P
6 [. \' U) `8 R# w7 R! Q当到达物料速度越高时,这个报警更多,
" h$ u  H/ J. l; Q$ \9 S- X
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-8 03:14 , Processed in 0.026136 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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