设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10063|回复: 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', M8 s& T. @; K) @6 w
*/
( @2 [4 b  r; R, b! u+ @* Eis
/ u% O3 i& E  q7 ]  ?6 w        part, GlobalDistObj, assignLObj:object;row,Lan:integer;& s9 u1 P6 P( f6 q& u# [8 {
do
8 q* i: G! Y/ p9 \        Lan := rootfolder.Internal.Tools.AOLlanguage;3 O; K2 o9 s3 s7 X; \  d7 r; z
        if current = @.Destination -- else return6 v0 B, C- |) m5 }6 k
        then
2 K+ T$ k' _6 C                @.Destination := void;1 \( Z$ E5 D* d: |; u
                if @.occupied then7 w5 D9 \- \# {% t5 |1 l
                        part := @.cont;
" R# j4 Z1 K) C& z5 E4 n* [; t                        @.transpOrder := void;7 P6 u: |6 p! M" @8 |7 V
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 @; [- C& [; _9 B                                @,root.eventcontroller.simTime);& }4 M% `1 n) v3 I/ q
                        @.HasOrder := false;
9 Z- b; j  p, n. H                        @.DrivingHome := true;' h3 j: @2 L4 Q: A2 N
                        rgManager.tryToStartTransOrder;4 s* ]& R6 P- [5 g  Z1 S3 t7 e$ c
                        if @.Destination = void/ y! X# c; Y9 M9 O0 O. [' t7 L" _, `% B
                        then -- no transport order for vehicle @2 W1 A7 y" D- d* |: X  M
                                @.Destination :=
5 H' r( ]  n: G( q- H                                rgManager.nearestFreeStation(@,track.~);, w0 V( V5 Y1 G5 ~
                                newDirection(@);   8 g4 f) I9 r$ v! b
                                if @.Destination /= void then5 h. D' l) l: a& P0 |! U& u" k
                                        @.Destination.NumReservation :=
. u" z6 x9 t/ c                                        @.Destination.NumReservation + 1;
% r8 W5 o7 D; t) W. d: M                                end;  q) {5 h* R! ^- q, d; Y5 ]4 J
                                @.CurrIcon := "drivingHome";& `' j0 r2 v' d* I" ~, {- S: o, P$ _
                                @.DrivingHome := true;& W3 W# C- A. Q% w5 K( ~
                        end;
. u+ W1 o/ x* V& Q8 `$ ~                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 d" Q! T: O; B. v                        part := @.transpOrder;% ~+ {7 `* S( u7 Q. M+ K0 t5 b
                        part.move(@);-- load part+ T2 k0 S: u3 H' u  y# n
                        @.CurrIcon := "load";+ ^' H! T7 X/ [( a, Y
                        GlobalDistObj := part.globDestination;
: s4 [4 \1 q% r$ X                        assignLObj := rgmanager.rgAssignL;7 C( K. [, T1 C4 |9 F
                        row := assignLObj.getRowNo(GlobalDistObj);4 |8 S# B- P2 b- g& l- }; t
                        if Row = -1 then -- since 70" e- B; ?1 {4 ~, k. x$ ]2 z
                                if lan=1 then; `% w6 ]; s2 s. Z$ g* L+ k7 r1 E
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 \) M7 E, a# p, B# }* S                                                to_str("in der Andockstation: \"",?.~.name,"\""));
# r2 M' v2 B1 h+ A( D) J                                else
/ e3 j% s. `7 e# O                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 b* K  \$ j! _" u3 n                                                to_str("in docking station: \"",?.~.name,"\""));                               
* b1 q5 x  E" J/ }                                end;; ?% K! t0 c3 ]' T; Q" r! m: k  M/ g
                        else
6 Z# d2 d  |: Z4 g                                @.Destination := assignLObj[1,row];* Z( d9 t+ q6 k9 m" T( f
                        end;                        6 J) l; a0 t. O1 v
                        newDirection(@);
  d" G1 k# b2 S1 l5 M9 W                        @.HasOrder := true;
+ a: o2 a* J+ O+ U                end;
. y* W1 K: I# u        end;( G0 i/ g) v% Q' H9 y5 `
end;        -- of the method
4 w3 S+ `8 N3 Y" h* V. A" @' b
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 # L4 L5 q& a  i4 p! x% k' N

2 |1 W* \6 e/ N% K: ^这是AGV_putin中arrive的method。
/ F6 ~# G5 ]9 P8 ~/ ]
1 W% [8 i! i# I, C. t; P3 o当到达物料速度越高时,这个报警更多,
9 ^  {  o3 B; G- B  f4 e可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。7 t' i, Y- E0 b( _% d& T
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
& y& ~5 Y( _$ K
! E- P7 l- M" T1 f& q  P/ z另外一个小建议,就是move,所有的move都可以这样
' _5 }0 _# v+ @2 a7 w4 Nif not move() then debug end
! H. a7 I' }: D6 b* N" U这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
9 Q+ @( `, r. g; ]4 Lplant simulation中的free libraries有AGV模板,7 l, ]8 c9 M. |7 U" d
里面也有案例。/ n" @6 W! l0 i" p. j# @* l1 k' @
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
# _; B. p( \1 j- }
* n+ t; {6 _% H( z7 v2 h7 k2 L我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 " e3 w) W8 q/ b- I: f

) C/ f$ i5 M1 W+ |- |' {那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 5 c" M; y8 ?  K- {9 E* W; M
这是AGV_putin中arrive的method。) |# p5 e) q4 l* G) {  d
& z2 H; w# a" t' f! f# o' h3 |& e) w! a
当到达物料速度越高时,这个报警更多,
) _: h: ?) j  C) Q3 p2 J
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-11 07:18 , Processed in 0.017911 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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