设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7470|回复: 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'
; z' c2 S4 [. X/ f  [3 w+ ]$ l( a*/
( v4 A1 ]0 j2 t) t5 z# uis4 o& q' T, W( ~) U% S- h
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 I$ v* z' v) G! C3 Q$ Tdo2 s# a" n0 o8 _! _1 u
        Lan := rootfolder.Internal.Tools.AOLlanguage;4 D& A. \& J* Q# D; T& W
        if current = @.Destination -- else return' V; T2 X/ _& P/ C. ?, W& R7 j
        then3 N- m8 I- h0 |) G$ B2 b$ w5 E
                @.Destination := void;5 n; S# L1 n/ N! n, S0 l: l
                if @.occupied then  _0 t4 i6 V! j, O0 g
                        part := @.cont;
$ W* P* T9 m& e( w" C8 @: U8 Y/ d                        @.transpOrder := void;& Z5 o  H: }+ I
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 O' t# C+ B- |$ K) f% d
                                @,root.eventcontroller.simTime);6 \; _; k' }# j: S; [
                        @.HasOrder := false;  ]4 }/ }4 G7 ~% Y, q7 W$ j
                        @.DrivingHome := true;
+ K" {8 p$ `$ i8 R3 W                        rgManager.tryToStartTransOrder;
/ }# }& [; ]+ K                        if @.Destination = void# }. b# c* d, F- {: j
                        then -- no transport order for vehicle @! X; t% a/ Z! e: k, c& K+ Z% l
                                @.Destination :=
& x; s3 P5 U0 I  k8 u1 X! S1 A                                rgManager.nearestFreeStation(@,track.~);
$ o; y# w& E/ L  V                                newDirection(@);   
, T$ R* f( t  w: x8 k1 }: G& N9 `                                if @.Destination /= void then
( z  @9 [- |4 x# D; F% j+ ^/ n                                        @.Destination.NumReservation :=- X; D! }5 T3 _7 [  L# V
                                        @.Destination.NumReservation + 1;: z& k* o& |4 m
                                end;& |' z+ V. i( n3 y) _' i+ l
                                @.CurrIcon := "drivingHome";
$ |/ b0 Z3 {2 `' H. Z                                @.DrivingHome := true;
4 m$ w  j0 e3 O$ K                        end;
0 j: y6 m  L) n! w' i* u                else -- the vehicle @ is empty, both vehicle and part are in the same dock station% H. X7 M2 j: C6 A  r! ]; Q# M$ J
                        part := @.transpOrder;
' u/ S' {) k0 z1 A                        part.move(@);-- load part1 Q' g* `3 W5 b3 n' L: \5 U
                        @.CurrIcon := "load";
/ A. l! y7 |, x" l1 ~8 F! k                        GlobalDistObj := part.globDestination;; v( f5 h% b) e3 r( z: ?
                        assignLObj := rgmanager.rgAssignL;) p4 r6 z( z# A' ?- [7 n& s' W. p
                        row := assignLObj.getRowNo(GlobalDistObj);* ]  q( q8 Q7 F
                        if Row = -1 then -- since 700 R5 g! i6 M1 [
                                if lan=1 then, p" [) R: w& V( k0 v
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 ]. c! s& i+ D+ _" b' k                                                to_str("in der Andockstation: \"",?.~.name,"\""));/ u; C: {! j, s
                                else
5 e7 p4 e1 A2 ?                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& c& s: e# X* g$ _* E: R. b                                                to_str("in docking station: \"",?.~.name,"\""));                                ' X6 n0 d! b5 i1 i7 Q
                                end;' r; d: ~9 v. ?1 g0 v' O
                        else' t8 v; E+ t2 w4 ^7 {4 }$ C0 c
                                @.Destination := assignLObj[1,row];7 }+ ?! G7 c2 Z; }% ~) |- s5 R: `
                        end;                       
4 x! Q4 O. v3 Z. d                        newDirection(@);, I4 m1 U) u6 ~+ P6 l
                        @.HasOrder := true;
/ f8 Q3 [# E. k& r                end;
7 T! d# i! D: p: _        end;
4 G1 U# n5 n5 K" Z- e* Yend;        -- of the method! H3 y* N0 s! w0 i
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
. {7 ^- n$ ~* X  [0 [+ L8 P/ \: }4 Z* n0 A1 E: q: ?
这是AGV_putin中arrive的method。
+ C. J; _, o6 D( C& _7 }1 d" j" n$ Y& y; Q
当到达物料速度越高时,这个报警更多,
- i( D8 e* D3 J0 V( @可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。; w3 i; @' d7 O; f, _; |9 y
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
8 ~+ _; C" l' w# O( j) B. K
: M. M) S6 P: G  Q- d5 p4 \* ?另外一个小建议,就是move,所有的move都可以这样: Z; T: v6 Y- m. ?+ O9 F
if not move() then debug end4 v& A8 _1 P( Y
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。1 \' u6 T5 ~) d: |5 U  X
plant simulation中的free libraries有AGV模板,' |" G8 b4 s; T8 Y3 q# t3 {
里面也有案例。
, k7 w- |/ S: B0 U$ N4 w/ l1 n我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。. g* f# s6 d1 q$ y) w5 b
" d) D, ?- @( T! U
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
# {! R0 f( K+ V; D. F! ~" c+ q
1 e+ n+ J0 o6 K那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 4 t9 R! ^& d' i5 W; d  f, G
这是AGV_putin中arrive的method。* V% t- T+ z3 T/ }

+ `! P7 F# E" z  Z' v; `3 o/ F当到达物料速度越高时,这个报警更多,
& a2 V! n3 u, R  c5 W
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-13 10:15 , Processed in 0.024662 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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