设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8596|回复: 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'. F8 ?1 U, Z( D1 `5 F
*/9 \$ i# R( h2 B0 Z: G( \! q; a
is( b+ ^4 q. u- f! L/ ~2 ?
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 t3 n5 j' n( H& A% J- k" U
do, d8 i0 M( |. s! {4 P
        Lan := rootfolder.Internal.Tools.AOLlanguage;
7 W  x/ z4 S2 I5 f; S0 d' x2 y* G        if current = @.Destination -- else return3 y9 A+ }# J- z9 r+ [+ h
        then, s$ t3 U5 t5 g
                @.Destination := void;* w. o/ C( n+ n* E
                if @.occupied then# n$ M$ {0 \8 X3 }- g; l
                        part := @.cont;. T( G8 k# E. o9 G( ^
                        @.transpOrder := void;
& H2 v/ x6 p0 f+ I: s$ x$ r                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# ?, m8 E9 y& c/ d. V
                                @,root.eventcontroller.simTime);: [! G/ o5 T8 ]; K8 Y5 x
                        @.HasOrder := false;& h5 I6 z- [9 _* U0 {% C( p
                        @.DrivingHome := true;
) H1 P$ V8 ~4 q7 T' N                        rgManager.tryToStartTransOrder;
% U# D  R2 R1 u/ {5 k: T                        if @.Destination = void
% `  q8 T  e0 _% a1 \0 k                        then -- no transport order for vehicle @
5 D) m' x8 t# _2 C                                @.Destination :=
6 q; j) N% x; a5 a                                rgManager.nearestFreeStation(@,track.~);9 c" c* f6 f/ A; V* U8 {" a* h9 N
                                newDirection(@);   
, B9 x( ?& j5 G                                if @.Destination /= void then
1 H' |+ o3 A* u% U+ D0 z! S                                        @.Destination.NumReservation :=
0 g' x* @7 l* H8 o8 X. K                                        @.Destination.NumReservation + 1;
) e- v5 d8 w; b' m! t; Q, x                                end;4 Z1 f5 ]2 i7 H6 ^9 T- z
                                @.CurrIcon := "drivingHome";
3 h. f7 C: e7 V8 Z1 ^                                @.DrivingHome := true;
1 O8 l" v0 V* R; i# c" S                        end;1 Y7 o* f- ], ?
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, z. n' [5 L5 X" ~- A& d) C                        part := @.transpOrder;4 L  `/ Q2 K1 s$ s
                        part.move(@);-- load part' m$ f0 Q$ ~2 a+ D9 [/ W
                        @.CurrIcon := "load";
  ~$ i; x9 T3 A/ _                        GlobalDistObj := part.globDestination;" \' `. E) B, [, I8 {2 u
                        assignLObj := rgmanager.rgAssignL;% ?: c2 s6 b' W
                        row := assignLObj.getRowNo(GlobalDistObj);
5 w8 k# J% l/ G' N                        if Row = -1 then -- since 700 m: A5 v' `3 @1 F( I8 s$ z
                                if lan=1 then6 |4 s# p: _. h# h: g, L; ]1 A8 y
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' v0 g' J' y1 n' ?; D+ N9 I
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
$ _' d* J5 e% d1 i9 p                                else
4 d: k$ Z: v. t% Q, W) E                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; U) C' L) Z1 V) {* Q% }
                                                to_str("in docking station: \"",?.~.name,"\""));                               
8 J& L  o# p# u6 V+ j; ~                                end;2 M9 Y  K2 G; H. O; w' q
                        else
* b" W& r4 u8 N2 X+ t                                @.Destination := assignLObj[1,row];/ C3 }1 b& z/ s$ r: w# L
                        end;                       
" }; h) W" T6 Y  R* m' ]. K! [                        newDirection(@);7 R' [0 ]# c3 j8 ]6 H7 ^
                        @.HasOrder := true;
( t% ~% U, B3 m1 r! K( L                end;
5 N8 g. n8 n: }" }. {+ y        end;
2 ~. q( N$ b- Yend;        -- of the method) x0 U) k5 W4 X1 J
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 8 d% W1 c" M/ i# c8 }

6 ^3 d5 S$ m9 ?$ Y9 C% u5 |4 Z这是AGV_putin中arrive的method。
% H8 O) K2 w1 {$ \+ r, D3 l: k, v7 x6 d8 o* \( a: w- |$ ?" K! [( b+ y% {
当到达物料速度越高时,这个报警更多,9 B; C) c4 T/ c, A- y
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
6 f2 b/ r3 P( B6 |4 }5 S7 ?程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
5 G! A9 T# f+ v( o* V- F/ [( L* h- @7 N7 x& I/ L, i6 q
另外一个小建议,就是move,所有的move都可以这样
7 I* s9 p/ B4 ]if not move() then debug end- Z2 K6 k+ h. w6 q
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。) P' C1 A$ ]2 s6 R$ s- R
plant simulation中的free libraries有AGV模板,
" _0 l8 I) {; J6 R& E1 A  w里面也有案例。1 e# _  Z- ?" d  n
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
/ g. B2 @" q$ d+ e5 n
  y% N$ L; C+ a  r8 N) Z; M我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
, A5 {' W) ~* G( N' R2 Z
/ r  R( Y1 p- K9 D1 U% ]那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 + G- T4 t& n" l. q% B; p5 O
这是AGV_putin中arrive的method。
  Y- }% m: ~$ ^" r0 X0 {* _4 Z0 ?, v
当到达物料速度越高时,这个报警更多,
5 s$ g9 `: z3 @) X
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-14 13:52 , Processed in 0.013368 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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