设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6314|回复: 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'
' z& N- E% [% X$ D*/" S, f7 ?0 s; L5 r  q" W
is" H' E; x1 o: n5 [  h$ H
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 Z1 f- m. B9 c8 Y3 Y7 n7 M
do! ?5 ]1 {& @% g( O3 ]
        Lan := rootfolder.Internal.Tools.AOLlanguage;
* P, H* @7 L* Y- A8 ~0 A( h        if current = @.Destination -- else return9 f  z# F. v$ S$ K
        then
! F/ {3 c4 x) h6 T0 k9 W                @.Destination := void;
" I, @7 m! w/ F* k& k% ]8 y                if @.occupied then
/ V4 ]6 q8 p& E0 Y                        part := @.cont;
. R6 Z) J) [8 q4 D" K: ^7 f5 z: v                        @.transpOrder := void;
4 K  q  ~& G: W7 M6 S% N. {                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, a/ @' |" {8 W2 D, d" W
                                @,root.eventcontroller.simTime);0 v4 Z' P% J6 o# r
                        @.HasOrder := false;, A  Y/ {3 y& U% z% V
                        @.DrivingHome := true;
6 b, B. c/ o: v. J                        rgManager.tryToStartTransOrder;: Y3 F: Z! U4 o7 O4 Q& D
                        if @.Destination = void
6 [1 A% G2 Q% m                        then -- no transport order for vehicle @
. w2 L# {/ N( U: l1 t" h1 h                                @.Destination :=# {7 Y+ G# J6 e! Y7 y
                                rgManager.nearestFreeStation(@,track.~);
$ e# i' `; L& ~8 o7 ?# j                                newDirection(@);   
4 E5 V$ C7 r4 r* y                                if @.Destination /= void then
+ T2 `6 t$ H8 p) u& v3 `8 j+ |                                        @.Destination.NumReservation :=) p5 {# H! o) ~- L
                                        @.Destination.NumReservation + 1;/ `& z- x4 f1 i  p" y5 K
                                end;8 I5 L1 ^* A" f+ d
                                @.CurrIcon := "drivingHome";
5 O6 A5 L- _$ {: W6 t9 U+ h3 t8 }                                @.DrivingHome := true;
2 W8 \! D! h' I# E6 `                        end;, ~: a7 M4 y! L6 F$ B& E& b
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 f, J7 F3 S, q0 q& T6 E8 z% Q                        part := @.transpOrder;
9 u: [6 {* j9 `, o                        part.move(@);-- load part- Y4 s2 t7 ^% U  Q( e6 L9 d
                        @.CurrIcon := "load";8 E& m4 C5 @7 i0 {
                        GlobalDistObj := part.globDestination;7 h$ w1 B0 S; [1 i" `0 ?
                        assignLObj := rgmanager.rgAssignL;
+ |# p; f) D4 J9 C0 w                        row := assignLObj.getRowNo(GlobalDistObj);  m$ `. |! w7 v0 v  u! [
                        if Row = -1 then -- since 70
; P# o, |4 |$ @6 s. _1 ~. _                                if lan=1 then
! S5 b. w: h1 z                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 O# x- p: c( H) q* q                                                to_str("in der Andockstation: \"",?.~.name,"\""));
6 S; Z1 c. ^# a5 X                                else- D& P# J; Z* l" j9 `6 y) o7 }
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 N  s( a" K! s; q                                                to_str("in docking station: \"",?.~.name,"\""));                               
7 ~* r% @$ Y# H3 }0 O1 l9 g                                end;
# r. B/ U7 V0 q4 @, {! Y                        else
# @: k# ]  f& r4 X, T1 p                                @.Destination := assignLObj[1,row];
/ S5 s9 I5 i3 v0 H- N& V9 [# V' o                        end;                        " h: y$ w( v/ J& e( l7 @
                        newDirection(@);# P- y1 x* G7 v; U' Y* m
                        @.HasOrder := true;# C. ]7 e. l: O1 A
                end;+ ]1 g. V% O( i0 e( p* K
        end;
9 Z: m( r' K, a0 u9 Hend;        -- of the method
/ A# m; i3 H7 }3 k/ K; M
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 8 g2 M. u, z  l) p- z( x
* _8 ?$ o# f" `
这是AGV_putin中arrive的method。: s/ ^: P: `) n1 T* j

- S8 {* E6 N" y- R/ H当到达物料速度越高时,这个报警更多,
8 I" S' b1 u3 D! g- k可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
' d( R, V* o9 ]; U* |程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
' x% B  _  J0 k3 A  r$ Q6 {) Y) C$ p8 W' b( \0 |# C, _
另外一个小建议,就是move,所有的move都可以这样% U: D0 P) A2 ]
if not move() then debug end
0 k3 {) h  C7 g2 y1 b" L* Q+ ~这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。- h: R5 b$ R2 [- q  }* _. R$ G
plant simulation中的free libraries有AGV模板,
& [+ H+ @- X% z" S5 B' q里面也有案例。& _) ?  t. |5 {) g
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
" ?& N9 h' E7 T/ Y( v& ]5 ?/ n8 A9 [5 ^/ }6 F, [  C
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 $ G7 l$ ~+ c5 s
& D# j! `6 }) a+ }
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
2 J6 D1 E$ u& `. R这是AGV_putin中arrive的method。
' a+ `. ~8 i0 E+ L$ f* |
- M/ R: P: U+ s4 j( m3 i* W当到达物料速度越高时,这个报警更多,
& P6 S3 u7 [- K7 Z
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-30 08:17 , Processed in 0.020330 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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