设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8336|回复: 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'
" J6 n9 H+ i/ ?2 K2 `' v, O4 H*/
$ |4 x- ?1 {! Y& x% m6 ris- G! S2 r/ M' B( `: B3 E
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;) l/ y) `0 O' q8 A' x  S& [
do
: s: [8 h0 @  }; @# [        Lan := rootfolder.Internal.Tools.AOLlanguage;
0 D+ I3 g* J& `        if current = @.Destination -- else return
+ E+ Y* P) E& s# f$ R  S        then& n. s( o/ }  A8 H" N
                @.Destination := void;
; M6 z. }% G1 G2 }* U- N# Q" r                if @.occupied then1 y, a' B; v* P' r
                        part := @.cont;
9 ~' m: M- r" f. s: g5 \                        @.transpOrder := void;
* ]! h- d- |& k7 }9 Y% z                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" h$ z! v% `6 @7 P                                @,root.eventcontroller.simTime);
4 X  B8 A9 h5 ^& t- E                        @.HasOrder := false;
5 M. h: b/ a# _/ U0 Q8 R4 k* n                        @.DrivingHome := true;
. S- v; I; x; k5 h9 Q! c* w2 P/ }                        rgManager.tryToStartTransOrder;
; B. f6 l" }* k0 ^1 A7 u* W                        if @.Destination = void
8 ^8 o0 @7 f: I1 |1 l                        then -- no transport order for vehicle @4 |1 l8 ]- |9 N5 u1 A
                                @.Destination :=3 P8 J6 Q7 r0 ?! v% m
                                rgManager.nearestFreeStation(@,track.~);
/ _. Y! p  L/ M8 o                                newDirection(@);   , A- q) ~& a6 O8 e. i& g: _- y
                                if @.Destination /= void then7 V  B- g% a" D0 Y/ _2 w) h( f7 S
                                        @.Destination.NumReservation :=& ]3 r; M4 f" ]( h+ P% i+ r$ g
                                        @.Destination.NumReservation + 1;/ o9 S& J2 f: f1 D0 [# r
                                end;
4 c6 t$ V; W; [7 L2 _& @                                @.CurrIcon := "drivingHome";
/ o" k+ h& L0 O* w" M4 |                                @.DrivingHome := true;
/ f- @  l5 m6 O+ ?; i                        end;
, ^& f' ?* e8 }. w3 m                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* w7 w, G+ r/ r! c7 w) z                        part := @.transpOrder;
/ D* K( s) M. }( ]0 G                        part.move(@);-- load part
7 R5 v" Y# T$ Z6 y' I2 G, j# P                        @.CurrIcon := "load";
/ Z* \* E) _* x3 D2 G# s                        GlobalDistObj := part.globDestination;) b% @) m9 x( G7 l7 i( P' j2 k
                        assignLObj := rgmanager.rgAssignL;. B9 `* B0 I: z9 G
                        row := assignLObj.getRowNo(GlobalDistObj);# R$ [0 N/ j, {
                        if Row = -1 then -- since 703 m+ |2 A( N) |( U9 T
                                if lan=1 then
% \$ F& H, ]/ T1 l: N                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," t5 h) d. i. ^( S7 t5 A/ J1 _) O( ~
                                                to_str("in der Andockstation: \"",?.~.name,"\""));: H4 R$ @3 A* |5 C! S4 ~# ]
                                else( e$ ~# K$ V% o0 D
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. x9 g$ G/ q1 S                                                to_str("in docking station: \"",?.~.name,"\""));                                - J; p1 D( s& g' t4 d6 W5 P
                                end;
4 [# L8 G2 [: N                        else0 f- F; @) i2 O9 x* K  A! ?; T1 i
                                @.Destination := assignLObj[1,row];  E6 W  h. H0 h
                        end;                        5 K6 @7 E; i+ M+ h' T/ {+ E5 A
                        newDirection(@);
6 k/ e: f: M$ \$ g% w5 R                        @.HasOrder := true;
1 o0 m. T. \! h2 v0 y: F' K% z1 S% U                end;, l( {  [" ?6 \+ C7 z4 H
        end;* J' G$ S1 u4 l% {
end;        -- of the method
1 h+ S9 T- O! M( w( F
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 * Z4 o) g, q7 v  f- o/ I
% i3 |" j; m  `* R* V" ~; N
这是AGV_putin中arrive的method。
; V" A! ~$ W6 Z# C3 \- S0 ]& a! E9 f+ a% ?; m) Z+ C
当到达物料速度越高时,这个报警更多,3 o" U* u* b/ t& r3 m) |6 r
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。. R6 ~5 n7 Q5 N* ~# k9 M8 h
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?$ L3 |1 L$ U, I. `5 M

2 t  s' P. T" O" t; k9 ]另外一个小建议,就是move,所有的move都可以这样4 K* r4 |  E5 W9 R2 Y
if not move() then debug end/ R' U- z. u5 x' e# Q' C$ ]
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。: T, s2 f" K  O, {. v2 S
plant simulation中的free libraries有AGV模板,
; D5 M! f& X: A* q3 {0 h9 \里面也有案例。9 F# ^3 b; `  G* N4 F' s$ y
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。$ d. e( G' G* h5 q) b
& V6 S$ c8 n8 Q: k4 [! {( i* X7 c( Q
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 . o1 {% x: C+ G: d

: y3 `2 \7 C9 I+ r( j% Q- A那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 & f! t: Q( E4 V1 s  l  J0 Z) B. B( W' e1 g( [
这是AGV_putin中arrive的method。
1 z5 j" j6 z  h( T' \/ p% N2 n5 q$ p  ~$ _* w; j4 s
当到达物料速度越高时,这个报警更多,
5 ~: x/ a1 F, H8 ]: \' v. q
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-28 14:54 , Processed in 0.017554 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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