设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9335|回复: 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'
7 E% R4 n: s2 Q*/
  l9 U. y0 Y6 L2 W3 m7 [3 \/ kis
% S. v. }+ T% [( g5 Y( C        part, GlobalDistObj, assignLObj:object;row,Lan:integer;- G5 x4 r, S# \( f4 t- }
do
  E: f$ \9 t( U; d5 \        Lan := rootfolder.Internal.Tools.AOLlanguage;9 [6 ]8 T, p! u! h( J+ W/ F
        if current = @.Destination -- else return
4 E4 C) M" P# l: Q' T+ p, n        then
4 x: U: E4 e: T9 A* n                @.Destination := void;( v% y: d# F3 H- J9 Z: P
                if @.occupied then
1 f; P+ F) E$ h  n1 n! w) Q+ p7 a% w                        part := @.cont;
; Q/ B% s2 ]6 R/ K2 \% h: K' [                        @.transpOrder := void;
9 |3 B! _5 a2 G  A4 R                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
  S- p- R% N' u7 a, w                                @,root.eventcontroller.simTime);
0 }) V. _1 O$ W0 X  J5 ^, z                        @.HasOrder := false;1 Z5 g. F6 Y3 ]# S
                        @.DrivingHome := true;% ]. x# C  F8 A9 g
                        rgManager.tryToStartTransOrder;
3 v) S3 {* k- Y8 w) t6 y* H0 G1 @                        if @.Destination = void
* ]: R/ u- [3 V/ R                        then -- no transport order for vehicle @
) Z0 L( {; X% i( s2 F4 c                                @.Destination :=  c: a: S# }8 E; ^; s2 e4 `: N
                                rgManager.nearestFreeStation(@,track.~);
% F3 \9 x1 }! o9 L                                newDirection(@);   5 V9 ~: _7 E; t0 C4 }9 r
                                if @.Destination /= void then
5 e: S6 p* u& \* V                                        @.Destination.NumReservation :=
. e7 i# }3 N1 l7 w0 C- l+ y                                        @.Destination.NumReservation + 1;& c9 d  I% k, x  x; s! o9 _( ^" Y
                                end;4 F; ?2 }6 R+ g. f% \5 Y* d
                                @.CurrIcon := "drivingHome";" P' E% u$ T6 q
                                @.DrivingHome := true;( ?! d/ J+ f3 D/ \& ]% C
                        end;3 O3 w- A1 C4 q7 v# ]0 A/ F
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 Y. G+ I  T$ u% e# q                        part := @.transpOrder;; O& o" x# s8 |
                        part.move(@);-- load part
* I! ~$ q5 v# y                        @.CurrIcon := "load";
; p( o, {* O) v. J% M  W5 h1 S1 U: t                        GlobalDistObj := part.globDestination;
$ ?6 V+ Y  d" Q                        assignLObj := rgmanager.rgAssignL;7 b3 b+ F5 |* r2 m  I7 n$ K
                        row := assignLObj.getRowNo(GlobalDistObj);1 B" k1 V; k8 a/ }  Z" U1 C* D
                        if Row = -1 then -- since 70
* T, B. A0 Z" k6 @* v/ v* [' X                                if lan=1 then5 m8 F1 K7 r( [4 B. A, I  @* N
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. W0 x# C" c" t4 ~$ z6 }% y
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
5 P+ I/ n1 Q/ w. W                                else+ T9 {! ]4 R$ `( L" G& z' j2 r
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 L& u& P% H  h- n  W                                                to_str("in docking station: \"",?.~.name,"\""));                                0 N- e. ~! T5 ?) ?; Y% F
                                end;, D/ b; E( o; y% P1 P8 {  c
                        else
5 |6 `( ?$ {2 g5 h1 x' e- O# {% {                                @.Destination := assignLObj[1,row];
+ ]# p4 R6 e2 \$ u                        end;                        / g5 D* i* }. |8 f; R6 D
                        newDirection(@);" F! R! |. E; q3 }: Z8 h! Z1 i
                        @.HasOrder := true;# e, T$ u0 }% n! A, a7 F, i
                end;
. f& D; U' ?) Z5 E! Q& ~0 t* l' P        end;
2 ^+ O8 j) f+ X% Y+ \* s* Tend;        -- of the method
+ }1 L0 m1 y% T8 A  z  w3 T- e
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
" s- f# B8 A& D+ ?1 x/ p% @
7 _& D+ P# a' G( v这是AGV_putin中arrive的method。
) r0 L: k- `) L- f; h: C2 p8 j  H1 M& Y' ^! V
当到达物料速度越高时,这个报警更多,! o5 n) K# N3 X( o  U! L7 X2 K* h
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。5 _6 i! h) l" S! ]: k' L
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
; R$ a  V# K9 X, n
: L5 k) t, M: Y& q另外一个小建议,就是move,所有的move都可以这样
6 t  e" h9 ?- ~if not move() then debug end
' I9 d, ]. g: w, ?+ k- U  f这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。8 t% l. |3 X& U7 ~0 L( Z
plant simulation中的free libraries有AGV模板,
& i  J6 O* C: b' B0 d' U7 K9 W里面也有案例。
3 n3 ~' r: L7 H我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。+ w3 u3 b) g4 n% |3 h! G

! G; m6 ~* }- j我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 7 O  T% L, r7 @* O! F5 |$ W7 m

# Y" T7 x6 S, T( u5 r9 d那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 0 b9 u# ?. f5 a' u1 ]: p8 l
这是AGV_putin中arrive的method。; \# J0 v+ c. g7 N
( F$ N: @: t, T& u. `5 h
当到达物料速度越高时,这个报警更多,

5 s# a3 z9 R& {0 e5 M( W另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-26 02:40 , Processed in 0.013621 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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