设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8363|回复: 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'
: {& a4 s: ~: K& D5 N*/. |( H% U! f  T- p1 [- s' f5 l3 Y8 \
is
* X$ L; r: |/ Y" D" X: u) }4 t" c        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- Z5 [- c: K- A2 U( i0 v9 u( Kdo
* k4 @: A# j" H% H* V, W% f' \        Lan := rootfolder.Internal.Tools.AOLlanguage;8 S! W' F. T: E+ u5 L1 U
        if current = @.Destination -- else return
, U8 d- n4 @, U8 u        then
! `6 _( ^; {: ^  q3 |! ~                @.Destination := void;' b4 M5 E" ]/ s7 Z2 M5 z
                if @.occupied then
- y1 F1 y7 Q* h                        part := @.cont;
5 ^6 q2 N+ @6 q3 C/ q' ?! i                        @.transpOrder := void;
3 G+ u, ?9 Q  ^1 m* _5 X2 u( {3 L                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" W0 [% P# H& u4 O1 ]                                @,root.eventcontroller.simTime);
. t6 ^8 {9 N$ O, {# t. b3 ^                        @.HasOrder := false;- C+ a# x, ^5 c& l) n) S
                        @.DrivingHome := true;
  F5 X3 \3 _. ~7 n4 x& B$ D- C                        rgManager.tryToStartTransOrder;
3 T! j7 C7 l, B                        if @.Destination = void! p1 D( x: ^8 R  W6 |" q
                        then -- no transport order for vehicle @2 o, O7 B! y1 y& H1 P# E5 s0 g7 }
                                @.Destination :=1 u5 U2 ~2 P- S! m! S7 l: B
                                rgManager.nearestFreeStation(@,track.~);
4 K& ^4 A5 _. ?0 \& g                                newDirection(@);   : y- X  m( x9 d
                                if @.Destination /= void then! _" b" u" W( J4 z8 u, d( C0 r
                                        @.Destination.NumReservation :=
* T- R0 [, _, z2 g! z7 k                                        @.Destination.NumReservation + 1;
. F& V6 F# y' g+ y, H. a                                end;$ {& E  B9 r$ _. q- `! E
                                @.CurrIcon := "drivingHome";1 ]( w' c  u" K/ l' b. v
                                @.DrivingHome := true;
- Y  @. ?% Z; H( [                        end;. q; \) E$ M0 N( _4 }. B
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- ^% ~4 v6 |. R+ A6 Y4 w                        part := @.transpOrder;
3 n( y" }6 B% b$ }; G4 ?' V                        part.move(@);-- load part8 P; R/ h8 a7 p$ e5 Z" L. x
                        @.CurrIcon := "load";
* `; f6 A% |  y                        GlobalDistObj := part.globDestination;. d' O" n) [$ x# ~( G% B
                        assignLObj := rgmanager.rgAssignL;7 R& U3 Y5 G5 P4 p% U! B' y$ u- l
                        row := assignLObj.getRowNo(GlobalDistObj);
' ]6 o6 ~1 j1 |2 P                        if Row = -1 then -- since 70
2 E6 ], E5 ~% c& R; Z                                if lan=1 then
6 b; X# G( u: [! f& c                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 q" {* m8 p' k) m6 q                                                to_str("in der Andockstation: \"",?.~.name,"\""));6 O1 v/ }: R8 ^- n" c0 D! \; t
                                else, @+ @2 g; G- X2 U* i. ^* G; C
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& Z5 c: u$ S, q
                                                to_str("in docking station: \"",?.~.name,"\""));                               
" Y$ {9 u: p; w, H5 g0 E: D                                end;/ ]4 S$ }' _: j2 w6 ]. A4 R
                        else6 T& i" @) A  g0 y. G
                                @.Destination := assignLObj[1,row];% w/ v* `! ]( _3 @" e: b
                        end;                       
) @# W3 m# R  j                        newDirection(@);
" S2 ~0 v5 R) u& g* p( k2 _# p                        @.HasOrder := true;. ^) J9 r" l9 g' r2 \
                end;
( x- s3 L5 G% l/ G+ `- w        end;, |8 d' e( T7 o
end;        -- of the method0 O+ @. |, z6 o" {) H- N
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑   ~$ `' k3 d: i

7 _3 c1 c7 e$ D+ `这是AGV_putin中arrive的method。$ }( i6 O+ D: m# G2 O
* M  }) z( ^' S( C( m2 b  G. Z
当到达物料速度越高时,这个报警更多,
" T, O3 ^7 L7 _+ w可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
& x) D  n$ I, h! c" _# Q; B  O: x程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?& d$ C1 F9 ]1 X' ~$ h+ \' z/ w" H

3 p* E: K7 N9 D: n! t8 e* z另外一个小建议,就是move,所有的move都可以这样
; R! o+ j7 w* ?9 D( {if not move() then debug end
3 s) C; n8 }* j% z8 M1 O这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。+ e# ^- O% v7 f; O
plant simulation中的free libraries有AGV模板,* y. `% c' P6 x
里面也有案例。
3 P5 U/ P$ Q' T: M. B4 V我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
1 b$ f6 d  z9 U' r. L" {8 U8 W$ K* K  |$ u6 |/ l$ x
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 , F$ w) S8 x" b: p4 D: g

" H4 m( M+ ]5 K+ u那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 % ?8 Q3 r* f  |% @, `$ z6 s) J
这是AGV_putin中arrive的method。
$ d. x- t5 ], \. x8 r2 x
, T) @; i  z, X/ [! y当到达物料速度越高时,这个报警更多,

; v5 t/ R5 ?0 k7 q+ u7 h, e另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-30 15:48 , Processed in 0.017124 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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