设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8139|回复: 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', t# H8 E' e* L2 w5 m/ B
*/
/ C/ A$ r8 F3 H: k% Z7 iis
" S6 a/ I' X3 g4 p        part, GlobalDistObj, assignLObj:object;row,Lan:integer;) j8 @! r1 b* P. j3 r3 t7 ]4 `
do0 Y. e& K( \' |1 ]2 N- K) b) |
        Lan := rootfolder.Internal.Tools.AOLlanguage;
6 x+ m  M+ @8 c& z; [        if current = @.Destination -- else return/ R/ S9 N4 s- R: z3 @
        then
+ g7 n% \( C9 M+ E1 k! G, d" A                @.Destination := void;
% u" S  }1 M& H/ C  h+ v0 _                if @.occupied then
+ H/ |) o" e1 |                        part := @.cont;
- G& Q- L: _/ e/ }                        @.transpOrder := void;
* V3 ~7 G1 r+ m                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ q; f. J% R8 D" Y                                @,root.eventcontroller.simTime);
( `) W! R" R( Q                        @.HasOrder := false;" f& x9 u% z1 I4 \9 p9 W
                        @.DrivingHome := true;( I3 t2 a! ~" Q9 x
                        rgManager.tryToStartTransOrder;
9 _1 ?2 S( [. q& W2 P7 _                        if @.Destination = void  x  W& o5 I3 K
                        then -- no transport order for vehicle @
' q6 p8 d7 J; O. a, l                                @.Destination :=/ E! ~* k( K3 M# ^/ m7 @
                                rgManager.nearestFreeStation(@,track.~);7 ^2 X9 `# R: C0 ^' u
                                newDirection(@);   % i: V+ m: C% O2 T: `0 g
                                if @.Destination /= void then' n( g) P) a3 O% A6 `5 f! q. n
                                        @.Destination.NumReservation :=# i9 {3 P- L: X: l
                                        @.Destination.NumReservation + 1;3 x' X' M& c9 ~2 j% e! U
                                end;
5 b; p; C: W; I) q                                @.CurrIcon := "drivingHome";- N) Q4 x: U9 g$ ?
                                @.DrivingHome := true;
, p5 n. Q8 _$ T: w# [6 @5 L                        end;& C: Q* A* W7 J$ M
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" t, S* Y  Q( K8 b$ x( }                        part := @.transpOrder;
: ~1 q8 A  S  y& O                        part.move(@);-- load part
* U$ A6 l# K. T                        @.CurrIcon := "load";
1 a6 N( P+ A! r- R" d                        GlobalDistObj := part.globDestination;* X$ }9 m& I+ Z7 J+ [, b/ ^! r. W4 }0 [
                        assignLObj := rgmanager.rgAssignL;
# a. P. ~0 A# B' h7 u                        row := assignLObj.getRowNo(GlobalDistObj);! }5 _5 `% M5 H" h
                        if Row = -1 then -- since 701 s3 b! G( {) |/ y
                                if lan=1 then# \( Q. f' O! }, [7 {4 _
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 f9 ^4 u+ `5 m8 ~* E9 h
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
( D! J; L% f7 E4 {                                else( P: B- R. s5 ?( v; {% V
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! ?; h. R) F$ G# y. n  Y( `# r) Q, o                                                to_str("in docking station: \"",?.~.name,"\""));                               
% N5 B' P) P% e2 {# j" @                                end;
+ K  _" x; _4 n4 _# t8 |; Q                        else
' G4 b  ?/ H+ k9 j1 d1 S                                @.Destination := assignLObj[1,row];
- O1 y# r9 A8 l4 [/ H  M                        end;                        & N( r9 |! G3 Z/ ~, r' L
                        newDirection(@);' W( d5 p7 t: Y
                        @.HasOrder := true;3 i' F, s8 Q( E
                end;8 d! V3 T) v- f4 O( N
        end;
* s6 n& E" i* [5 e: I# t! xend;        -- of the method
& W4 w) Y4 d& {" L" W- X
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ) D3 _/ {$ L  y  ?
- Y9 w7 C' O7 x) o5 }
这是AGV_putin中arrive的method。
% l% v) S# {% H( H9 j
0 _5 y8 t/ t7 h* G8 t2 L当到达物料速度越高时,这个报警更多,
. L' \- t9 r& I/ M7 R. x' B可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
3 N  g! _1 _3 ^; I* G9 `程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?3 R7 o" N& |0 P! q  L. X
* O' O, O! m$ r+ x: ^! p% o
另外一个小建议,就是move,所有的move都可以这样
7 V( h& i8 |6 v& b" p1 Z3 g( J( Eif not move() then debug end$ V; p/ ]/ v0 w; O
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。7 W8 |, w# W: [
plant simulation中的free libraries有AGV模板,
5 y+ {9 H! q7 b0 N8 W里面也有案例。
0 o% K$ ]" s: R* P& w我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。8 p& @$ G/ p% ?' P8 {# u6 g$ y. k7 f

  v4 R4 M; l, J/ r9 P; ~我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
6 ]* o9 ?( d5 ^- S  i& b# |  B! ?  S2 U! A1 n, k
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
2 @; V& J& r: y0 r这是AGV_putin中arrive的method。2 _* |; b& `) Q
3 Z) @+ t% V" J! ]+ Y% |& d
当到达物料速度越高时,这个报警更多,
1 H; @( L( N- _& h0 L: |
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-16 22:26 , Processed in 0.023462 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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