设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9755|回复: 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'' K! g0 i  c2 T& c' x5 P
*/
5 i3 A8 b) I# x5 u8 eis7 t6 e& k8 h) }" R' t
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;! b" \5 B2 u/ R# N/ E1 d
do. N  {1 N; k2 {/ z
        Lan := rootfolder.Internal.Tools.AOLlanguage;
6 X0 o6 S- Q- I* C2 c' x" |- L, M        if current = @.Destination -- else return
) o! F/ o/ J/ Y% A        then
0 q# c! \/ V2 @+ U$ s  Q; K                @.Destination := void;- Q; A  o; w0 f% y5 f( O
                if @.occupied then
  d5 f! q  t0 P+ q                        part := @.cont;2 p6 ^7 Q+ L- U
                        @.transpOrder := void;
. R, h% Y, K6 w                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( t1 \. \- H1 e$ A                                @,root.eventcontroller.simTime);. c5 L5 B+ p. S) }4 A  |  k
                        @.HasOrder := false;
+ O: @4 @7 _. r& f& N                        @.DrivingHome := true;3 O+ \6 I3 p$ b5 O8 m
                        rgManager.tryToStartTransOrder;' N" [- ^5 z4 ?1 g0 e9 t
                        if @.Destination = void
$ i6 y% _# [( V( b6 B% ]                        then -- no transport order for vehicle @& n) m* b9 v4 V5 C& g
                                @.Destination :=+ m8 M: n# [) M5 p) ]! |- C
                                rgManager.nearestFreeStation(@,track.~);; i5 g& b3 Q1 Z6 k  Z* }
                                newDirection(@);   
- ~$ l; t; |7 t                                if @.Destination /= void then. r4 N1 o+ Q1 a  f$ `  F
                                        @.Destination.NumReservation :=8 b: {! }# v/ L! q
                                        @.Destination.NumReservation + 1;
" w) B3 H4 ^, x                                end;5 k" M( F' ^( B9 i( Y
                                @.CurrIcon := "drivingHome";7 F- d: _9 i/ g1 o
                                @.DrivingHome := true;
6 ?: }% g" Q* Y. V9 Z- ~  o                        end;: f+ D4 b! a8 O0 L, k
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ y+ T+ M" |- w. v                        part := @.transpOrder;& d9 E' L: l4 `, R: J6 A
                        part.move(@);-- load part
+ b2 n' W; Q# a8 [7 Y                        @.CurrIcon := "load";* l5 p  V; e8 @# E4 s4 a# L5 E) g( N
                        GlobalDistObj := part.globDestination;5 M5 F, p) p, J9 j5 @* c( y
                        assignLObj := rgmanager.rgAssignL;5 E7 O9 n2 g" `, T) s. ^: {
                        row := assignLObj.getRowNo(GlobalDistObj);2 K( ~  n9 `  P1 r9 ~" t" c
                        if Row = -1 then -- since 70
  n4 }$ {5 z& Z2 t& l                                if lan=1 then
& B0 G- c3 L  W9 y                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: h+ j$ a# K  ]. ?& D/ n
                                                to_str("in der Andockstation: \"",?.~.name,"\""));* `5 z7 h0 M( r- q
                                else
, U0 l4 S3 m3 k! o  B; A! y6 C                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 L% a* y# d; t1 [
                                                to_str("in docking station: \"",?.~.name,"\""));                               
8 P6 Q- [; W, `  [* k                                end;3 D, W9 j7 u. A4 j. s5 K/ o: \
                        else
8 w+ h7 @- H* n. Y                                @.Destination := assignLObj[1,row];: g( z% L- s5 H
                        end;                       
2 u$ Y4 k  V* H* v                        newDirection(@);" \: _" i' a( X
                        @.HasOrder := true;' q* o( ~4 C0 d6 |* U0 l
                end;
& U* J- b% A5 |. K, E        end;1 h9 l/ _& |9 z1 I9 h
end;        -- of the method
4 {5 y% _% r0 Z' p' C! c7 x+ ~* {
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 0 o# S! S. _1 p& ^5 A, _% V

$ ?+ x7 G/ U+ A- {8 y+ I0 F这是AGV_putin中arrive的method。
0 ^! h# u3 d0 ]$ b% x& U7 [
3 C7 d$ }. E' X1 D! g当到达物料速度越高时,这个报警更多,
" N" g+ M6 O- T- k: l4 u可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。" W0 q' e% ?8 N" f9 ~2 m
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
! p( L6 C& d" B7 i% x
4 W' k% m2 E+ M0 r) `5 u0 L另外一个小建议,就是move,所有的move都可以这样/ U$ Y7 p' i" O. W: B
if not move() then debug end$ @: L! ?9 @& q' w: v$ f6 R; r% }
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。7 Y5 u! c! Z' V- ?" j: a, b4 R
plant simulation中的free libraries有AGV模板,
8 L+ w: U$ o6 a" ~里面也有案例。6 p& j: {" H' D1 M
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
/ T9 @' b/ J' O! b! U+ ^1 b' M4 T& r! ]8 ?  H
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
5 I! C6 q2 E/ ~! i% L( p% q2 Q, m  j4 Q8 o. a% {& L
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
  K4 b$ F: X. a- W' q# V这是AGV_putin中arrive的method。
9 J1 S3 ]: l+ y- P4 C
3 Z) `) ?6 [" p& E' q, v当到达物料速度越高时,这个报警更多,

5 D% y( A8 V0 _0 {8 j) _另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-22 14:26 , Processed in 0.021687 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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