设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6185|回复: 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'+ P8 V$ x2 Z8 Z% I5 }( q* F' L
*/
2 C  ]5 K" W0 [) s5 S: sis
" T' `  O4 G; f" i9 {2 ^# V$ E        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' h( N: K: R4 J. n* Pdo$ _0 A4 h4 ]; `0 h& l( k
        Lan := rootfolder.Internal.Tools.AOLlanguage;
1 R% H' b! k5 L1 z# b        if current = @.Destination -- else return
. H6 j8 s+ m0 I$ [9 z' i- B        then
3 q( K( C. Q8 X- u; x                @.Destination := void;
$ `! R3 h7 I$ u0 X) F' n% o* M6 M                if @.occupied then$ [# [# K$ J( J& r- A
                        part := @.cont;
. Y3 [. ]$ w: R8 B3 G/ Z6 Q                        @.transpOrder := void;
* f, J9 ]  c! R( M/ _8 ^- S" p                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" U1 U+ F* t! F# z6 B$ }, X                                @,root.eventcontroller.simTime);2 N6 X7 x6 a$ }/ z. h# P
                        @.HasOrder := false;
( F$ `/ v1 G& y: x7 Q- z                        @.DrivingHome := true;& {  m% Z& u( F" I
                        rgManager.tryToStartTransOrder;/ W8 c2 r- }$ E, ~" @& m0 i
                        if @.Destination = void, S# }, F* {9 x) k- P
                        then -- no transport order for vehicle @
& R2 A$ J* C7 T2 U                                @.Destination :=1 t6 @* K/ y8 ^% M$ n" L7 M, L
                                rgManager.nearestFreeStation(@,track.~);
3 B. e) S/ c5 ]  {- ]                                newDirection(@);   " }) Y$ z5 N0 t7 i" h/ z) ^
                                if @.Destination /= void then( y4 X3 [. T/ U% ]$ }2 g- H1 b
                                        @.Destination.NumReservation :=
; q" K6 Y4 p. r# }                                        @.Destination.NumReservation + 1;, I/ `+ s) l) @$ ?: D) w  N
                                end;2 Y; G( ^$ v( g0 f
                                @.CurrIcon := "drivingHome";
9 a# @6 G/ y6 Z/ @! ^# k                                @.DrivingHome := true;+ b7 R, `! U% |1 C! h
                        end;2 }1 N. B. h% i* c, H  k1 s
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& f4 a+ l  y) E2 \$ L7 n                        part := @.transpOrder;
# ?1 H6 _$ C3 F, D  c" S                        part.move(@);-- load part2 y! B) [8 V  J7 c0 l' r
                        @.CurrIcon := "load";0 Y+ [3 w! E6 i: e
                        GlobalDistObj := part.globDestination;
2 h8 }0 i1 k% U2 L" ?5 }9 h# {, g                        assignLObj := rgmanager.rgAssignL;/ }& B" Z- n. g- ^! ?
                        row := assignLObj.getRowNo(GlobalDistObj);
' @) f: |3 G( u1 E                        if Row = -1 then -- since 70
2 Q+ s! }; O7 ^* b" Z  ]6 Q* C, Q                                if lan=1 then" `2 M. g8 G1 {0 M& L
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 r2 j, S' \" G7 ^4 y" j0 n& d
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
% o, k: s8 W# A0 @2 I* p% t% m) \/ m                                else9 z0 J. W2 q( M+ ~4 f6 A
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 v1 m) T) U3 m7 ~( l; O6 ?# R                                                to_str("in docking station: \"",?.~.name,"\""));                               
2 m0 p( s' [: j+ X                                end;
3 i- ~4 u% I# P% ]3 ?                        else  ]& e5 Z# R9 x5 R
                                @.Destination := assignLObj[1,row];6 g4 ]' h4 m5 C4 g' i
                        end;                       
9 p3 T9 V* `, _$ ~8 m$ \                        newDirection(@);
! K/ G5 A5 n# w1 t6 v. @                        @.HasOrder := true;
. r. m* o1 {. z( C! c& m" g                end;
* N( ~1 ~' v& C6 ^) N& V5 U7 o        end;' Z" v( z6 j) b" B( I* x
end;        -- of the method1 R" Y" K0 w* ~* C4 o' s- V& y; u1 X# J
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 % e1 G% ^( L0 V
- Q2 K9 F' \, B/ y+ e
这是AGV_putin中arrive的method。6 @* e  R/ d' l. C0 V6 x
/ Q, Z2 I6 U( l; C# Y! p' T
当到达物料速度越高时,这个报警更多,/ x) S" Z9 m6 R$ C8 {( F: j
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
$ E" Z0 s' L5 J9 g8 Y2 G/ e& u0 \7 ^) U6 C程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?, M9 X; ~& g6 c0 _/ l; o1 p0 y2 p

1 @" Q0 t3 n0 v; k另外一个小建议,就是move,所有的move都可以这样
2 B, [6 J8 `" D% Wif not move() then debug end
) ]* O! A5 ^- z7 U: x* O- V这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
3 }7 V+ Z* S6 S* x1 Fplant simulation中的free libraries有AGV模板,6 j7 _6 D  p, R# I7 G! N
里面也有案例。
0 u" z. \/ t3 b我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。0 @: Q0 q4 `. d3 O+ I8 d4 \+ I

% t! m& V" v2 y4 g! q& F2 k5 E我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 9 i$ P/ l9 ^7 I

1 v2 M' i: W( O那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
7 Q( _$ b9 g: O" R: e% S5 T8 @这是AGV_putin中arrive的method。6 u8 a5 Q+ `' A+ D

/ H7 {  d" \* H9 |0 X2 ]) w当到达物料速度越高时,这个报警更多,

$ x/ L" f+ r, B5 _6 \& V( ]4 X另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-23 17:47 , Processed in 0.015541 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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