设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8044|回复: 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'
, d2 v; @6 E; F*/
# i- `, u8 E# b, h- U, t0 }* o  Pis2 s; q/ W; z5 b
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 o7 _3 I& \7 p0 Q6 W4 F0 Bdo
# s% f" t3 L+ x2 S+ L        Lan := rootfolder.Internal.Tools.AOLlanguage;
5 |$ R4 G: T/ Z        if current = @.Destination -- else return( i) I: ^8 U5 n& b2 }. s; X8 {
        then% U; I! [' h4 F# k. z
                @.Destination := void;7 p" B% r' ~0 q, B* ?1 t" N
                if @.occupied then$ ^& z4 Z! y* D, r  e- N  L) N, \
                        part := @.cont;
0 L# J/ r4 o# z1 O" A- A7 W                        @.transpOrder := void;9 `4 l/ |6 S! x# k" v% l" d0 o0 k
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( s  Q8 V7 h+ h
                                @,root.eventcontroller.simTime);
" N5 E5 G+ H8 b                        @.HasOrder := false;% z. \+ w2 m' |
                        @.DrivingHome := true;
' {3 b$ W! Q+ c5 s3 g                        rgManager.tryToStartTransOrder;! ^0 U; W% }0 E' G
                        if @.Destination = void
. i2 I/ c3 K5 ^/ t0 O. E                        then -- no transport order for vehicle @
# Q7 V5 s) @5 |! R  g- n                                @.Destination :=
* h# X& o. s9 d% r                                rgManager.nearestFreeStation(@,track.~);
. p; N/ o1 u' A4 o& Y. U5 Q                                newDirection(@);   / g" b. c! E6 b1 k/ Q- R2 g
                                if @.Destination /= void then- Q2 a" L0 a! F7 D8 X' S
                                        @.Destination.NumReservation :=7 z$ @3 U+ V5 x. l8 N5 F: {" Y; Y; s
                                        @.Destination.NumReservation + 1;! |) U# O; _& I, H6 e
                                end;
  u% P( H7 I; w/ A- @; i, m                                @.CurrIcon := "drivingHome";
& o' t6 u# c/ y5 _' @                                @.DrivingHome := true;- t5 t) F$ S0 h! A+ d7 w
                        end;" _! Q/ Y6 E: q& W% G# W8 n
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ g7 l. d5 k/ @7 D2 w
                        part := @.transpOrder;- i' B% R" _- j; }! C+ H% i
                        part.move(@);-- load part8 a2 V, y0 J8 |2 S$ ~" F% Y/ }
                        @.CurrIcon := "load";
, K, e$ o0 E# l; i: B! z                        GlobalDistObj := part.globDestination;
! @& ?; V4 y! d* J8 [2 S2 u                        assignLObj := rgmanager.rgAssignL;* e! G% Z1 U4 F$ Q
                        row := assignLObj.getRowNo(GlobalDistObj);
! h; g$ `9 t! E1 S! ^/ \- b8 b) u: i                        if Row = -1 then -- since 70: l7 k; U+ K% W* F
                                if lan=1 then
* i# t, u" U3 V' H( a; G) Y4 G                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 u" o  T- k1 m. G
                                                to_str("in der Andockstation: \"",?.~.name,"\""));: {3 M2 y) _# z5 l9 B7 c
                                else
! ^8 X+ @" u% W7 b1 B                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. w1 `  ~8 H; l. |# _& v3 f% o/ [
                                                to_str("in docking station: \"",?.~.name,"\""));                               
( s' M" d  J# i3 F  _0 ^                                end;
, s) I- d' E4 a' H8 A; W0 D1 Z                        else* ]- |! C8 N: L
                                @.Destination := assignLObj[1,row];# t( w4 b1 t5 T  L+ Z8 Q; w- \
                        end;                       
& w/ S& Y% t! t- ?                        newDirection(@);
8 K/ O5 D, b- V% o; d                        @.HasOrder := true;
, a/ D! H+ @* Z9 k                end;
0 S) C! b" K1 ?7 k' w; n$ B9 O        end;
4 }/ u9 M) v) b2 q0 fend;        -- of the method; z+ U' Y% U! z$ E
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 9 Z% h, d! \$ z$ c( P
! O) B2 Y; Y3 K
这是AGV_putin中arrive的method。
# G2 ?/ h! @* {, ^) w
4 l$ B4 z: `* `* w3 p0 }& M当到达物料速度越高时,这个报警更多,
$ Y2 o  [" c/ `0 j' T可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
5 V# r* l: ]! H2 l  [+ y  P. I程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
- f6 Y; a1 Z8 a+ [8 A0 G. _( D! V. v8 r) ~
另外一个小建议,就是move,所有的move都可以这样' E$ @) j, F; E3 ], |7 Y3 a$ g
if not move() then debug end0 D6 W7 X( k- _% I: [  c
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。! ^. h5 q, F5 }5 M$ z0 s0 C
plant simulation中的free libraries有AGV模板,
/ ?$ o% q5 q0 `' W, L  F里面也有案例。7 E, B: |, I# u9 V+ K/ S
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
& M7 X- J+ \4 b) K, w, f2 [/ D) y) Q7 c' H- J! h4 Z
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
$ e8 w8 s, Y) F, Q3 |' ?1 X3 M; @
% H. @. x/ w4 C& R( [那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 2 M$ S8 C* N- ?
这是AGV_putin中arrive的method。! S' {  w! O, L: ~' b# k: D1 ]3 {

( E: r- g  E) u) R4 A2 S当到达物料速度越高时,这个报警更多,
; M3 t- Y8 ^6 O1 x0 {5 `. V
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-12 11:18 , Processed in 4.661201 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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