设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6749|回复: 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'& c4 D! T9 K& n+ v* c+ m
*/
* ~2 b& `+ {8 ais$ E+ M0 x% D' ?4 {2 Z( E0 t" v
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. {7 O: q$ O: q& u% gdo
/ D* }( h3 r0 t6 d- e; Y6 v  q! U/ K        Lan := rootfolder.Internal.Tools.AOLlanguage;
: b& }9 x+ H6 k& |& E# Q        if current = @.Destination -- else return
( p9 x* I) E4 p$ o        then/ C  s1 E+ ?& Z# M& v
                @.Destination := void;
3 }+ H* W: K* w" v) h                if @.occupied then* t, p; {# m- I2 K
                        part := @.cont;
9 Q! P3 K# B2 C5 Y                        @.transpOrder := void;' K9 n9 F% u( N1 t% Y4 y* r
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ o1 V# w/ p& q3 V                                @,root.eventcontroller.simTime);  }2 F8 K9 U+ j. h5 V2 H3 r4 Y7 ~! V
                        @.HasOrder := false;
5 w) C4 l6 V9 M( V& h8 y( d                        @.DrivingHome := true;
6 r& [5 h6 |' z( }                        rgManager.tryToStartTransOrder;9 o& U; a/ P) d. f4 h, {$ a0 {
                        if @.Destination = void5 h* _* b- l, ?$ D0 A/ j' z
                        then -- no transport order for vehicle @
" v5 s0 k  E% C1 Z$ t4 F                                @.Destination :=
& k& w/ b! S; L5 V8 v! n                                rgManager.nearestFreeStation(@,track.~);- x; \& w+ |5 s
                                newDirection(@);   
' G4 `( U$ C9 x: q9 a                                if @.Destination /= void then# D& t5 h: l& W0 S  Z2 E
                                        @.Destination.NumReservation :=
3 X4 y& @( Q: }- K                                        @.Destination.NumReservation + 1;
' _& y$ I2 |# j! g2 k: y' \' q                                end;
1 T- c0 c+ N# x7 }                                @.CurrIcon := "drivingHome";
" G4 k4 g9 q* \, M  t                                @.DrivingHome := true;
- ]4 I( z# n* ^2 N                        end;
4 E& r* p  X$ Q  o* p                else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 A- D# [' Q+ C8 D, e$ K1 R: s: r
                        part := @.transpOrder;, x) ]5 P' D7 s' ^7 O0 S% g$ n
                        part.move(@);-- load part
) v0 a6 X. X* k! O8 O/ S( r' h5 Y4 B                        @.CurrIcon := "load";" n& e7 c  e. A7 j
                        GlobalDistObj := part.globDestination;
5 U. T* I& V% @6 C' }" M$ @& V' M                        assignLObj := rgmanager.rgAssignL;- {$ ^6 T* P" E3 e' T7 L8 r
                        row := assignLObj.getRowNo(GlobalDistObj);2 G, V* E7 T5 F( R7 i  w( N, e1 l9 C
                        if Row = -1 then -- since 70
1 a- |5 g5 g# B0 q2 V( N' E                                if lan=1 then$ l# _& f" D. t
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& }8 O3 j7 s( w) ?9 ^/ L                                                to_str("in der Andockstation: \"",?.~.name,"\""));
6 Q$ ?* U! W0 O) D: V" J                                else; K; m. I( _* v6 X! t* B' J2 |
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- Q$ c0 P9 Z, S5 r6 R) M4 m
                                                to_str("in docking station: \"",?.~.name,"\""));                               
1 t7 b5 M& G! i0 }9 g4 r/ @) y                                end;7 ?7 c5 r. A& Z. _1 Q7 O( P* _
                        else) `) y- @1 p3 v; s2 Y
                                @.Destination := assignLObj[1,row];* f; ~/ l( i, c
                        end;                       
  Z2 ~6 b  k9 y" q                        newDirection(@);
  k5 ^/ d, K5 x2 O6 D" s                        @.HasOrder := true;# ?- i9 o# Z; ]
                end;
" [! Y- C7 @7 P5 c/ J6 e        end;
, p3 p9 e1 }  g( Wend;        -- of the method- s, g5 K: {% i% P
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
0 i* N0 \$ o8 m. Z* X; o, \; B, C+ {7 Z7 r) |9 r
这是AGV_putin中arrive的method。
2 O8 n6 F2 D7 o7 p# l- |: l! o7 `% e- M4 {
当到达物料速度越高时,这个报警更多,: ^- A3 p& n9 o" ~$ J8 L" f9 Q+ |
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。2 m; g3 E3 P+ D3 U) A. c
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
; j) V2 V, g; D2 v) w0 v0 u, S+ O% l
另外一个小建议,就是move,所有的move都可以这样
) P. h+ ]3 o1 f6 Kif not move() then debug end
* k8 O' [% p( k& K3 u6 @0 h这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
( b/ ^( C1 @0 ~5 E, `plant simulation中的free libraries有AGV模板,
) {- p" t2 U  T9 ]里面也有案例。
# o( x/ f9 K4 C& s6 a我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。2 \$ \  J' w; V& ]" a
& B, u2 K+ R+ Y' G: O+ V7 J
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 8 |+ R' d: ?2 }# E) b

; T6 [4 ?8 Z$ r' r/ N那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 - R+ p$ u  b: T, c( ^+ ?- ?" z$ `( c
这是AGV_putin中arrive的method。
+ V# j0 A0 W+ J
" N* [) T" C" L6 c# W当到达物料速度越高时,这个报警更多,

& ]3 v4 ]1 f3 r- P3 c. a! X另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-24 11:45 , Processed in 0.017775 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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