设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5872|回复: 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'
* y: W  n  J+ D- k  K*/: g" q3 z4 I& a" N/ N# R* c
is
$ _* c* ]: O4 w4 F; R& p        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
  y* v' }5 Z; }% D3 y9 d+ Jdo
* _; Q8 K7 m2 C2 y' n/ k" @        Lan := rootfolder.Internal.Tools.AOLlanguage;
2 K  X& H! c) M  }, g! L        if current = @.Destination -- else return) o2 B% @$ i. f$ e- I
        then- }/ t; V" E) T. t3 s6 q) F! |
                @.Destination := void;% F6 ~3 h0 l3 w3 a* p
                if @.occupied then
) x7 d1 K7 O  R                        part := @.cont;
, k0 n0 S' r- m6 y                        @.transpOrder := void;
- V+ b9 {' `3 h" p- |                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* Y5 U: v9 M% G/ |2 G  q% g
                                @,root.eventcontroller.simTime);9 k( L* G, J2 e, L( q# \3 Z1 H1 C
                        @.HasOrder := false;
. M/ {/ k9 w$ E$ @7 j) i                        @.DrivingHome := true;
& w9 ~6 G+ H+ U! ?6 [7 r8 s- G, q                        rgManager.tryToStartTransOrder;8 F+ p! Y% X1 R9 G( C3 C7 x
                        if @.Destination = void; B/ q  H1 V, j  l
                        then -- no transport order for vehicle @3 u* R/ s" z! N1 N* o- p9 P
                                @.Destination :=
7 U% A1 ^4 A$ {7 |3 Y                                rgManager.nearestFreeStation(@,track.~);
/ a% y, L) r3 P* Z                                newDirection(@);   
' X- x6 f+ x0 P) p* S$ {                                if @.Destination /= void then; I+ ?' L! ?: |; N/ P
                                        @.Destination.NumReservation :=4 u  h: ^1 b/ j8 ]/ @: G/ g. n
                                        @.Destination.NumReservation + 1;5 M7 E% Q! @/ A* O" ^  [2 z" B
                                end;! o  R* b# F9 s( W$ n4 y8 E
                                @.CurrIcon := "drivingHome";
) O! P1 R9 H6 t7 s) O  o                                @.DrivingHome := true;2 i; k3 {! x# b' J* t  V8 C" ^
                        end;
% l: \0 f+ n( B+ s, x( i$ O) |                else -- the vehicle @ is empty, both vehicle and part are in the same dock station* e9 y4 O1 ^# J2 {! b
                        part := @.transpOrder;/ O3 H, J( h" G7 a. K, ?7 C1 w4 J8 H
                        part.move(@);-- load part
& G' B7 |8 ~% k5 b% r8 U                        @.CurrIcon := "load";( y9 O9 G! Z. k5 v. }5 H3 w
                        GlobalDistObj := part.globDestination;# E6 T* N8 P  f% L- R/ J
                        assignLObj := rgmanager.rgAssignL;
/ B' h( t+ b% R0 W7 G                        row := assignLObj.getRowNo(GlobalDistObj);6 W+ I0 }, A7 _1 `
                        if Row = -1 then -- since 70
) f2 ^' m: d% f. e4 |: k                                if lan=1 then: w% d+ g) r* i" b  K* b5 ?4 F  j
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' F6 x) g5 y5 T
                                                to_str("in der Andockstation: \"",?.~.name,"\""));. u4 l: w/ g+ O9 {' V3 L( a8 d
                                else
6 y/ E! o- @. H' R2 }+ H( Q5 L                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 |9 m, _; K/ x( k# e                                                to_str("in docking station: \"",?.~.name,"\""));                               
' n: q" j6 l, @( S9 @$ B                                end;
1 T4 Z  f. d& ~6 y8 z. e3 L                        else
, H% H% H9 W0 l  ?' I: X                                @.Destination := assignLObj[1,row];
3 w; J- [7 y4 v7 q3 X                        end;                       
: ]* c/ E7 Z: [! d                        newDirection(@);
. e/ e1 N7 o- y) `, Q# u4 ?7 G                        @.HasOrder := true;
5 T$ O; g' B/ a7 p; C# F                end;
8 v/ S3 o# t/ `2 n        end;
# d+ U3 H& Q# O6 {end;        -- of the method
$ y$ ]! v+ B* g2 M. u! f
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
) h, B3 j4 e) }8 M
: @7 j7 }. a' w" U/ i这是AGV_putin中arrive的method。
! b5 H3 W7 T/ u! D
8 ~5 h- o/ u+ P7 L; e, h当到达物料速度越高时,这个报警更多,
0 z$ V" T4 N& h/ x2 K可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。/ d/ z  k( i: i. b& U6 s. _
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?/ |# z' h* z( Z9 F

. H4 \7 ~8 u, r( a2 n. U另外一个小建议,就是move,所有的move都可以这样, T7 ]3 m( d1 r, V8 N
if not move() then debug end; x' w: R' Y6 B+ t) G; r
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
  N. M- {- J6 x  G4 T- h1 `( cplant simulation中的free libraries有AGV模板,
: r: h; g) |# l  I3 z里面也有案例。
+ F' s* A( L) v  b5 P6 z% B8 R我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。$ i8 a; w- R, p  w; f2 @
. W# h* k& C! e1 l& Z8 v
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑   @5 k/ M# `4 t* F, u

- }1 C/ f! j1 J那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 2 T2 C: q4 v$ e6 p4 t
这是AGV_putin中arrive的method。1 s3 |" i- [+ A
9 u6 u& M5 N6 D, a" l# b/ K
当到达物料速度越高时,这个报警更多,
/ _; S3 Z+ _1 z9 ]( R3 F+ t+ b3 x8 I
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-28 04:30 , Processed in 0.017486 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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