设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5593|回复: 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'
) _! a+ W. ^" V- ]4 e; g" Y*/; ?! [; b/ ^* m/ s& g9 ]4 j6 U
is
, Q4 s; e& ]% B$ p        part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ M9 {% }) z( X
do( {& }5 Z3 c6 d8 w7 H: s" Z
        Lan := rootfolder.Internal.Tools.AOLlanguage;
/ W& f9 N8 R+ Z5 i, F. H        if current = @.Destination -- else return
- o3 E) s/ j7 g6 t1 s5 p* C+ w        then
1 {  t+ `" S* q- S, B: G. {                @.Destination := void;
" Z* F3 O2 X& m& p; E                if @.occupied then
; a. y7 o. z. w3 y6 A                        part := @.cont;
% N3 W3 ?  W& z                        @.transpOrder := void;5 c" W& F: M  W6 @
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" ^. P/ `. o) X" e& B0 r. O; L                                @,root.eventcontroller.simTime);% {4 ?5 ^: U3 W  o8 s0 }
                        @.HasOrder := false;
- C6 x6 G) E! g4 y                        @.DrivingHome := true;  s% i! P- ]$ `
                        rgManager.tryToStartTransOrder;2 u! Z; g5 c! t6 F7 }
                        if @.Destination = void! z/ p. ^! v  a; L1 ~( K  i
                        then -- no transport order for vehicle @
; V2 O0 B. F& M. A& G$ w7 r# D                                @.Destination :=/ k7 ]; v* h3 ~2 O1 b
                                rgManager.nearestFreeStation(@,track.~);  e. [( L9 X$ ^
                                newDirection(@);   
# _1 ]! s0 |7 p* ^/ n9 P                                if @.Destination /= void then8 u7 L6 w, d# E' T7 U
                                        @.Destination.NumReservation :=
* A+ {( ~& d4 F, _; Q- {4 Q                                        @.Destination.NumReservation + 1;
% ?; w, `& L& E1 D: v( b                                end;
; _  o) W+ M( ^! {                                @.CurrIcon := "drivingHome";
* u  [$ J* b$ e1 a$ r                                @.DrivingHome := true;
- ^- r# S6 p4 ^+ C4 ]% i- d                        end;+ J' _8 I% o; l1 z1 A+ @. g: I
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 k* n& X1 k9 b/ K' b3 f7 J" x% R
                        part := @.transpOrder;
$ ^) H+ s0 T8 c, e! h                        part.move(@);-- load part- q& i$ h  A: ]7 o
                        @.CurrIcon := "load";. g3 x& Z) j' h
                        GlobalDistObj := part.globDestination;
4 d) m: [; Q' |  ^! \, d/ _8 V                        assignLObj := rgmanager.rgAssignL;
! J" k, @3 ]5 `' F  L' K                        row := assignLObj.getRowNo(GlobalDistObj);; {% I* Q! J; D, }) U+ Q
                        if Row = -1 then -- since 70- b2 E0 W' _5 Y0 o3 i' _3 M* e2 \4 y( ~
                                if lan=1 then/ P" k5 h! E! f" m9 i( q
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ z; }  d4 u' t$ r* S3 c/ k/ ^
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
6 V, y$ s$ Y# W) C" p                                else* K/ ], n0 {' q  Z5 h" m0 [
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 h0 I. Y9 L/ R* {" U% D. t$ G7 j                                                to_str("in docking station: \"",?.~.name,"\""));                               
+ p8 N7 Q* G5 X/ X                                end;9 J" l, P+ T) p3 b9 U% d+ V
                        else
6 t& d" b* N* [  p0 a- n                                @.Destination := assignLObj[1,row];: L% ^* E& X" a4 v
                        end;                        7 s& s) s" y+ P5 j$ L. ^, g
                        newDirection(@);: K) j0 i0 z9 l' Q/ y+ `+ x' O
                        @.HasOrder := true;' T# i$ `/ e. W0 y% r6 @( F
                end;: R! G# }7 N% J# q8 {
        end;
) @3 g5 `5 Q8 C! zend;        -- of the method/ s# G5 m% j* f9 s
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
% w0 ^6 Z& s% g+ W  L% [. m: J0 ?, N0 E( I/ t+ D9 V" j7 h
这是AGV_putin中arrive的method。) {+ m  j/ T/ r. E- R  R- s7 [

& O6 |9 ?4 f4 I' @4 |' Z: |当到达物料速度越高时,这个报警更多,
( j9 ?1 V! a7 t" l, M可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。9 w" F4 K: |( x' U" M9 J
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
- J) C! ]( m/ z! T4 q6 [
: q: @- t; S8 L" j" P7 H2 m另外一个小建议,就是move,所有的move都可以这样
# Y9 B4 w6 c6 b  v# A+ v' `, ^if not move() then debug end
! s+ ?0 O4 e6 m" L9 h这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。- o- A4 Y' G3 a3 t* ?
plant simulation中的free libraries有AGV模板,
4 G! ?$ D! i* R& Z8 |- F7 j+ \' L: l里面也有案例。
) N3 I# q8 l2 W我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
" A( E% y0 w" R5 i
: A" x; O$ q, t% T$ e; f, G我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 , W8 y- K7 Y" T8 b
2 k1 N* i( r% N% t( C& L
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
: Q& }0 g; n6 f% L: Z! P. ^/ `3 f这是AGV_putin中arrive的method。
) ], j! X1 ~4 C: ~4 ]* `; C  i; T- r, H, c* Y
当到达物料速度越高时,这个报警更多,

- [/ u8 A4 p: p8 c- x: M另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-7 19:05 , Processed in 0.037585 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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