设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6875|回复: 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" j  H" h/ p3 s- n2 @; I* R
*/' m2 U5 r, j, l8 H) h. V
is
5 b5 ^' @' t1 @* X9 M) F        part, GlobalDistObj, assignLObj:object;row,Lan:integer;: D' m0 l' r# h# R" D- F9 M
do. y" p7 ^5 c: [4 h4 }
        Lan := rootfolder.Internal.Tools.AOLlanguage;
: z/ `0 T7 v" d& [2 L        if current = @.Destination -- else return
  T6 ]9 I. \8 Z. Q$ ?  Y- X" {        then
* u+ D0 ^9 P- o2 f1 G. d                @.Destination := void;
7 H7 T5 |# t! \8 \: a9 f                if @.occupied then
3 d" p4 W6 r. U9 w2 Q3 M                        part := @.cont;" s# _; M  }9 f/ H; `, s
                        @.transpOrder := void;. e) d8 [0 i% i: I" ?0 S
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& ?7 E# S% _/ l; _5 |/ R
                                @,root.eventcontroller.simTime);9 e2 H! x) }  H. Y6 I* t
                        @.HasOrder := false;
9 ^+ y; r- k! N9 o/ ]                        @.DrivingHome := true;
; a' S5 I. B' B                        rgManager.tryToStartTransOrder;
% S/ I- P! m$ Y: w: P. y) E                        if @.Destination = void
, a4 N  J" u/ i                        then -- no transport order for vehicle @1 [4 l) M1 d, z" w' |
                                @.Destination :=
% w# p# P) f. i) y, r: E% N- h6 P                                rgManager.nearestFreeStation(@,track.~);2 |6 E5 S& ~; L# e- h
                                newDirection(@);   ! p% R% n2 W( [# l9 n
                                if @.Destination /= void then' m  D  N& H9 {' N
                                        @.Destination.NumReservation :=
5 Q- ^7 r( M: k* G5 }                                        @.Destination.NumReservation + 1;
. k& F5 P' t3 a, I1 V                                end;
9 Z9 p( w6 n) d                                @.CurrIcon := "drivingHome";# b6 q, w4 n+ P! o* Z- b& k
                                @.DrivingHome := true;
- g. B/ |) X  x5 Z                        end;- S" y" M! H- W) Z. ^; U( j. q
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 y  W# W1 s- t5 l) a' Z( B
                        part := @.transpOrder;( K) R5 S  M- |. a1 {4 O# z: o0 F. W/ o
                        part.move(@);-- load part
+ B2 u- ?- K" m1 w                        @.CurrIcon := "load";
0 P$ W* Y- w8 _" ~. O6 w6 M& c                        GlobalDistObj := part.globDestination;
+ w0 h8 ~" z9 w. d* V                        assignLObj := rgmanager.rgAssignL;; O7 k8 \. z+ `
                        row := assignLObj.getRowNo(GlobalDistObj);3 M1 S" X) n# R5 C
                        if Row = -1 then -- since 70* [" i% @+ n; b' {& j
                                if lan=1 then8 B5 k7 Z$ n% w7 S5 j* a
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 ]/ z- O5 v; A% C                                                to_str("in der Andockstation: \"",?.~.name,"\""));
# @# s# u2 B! B0 n' H$ A+ c                                else
6 r4 G1 w2 i5 L9 v7 S                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( L% x1 }/ q# @! u
                                                to_str("in docking station: \"",?.~.name,"\""));                                , N! |4 |% ^8 C/ k  Y2 b* V/ i4 U
                                end;
1 z0 }& ~) V& n! T" e                        else
0 @6 v. ]- g2 H8 |                                @.Destination := assignLObj[1,row];; E$ \& h' ?$ q# Y/ u2 E, c2 }6 n
                        end;                       
2 {9 V: R+ p8 O3 \: s                        newDirection(@);5 c) D" a4 K& L# o6 K! y5 f
                        @.HasOrder := true;4 K1 s" H9 _& t* R8 M! y
                end;
- H+ \' U1 S: l        end;
  D  q# h  S( O" {' |end;        -- of the method+ a+ L' F5 o3 K0 E+ `/ k3 v
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
4 v9 z9 v$ ^* g2 [  ]! P
. v1 }& x1 V$ p9 V. H" p: G/ \这是AGV_putin中arrive的method。
$ ?( Q9 |2 F6 M. h; u3 {$ r# O, h5 E, u2 C& |
当到达物料速度越高时,这个报警更多,6 h" C5 ^' r0 i& n- l
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。  |& c3 A7 h8 C3 B
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
- G" X$ V( N* N* B9 P
1 ?. p7 O( N% t9 b另外一个小建议,就是move,所有的move都可以这样
0 Q$ e/ g! N/ Y* N  Qif not move() then debug end
2 `5 K! k* c+ f' `% G这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。$ J' g# f1 B, A6 p- w. M! x' [
plant simulation中的free libraries有AGV模板,- Z  H% n& H, d  W
里面也有案例。! n1 m* K4 u" X/ \4 m0 }7 F
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。) L0 U. J6 b" E( g- v) v

  D- o$ p! M/ s* [我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 * J& O7 a8 c, [2 C
+ `( j, l" P4 L
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 % x( _. n: m6 P7 |! K3 K
这是AGV_putin中arrive的method。
( `: c( `3 z8 f3 ^1 z$ l# w( m
当到达物料速度越高时,这个报警更多,
0 G: \1 ~* z+ K( J
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-4 04:26 , Processed in 0.021785 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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