设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7714|回复: 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'
& J9 L- [9 Y) a7 Z' f*/4 T, o2 ]/ G1 Z& x4 [4 k8 f- V
is6 C1 {/ i1 n8 d) l# Q3 n4 x% ]% E
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% w6 o: Q2 w5 x) t- ^do
) Q! P1 n% T/ D! o" h        Lan := rootfolder.Internal.Tools.AOLlanguage;
* Q3 w- l! w. [) ?: e, X  M        if current = @.Destination -- else return
- g0 Y0 O- ^) E) y        then' |0 q/ w- T2 d' J( m2 d
                @.Destination := void;# z4 q0 M9 k2 _/ A) ]& Q
                if @.occupied then+ U' O3 j& U$ I- z/ A6 {! t, A
                        part := @.cont;  n: t! i6 O' c5 ~4 G) D  @# O
                        @.transpOrder := void;
3 V& X% ?$ g9 n' O9 @                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- c9 q. s  C1 F2 Z
                                @,root.eventcontroller.simTime);
" Y3 {$ g( U7 Q- y( X% B" T                        @.HasOrder := false;- _: j& b" [3 u6 o2 `
                        @.DrivingHome := true;4 V* q( Q8 S( J$ H' w) b1 B9 U
                        rgManager.tryToStartTransOrder;# S& P# j* r, F6 q5 @
                        if @.Destination = void8 s7 P+ p4 a. R6 F1 l! q/ F4 m
                        then -- no transport order for vehicle @1 l$ S& Y8 P$ X& G
                                @.Destination :=7 F  S! i4 J" n6 d: f& W3 e
                                rgManager.nearestFreeStation(@,track.~);
$ L0 L. q7 }0 b% J; g4 R$ k+ a                                newDirection(@);   - L- q# |, Q+ B( V8 D1 ~
                                if @.Destination /= void then
* S5 m( W( H6 g- `6 f                                        @.Destination.NumReservation :=
6 a2 B5 l: J8 ]) r) |                                        @.Destination.NumReservation + 1;4 r" V( y0 w8 ?# W8 u
                                end;
! i- T' m8 d2 T3 a% f                                @.CurrIcon := "drivingHome";
# i$ N$ t. k# l3 y" _, A                                @.DrivingHome := true;
7 g8 Y8 J- j( i$ q                        end;
8 n3 n5 E% V2 t% |: W                else -- the vehicle @ is empty, both vehicle and part are in the same dock station. P2 a  S3 N( T7 e7 O; x
                        part := @.transpOrder;
3 c+ s9 @; ~( t# m, p8 o                        part.move(@);-- load part% m( [* n- C; {; n1 L
                        @.CurrIcon := "load";7 @; ~! @1 p8 A( _5 {  _
                        GlobalDistObj := part.globDestination;$ K( S: e2 I0 L) T$ ]; m
                        assignLObj := rgmanager.rgAssignL;
( Q6 c& n2 W3 D                        row := assignLObj.getRowNo(GlobalDistObj);
1 P8 ?' w$ F7 c+ _& R* c                        if Row = -1 then -- since 70
, ~/ o6 a! {' d( C( a4 m                                if lan=1 then6 N  Q& `# H8 I! T
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" w. C9 n3 U$ A; n                                                to_str("in der Andockstation: \"",?.~.name,"\""));
& u  H5 c% y1 m6 c" W  ^! }                                else
2 {# L" M* Y/ c1 s/ m- S! ?                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) E( \% M: G3 b' e2 L# D1 ?                                                to_str("in docking station: \"",?.~.name,"\""));                                9 \: }8 O. e5 M; r
                                end;
3 w0 X  b" l( Z+ g                        else2 \: m* ~, H0 A1 p: D) a
                                @.Destination := assignLObj[1,row];
8 l7 Y1 A' M' h! W7 I& e                        end;                        5 R) `& R/ O3 U/ P2 x1 a
                        newDirection(@);/ ^, T8 ?- G/ _  K) _
                        @.HasOrder := true;) o1 k: W- C* j( y
                end;
; H' ~  D$ L1 Y3 D        end;7 q$ }) b! Q- R  ?
end;        -- of the method+ k7 |- y7 E7 q$ g+ n9 G/ Z' o
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 + F4 _, D9 }2 M; A# T6 n, `* _0 ]
5 |6 P/ J" b" U% t; a7 b  O; k3 \
这是AGV_putin中arrive的method。9 G  D1 Q+ m2 i$ S! L; z# |/ ]
) ?( G1 T% x0 o+ r* I, D! ?
当到达物料速度越高时,这个报警更多,( A# Q6 u! U1 s7 \6 \
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。1 O+ j% M% d/ e" |. S% x
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
; P0 Q$ Q" V' S3 C
/ h2 |% h- d$ [  p. z0 A  p. u$ R另外一个小建议,就是move,所有的move都可以这样
6 J/ H9 G, Q$ e; m* lif not move() then debug end
4 l  U! x& b: a9 Z: O这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
* q+ z8 \5 B" m' Wplant simulation中的free libraries有AGV模板,9 E: @/ C: g2 b! [
里面也有案例。
0 \3 L. ?" ?$ o3 L! r我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。; _5 M5 M8 h: S' T  o9 }, T

  P0 R* \  C+ }/ w5 U0 C3 j' u我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 5 e( J+ s4 _8 e, ]" u5 f, T

& R/ o- e5 s2 ~# A0 x' R2 }那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 0 b# u& n9 Q+ M% t
这是AGV_putin中arrive的method。. V( Y2 B% n# b5 N" T+ ^
8 Y6 V  L" {& {+ q
当到达物料速度越高时,这个报警更多,

) u# M' J$ t! b6 ?( a) o% w2 V另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-25 17:05 , Processed in 0.020366 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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