设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7477|回复: 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'3 t' R! }7 R. K- Y2 D# [9 J- J. K
*/
1 M4 u% _% _4 S2 p: q% Ais( I+ r( `1 @/ u% N9 U# U( u
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 x% k: `! H: @" Ddo
1 k& k) h7 `+ Z% \0 F        Lan := rootfolder.Internal.Tools.AOLlanguage;: l& T% l2 }0 p0 [5 h
        if current = @.Destination -- else return
4 P8 d1 }  q, t, Y        then
) K% z( N2 {) r$ z- Q                @.Destination := void;( o! K* C3 |2 ^" g- c1 U
                if @.occupied then
  ?3 Q# {- E: F/ q# U                        part := @.cont;
% ^' F7 |. Q- _: {                        @.transpOrder := void;' l* T6 V3 G3 u
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 U9 q1 g% [. U
                                @,root.eventcontroller.simTime);" t4 \, v4 t/ M! M9 h& T7 n
                        @.HasOrder := false;6 i2 o6 T* i) |( |+ F# a0 {
                        @.DrivingHome := true;9 [1 m, }6 n6 k
                        rgManager.tryToStartTransOrder;* Q/ Z6 B3 `! v
                        if @.Destination = void
! s- R, C4 u6 W, N                        then -- no transport order for vehicle @
& [: L/ Z5 [: J# D/ ?. U                                @.Destination :=
& u9 {( Z. T% h3 V: h" X3 W                                rgManager.nearestFreeStation(@,track.~);# [" I) N* {2 q: R3 m1 x
                                newDirection(@);   8 ]. n! ]7 y8 N* V! w# p+ S+ ^9 z2 ?$ B
                                if @.Destination /= void then5 s, R% Z, T7 H& ~. X# X
                                        @.Destination.NumReservation :=
+ }" U0 e' Z, C1 C9 R0 Q0 J                                        @.Destination.NumReservation + 1;
) G9 l9 e2 S, b                                end;
/ U* ~6 H. W1 D* _' Z6 y* x# z                                @.CurrIcon := "drivingHome";
: \8 ^  x. d" w+ b                                @.DrivingHome := true;
( R+ L0 R" Q* v2 w8 m* K$ P5 x                        end;; q- a  @! B6 H
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 m3 d) o2 i5 M: d                        part := @.transpOrder;
% {% h, v6 m5 E) {/ ^                        part.move(@);-- load part1 d" a+ B. g! ?
                        @.CurrIcon := "load";3 ]  ]1 s4 Z- ^# }
                        GlobalDistObj := part.globDestination;% l$ W: l" K- i5 n/ e! D3 S% S+ \
                        assignLObj := rgmanager.rgAssignL;
$ v$ W  Q$ O4 J6 z. r9 @* x0 O  a                        row := assignLObj.getRowNo(GlobalDistObj);
! [! U7 V; `9 G( b- i. \                        if Row = -1 then -- since 70
, r7 d8 U% n. I! Y4 V: {, I                                if lan=1 then
7 F! u' j) Y+ U; B+ R: m5 E$ h                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ h2 ?2 i) e# d
                                                to_str("in der Andockstation: \"",?.~.name,"\""));7 Z0 C8 V2 j" C6 C& c: S
                                else
/ Y  U% f3 V6 P5 l                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ f# ?; \6 V/ n+ I
                                                to_str("in docking station: \"",?.~.name,"\""));                               
! [& u+ L2 `* g1 K/ F                                end;: b1 Q. y( `( c9 r
                        else  R% O9 I& E5 S$ o
                                @.Destination := assignLObj[1,row];
8 {. U/ L( q% I$ R. G! o                        end;                       
5 G; T8 }) s7 A: {) a: K                        newDirection(@);& ]6 T+ r  t9 }% x% \' \; v& P% E
                        @.HasOrder := true;! R3 z0 a& }0 m/ H  b5 m6 s( }
                end;6 O% S. ^" j) u! T: J0 I2 Q) p. Q
        end;
" h; L: c- K7 I' D2 @end;        -- of the method
& q: M/ r7 P4 ^% b6 E- G+ a
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 , j4 ^: x  ^* q  B$ r
6 h+ w, M  U3 t
这是AGV_putin中arrive的method。
  B6 D' W  Q. O- w1 j; q! i) b* T' x7 C" q. h
当到达物料速度越高时,这个报警更多,( N7 W' `- v" H: ?/ Z( Y; }- B
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
, p% J) V6 u. x1 m8 o- C6 E程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?& U4 U" ]8 e% ]* U1 e

1 w# o- h( i; P8 M+ U+ W5 y另外一个小建议,就是move,所有的move都可以这样
7 c; {2 P- t/ dif not move() then debug end
; I* D8 {* F' p9 Y) K这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。8 Z, {# b# o7 V* |* o1 E$ k
plant simulation中的free libraries有AGV模板,# ^6 N, h( |+ u+ _; w0 N
里面也有案例。
' i- V" r5 d! p+ ]( P+ y$ ~我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
% g. X% r& s7 s2 x6 @: B
$ ^- u! L# n- K我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 c$ Z* C) T* c+ n& ~: y) c: Q: P& W# v1 l# k7 o8 Y
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 6 s; a+ K! O. C+ }0 Y6 f) B
这是AGV_putin中arrive的method。/ z0 [) S0 w) j

, D9 i' r* R9 i! G; b  \- A当到达物料速度越高时,这个报警更多,
( G+ v3 B; Z, }% s0 ~& s3 a' j
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-13 17:42 , Processed in 0.022620 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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