设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9231|回复: 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'
* z0 m* q5 U: A( y# n* U0 a*/3 j. X6 ?, d# O1 f
is
$ {- w) `$ V9 |+ O9 i        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' l9 x4 A+ @# c- X2 }1 Y( odo# R& X5 c/ H- V. {4 J+ X
        Lan := rootfolder.Internal.Tools.AOLlanguage;* G. l, o6 c$ l7 `* r
        if current = @.Destination -- else return) o/ v+ k5 f, v7 h
        then& }. ~% l0 Q2 J' t% I
                @.Destination := void;8 B6 c; O! W2 j: G9 n
                if @.occupied then
* D, A6 _& c9 _" w9 l                        part := @.cont;
$ H4 `+ @+ Y3 l3 R$ M                        @.transpOrder := void;
2 f% c" u' W& }5 x+ s                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ Y1 }, t" h9 `3 Z
                                @,root.eventcontroller.simTime);
3 ]+ |3 ~$ V/ |3 v8 n7 k4 h                        @.HasOrder := false;
+ z+ [2 c# T) c$ b3 n                        @.DrivingHome := true;
( r$ `$ D) |4 {$ _5 g! ~; u                        rgManager.tryToStartTransOrder;9 A$ C" X0 Z8 y4 i- W
                        if @.Destination = void
. ]( K7 `( T, n. O                        then -- no transport order for vehicle @% E/ p/ Z  v3 y3 h
                                @.Destination :=6 V% \8 d9 P: T1 [9 f2 F  D
                                rgManager.nearestFreeStation(@,track.~);  i8 ~8 I) s0 f  A( A/ B" T3 \
                                newDirection(@);   % u7 a8 k( C% s
                                if @.Destination /= void then1 d& s" A# C6 u, G! G. E8 z1 r
                                        @.Destination.NumReservation :=
) L; z- Z2 ]; h+ R* I1 O' M                                        @.Destination.NumReservation + 1;
. o8 @  B( Q1 e, \! Z                                end;
  p4 d3 Z" p; b$ ?: i                                @.CurrIcon := "drivingHome";9 s7 x) C' N% F+ Y2 Z2 K- p
                                @.DrivingHome := true;- [) p2 s0 P& ]* E: _3 t
                        end;
& U1 N7 \5 i/ @7 e/ U' E5 F* t( V# L0 {: f                else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 \# S3 F7 i" v, G
                        part := @.transpOrder;
6 U- _( O) j( ?& l) x9 s                        part.move(@);-- load part
4 ~& M0 H+ M. w                        @.CurrIcon := "load";- b- ?* |# c( Q% c5 z
                        GlobalDistObj := part.globDestination;
7 W) K7 U" o+ q  E) s* B& j0 ^                        assignLObj := rgmanager.rgAssignL;
( D7 `2 m# N9 [+ c1 w                        row := assignLObj.getRowNo(GlobalDistObj);
2 C1 X. [# [0 w7 s+ e' u8 H                        if Row = -1 then -- since 70
1 R8 j6 K) x1 d: @  t3 B0 w( z9 u                                if lan=1 then4 W% J* i9 d- D$ t) V- }
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& l" n( H0 K# s  z4 ]/ e$ N0 i: a
                                                to_str("in der Andockstation: \"",?.~.name,"\""));  u4 Y) {3 d* [+ Z( ^- h
                                else
9 n0 P) m7 X) `- l, }: u6 f4 w                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 v* g; g1 O8 h
                                                to_str("in docking station: \"",?.~.name,"\""));                                3 V' t8 g8 y0 m. F3 h  q
                                end;
. j$ V, Z1 `6 ?( o+ x8 H4 ^1 G; B                        else6 l2 y1 H# _+ A0 S$ s
                                @.Destination := assignLObj[1,row];
2 M2 C% ]. s8 ^1 H& v5 i% V( k3 M                        end;                        $ \' |, V* B- O
                        newDirection(@);* v1 Q) T7 N' t, j/ ^/ ~# o
                        @.HasOrder := true;
. Y0 `3 Z# [% a1 s9 @                end;7 p, M8 V3 Z& Z1 W4 l% n
        end;
; D( W6 y' d6 N) n* Fend;        -- of the method* H) |/ H% Z. {. ~- D9 f3 \
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 8 W! G' O8 k7 n- `
9 b; e, F5 ?  }( p$ I: }
这是AGV_putin中arrive的method。
" Z' P  ?9 n3 U& f* q0 A) \$ ~4 {" n( b  F
当到达物料速度越高时,这个报警更多,
9 X; }# b8 l  W4 J1 B可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
! l! U- z0 n1 u$ \程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; O) o2 Y5 q0 O& }# z( W- s' \" A
5 V7 i4 _6 _# [
另外一个小建议,就是move,所有的move都可以这样+ P# n: S( a* |
if not move() then debug end3 S# @1 n4 ^( W% C
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。; }* c! @8 E9 e5 u% w
plant simulation中的free libraries有AGV模板,
3 p7 O* i2 j4 p* [( \里面也有案例。
. @' |. |7 j% x' h  |$ a% b9 _我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
3 [/ j& Q; i. I7 ?* B" S* w% v1 k8 \7 ~
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 d$ K2 H% F" B* h8 P7 `& B% m0 ]. @
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
3 {6 }, C/ A$ {% V这是AGV_putin中arrive的method。6 W% T: F) E4 A0 C+ H1 u+ K

% i  N% o# W& H! [2 u当到达物料速度越高时,这个报警更多,

, m$ m- \8 n# O7 n; m另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-20 09:06 , Processed in 0.017449 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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