设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9678|回复: 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': V8 D; E* N9 D% d: M
*/
% M3 `; D. U; L; V& W- n7 Pis* N9 @# n* g2 O
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& I4 c1 G, m" M; F1 b: K% bdo+ ^  q3 i( V7 _! L
        Lan := rootfolder.Internal.Tools.AOLlanguage;; T/ k, _, Y& u+ {
        if current = @.Destination -- else return2 l% T; {$ X+ [9 i* m+ J
        then
2 V; ?& ]8 `6 x2 e- }                @.Destination := void;3 v9 w) M& g% Q+ c1 j. H" Z
                if @.occupied then/ k5 w4 e8 }, E. d; q
                        part := @.cont;
' g/ A, A- C& U  t6 |* ?                        @.transpOrder := void;
7 A$ I  i5 j9 P7 T                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! F- G' [% S9 f% g9 W                                @,root.eventcontroller.simTime);2 W& D: ^! u3 P2 R# P' z' {
                        @.HasOrder := false;6 N/ x7 r# J. y' J
                        @.DrivingHome := true;
1 N4 q* r& T% s  f/ }1 r                        rgManager.tryToStartTransOrder;
! [! \5 S2 ~6 b$ ]                        if @.Destination = void1 M3 v% m8 J- d# e" I5 d: M
                        then -- no transport order for vehicle @+ H0 u# h% s8 `7 n
                                @.Destination :=7 I8 r2 o/ A6 L3 b! h
                                rgManager.nearestFreeStation(@,track.~);. U4 P2 S, E! k; W1 e
                                newDirection(@);   8 L, `+ E; U" v1 P; w" D
                                if @.Destination /= void then6 N# f: ~% h6 r: o8 h
                                        @.Destination.NumReservation :=
# O) i" _3 }# u0 X: x3 q0 y                                        @.Destination.NumReservation + 1;
& X5 G9 b: x4 u: ]+ u                                end;/ }' V6 R. F1 T1 T( E
                                @.CurrIcon := "drivingHome";
" d4 ?* ~9 }# L2 @                                @.DrivingHome := true;
6 q7 g4 h! L% T" p1 \% h/ |3 v                        end;' w$ a* a6 A% V% r; M
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station. p- _0 p$ ]$ K) ?6 k+ D% ]
                        part := @.transpOrder;
; e: P# G1 l! E9 U                        part.move(@);-- load part  J& A5 _. u/ `4 K& B7 z/ C" o1 Y
                        @.CurrIcon := "load";# ^6 o  G# l& y" M4 R
                        GlobalDistObj := part.globDestination;
8 B- |2 r+ M5 x; b6 c, x' W2 H; W                        assignLObj := rgmanager.rgAssignL;
! c* }* z) ~( r2 o& T3 v                        row := assignLObj.getRowNo(GlobalDistObj);
; ]* M( ^& O3 H- Q                        if Row = -1 then -- since 70
# R8 I2 o; H+ S3 G( Z& G                                if lan=1 then1 b0 o* l- f5 k7 N3 w) n
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 Y! @/ g# h$ G$ @) u- ~
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
) F- e4 ~7 @9 n3 j, y                                else) |5 e) I9 c6 H5 v
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! j+ a+ G, n# n" C. O: t  p; F) V  B
                                                to_str("in docking station: \"",?.~.name,"\""));                                6 E0 _- X" {: y4 S! G+ b1 }% Z
                                end;. K2 ?7 T  s, B$ D9 |. z
                        else
# P; y7 T( n8 [- b( e) c                                @.Destination := assignLObj[1,row];+ T3 v: q) j3 m, a0 N: A2 ]
                        end;                       
# o1 i: \8 N8 S) H6 ?8 u                        newDirection(@);) k2 @" X9 X9 x! }$ l7 t* m
                        @.HasOrder := true;
) ^4 |) i( \8 d- M% y  @/ `3 I( q                end;3 R8 Q+ }- R& k$ l7 [, ^! ^: p
        end;4 p/ N. d4 G9 b! i5 U
end;        -- of the method! ~' X7 X) R4 H* `# u/ w
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 % G. X4 e4 K' C* Q

6 ]4 Y4 E/ E% k! C  F4 D这是AGV_putin中arrive的method。
: L% Q! w/ i& w& k. C
1 X0 j0 R9 b7 [% t当到达物料速度越高时,这个报警更多,0 q. |+ h5 Y% @' m
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
* r: T* Q  X$ ~3 k0 ]程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?* V8 R% I3 Z+ M- ?6 x
" H0 Y' q  @2 B/ A
另外一个小建议,就是move,所有的move都可以这样* {& ~- J$ }# }2 O
if not move() then debug end
( |) @3 G+ A* L这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
6 ^* z: X: S0 p7 dplant simulation中的free libraries有AGV模板,
' a; ]& \3 B) ^/ J* [里面也有案例。
! Z& \! r5 _4 ~$ P6 T9 s+ L我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
# B- C; T/ f; ~
% \# T2 F/ N; T3 `8 F; A我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 B2 [2 a  ]- H& n: k6 Y  b& V9 ^# j" O% Q' {  e+ q
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
9 j' _  b8 r7 T' p0 v这是AGV_putin中arrive的method。
1 l$ C/ H! g2 z  P* X! r) z1 f) H) J  p* I% W- O
当到达物料速度越高时,这个报警更多,

9 N) S, K, r2 _0 H; z6 r* m* |$ L8 ~另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-16 19:03 , Processed in 0.025404 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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