设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5769|回复: 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'! @6 Z- O0 e/ c9 {6 e
*/
+ y$ ?) ?- i7 J* f7 N& ?5 }# Uis
+ }+ ~6 e: b- f  W5 g8 S        part, GlobalDistObj, assignLObj:object;row,Lan:integer;( R: R3 u. P/ b" x& B& Y
do4 Q  J$ P6 E! V
        Lan := rootfolder.Internal.Tools.AOLlanguage;; l0 |* L* k* i( T( }# y: p8 b
        if current = @.Destination -- else return
; W5 f9 G" Q* i0 ?/ f$ G; d6 }9 @        then$ p5 x- {* }% o& N1 f# U8 ]
                @.Destination := void;
( ^; r( B( F8 v, j                if @.occupied then6 _6 h0 J: W; Z4 J: d
                        part := @.cont;) j( ?' |* K* N3 D% u1 u0 R& J
                        @.transpOrder := void;0 _6 m6 k0 U, p: T
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 d  n* R2 N1 K, q$ [% H+ [6 c$ `
                                @,root.eventcontroller.simTime);
9 a2 a1 [) v4 E) f/ B$ O                        @.HasOrder := false;
8 i' y: @3 M, X                        @.DrivingHome := true;8 s* O, F: {# h3 c& J5 G- |
                        rgManager.tryToStartTransOrder;) R: ^* ~# c1 I0 t' \
                        if @.Destination = void
  F0 r* d, n& k' e9 g                        then -- no transport order for vehicle @
3 Q3 ~$ _5 m8 a/ w6 a2 P2 n                                @.Destination :=+ Y  a9 l& F; M* j$ ~# B- ^7 x
                                rgManager.nearestFreeStation(@,track.~);
- Y3 G- X! R& j4 k2 X" x4 f                                newDirection(@);   
# T. B( t' k  k/ q, `2 w5 g6 y% \0 z0 X                                if @.Destination /= void then
9 n1 {7 p5 E" I2 y! B5 Q                                        @.Destination.NumReservation :=
- f; {1 {/ |  M+ y, R4 ?                                        @.Destination.NumReservation + 1;- N4 L# @4 u( p8 e  s
                                end;+ ~/ u6 A- ]9 J6 k* U
                                @.CurrIcon := "drivingHome";7 [: }/ p4 h! E  `5 i( O: ~
                                @.DrivingHome := true;! X  n8 p) E- m9 J. g$ Q
                        end;! U5 u8 Z6 C- X2 T% M7 x. w
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 D% T9 }4 P' [# y
                        part := @.transpOrder;& g+ D3 K) D+ M* q
                        part.move(@);-- load part
' L3 J) L3 x6 S# H( j+ r2 V                        @.CurrIcon := "load";6 g+ V: x9 J3 g: D4 s) Q
                        GlobalDistObj := part.globDestination;: e# o5 z/ U" M: d% ], j4 ?
                        assignLObj := rgmanager.rgAssignL;7 z: }/ _& I/ ^) Z/ l. L( d. }
                        row := assignLObj.getRowNo(GlobalDistObj);+ F$ S# P, F. X4 G8 j) G
                        if Row = -1 then -- since 70
6 H2 E5 O! i2 u. v8 Z& m                                if lan=1 then
3 C3 I  G8 @% L+ t  R* X                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( ?, j$ j# [' [: }                                                to_str("in der Andockstation: \"",?.~.name,"\""));
, j, X1 @* M) P4 B& \# G                                else& p5 X* y* \7 k" X" y. X
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ G4 g! _3 [: W; e- o* u
                                                to_str("in docking station: \"",?.~.name,"\""));                                  {, g* h+ }2 r) M) z- D
                                end;: L! ]' b1 u8 e" t
                        else
2 S1 c6 ?& T2 T8 f                                @.Destination := assignLObj[1,row];$ v) D+ S2 c5 z- W
                        end;                       
! X0 _' U& ?# q                        newDirection(@);9 a$ t7 _. @9 f& m1 \% ^' }
                        @.HasOrder := true;
0 G8 T3 ]0 \% I$ b& e$ e                end;
; N9 K. a) s7 K7 J3 W        end;. z" ^  p" A$ Y' W6 v: Z8 I6 g' a
end;        -- of the method
' `3 w. J: a( a0 Y0 n0 o4 D
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 5 g7 O5 z3 |% j6 h7 @) [$ ^. _
' W, V; a8 f# @* p% Z% p2 W
这是AGV_putin中arrive的method。3 ^( d" d& {9 l4 S$ r
- R. y" t, h5 x7 m; ~7 Y' v
当到达物料速度越高时,这个报警更多,+ ^1 ?7 h* ]$ X" T* `3 r
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。7 Q2 e5 v4 z: U9 ~3 m8 |" K( Z$ q* M
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?* W& x/ H# e  F# l" W
6 d& b0 e& q  q/ b# \- x
另外一个小建议,就是move,所有的move都可以这样
, h" w7 z) m& ^# \" Eif not move() then debug end, m" {3 t9 K/ E
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。% m+ p( C& g5 `  y4 r7 _
plant simulation中的free libraries有AGV模板,
, l* ?2 }% Z3 ~里面也有案例。
( \. p# d" R3 @, I我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。/ B3 D- p* S0 S- j; F! H: L
, L/ ?) W) d& q# Y* U1 y
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
/ j5 i& a6 J2 x0 Y$ p* u: a* l- S2 _5 t2 c4 N9 v0 D
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
$ u. R% c0 n2 J: B这是AGV_putin中arrive的method。& X/ v3 r# {5 ~, l) k9 w

- D) x; A5 ?  g  y* H' _  q/ z! M当到达物料速度越高时,这个报警更多,
) m% z' D, f/ [! X$ E$ j
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-18 12:38 , Processed in 0.018436 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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