设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6447|回复: 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': m- J8 j$ ~. [2 I7 H
*/
2 o( o4 L+ ]; B2 u  I% |is
0 w1 k+ |, x0 q        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: L$ Q! @4 x2 C% P8 u6 zdo6 @! {: K8 M2 S% E" g7 g
        Lan := rootfolder.Internal.Tools.AOLlanguage;/ Q5 M: S( a$ `* d- d$ e/ e
        if current = @.Destination -- else return
3 X( h- L6 q, N4 ]        then- H' G/ P8 j; s7 t
                @.Destination := void;* B7 l) V) x0 J& c* P6 y; T" W
                if @.occupied then) W* i; W5 d; k4 o# I( Y1 i0 x
                        part := @.cont;/ P( Y( A; \, w# }/ K; F8 l
                        @.transpOrder := void;4 S. t. S, Y) [5 Q8 \2 G1 Q  }5 E6 {
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 O; U0 q* M0 r$ y4 {
                                @,root.eventcontroller.simTime);, c6 L$ _8 S+ Q4 V  b! [
                        @.HasOrder := false;
/ W: ]% F) Z, A7 R; S                        @.DrivingHome := true;8 G8 R# D- g8 _
                        rgManager.tryToStartTransOrder;
+ V" K0 {0 E3 o1 d" z' v                        if @.Destination = void: a- y& o) S. _- F3 N
                        then -- no transport order for vehicle @" q7 }0 M5 W) b7 `
                                @.Destination :=5 {, l. l  L) P3 @3 e$ E6 g
                                rgManager.nearestFreeStation(@,track.~);
. W. h8 O# s- m1 ^                                newDirection(@);   # x) R1 F. r3 [  k  S8 o
                                if @.Destination /= void then
2 o$ R7 X7 Q5 M7 I                                        @.Destination.NumReservation :=/ C6 d* w; [- l; j# I, H2 @
                                        @.Destination.NumReservation + 1;- P4 t$ T. }/ U& X1 [8 A6 i9 I6 W
                                end;
# Z' y+ y4 q; k: l2 H                                @.CurrIcon := "drivingHome";) v+ Z- S% X- d
                                @.DrivingHome := true;* x- y. z, D. w$ u, J1 F
                        end;
1 b+ U- `) G1 F% ]                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! A2 ~6 X  d9 V8 X$ z* D; n6 N                        part := @.transpOrder;
; \6 D* R, {2 U5 _7 h. n2 c                        part.move(@);-- load part% Q* q, a# x2 B
                        @.CurrIcon := "load";
3 w! R$ u0 Z5 L$ f                        GlobalDistObj := part.globDestination;
, v. D" C9 U: ?                        assignLObj := rgmanager.rgAssignL;
9 m% {0 H" l* H" t, ~                        row := assignLObj.getRowNo(GlobalDistObj);
0 ?4 y% @( o3 |0 l1 o2 U" L                        if Row = -1 then -- since 707 U$ r% x3 y/ u# @5 n+ `
                                if lan=1 then; A9 V% V* J; e  Y
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' U- b: `! M0 B/ p7 P1 ?
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
4 u) o* X7 Q4 L, w; P. g& w                                else
0 f* X) {+ L2 Q6 N: L( [                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ O6 j( m: M* X8 o) a                                                to_str("in docking station: \"",?.~.name,"\""));                                . p5 t3 P6 L$ K, p
                                end;2 X) j# ^+ J- _( a3 G
                        else* e- y  F3 T2 C8 p: b
                                @.Destination := assignLObj[1,row];
- {* u% W* s4 f5 c; g+ f                        end;                       
# ~3 e( a/ a1 ]) a                        newDirection(@);
( u$ h! r$ U4 \3 x$ M                        @.HasOrder := true;4 L" J9 t% t! u$ `, V! \7 U" H
                end;
. L0 ^. ?8 x6 e0 U        end;1 c3 v2 N$ ?, L; Q4 ?
end;        -- of the method
) [/ @; p4 u5 t# @0 o1 k  {
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
$ c/ F7 Y) K$ k0 {& c) ?( i* W6 r6 X3 M7 X
这是AGV_putin中arrive的method。
; x5 G" b( _3 k; l
0 h% B3 r% g" K7 X% ]当到达物料速度越高时,这个报警更多,* b/ i7 z3 a9 r% l! ]
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
8 ~8 h9 M$ P. ^; k程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
0 X$ q& G' S% O7 g" D5 X3 B" I" z- M1 I' {5 ^( G0 e
另外一个小建议,就是move,所有的move都可以这样6 m- w5 j( A9 K, L! o7 P
if not move() then debug end1 t: V4 D3 R) h4 j
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。; B7 o, M0 I: m' \/ a. h
plant simulation中的free libraries有AGV模板,; p: ~8 F5 C/ {, h5 ]6 ^4 G
里面也有案例。
4 \$ A3 d2 }- _0 B我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
, x0 j' {4 J" A4 [/ C
. h5 P6 a" b/ D1 @7 f. P( s我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
# }" H: b$ [  A/ Z2 q
$ _: G1 l( S  p- I那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
- ~  S* s! s5 N6 y这是AGV_putin中arrive的method。7 [% y  I0 `9 N  T! ?! i: N; P
) j( K3 p& `9 T
当到达物料速度越高时,这个报警更多,
7 e# ^  @! e& U8 B  s; ]
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-7 07:45 , Processed in 0.018166 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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