设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8635|回复: 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', j1 k! c' ]% h0 X
*/
0 Z1 m5 f! b7 fis
' Y  {# t- |# w$ G        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) t  E# W9 G) L6 R5 J: Tdo
6 X1 C1 r$ B) m' `0 W        Lan := rootfolder.Internal.Tools.AOLlanguage;
0 l1 T$ M9 u$ z" v        if current = @.Destination -- else return
" n" O* l) l$ v+ T        then
; Y% r6 N) Z2 ^% G- x* ^" P                @.Destination := void;% Z9 i& n; D( X1 I9 j% K
                if @.occupied then6 F/ x* G/ ~! {) A$ F+ J! |0 K
                        part := @.cont;
. d! I+ \) g' Q                        @.transpOrder := void;" h. A! j* b3 U
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; i8 j/ p$ s! x
                                @,root.eventcontroller.simTime);2 W  R- L$ p+ i6 j/ `1 C9 \" c
                        @.HasOrder := false;
7 U* W' F, F4 [+ Y7 m) b' @                        @.DrivingHome := true;
" ]5 |: B" l$ i# [; t! M                        rgManager.tryToStartTransOrder;
6 `6 G2 ~! N2 ]! `+ g. y0 q                        if @.Destination = void' k/ Y" {6 }# W8 E* G5 ]) U) I3 e
                        then -- no transport order for vehicle @, C0 j, R' x) z2 j7 q' r* m" N5 C
                                @.Destination :=% L/ d3 [) c8 ]+ K+ I1 \. }
                                rgManager.nearestFreeStation(@,track.~);
1 A- g- w( L. }0 ?6 I+ W                                newDirection(@);   
! R9 Y6 a) V% r6 g                                if @.Destination /= void then: K6 j/ g; [) k
                                        @.Destination.NumReservation :=; X. o& ?$ j* ?9 ~! d
                                        @.Destination.NumReservation + 1;
1 i, P' I1 N0 ?                                end;* M  Q9 [5 n0 P7 X) W; G4 ^
                                @.CurrIcon := "drivingHome";; z) l8 `/ f- z/ l8 v, [
                                @.DrivingHome := true;
# o( V$ u+ M# H                        end;
( P  ~& Y6 ~0 Q$ r5 }                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, L5 M/ o4 K# ?) L                        part := @.transpOrder;
, K8 v9 q4 _* I& M+ e) W  j                        part.move(@);-- load part; j8 Z4 a6 ~0 P# m
                        @.CurrIcon := "load";% Y; l1 V; B( o  I& [, l- H1 _
                        GlobalDistObj := part.globDestination;
1 `1 N3 ^$ J0 a& D                        assignLObj := rgmanager.rgAssignL;% B5 L) W1 w: ]. M8 _
                        row := assignLObj.getRowNo(GlobalDistObj);. ?. l6 o" }1 b. w) P) N1 T( Y3 z
                        if Row = -1 then -- since 701 k% E) P4 s% a9 e
                                if lan=1 then
/ S5 ~& A1 g. V) m  i% N9 }" p                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' l" \" l/ u7 E6 t  T) W+ J
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
7 B6 @8 i5 J8 [                                else* n+ T9 u/ o. O& ^
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 j1 B$ D8 t  _                                                to_str("in docking station: \"",?.~.name,"\""));                                # m7 z2 _7 S' H9 _
                                end;
+ _8 F. ?5 Q5 X                        else. R, A+ `6 d9 \  [4 t" r: D" U9 q
                                @.Destination := assignLObj[1,row];
* {7 F4 F2 H% L; @- H                        end;                        $ k$ h! Y: A: M$ J+ v/ J7 ~; T) o
                        newDirection(@);
- C# v7 x6 x0 ?  n1 [' s) N0 d                        @.HasOrder := true;
' q* a, Y: a, v' r2 O, H& V                end;: V# }9 I7 o4 c% m2 `% N
        end;& S+ K) z" z; R4 m$ t1 w/ p9 ?" `
end;        -- of the method5 U8 \: X" U: ]9 e/ u9 T
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
3 r3 F* D0 q0 j
) p2 j! b$ P; P这是AGV_putin中arrive的method。0 ~' s; R- u4 }/ q

: d2 H8 C0 h) r当到达物料速度越高时,这个报警更多,5 R/ \2 y' m; O
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。; ^6 U: @: R& l  h
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
" f6 u9 @# J: Y8 x1 w6 ^
) Z8 ~, j/ U& F: ]- S另外一个小建议,就是move,所有的move都可以这样
# m& C* X7 y8 d/ S$ Q  ^1 B0 uif not move() then debug end3 ?0 ~* |" F; c, D8 c; j+ T
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。* X, O& H0 K6 o7 x) Q  V, ]" L6 E
plant simulation中的free libraries有AGV模板,
* z: n% f& W( j里面也有案例。
+ ^8 K6 ^' }6 w% C; z7 k我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
2 h9 J2 E6 n# K- e, p! b8 ]( j" f8 t+ G, L5 Q; ~
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 * N( {( V  y, u% M' F) _4 K
, w# M4 d) Q2 o* o
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 : Y, Z# u8 [: _
这是AGV_putin中arrive的method。
* d. h2 v7 j, @" z" N& P6 W* m4 h+ E
当到达物料速度越高时,这个报警更多,

; |5 Z) c$ |4 h0 g. W另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-17 11:30 , Processed in 0.017427 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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