设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6731|回复: 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 }4 M& d* G; l8 t( b4 F( B
*/
2 X6 q, N- J3 C. p1 `6 }is6 L; y+ f8 ^( l" O* L/ m
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 x8 z  u2 I5 _& d
do
7 l- X& i9 W+ \0 K  E3 C        Lan := rootfolder.Internal.Tools.AOLlanguage;4 v+ z- s0 P3 l: B6 d" y" C9 [4 N
        if current = @.Destination -- else return
0 B3 l6 |7 V7 U1 S, c        then9 v; E6 [' Z: z8 L5 N
                @.Destination := void;* k* K! ^7 ^" I, H/ r- c! }9 c4 Y
                if @.occupied then
& y( D+ B# P- U  W                        part := @.cont;
; i9 L& e0 f9 D                        @.transpOrder := void;% G5 {( n0 v7 @# r9 x; S2 Y; r
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' X) C$ \. u5 D& ?5 w5 t
                                @,root.eventcontroller.simTime);  F$ I9 i/ t, F. D* M
                        @.HasOrder := false;
% t6 b) k+ r' s: S6 r/ A                        @.DrivingHome := true;
1 H& x. b+ V8 ?! ^  ?9 h                        rgManager.tryToStartTransOrder;
* S; t5 v5 H# F, O) _7 B* Y                        if @.Destination = void
) D# b, [6 Y/ i) j6 O                        then -- no transport order for vehicle @! s2 I- s$ g" j9 b3 |0 f
                                @.Destination :=! L, H% L5 F- J3 H* {  k; O' r, n( N
                                rgManager.nearestFreeStation(@,track.~);
% R) N- @$ r5 n. |0 B                                newDirection(@);   * u0 I, R/ ]" O# P9 P
                                if @.Destination /= void then
- t6 J7 l- a5 }: l  D                                        @.Destination.NumReservation :=( i9 A/ ~/ E6 X& J6 D. _+ S
                                        @.Destination.NumReservation + 1;
" o5 K# O% o" R: G, l% R. m                                end;
8 F* l$ W% r! X" p                                @.CurrIcon := "drivingHome";
: t  f' y3 e$ {, ~! P                                @.DrivingHome := true;4 ?- i" L7 o9 i' T7 ~$ B
                        end;) q. `9 i4 t! ]1 |* V- X9 y
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station( X" g* D6 k0 a1 C, I' [
                        part := @.transpOrder;# L5 ^2 a, v  X8 L8 j4 H3 h
                        part.move(@);-- load part
9 g$ W' P, B8 M$ ?                        @.CurrIcon := "load";( o7 p) |- x0 x5 A! M
                        GlobalDistObj := part.globDestination;9 Y* _8 x5 \/ F! k; s: I
                        assignLObj := rgmanager.rgAssignL;
$ X2 h  f! G! ^, W: I; C) G/ D                        row := assignLObj.getRowNo(GlobalDistObj);3 j/ _* [- }7 J7 [) ]/ Z
                        if Row = -1 then -- since 70
3 U3 o7 c/ d) F6 k$ I                                if lan=1 then
" k7 G& G  M; Q1 k6 {# z  c3 j                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),  x4 J" {5 @/ z* X
                                                to_str("in der Andockstation: \"",?.~.name,"\""));. K1 s3 f: n8 k
                                else
+ v) x5 U) d$ y; f! ?& b                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! r; C/ s/ g# Q4 E7 [
                                                to_str("in docking station: \"",?.~.name,"\""));                                4 U! |6 P' e6 e2 d
                                end;: p, h) t. @+ \1 X; Q
                        else
. ~; S/ e1 t1 Y; s  m  Z) Q7 k                                @.Destination := assignLObj[1,row];
. S7 X: D5 s$ D6 s' ^) M3 @( T  N                        end;                       
- l: ~0 [0 y- }2 v$ z; ~- @: X) q: R                        newDirection(@);
3 b5 n' L* O9 R6 v  V                        @.HasOrder := true;0 R7 h& G# A  A, ~4 D, y: k/ P" k+ v
                end;
- N2 {% x/ [8 [/ ~& L' U9 I0 F+ J7 H        end;
8 {, W: u3 u& p5 M" send;        -- of the method# s2 J( E# i% V- b. N4 X4 T+ [; J* \3 C
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 * _  q# Y0 C  S/ \) N; J4 `

  u2 L4 {( [! a3 R4 j这是AGV_putin中arrive的method。! K' o1 s2 Q7 S1 O
# B( d; [$ M9 b8 ^
当到达物料速度越高时,这个报警更多,, i9 \- r" }& c. Z" B3 t1 Y7 a* y
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
0 W$ `9 F$ I- |% r9 ~7 N程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
: B8 c: t- A, w7 p1 |
$ R9 U  ?' m9 i- f) Q% C另外一个小建议,就是move,所有的move都可以这样* |; l0 n. w7 V1 t6 E" \; z
if not move() then debug end+ s7 B( S( ~  m8 `( t/ T
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。+ i6 @0 D  s! D: z0 I
plant simulation中的free libraries有AGV模板,
2 z7 l" f( A% q7 o6 ?5 K! ?. {$ p里面也有案例。
7 w8 D; I4 S' }  o3 Y6 D- P8 v我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
8 h* J/ G; O# T5 l. H$ h6 M7 y
( u2 _% V4 y2 h7 m3 u# Z* N) \1 ^& r我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ; K( s6 z# t4 F
! W9 i) r; N2 R4 h% C6 c( E+ z
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 - S- `& f# G, I3 r2 G
这是AGV_putin中arrive的method。
5 }" L+ R% B4 P; X/ O: T# V" c7 y: ?7 {+ N1 B# F3 y
当到达物料速度越高时,这个报警更多,

) s( P6 Y* I6 h: E# l6 Y另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-23 08:56 , Processed in 0.017780 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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