设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9927|回复: 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': l5 H: J* Y( Q. k* V* x! G
*/
$ X5 w/ y) d7 p, ]- ], [is
' j2 m# v- J! `  ?8 Y, x        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 t$ _9 s7 E) _% S7 J/ Zdo
- g% A; w& B  m# R# F3 X        Lan := rootfolder.Internal.Tools.AOLlanguage;, X+ t% _6 W$ f3 K8 c
        if current = @.Destination -- else return
, K$ x* x4 Z6 z2 I& n3 i! S        then7 w( @" b0 E3 Y
                @.Destination := void;7 g$ x6 g7 R- l9 B9 x; p9 @
                if @.occupied then% p- z% w2 O1 ^$ t4 W
                        part := @.cont;( {4 O) ^1 I' n8 x: ?" I! m
                        @.transpOrder := void;* o2 Q: v# E% L0 j
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: [6 I% {" s) x6 q. H, R  p
                                @,root.eventcontroller.simTime);
6 j# j, j, y- F( f6 B                        @.HasOrder := false;
. E" h/ q  v  \% T/ w                        @.DrivingHome := true;2 a7 r: J! F% v, p/ e) C
                        rgManager.tryToStartTransOrder;6 {7 Z  w, Q% k
                        if @.Destination = void& j  V( a. `4 m& V0 P
                        then -- no transport order for vehicle @
* p! Q( ]+ A3 i% m; J                                @.Destination :=
8 G  y4 E$ b* B4 U                                rgManager.nearestFreeStation(@,track.~);0 f  b4 k4 e6 V7 z' l3 Q/ Z
                                newDirection(@);   
+ j8 i3 X! }% u" C' `5 `                                if @.Destination /= void then% R( k* Q. }3 z4 k: @4 m
                                        @.Destination.NumReservation :=- s$ }7 u5 P9 x9 s7 {
                                        @.Destination.NumReservation + 1;# S4 `7 E% r( o0 O: k1 i" S
                                end;" P" C. @. D+ p* N" u% P7 L
                                @.CurrIcon := "drivingHome";; O$ f4 c3 b+ j1 u! T
                                @.DrivingHome := true;
3 R+ f! e; E8 u7 z                        end;
  c2 e7 S1 x* j+ o/ w/ E/ r                else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 P' B6 _! U, Z4 _7 ~  J# m
                        part := @.transpOrder;- c, B  x7 t% C# i+ C
                        part.move(@);-- load part
  B8 p; ~/ u0 p* `$ E. ?1 |" O) f                        @.CurrIcon := "load";* W: g8 b" L  v
                        GlobalDistObj := part.globDestination;+ s/ X1 g) i0 H* w+ X
                        assignLObj := rgmanager.rgAssignL;8 R3 s, r, y7 b7 o
                        row := assignLObj.getRowNo(GlobalDistObj);
8 z1 H/ X) _, N' m  ?                        if Row = -1 then -- since 70
) i5 t. Y5 W+ M5 _+ ~$ b( L                                if lan=1 then
- [" g# l( D9 \  E' D6 s                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ {. Y: C% w, ?. E
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
8 h2 I3 A9 h7 ^                                else
: ]  h0 O1 M1 U: _' V. X                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, g5 o6 H; @$ e7 j) R
                                                to_str("in docking station: \"",?.~.name,"\""));                               
# Q- K1 Y/ m- ?* |                                end;
/ [- k& F1 J9 h6 p/ [& ?                        else% |. E" ]: c. C) n; y' n
                                @.Destination := assignLObj[1,row];' V3 ~0 h$ u. K  z4 y
                        end;                        : C. u. W& r+ G+ s9 f
                        newDirection(@);
; |) F' G0 U5 o, \- m                        @.HasOrder := true;" M# n/ C0 O' J; h  A0 v7 ^' V* t- ^  q
                end;
' ^) b7 O6 r& S! Q6 m        end;: P# m% h2 b3 [% G6 @  l( _
end;        -- of the method
! Q" J$ }5 i, i3 C+ l
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
: J7 K1 q3 E) ^: F" h( G4 W; _2 d* t  d
这是AGV_putin中arrive的method。& o1 M) A* j3 \5 R# I* ~6 w

6 S! t; [  w. b1 t( Z1 x4 D/ ]当到达物料速度越高时,这个报警更多,6 r) }7 M- a5 t+ V6 x! ~  ?
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。% n9 B7 P! ?; B
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?, }: ?, i6 m" {) ^3 L' k

1 F. n2 c. j* ~  W4 q& h另外一个小建议,就是move,所有的move都可以这样- t( J$ ~! [8 `& i# G9 V) f9 q# r& W
if not move() then debug end5 Q8 J" _# z/ Z" ?% h6 h
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。. B& D/ H! C% j& v. {0 N
plant simulation中的free libraries有AGV模板,! P# F6 \  X- x/ c# n) i
里面也有案例。
6 R  w' K* V+ q' x我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。- T. J" [3 |5 I9 i9 R/ D

: g, i# f" L6 A6 l. R2 [( C( b( g我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
$ i' L+ f1 G5 A$ S& {! n' E3 v& E& i, g& t
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
4 r3 i* ?/ d0 [1 o这是AGV_putin中arrive的method。
; W& o( T- T9 y  h. B6 ?8 A. X3 @( R
当到达物料速度越高时,这个报警更多,
: s1 s4 h& s/ T& M
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-2 23:22 , Processed in 0.017404 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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