设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9013|回复: 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'7 a* E1 P$ G+ K' g/ U# c
*/
! I3 x+ J- P7 a/ {7 A; ^' R: his
2 I. x  c0 G+ L$ q( I) y        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' K2 L  R9 g1 n! H- n8 P" xdo
. |" @  Z$ g- s  X4 N6 ^/ S3 m2 \        Lan := rootfolder.Internal.Tools.AOLlanguage;! k5 ^' W( I' D: \$ w: Q2 _3 s
        if current = @.Destination -- else return
8 z7 B/ U2 G8 |3 b2 x1 i        then/ N0 {) J( w5 P( o: K! n
                @.Destination := void;8 o5 p7 M, l7 U1 ~4 ]# L
                if @.occupied then7 n- o5 w5 b& u# A( U, d8 u( S
                        part := @.cont;2 K  k3 b) F3 \  D; J; }
                        @.transpOrder := void;
. ]) N3 ]: @7 O; A2 c# |- ~                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& P8 l! m$ k/ q, J9 @! g1 v                                @,root.eventcontroller.simTime);
! m+ [$ I: X4 l' U( b                        @.HasOrder := false;* y5 W; T/ U, F$ `: t2 [4 X( T
                        @.DrivingHome := true;& |4 [: T# e8 @. Y. E6 N: N
                        rgManager.tryToStartTransOrder;2 D4 _) x" O1 F" c4 O3 q
                        if @.Destination = void) [: N+ y4 C3 y1 l% K6 p
                        then -- no transport order for vehicle @* ]$ a2 Y4 C, w
                                @.Destination :=
6 B2 {; |) R6 q: b% E- Y                                rgManager.nearestFreeStation(@,track.~);
3 V, x$ Q* ~3 I9 W2 q9 r                                newDirection(@);   
3 b9 t" J' P5 x* s                                if @.Destination /= void then
+ F% f. W$ [0 e* C# ~                                        @.Destination.NumReservation :=6 y8 G( J" F& W- h3 |' v# g
                                        @.Destination.NumReservation + 1;
. X7 `' O9 L. r& |/ }, i" h                                end;
4 ~# V. S! U  W# [9 k, P4 J                                @.CurrIcon := "drivingHome";
: M0 m6 S8 V# e                                @.DrivingHome := true;' l2 n: g) Y6 _3 s6 E! k" x' ]
                        end;
' l* c3 i7 Q4 C2 o& M                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: e" }& B+ Q: ?  P                        part := @.transpOrder;
8 q9 w8 n# e8 c; p% I                        part.move(@);-- load part6 D0 s8 p' @, {2 j1 y( V# e1 A6 o
                        @.CurrIcon := "load";' P, A9 W/ v# s) E2 ?
                        GlobalDistObj := part.globDestination;
* l4 Q1 U! ^# h' ~" H                        assignLObj := rgmanager.rgAssignL;
: o1 h1 j  `. }4 b8 f4 V                        row := assignLObj.getRowNo(GlobalDistObj);' q# X4 T7 ^+ w: |
                        if Row = -1 then -- since 70
9 l, L  y7 `& d                                if lan=1 then
/ w/ P" F% G0 M3 W" j                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) q* F" `2 z$ k! w                                                to_str("in der Andockstation: \"",?.~.name,"\""));( T, Z# g) E4 x. ^
                                else
# V3 u3 {. L" U6 S+ B                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 J  U4 x1 Z4 H0 |( z) k                                                to_str("in docking station: \"",?.~.name,"\""));                                ) Y) J! t* D9 |. ?
                                end;
% k$ L  J" w+ D! z6 K7 k/ K                        else% w; ]4 P9 g. Y- u; j7 g1 \
                                @.Destination := assignLObj[1,row];
  ]+ P2 {( g7 ]# }0 q                        end;                       
% i4 {1 B6 p. _2 Y% `  _                        newDirection(@);
) d/ O" o( B+ e! ]& r( g                        @.HasOrder := true;
$ `( e* }# ]; O) \$ X                end;
) `) @* O5 \& U; z% E4 k        end;
+ P) p" L* l1 F) B. o/ i* Wend;        -- of the method8 c. T* y" f8 e: J6 k
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 1 I3 ]0 D* d6 `0 Y
; E9 I. }6 c' t' D2 S/ H
这是AGV_putin中arrive的method。  ^& @2 I; ]; O7 ~; N, m, U( ]1 ~

/ E1 D3 y) {; ^( Q0 k0 _" k当到达物料速度越高时,这个报警更多," }6 O" k- t( G& w0 M% |
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。0 L, O/ t, c1 j& @9 [; E
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
; h$ S, D, N- y
! ^5 S$ @7 P. Q/ K7 P3 j另外一个小建议,就是move,所有的move都可以这样1 O9 V+ z8 A- Z, l  V
if not move() then debug end$ \* |5 s* z. O6 W/ {
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。4 Q8 L, f. N) O% \
plant simulation中的free libraries有AGV模板,
8 u# r! D0 Q6 v- [9 ]- |里面也有案例。9 B+ L" Y; M( i/ w
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。7 I' w, e( f! ]" ~# z9 D9 K
! ~6 @: S+ `% l8 e# q% n6 u
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 % }9 ^* y% c& H& M1 g) Q- n

% I9 m5 b" K$ M  p! k那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
5 U$ D5 @" l0 j( T6 Q( h  M这是AGV_putin中arrive的method。
2 \' ?' V/ y: q" t1 k! l0 d; M# W% o& V4 F8 Q1 n6 u' U
当到达物料速度越高时,这个报警更多,

4 O+ [$ F/ K3 w2 G另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-8 22:58 , Processed in 0.067754 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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