设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7058|回复: 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'+ ]0 `% g3 [: U+ D- z2 @# u2 k
*/
# z/ A. ]1 E' G8 b+ i, Wis
4 O9 d* @: A0 n: _        part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ r' n4 I) L$ `4 E+ K
do1 n/ _* t5 ]4 x" u* N2 w
        Lan := rootfolder.Internal.Tools.AOLlanguage;
+ U, x0 |: c) l        if current = @.Destination -- else return1 Q6 M4 M7 l& \% }# @  S( |1 M
        then
" p6 V1 C+ T6 I( }5 m9 x' S                @.Destination := void;( }- m, i1 p' f6 [
                if @.occupied then
8 a' a! y6 p, ~( f4 M: i                        part := @.cont;
; ^9 a0 s% f/ j5 @# r+ i                        @.transpOrder := void;
/ P- s0 [& a& {% _8 D$ K                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# q7 T7 c/ P7 `! W0 B) A                                @,root.eventcontroller.simTime);
7 {" h, Q* o; e; n3 i6 Y) ]                        @.HasOrder := false;
% N& Y' `) x' w0 i9 b                        @.DrivingHome := true;
' k4 b; h% n# p1 l9 W                        rgManager.tryToStartTransOrder;$ Y. @* E3 K% E# Z
                        if @.Destination = void, ?5 }  H) k. R
                        then -- no transport order for vehicle @- E; ?5 D0 O; g; K
                                @.Destination :=: t4 ~  G, p' Q! w$ }" j8 n+ l
                                rgManager.nearestFreeStation(@,track.~);. w9 z! A* a" E; d2 ?  o3 D5 s
                                newDirection(@);   
) ?1 Y: {( D# e) ?$ v' _, [5 S                                if @.Destination /= void then
" M: a* F2 _) v( r3 j( V$ X+ _                                        @.Destination.NumReservation :=
# ?: C# S7 m3 r; Z                                        @.Destination.NumReservation + 1;
- [9 ~+ d$ [: M. _7 h8 k1 @                                end;! P) A; q3 u" z- E
                                @.CurrIcon := "drivingHome";' `! I5 k3 j. P* B3 ~( O( @: F" U
                                @.DrivingHome := true;& L9 C% b  o% s6 {
                        end;
6 Z! ~! ?; S; g: Q. @: l                else -- the vehicle @ is empty, both vehicle and part are in the same dock station) Z8 [: p1 _  ^! R' S- w
                        part := @.transpOrder;
8 H9 c: Q5 l4 Q3 R5 F                        part.move(@);-- load part
8 y/ f3 g- S- l/ \8 `$ c% Y- s                        @.CurrIcon := "load";
0 l# q3 N6 a, Z3 {! `; h                        GlobalDistObj := part.globDestination;
, _) T5 q9 i" Z2 v' |) D4 {! N, Z                        assignLObj := rgmanager.rgAssignL;( Q9 |" h, B, O7 M# J( H! ~
                        row := assignLObj.getRowNo(GlobalDistObj);
  e) D- Z0 I4 E' T6 R: ?: T% N                        if Row = -1 then -- since 702 F# v9 ^5 o$ r7 r" [
                                if lan=1 then/ t% E. N0 [3 p
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 G) U( _" P# }; V) X( P7 D+ ^                                                to_str("in der Andockstation: \"",?.~.name,"\""));, X# @! v5 M& E5 y  `  `& W
                                else
% [. n6 z7 w6 y- {! T9 y                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" \; L, h5 T# @( ]) E* t: J                                                to_str("in docking station: \"",?.~.name,"\""));                               
% [( a7 p  w' l. m& s& x" u/ |                                end;
4 ^  @1 J1 Y( z                        else
* i: u, k5 q) z; l' O( Y4 S                                @.Destination := assignLObj[1,row];3 z8 q1 Z( c( Z  J7 d1 _2 Y
                        end;                       
1 K: `3 P/ ^+ `: _2 o& {                        newDirection(@);
$ j# G+ s% E  u2 b                        @.HasOrder := true;7 I' e) |% p% |# h+ h4 m" p
                end;
( [. G* Z# b# O3 q4 v  z0 _        end;( Y  j- P5 F# L
end;        -- of the method
+ S, S* X5 x$ o9 J% F4 ]
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑   V9 m8 l, E9 e3 j2 s5 r. N
8 Q+ Y+ K0 V6 R: m+ U6 d4 t) Y7 `$ J
这是AGV_putin中arrive的method。% Z) q3 ~6 I, i! h' H' F
4 g8 Q* Y5 F9 i  l+ }. M
当到达物料速度越高时,这个报警更多,& w  y% P. U3 R7 f, y( U+ t
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
% B! ~# N  X# N$ a* z, Z0 Z3 p程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
5 G2 t) u# E2 o0 ?$ g3 c- [1 O# W' y
另外一个小建议,就是move,所有的move都可以这样1 B1 O  i% r- S, y! }  e
if not move() then debug end* A5 Y" h% v$ B$ h( j9 m7 l3 h
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。( c9 Y/ m3 m9 [: A
plant simulation中的free libraries有AGV模板,& X! o" T+ r: h
里面也有案例。; Q# B0 ^: g5 l* I0 T, X! F2 e8 ]
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。3 p. _- S- ]- p# j3 n5 h# r3 z

" Y( V" k6 X( x4 F0 {我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 : k3 Y6 ?& l( k- {
4 j2 t1 _! q2 w
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 - [0 Q8 q! f1 D  f( f
这是AGV_putin中arrive的method。
; N! R# D" Y* m' Q/ s! g$ M, K1 W9 Y' J7 N' u. ^( m
当到达物料速度越高时,这个报警更多,

! f$ F+ O! c) x7 ]另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-14 02:39 , Processed in 0.026004 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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