设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7272|回复: 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'
6 S2 Y& g+ O6 z/ K' D0 e*/( O$ j& G# {* v( T
is+ v6 |0 I$ [. Q# v
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& o0 j% Y2 O5 o7 udo
, ^. x3 z" d# ]1 C) Q& ~7 y" H        Lan := rootfolder.Internal.Tools.AOLlanguage;9 _0 h) j2 y4 d" a  i; Y* p* G
        if current = @.Destination -- else return
5 A4 X" X7 T; T% o' Q  ^* ]1 n        then
" i4 c% b; h- l* H  w, [* I( M                @.Destination := void;0 g- G4 ^- ^, ?2 v# i8 u
                if @.occupied then
( \% @! I: J+ l  ^: V                        part := @.cont;2 Y! o# X- `2 Y) B5 S: _
                        @.transpOrder := void;
2 @& G* J9 r$ ?" c$ p4 I) o                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# p! A4 M$ P4 g  T, V# Z' V( |                                @,root.eventcontroller.simTime);
0 H! r3 i/ Q/ D$ `                        @.HasOrder := false;
! L' q" c  Y* G  I7 |6 g" x                        @.DrivingHome := true;
% ^) Q& y7 Z& X" V9 v7 Y                        rgManager.tryToStartTransOrder;
# h; e% `5 w% r* v# F3 p( L3 @9 p                        if @.Destination = void7 h. p1 L; L% f
                        then -- no transport order for vehicle @" _4 s3 ^3 \6 m7 D2 l
                                @.Destination :=
- G5 |$ P0 \* M4 o                                rgManager.nearestFreeStation(@,track.~);
) ?$ a8 V* R( G0 |0 ]  j                                newDirection(@);   
! N# N- t" k2 K4 U( v- o3 U                                if @.Destination /= void then+ P$ F. H: F8 a
                                        @.Destination.NumReservation :=- [: X$ a' Q5 R
                                        @.Destination.NumReservation + 1;
' ?1 l8 c7 |0 p                                end;* u  K. @0 Q! @$ H: A
                                @.CurrIcon := "drivingHome";' W4 r2 |! _1 t6 c+ G
                                @.DrivingHome := true;
) n& r3 [% r4 H                        end;! v; \: }) p) L0 X# `+ {
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; v! s% U) u2 x7 G  E                        part := @.transpOrder;$ Q5 r/ `; G$ F% B' d
                        part.move(@);-- load part4 E9 L7 ?: Z& p! b! o, S* M' ~3 q) {9 U
                        @.CurrIcon := "load";
5 A1 ^5 h. o5 a* h$ u                        GlobalDistObj := part.globDestination;7 F/ n9 {3 r: l
                        assignLObj := rgmanager.rgAssignL;
2 ?8 F3 B  c" ^, q1 q2 ~5 e                        row := assignLObj.getRowNo(GlobalDistObj);4 f0 y+ b$ C- k1 |. t
                        if Row = -1 then -- since 70
* s8 `' h6 C) Q! n" k                                if lan=1 then# S& s! ~9 [; N: J* w6 Q# r
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 E* m& t% m( Y) I6 |6 w% ?3 V
                                                to_str("in der Andockstation: \"",?.~.name,"\""));% F/ k* {' f, X
                                else8 A3 G  K  F+ I( o! Z6 i
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 j' G. D2 k. \& ^7 c% m8 V; S                                                to_str("in docking station: \"",?.~.name,"\""));                               
& f5 H7 d* ]) f7 k1 F! D7 f9 _                                end;
2 P0 H% N4 V' A9 p, ?7 L                        else6 ]1 {& G1 o! Q
                                @.Destination := assignLObj[1,row];: z3 j) ^, x6 u+ r
                        end;                       
# b6 K2 t. G/ u                        newDirection(@);3 }4 u8 ~7 u* p, ]1 d) ]
                        @.HasOrder := true;
: `& F7 @. w  h: S( y( M& k                end;- e3 h7 _- F4 Y. ?
        end;
* o0 [9 A+ U7 n3 G0 c' G+ Qend;        -- of the method, t1 O# u! d: w7 Y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
" B; R- W; Q0 X$ \* f& Q" X% E0 L3 U
这是AGV_putin中arrive的method。
3 P8 ?6 j" c& e, t3 _+ a% x+ F9 d9 d  P. A) W+ |
当到达物料速度越高时,这个报警更多,
3 ?8 r" n' x+ K( V  a可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。* |( l& M6 f, ^& O8 I+ u2 E+ Z
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?) Z. ?4 @+ W; S$ @! L; r

( ]( n" C# X  b$ X5 v8 b另外一个小建议,就是move,所有的move都可以这样4 k7 ~; x  H: R$ U
if not move() then debug end% ]$ B+ ]& t1 W/ Q, S
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。  ~# X+ u7 W4 Y7 Q
plant simulation中的free libraries有AGV模板,
. D; \; B. l) G) ]里面也有案例。" D1 }/ O6 Y8 P
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
$ r$ I% u# ~) R1 I. b& E+ r
0 |+ o9 Z& e& I, w% B, _我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
) U1 }2 p% m& H. W4 V6 F! n( E/ ~5 j# O
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
8 m$ r' o: I: [: c; g+ Q这是AGV_putin中arrive的method。
% i4 x' v* Z* i( \5 I! `% Y; E: l1 W; V# b
当到达物料速度越高时,这个报警更多,

% J. T, B7 Q2 O0 K8 T& s另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-1 01:33 , Processed in 0.021813 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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