设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7850|回复: 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 K9 g$ _2 D8 q" D: h0 q+ {
*/  O+ s) S; {0 u2 v% }( N) k
is
) Z- x9 h- u3 d! o: O4 L        part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 G2 q1 H7 e0 Q  \+ }
do
9 d+ j; L" w9 m9 z        Lan := rootfolder.Internal.Tools.AOLlanguage;
" _, y1 z. K& ?        if current = @.Destination -- else return% j1 O7 c( I8 I" X& m
        then
) A# D: b9 g& P4 W( N' |                @.Destination := void;
# e0 D2 c! z' Q/ X' B5 j                if @.occupied then( v% g2 i/ n. {7 U( p/ e7 G
                        part := @.cont;
3 j2 H" T6 D) M7 ^3 q; V2 `; b                        @.transpOrder := void;
+ R, X9 G3 b, h& b6 R! G                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 [$ x! S6 n! Y                                @,root.eventcontroller.simTime);
  Z" p. L7 q6 H/ x8 k7 |' f% g                        @.HasOrder := false;% A! R, ~: Q6 C/ |. x7 x- P; h& _# ?' a
                        @.DrivingHome := true;
+ M! v7 }& P, d; |) v7 s                        rgManager.tryToStartTransOrder;
0 T+ G/ v4 s8 C; |6 n" V- |                        if @.Destination = void8 s) O9 V# V1 g2 u% r* i0 C
                        then -- no transport order for vehicle @
9 ?6 }% D& ?$ r& N# p                                @.Destination :=: y. l+ U, Y# P, `: H" h* P3 }5 P
                                rgManager.nearestFreeStation(@,track.~);1 B2 k2 k; q5 X& y; A8 S. g
                                newDirection(@);   
! {" D. s7 B7 K. w% u4 [) E0 s                                if @.Destination /= void then5 R: {8 i+ Z* N
                                        @.Destination.NumReservation :=1 t; B. k5 Y% L4 Q! U
                                        @.Destination.NumReservation + 1;
2 m; b0 C% U! _4 n9 W1 y% L; E                                end;8 D, T" P* d! [6 B% {& y
                                @.CurrIcon := "drivingHome";5 V+ H8 H1 |8 {2 a$ Z. p, c
                                @.DrivingHome := true;5 c+ r/ b5 p1 M, i
                        end;0 Y) _+ h+ F8 y$ Y" D
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 b" i& B+ b( H' v% I
                        part := @.transpOrder;
) M0 o2 v9 ^2 \# ?+ `6 d1 [# L, n, e                        part.move(@);-- load part
4 E& O5 H. R" V3 ]8 R' q  e/ A. K                        @.CurrIcon := "load";' S0 s/ m% }4 j
                        GlobalDistObj := part.globDestination;
3 J" {0 q) d0 L! Z: d                        assignLObj := rgmanager.rgAssignL;+ `% ~+ K1 z! c, Z8 T/ k& J3 x
                        row := assignLObj.getRowNo(GlobalDistObj);' O3 D  S+ b5 J. t: A9 [
                        if Row = -1 then -- since 70
( K0 \9 s% H' E% \# M' ?+ D; U                                if lan=1 then
: W7 Q' C7 G6 b5 L, e+ O                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) m  o( z9 o- ^
                                                to_str("in der Andockstation: \"",?.~.name,"\""));% G+ a7 w& n3 a% R( s* ?( U- Y/ D
                                else
' l1 k6 k! P: d+ c* t/ ^                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ D. f2 d7 \0 D. |$ B/ S4 l* J/ x
                                                to_str("in docking station: \"",?.~.name,"\""));                                  B5 Q7 f. t/ t6 E$ K6 t4 b/ z% r! q
                                end;
- h; `) s/ e9 l3 s! a3 A8 L* s; I                        else
: `& P# v9 Q  e- P. T/ X9 g                                @.Destination := assignLObj[1,row];
& f2 b  m. l6 G* z) u5 P; `                        end;                       
1 w# a# ^6 P: S, N% \5 J3 j                        newDirection(@);, `: t5 _! D$ b9 S( B) _/ {
                        @.HasOrder := true;
; {1 D, m: d) e: Z, L                end;
9 O  M* ?$ a7 I7 F- _        end;6 Q- s% |, {2 H; y
end;        -- of the method4 u$ m9 }6 q6 |# T
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 & m$ M3 b8 ~9 L3 a7 h
( D* ^' r' c9 r  z1 D
这是AGV_putin中arrive的method。
' j* H+ o, m) @* Y5 ?# w8 t1 f
$ F# n: v1 W3 C- R, S% ~0 _当到达物料速度越高时,这个报警更多,
& y# N3 z- H/ s  b+ s可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。2 Z, R( C# [4 @% ~( \
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?) M. X9 q+ [1 [; o& M
% v9 d2 q5 {" S  O
另外一个小建议,就是move,所有的move都可以这样- n+ Z$ N, C; `5 y
if not move() then debug end/ u% J. \, r2 W" \3 I/ p
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
% a1 W$ W9 A8 K! @; m7 E1 Q7 Jplant simulation中的free libraries有AGV模板,
1 V& g2 q6 B* e  R# l# Q里面也有案例。4 t6 `5 Z) ~' e* u5 O
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
1 p% j) l+ g. l
  k) s9 Q: b" n1 ^/ F我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 + t6 m5 T& M- V) N6 k

1 o) x1 ^/ S3 n- M0 @+ x6 C那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ! n: m# Q0 s. }8 d; `$ j5 o
这是AGV_putin中arrive的method。, @7 \* w5 H& i6 H. q$ v' {( I5 ^
& W" K& R4 ?3 D4 b' B
当到达物料速度越高时,这个报警更多,
$ \! C. k, r& A! F) z( `
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-1 19:12 , Processed in 0.016618 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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