设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9113|回复: 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'
/ A, @% t) C* v# ?; Y; {*/
2 J7 s$ h& j2 ~: Iis
9 Y5 E! u8 q8 y9 ^, A+ S        part, GlobalDistObj, assignLObj:object;row,Lan:integer;* R: a1 u$ A8 t$ S* S
do
3 u' b- h% W. n& V* y+ V. B( d+ E5 f        Lan := rootfolder.Internal.Tools.AOLlanguage;- C" f! k* v$ m+ T8 t4 C
        if current = @.Destination -- else return
& Z: W+ P" P; q+ n        then
8 Y7 `  G0 a; B% D4 w, Y( J                @.Destination := void;
9 ^9 }. B& W) W8 y* Q; [5 W                if @.occupied then* n7 Z$ j  ]! u) l* I
                        part := @.cont;
9 f: r$ K' [7 ~                        @.transpOrder := void;
2 F- y" K! \$ S' K6 N4 B                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 g2 ~& O1 b! R6 ^$ g
                                @,root.eventcontroller.simTime);
( @( q) N3 g3 h" [6 ~# E                        @.HasOrder := false;1 V% e1 L: O/ q  _3 h
                        @.DrivingHome := true;
& l: O' p% `9 X5 j8 s. g3 A' P                        rgManager.tryToStartTransOrder;4 i' `) g( W" |
                        if @.Destination = void
8 E' ~! M7 F2 K5 W6 b, o. Q/ A$ G2 v7 x                        then -- no transport order for vehicle @
* _6 i9 u+ @# w5 a4 _) E/ P                                @.Destination :=" V5 f. B7 m4 K2 n, N. [
                                rgManager.nearestFreeStation(@,track.~);
$ L- |; ^7 @' f0 b+ j2 v                                newDirection(@);   
. G$ V* _9 h) f2 \% \                                if @.Destination /= void then
  I3 z# e5 G# a% S- [7 S  |2 X2 O                                        @.Destination.NumReservation :=- k) }! c0 Z6 k% W
                                        @.Destination.NumReservation + 1;
) }7 O$ K2 ~+ F* l& d) k+ P8 }9 N                                end;7 P+ l0 z* f. I; M& k/ \
                                @.CurrIcon := "drivingHome";
. u' \. T, D3 D/ K& M                                @.DrivingHome := true;0 m  h) ]+ [( L( c
                        end;
3 o7 K0 Y  f, K2 V% C! d                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 o* j2 A# W3 @- A9 S                        part := @.transpOrder;
; J0 y( V8 {9 r7 V                        part.move(@);-- load part
$ j1 r$ Y7 d  l" f* \* P* a* Z; U                        @.CurrIcon := "load";) U2 ?8 |$ z  y( I$ T( Q( i; g
                        GlobalDistObj := part.globDestination;
! C0 A3 V9 n: O0 I" S! {1 B  c  p                        assignLObj := rgmanager.rgAssignL;: E- G/ i" W( `, g
                        row := assignLObj.getRowNo(GlobalDistObj);
: }4 r$ }, C$ S) w                        if Row = -1 then -- since 708 l' i% C) R$ t- L7 p
                                if lan=1 then% k$ f% Z& k, g7 K( D
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; X) h% b' r+ A3 X" {( Z2 M0 Y                                                to_str("in der Andockstation: \"",?.~.name,"\""));  Q5 g1 V# x; p9 P! X: J
                                else: U& s* ~1 c0 U# u1 I8 k0 n
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," u3 [3 W  r* y3 H: {/ M+ q
                                                to_str("in docking station: \"",?.~.name,"\""));                                ( {% E2 K) Z! l5 M9 k
                                end;5 e  T) p1 u2 N- k. M* `( X
                        else, G( Y1 J' B; y0 S. R& G" Q/ m; K. X
                                @.Destination := assignLObj[1,row];
1 B( N$ H' `0 A8 C8 D1 U: N% y0 O; c                        end;                        6 p6 R1 r$ N$ k! g& k3 S
                        newDirection(@);9 k! q0 c, m  w& l* }' j
                        @.HasOrder := true;* F1 w- V; B8 F, @2 D/ g0 m: P
                end;
/ X+ D, f- v6 ^% x$ P1 k8 a& `% X1 c        end;8 ~; p" B! Q3 }) @$ Y; {# x
end;        -- of the method, m1 _& X5 K. W
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 . s, r0 Q( g( _. n
" \* \5 P. m5 {
这是AGV_putin中arrive的method。
' K* s5 Q  _# ~
( Z$ Z' I# _. h9 |) C3 M2 N/ f当到达物料速度越高时,这个报警更多,
3 a5 A6 |4 L2 `  J+ |: }可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
/ h# w7 D. @" L/ d* P: y- G程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?0 l) d% s0 @" c2 L7 M: h' m9 w

7 R) `1 C% x6 P! p另外一个小建议,就是move,所有的move都可以这样
0 N2 B  \" Y' ]$ rif not move() then debug end
  V2 b. k) O2 b这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
3 E/ F# ^$ U" t- e# _plant simulation中的free libraries有AGV模板,
4 U. K' b- T. i8 o. O里面也有案例。3 A+ U: u5 G1 u  p5 {0 A
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。4 b4 U2 Z$ h- T% F' z$ N0 y' D

/ w' a! b" ~( x" [1 c我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 6 _- j% W  d1 |$ P0 w6 L6 q* R8 b

; z, g- n1 @. T那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
9 ?) x2 F5 s+ v这是AGV_putin中arrive的method。
  o) u6 ^. q( b0 y: }, g& A+ Q+ h! n
当到达物料速度越高时,这个报警更多,
7 w: }9 D+ z2 O
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-14 11:51 , Processed in 0.013705 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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