设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7665|回复: 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'
$ C/ p- m: h# P; X*/
" b- P- ]2 }) Z7 L* f+ u, r# V2 ]  Tis
( [+ y+ c& G2 w9 ~8 D8 V        part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 A4 w8 N/ I! o4 N* c
do+ p4 c% X' `4 \& n% b+ w
        Lan := rootfolder.Internal.Tools.AOLlanguage;
/ o4 t' U6 j5 [1 [/ a7 q        if current = @.Destination -- else return1 H  w5 l1 H: G4 ?0 \+ J
        then
; X+ |# F8 _# W                @.Destination := void;
! I3 T3 c5 Y0 j2 s* c0 ~                if @.occupied then. q$ v' M- s  d. ~7 l1 {$ G. D
                        part := @.cont;
% Q: T: C  f" R* T                        @.transpOrder := void;
  f, l' c2 h4 L1 |5 O                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 y: F# }( _& R                                @,root.eventcontroller.simTime);
/ h& y+ J- r9 i) ?2 e* w                        @.HasOrder := false;
% d8 y; H, b9 x! z6 I4 p( \                        @.DrivingHome := true;1 ~( v, O4 p; o$ ]) b
                        rgManager.tryToStartTransOrder;
7 ^( N2 K" G5 d, X" `9 K, w3 k4 }# Z( \7 \                        if @.Destination = void
! Y& S3 u8 z! x, t                        then -- no transport order for vehicle @( w5 u. Z+ g7 P6 L9 D
                                @.Destination :=
* j$ P7 H8 M: H  v                                rgManager.nearestFreeStation(@,track.~);0 n% l+ e3 o0 \* O
                                newDirection(@);   
0 M! Y, r' O6 T                                if @.Destination /= void then' z- ^# T: f3 Z* F) u/ l
                                        @.Destination.NumReservation :=& B2 f& F: ?, N: M, E1 Q
                                        @.Destination.NumReservation + 1;
0 ?; X. ?8 M, h) e1 M0 x                                end;. e* j9 |0 F& k& e# Y1 o
                                @.CurrIcon := "drivingHome";4 U9 ?" v& [7 a" |- Y
                                @.DrivingHome := true;0 o( l1 \- p" Q4 e% \; k
                        end;
" G  u5 @9 w) W$ K$ V! U- H# X+ q                else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 Y- _4 Y6 e  Q* ]
                        part := @.transpOrder;" C. x4 R6 j1 ], y7 e4 D
                        part.move(@);-- load part
& P% @' H$ s- u. \2 s                        @.CurrIcon := "load";8 V, m. |" R' @$ U. w/ k
                        GlobalDistObj := part.globDestination;1 M7 y: k& e" L8 k' k
                        assignLObj := rgmanager.rgAssignL;
6 I; ^) m" Y& @4 r" M) `) A3 S                        row := assignLObj.getRowNo(GlobalDistObj);8 m* m# c* Z) ]  z' s& u
                        if Row = -1 then -- since 70
0 z/ U" K4 i5 `' C) b+ b* T% |                                if lan=1 then4 ~4 F. W& U$ V3 Q6 p" M
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; |. ]7 L( m/ l: y& v
                                                to_str("in der Andockstation: \"",?.~.name,"\""));9 i9 D- Z0 a! O; X8 s
                                else
# y" Q/ c! D! \9 _* Z' J                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* {0 C4 Y2 c5 R4 r& R                                                to_str("in docking station: \"",?.~.name,"\""));                               
8 s8 V: I& i6 B6 D! s                                end;
+ L$ P/ k% w4 S3 `* z1 Z                        else
: A  W" E! t* o. S7 _" ]* p                                @.Destination := assignLObj[1,row];* [( y9 y/ C9 K# w( N/ p
                        end;                        3 K9 S2 r! c: C; t8 v
                        newDirection(@);
% X  w1 @  I' f! }/ n" |                        @.HasOrder := true;
8 C7 x, {$ h) t$ r4 W                end;  |& I; g  _/ k& u
        end;5 N1 W6 y: ?  ]5 _6 Z6 g
end;        -- of the method. D# A0 o; e5 b. S' l3 E
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
3 }/ P# c, L" X8 ^6 [) x' N4 h) [" w! z; c2 y" L& Q
这是AGV_putin中arrive的method。
. m* V/ i4 @8 m! F0 m. q4 g" p! o- ]1 h6 ]% C! h
当到达物料速度越高时,这个报警更多,- U! ^4 q" s, d' ~. |$ M. g& F
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。$ [! h" \+ i7 f) _1 {+ S* _. `9 f  p
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
4 i- G6 q9 [0 `0 f5 J+ f7 L& Y
- S$ C* y- m, W, M/ m另外一个小建议,就是move,所有的move都可以这样! B" L* `5 f2 _
if not move() then debug end
& o5 D/ |. x% y, n1 @" u这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
0 `+ v3 @3 Z7 rplant simulation中的free libraries有AGV模板,2 \# E' ]" e- t+ n; x
里面也有案例。% m! I! p* z! @
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
3 A7 v( [& x. ]2 J  k4 A
8 `7 T  `+ n5 d& {9 V: H6 ^我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
7 ^. U5 ^+ V( H# O, ?+ q/ b% c/ \. d
/ r. q5 o! K5 V6 C$ m6 g2 x8 `7 y那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
7 |2 T5 Z) a0 q* C2 Z这是AGV_putin中arrive的method。5 L9 R; x/ ]7 w3 M3 P+ M2 J+ Z

/ ]% ~$ w; `) I9 g! G当到达物料速度越高时,这个报警更多,

4 g6 P" J3 n! H, z另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-23 04:21 , Processed in 0.016997 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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