设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6720|回复: 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'4 Z* v( @- \" }2 b& l6 d5 x
*/. z# B' ^1 n% y4 r6 o+ B( Z' R
is
8 A# s! j" P' Y& f: \        part, GlobalDistObj, assignLObj:object;row,Lan:integer;% v" C: ~2 F1 X6 O/ [7 [
do
' P0 y5 E" `! k( U2 Y8 c! K$ d        Lan := rootfolder.Internal.Tools.AOLlanguage;" l. {2 `' `9 g+ _
        if current = @.Destination -- else return9 y8 {5 M+ y3 l3 f. e# D
        then
/ c( `/ E! m  ]6 v                @.Destination := void;
& M* d) q* e/ }1 h$ A. g4 n/ _3 K                if @.occupied then7 p: ~5 k) g! b# b7 L- S) f) i4 i, {4 @
                        part := @.cont;
* y9 k. H( p, Z% V9 [                        @.transpOrder := void;
5 z4 K  f) b* i1 j; s                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- D) U+ N& S2 k
                                @,root.eventcontroller.simTime);
! s  b) _0 r) a+ N) A, d* {6 W                        @.HasOrder := false;# w* }: R& q( W# b! J+ {8 k
                        @.DrivingHome := true;
. n; Y. B3 S2 I: [8 s& i                        rgManager.tryToStartTransOrder;
' I! s/ `  {; [" w6 A                        if @.Destination = void
9 K0 |6 V; J' {& T( p1 i                        then -- no transport order for vehicle @" Z' D5 m# U$ P2 \+ `: _1 I3 v
                                @.Destination :=
, z: [0 j9 y! D6 `# E3 a                                rgManager.nearestFreeStation(@,track.~);8 M: q4 M9 m% j+ \
                                newDirection(@);   
# F" U. _6 A' {( P                                if @.Destination /= void then
& D: w+ {$ L+ U! E  t                                        @.Destination.NumReservation :=' o  U; V/ V# X7 I$ C# t% ^' \
                                        @.Destination.NumReservation + 1;' {# l& g+ B4 y1 Q, q
                                end;
0 P4 a: n" w  ^& a6 k                                @.CurrIcon := "drivingHome";
; F8 Y* l3 R7 ?" E                                @.DrivingHome := true;7 x  m5 `) n# h7 I; S
                        end;$ f: ~! h6 G( D( h
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 |/ d+ x! p0 e$ N6 w                        part := @.transpOrder;
9 R7 `: p) V+ L9 p                        part.move(@);-- load part
( D' D! b# r' m8 a. F0 z! T                        @.CurrIcon := "load";5 e; ?# W* }! G8 s: @$ ~4 \# ]' C
                        GlobalDistObj := part.globDestination;
* m" U9 D- n  C" N/ w                        assignLObj := rgmanager.rgAssignL;/ @  D7 m! D1 y( h" O) d) }9 d
                        row := assignLObj.getRowNo(GlobalDistObj);, q' Y& E0 O/ l7 [6 i4 `; R
                        if Row = -1 then -- since 705 u4 J2 }8 b4 J. p! D6 e2 l
                                if lan=1 then. j9 T% m+ B: s. K* G5 F8 a$ w
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),  C! D9 N; q/ i+ n7 N/ ]4 d
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
: t- H5 ?# Z# r6 Q% G: G# I  \2 Y5 X                                else$ G. m- z$ v# C! T
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ a7 R6 a7 [; K* o5 {5 V. @                                                to_str("in docking station: \"",?.~.name,"\""));                                  c% W& o+ I: C( R; @6 F! D- t% r
                                end;
8 A' V" z  x5 K  g! H                        else! t" k- C* U' m% |+ c; B( T
                                @.Destination := assignLObj[1,row];
# g; B! O7 O+ |5 a) D( k" H                        end;                       
) K2 d* m3 |/ x. R2 g$ h# F                        newDirection(@);9 G$ f' e. `! X8 K2 O% Y( v
                        @.HasOrder := true;
7 C) c: K* F% x  C/ v. K; K                end;
) n4 ~; n. ^& \6 m, ^' P) o: L9 ^        end;
7 \3 G3 {8 X" O! C- t8 Nend;        -- of the method
, D4 M8 y& B% ?* w" m4 K1 U
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
# h2 W0 T# f8 V$ \9 B- C4 u6 t2 Q( e  S8 d/ R& e* C
这是AGV_putin中arrive的method。
- V, p, o* z* D+ r! n$ f5 a( K7 {* J' h9 y' }
当到达物料速度越高时,这个报警更多,
" W: k; F7 q; Q3 H7 y可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
' U7 a4 I8 V- f) @* u程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
! Z3 W' Y, f1 G" M2 v* A& v' |, G, c( i  x! \- w
另外一个小建议,就是move,所有的move都可以这样
* q1 G  w9 v" t. pif not move() then debug end; c% ~- r# C" o. u
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
+ I# ^7 w; W" {: Cplant simulation中的free libraries有AGV模板,
( a, K6 l. n* l( b( O里面也有案例。3 y+ S+ x* B+ J: P4 @
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。* S8 g! |5 l5 Q/ t+ M

$ h% W( |5 e1 ~: K6 C' J* u4 N" c  R! C我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 $ i: E6 j  i* r3 A+ S- z

3 M; H; l- _/ i7 Q) @) u那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
. q; k) {4 a, {8 R( ^. [# Z这是AGV_putin中arrive的method。0 W* t1 f! X0 H6 B3 W/ ?1 ]# }

4 T! \% a8 a$ s( |, M) d) J当到达物料速度越高时,这个报警更多,

+ U% |, q9 V* A另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-22 18:50 , Processed in 0.023567 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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