设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9624|回复: 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': w, L- e+ L# W6 }
*/
6 D5 T( `5 b& J7 T" {! \$ l, Y$ s& eis
/ _/ }3 H3 P! T/ a+ j! o        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
  T& U" f) ?% G& l) x$ i2 Fdo
- F7 f) X4 g- `' z* R# X& P% _1 w        Lan := rootfolder.Internal.Tools.AOLlanguage;
1 M/ Z3 ?2 |4 f        if current = @.Destination -- else return' {$ g/ F2 M0 e) Q3 M0 h# j
        then
( l" K. p$ ~! p4 m& v1 |8 I; q: H                @.Destination := void;
+ q* A% y9 E& ?/ B" ~7 E                if @.occupied then
9 x; x4 T& J# ]: c' `$ |) M                        part := @.cont;
! n$ x5 O) P' O                        @.transpOrder := void;4 k5 ^) W( X2 W: w3 G8 }0 |$ t  R% r
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( c' ~1 g% a, A; {                                @,root.eventcontroller.simTime);
* P0 [% |: m% H' N: ^) I                        @.HasOrder := false;, e5 c7 C" \4 M& u9 U5 y; E+ S5 ^
                        @.DrivingHome := true;: O8 h$ g( J9 q5 E* p
                        rgManager.tryToStartTransOrder;
) O& m$ y: R. Z1 @# i                        if @.Destination = void
1 z; W4 w+ g: n/ m& |                        then -- no transport order for vehicle @
8 V0 l1 d2 W0 d; F                                @.Destination :=4 G& a1 A1 U* j# w
                                rgManager.nearestFreeStation(@,track.~);
5 n5 Z7 j2 T1 \% L                                newDirection(@);   * H* j7 p) u5 Q0 d# ^
                                if @.Destination /= void then1 Z" K& k% f$ i% Z
                                        @.Destination.NumReservation :=
2 T, N/ @" u0 P+ G7 Q                                        @.Destination.NumReservation + 1;
! G3 O( \2 M) [% [' g9 H8 b                                end;
1 _7 {& ]% }: g% d; `                                @.CurrIcon := "drivingHome";
, k7 w% p6 E* B) n                                @.DrivingHome := true;. @8 u3 g! s" y+ f
                        end;
- x4 J% `" n4 [+ I                else -- the vehicle @ is empty, both vehicle and part are in the same dock station' ~/ A4 R+ m: a2 v  x( Y
                        part := @.transpOrder;: L5 D) M+ c* W9 w/ C: G7 u( z
                        part.move(@);-- load part
  U, Q* x: H$ U, B5 @                        @.CurrIcon := "load";
6 N+ q; E+ [2 Q5 S& c                        GlobalDistObj := part.globDestination;# f0 F6 `7 P- L2 z7 a$ v
                        assignLObj := rgmanager.rgAssignL;( h% x" Q3 e) d6 P9 g
                        row := assignLObj.getRowNo(GlobalDistObj);. R: r8 M1 N: O  J
                        if Row = -1 then -- since 70/ F* ]9 n7 f) g* J
                                if lan=1 then
+ C& H1 f' K& {; A" [: \8 X                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 t! `3 z  h' Y                                                to_str("in der Andockstation: \"",?.~.name,"\""));. f' p9 c6 y) `# y
                                else% ?, w3 B" d7 m: d
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 N" _- Q6 h7 C                                                to_str("in docking station: \"",?.~.name,"\""));                               
) L2 z! E. [  e                                end;
$ d, K# B- P5 F! ?5 M  D$ [% u                        else! y9 C3 E$ w; A4 W) j3 ^/ k7 C$ \
                                @.Destination := assignLObj[1,row];
9 d, W  m" {. j                        end;                        ( `7 G/ H$ T' m  S! ^& Q7 q  @
                        newDirection(@);
2 h$ X1 r2 c1 Z' R: G+ R                        @.HasOrder := true;
. A9 F, U0 v7 Y$ ]+ k                end;# `$ ]  `& c4 ~( q
        end;0 c4 B5 L) [" G; Y, }) p# l$ X
end;        -- of the method6 }! _7 ~8 v7 x+ N; }
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
4 D+ L/ L  H0 o3 U9 _  t+ e7 q  t
这是AGV_putin中arrive的method。( n6 z; I+ E- \5 x4 P* \& _2 J

5 \3 N" N1 ?) X( r当到达物料速度越高时,这个报警更多,
: }$ y8 Q) L$ ?& t' R0 y2 N" q. W7 o可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。3 X% ?8 g3 X2 K2 `& l& Y' X
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; x- g) R- j, Y* o
/ \; F! @+ T: M2 w. _% D  S
另外一个小建议,就是move,所有的move都可以这样
) |# r+ G% a6 @  \5 r* hif not move() then debug end* Y: x8 `  w! h
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。- k- v$ k8 q- \9 \8 ], {
plant simulation中的free libraries有AGV模板,
; n- G5 Q6 G$ I, w0 I里面也有案例。
2 \$ z* m# z0 F* d6 y/ V6 ]我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
' ~6 v& ^- s$ o+ C* {0 K0 `6 `  M  S# [
' Z: E8 v& X, `* T4 a  A+ \我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
  N! e& @- j, v  b& P) M4 `4 }! ^# X# P& `+ x# }6 m2 i/ A1 m
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 7 r! N: l5 p! V! N+ }3 L1 L
这是AGV_putin中arrive的method。
  W! k! K. j: i9 I. ?+ F. K5 N/ o/ s2 l: U" X. ^% ^
当到达物料速度越高时,这个报警更多,
3 m/ M/ B9 j% H! Z: Y  T- Y: R9 W
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-12 13:37 , Processed in 0.017587 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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