设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9462|回复: 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'
% q+ n9 C9 R0 f3 f0 S* A% k8 d*/
% x/ b5 U# [# S5 n7 ~  k7 His
1 M, |1 A6 Q+ m9 q, _        part, GlobalDistObj, assignLObj:object;row,Lan:integer;# D1 w2 c3 {: r) L# W
do% i  z" L) k  ]4 Y
        Lan := rootfolder.Internal.Tools.AOLlanguage;6 G1 _: D! S+ o( C$ k5 S9 M
        if current = @.Destination -- else return
, y+ R5 S" \0 i0 E9 P        then" {2 z7 ?- ~5 U7 q4 H' v
                @.Destination := void;/ B2 i  z- D5 G6 S- ]+ U
                if @.occupied then- |5 [0 X  [* A5 [; H: }
                        part := @.cont;: X, H, g; Y, L: ^/ l
                        @.transpOrder := void;2 T1 T5 S& H4 K
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- g4 Q! c5 c! A8 `0 @6 f* }                                @,root.eventcontroller.simTime);5 Q1 B  k, B1 c; [% \8 N. [# _6 I9 H
                        @.HasOrder := false;
' C, l2 R6 y: k* a! d& t* |                        @.DrivingHome := true;
% }- d$ O8 N1 c0 Q0 c                        rgManager.tryToStartTransOrder;
7 h7 x1 J! f% N- A                        if @.Destination = void
0 O# E+ ]5 X* y: S4 o# {: N1 O) h) E                        then -- no transport order for vehicle @
+ r2 s6 r( [+ U8 ~" O& `                                @.Destination :=
5 ?) M- N8 u0 p6 l  `% c" Y! B% x                                rgManager.nearestFreeStation(@,track.~);+ s6 s; v2 m$ ?) h
                                newDirection(@);   
5 ?( J  T. E" g- ?) J                                if @.Destination /= void then
$ U6 T* `9 h) h3 _' V                                        @.Destination.NumReservation :=7 q, h; ?" R2 G# ?' `
                                        @.Destination.NumReservation + 1;
% @( Z& Z9 S4 a# A; K! s" p7 d                                end;
, ^( `8 O; G) s/ Q, y5 t  A                                @.CurrIcon := "drivingHome";% Q* B) H+ e0 d3 O9 Y
                                @.DrivingHome := true;
+ s' d3 X; F, D+ ~1 T: ^                        end;" O( Q8 N) z3 I
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 M6 s& |; R. H! }
                        part := @.transpOrder;
5 f! Y) y! y( [. V6 ?                        part.move(@);-- load part
7 V& c! Q3 [+ f2 M. d% E5 P                        @.CurrIcon := "load";
* E' ]7 u  ?6 Z                        GlobalDistObj := part.globDestination;* V' N1 t/ r) L& \
                        assignLObj := rgmanager.rgAssignL;
1 H7 Z( m; Z8 v: D. {                        row := assignLObj.getRowNo(GlobalDistObj);. j" [9 E: p, V% `$ \. B3 X
                        if Row = -1 then -- since 70
4 ]. S! `$ U& {2 [  N                                if lan=1 then
) I: B- N- W' }% m                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' w4 k) n7 K3 R6 W6 u- B                                                to_str("in der Andockstation: \"",?.~.name,"\""));% S$ D# |. N) g" H
                                else
$ |$ k1 m7 h% j                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- h" v% u# L2 [4 t# v                                                to_str("in docking station: \"",?.~.name,"\""));                               
4 u; k. k; k! r4 ]                                end;
6 F, [* t8 |/ k" v- q                        else$ l  [- ~, D6 y7 v# ?5 M
                                @.Destination := assignLObj[1,row];
: R  s4 |3 d& S0 \# g                        end;                       
8 q$ I$ e( D' `, T5 N                        newDirection(@);
, f' T+ `3 `( e  v. V$ _" S                        @.HasOrder := true;
+ o, h* S; M" [, O% s                end;
0 O2 R. G0 v/ g8 U        end;3 H/ ^- k' |( |' \  {
end;        -- of the method  D5 v9 L2 b" n6 S8 y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
! z! P  H+ a$ I3 U8 ?
% S. e9 t+ P% R  P1 d这是AGV_putin中arrive的method。
! O- K  O* }: [! \2 j! e, c* X1 \* i& @) m3 Z
当到达物料速度越高时,这个报警更多,+ w+ c5 {2 [& O/ ]
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。3 k( s4 g4 N( k+ Q
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?. Y3 r" f5 A  M" P: X5 q- c

! ]7 D  Q: \& l7 x- ~+ [+ o另外一个小建议,就是move,所有的move都可以这样
0 e* I1 Z1 W; j/ u" _if not move() then debug end$ z: z7 ?8 n/ j& b) p
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。; ^, D! g5 y$ w/ `
plant simulation中的free libraries有AGV模板,
* {! q# l. z# b里面也有案例。
+ z- c+ k" p/ \! J/ K- i9 C- Q我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。5 @/ o: P' G# h; }: U8 p
4 Y6 u6 E- C, w/ m* h1 r! a
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
' d0 T% f! e7 }. Y( X" }# X2 y
7 o1 s: y* i0 G那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 % ^* ~9 L  |) W2 ^/ m
这是AGV_putin中arrive的method。6 S) z4 z( T+ O/ M: q0 i  A3 b
+ t6 c* s4 u- H$ B
当到达物料速度越高时,这个报警更多,
, ?4 e) E/ d9 N6 Y# R, w
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-2 04:35 , Processed in 0.015047 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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