设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6897|回复: 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'9 z. x  c* D( U8 q
*/
, o1 F) I+ ]5 L6 uis
5 |0 u3 F( E0 ?% |4 P+ `  A        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* N0 @: [8 [4 J( V8 Ddo
7 ^9 i" P" r3 M8 G( k3 r: E        Lan := rootfolder.Internal.Tools.AOLlanguage;; V: o  R3 j& c1 @
        if current = @.Destination -- else return
5 a7 U& C* J" S! X        then. P) t% R. ?7 ~
                @.Destination := void;
6 I3 [$ K" I& \* f0 i! ~                if @.occupied then
7 H9 v6 z8 H! M8 p3 z/ {                        part := @.cont;
1 Y8 d; ?% J- ^- d                        @.transpOrder := void;
: g$ g- u8 j/ C( b                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' O: X8 U0 ?) o* s0 s                                @,root.eventcontroller.simTime);
9 h) w. {0 t' D- O4 p                        @.HasOrder := false;1 @" z* f9 `/ C7 `4 w
                        @.DrivingHome := true;/ W  h$ }* @. g8 @$ g: f% [
                        rgManager.tryToStartTransOrder;
4 M0 K1 k" M' H& `% \/ \2 F3 V( G$ O                        if @.Destination = void9 o: C/ m/ d7 {) V7 J3 Y: b
                        then -- no transport order for vehicle @! |8 |, R& S' s
                                @.Destination :=) ^' ]  I  L4 A% u. X7 t' A
                                rgManager.nearestFreeStation(@,track.~);. g; d* d& m* f2 A
                                newDirection(@);   
8 H* B3 s: p, I                                if @.Destination /= void then6 b  [1 a5 Y2 i
                                        @.Destination.NumReservation :=
4 k/ S- D* M7 q& F1 {                                        @.Destination.NumReservation + 1;& T9 K$ C* _) L& m. e" c' [/ D0 E5 W
                                end;
2 I; L- h8 O, Q+ f& S* N( V                                @.CurrIcon := "drivingHome";6 x7 L# U  [( O" U1 F! a# ^( O9 K; W
                                @.DrivingHome := true;
4 p* [: O9 c; E5 A  y7 ~( E                        end;
' U: j6 Q6 ]1 Q5 ^0 R                else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 S1 S9 ]2 Q. U# S/ M) v
                        part := @.transpOrder;
! h- e4 e' A! C: ~& K                        part.move(@);-- load part0 J/ ]8 O: @" B
                        @.CurrIcon := "load";
* q/ V2 P; V5 w  t* F                        GlobalDistObj := part.globDestination;
! i* K& {4 \3 A: N; e! h: H, B! U                        assignLObj := rgmanager.rgAssignL;9 s9 L- H# S2 x' v/ T
                        row := assignLObj.getRowNo(GlobalDistObj);1 W. L5 [1 _8 K3 u
                        if Row = -1 then -- since 70/ O7 C& w) c* C. v# [: G
                                if lan=1 then
0 h# _; y0 u+ N. C) L3 u3 Q                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& w* k+ Z5 Q( d: S3 B
                                                to_str("in der Andockstation: \"",?.~.name,"\""));& o9 p2 F8 @/ C. t0 Y: V3 V4 l
                                else
1 h$ r4 M* W. O( n; e# n3 a. s                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 Y. i9 K3 n; k8 X
                                                to_str("in docking station: \"",?.~.name,"\""));                                ( ]4 H$ W( C( L1 T
                                end;, R" N4 i( K0 t# O7 }- u
                        else
# _+ H" K9 c% R2 t                                @.Destination := assignLObj[1,row];4 j# h2 P! D/ z0 A4 o, w
                        end;                        ' f% `# v+ n" P0 ?( w% k$ G
                        newDirection(@);6 x. @. r* w# P+ @% z1 Q: D4 y0 h
                        @.HasOrder := true;& T, G" u+ s% q( r$ Y* O# T4 d$ P4 |9 c
                end;9 N' R4 n6 ?5 D$ S6 A
        end;  n0 d6 R/ }; y* ]8 \
end;        -- of the method
3 e9 C" V: J% n  G: p4 E6 x
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ( B$ d) K! X# H) Z" w+ w  |' J
/ }/ Q! @% D' N
这是AGV_putin中arrive的method。$ g3 v* R; T0 k% r; V  |" |

' j/ U8 ^5 g  [  @8 B- G当到达物料速度越高时,这个报警更多,$ W: p$ |: f3 B) l
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。9 g- Y1 O9 o& t
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?! x& m; h, a$ ]

6 u' W0 s- k7 b另外一个小建议,就是move,所有的move都可以这样8 e9 L4 M. P' p. w0 [
if not move() then debug end
- d: }  R8 q( z5 B* I3 i1 I这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。2 s* V$ D( L$ Y- l% B1 Q- _
plant simulation中的free libraries有AGV模板,
# F4 x- |/ R) |" J% M里面也有案例。
. r* P" i, ]$ p我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
/ a, F4 T8 N& Q3 i" z, T; r0 }3 c: [% J3 J& y
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
" Y: E6 O; ?6 J" n
* N# W* v$ x* T- _' f8 ?# G9 ]/ @' s那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 # T' Q) v  }6 `! Z+ ^! ?
这是AGV_putin中arrive的method。
1 \% ?3 a7 U. K7 t
4 v0 F* P* M- g( c* T* w7 g当到达物料速度越高时,这个报警更多,
! ~9 a* L: v' x  l9 K
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-5 11:00 , Processed in 0.016664 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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