设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10181|回复: 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'' o1 r5 U6 v" i3 C
*/5 a1 Q5 ?% ]+ S; A
is) M: U; T$ b/ c4 f
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ V) I, L0 v3 C4 H+ j0 W9 W0 T
do
# Q& C2 C. m! p6 S        Lan := rootfolder.Internal.Tools.AOLlanguage;
# \0 W$ `8 \) L        if current = @.Destination -- else return  Z5 G- f( M& S
        then
. s/ _; ^- W6 R/ N3 K  k# S! v4 b0 _" {                @.Destination := void;
+ S& n, P# r5 ~- x  E# E  F                if @.occupied then
) i$ n+ L1 I- Y* O1 f! c/ |) J                        part := @.cont;3 U3 x$ [/ J0 v
                        @.transpOrder := void;* G) {& O: B0 l  `! V7 T" z
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 |  H8 z" {" {' p7 W                                @,root.eventcontroller.simTime);# }' Y/ k  N6 y* R. N: A! c
                        @.HasOrder := false;
; z, d/ k. j& q& z                        @.DrivingHome := true;
( c# M1 b' T6 ]$ W                        rgManager.tryToStartTransOrder;
1 M- [  \$ E% Q                        if @.Destination = void
. B1 J; t# q, N: |" Q1 }# h4 g$ n                        then -- no transport order for vehicle @) r0 w* [, v5 _6 ?- S7 M2 G6 m( i" j4 E
                                @.Destination :=# T, n2 H/ p$ S( F2 K- f/ |3 z6 L* \
                                rgManager.nearestFreeStation(@,track.~);9 h, l( N6 ~" u, C. o- x8 W
                                newDirection(@);   
# x: m- x2 |8 k7 R5 d8 L                                if @.Destination /= void then! \: g% f1 x! O0 c% `" P. K
                                        @.Destination.NumReservation :=2 ~$ L- m2 i9 b- d& {1 z" H
                                        @.Destination.NumReservation + 1;
1 o0 ~0 k& z; a, p" w4 h2 l                                end;: V8 r7 }$ J! t5 z, f! U% m
                                @.CurrIcon := "drivingHome";
& j  M7 B& a/ f                                @.DrivingHome := true;
1 k" ?% \# m/ `3 F& U% N                        end;8 b- }" J& L" Y0 b6 |- A) ~0 o
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 \7 d3 c' k) D! }  h- J- l
                        part := @.transpOrder;- g0 N2 o3 @  O" ]- A! B
                        part.move(@);-- load part
& H# P! K* [' \/ N& Y+ q& b* r7 s2 K: M$ s                        @.CurrIcon := "load";
- h% ~9 i/ x* T3 z. f0 u* w8 |& p  f) R                        GlobalDistObj := part.globDestination;
. c8 W* J6 \( R                        assignLObj := rgmanager.rgAssignL;
+ m" \; f6 t3 `. u) y                        row := assignLObj.getRowNo(GlobalDistObj);; L# L: u, T7 B5 _
                        if Row = -1 then -- since 706 R: |- `. s% n" N
                                if lan=1 then# R9 u1 b7 d6 ?, j5 Q) z3 H
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 N5 H/ ?  W  V: F! s, W                                                to_str("in der Andockstation: \"",?.~.name,"\""));3 C$ e, I! A- X* F0 n
                                else
4 V3 Q7 s9 l& a9 ?2 j                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' y4 I4 ^" B5 P9 e% J4 ?: ]6 S                                                to_str("in docking station: \"",?.~.name,"\""));                                0 e+ [4 x2 }' t+ ^+ `& N( M
                                end;
- n  P- v2 S& {& ?                        else$ l. Q: c1 o/ J* g: L
                                @.Destination := assignLObj[1,row];
# u0 C; L# X( _                        end;                       
' n# U  z8 k# n" o/ e                        newDirection(@);3 T  }! E& T: Q: M* j4 b- v
                        @.HasOrder := true;+ g9 u* X0 u! M* ]0 c" ~
                end;  C7 }6 H, r+ _
        end;3 m7 w% l* _$ y5 `4 f; _1 |: T' O
end;        -- of the method* k- R: Z( \- k/ M; g. y& Z7 f2 }
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 $ Q5 y2 A: \: l3 P4 F0 x# h# x

" J* g4 D2 U. G! F( x/ Y! ~这是AGV_putin中arrive的method。7 N* R- d  {4 ]# R8 v5 h1 Q' M: j7 y
0 a% z* L7 F+ h2 V8 ~. Q3 A
当到达物料速度越高时,这个报警更多,
  S& ]5 M  A1 v4 e  _可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
5 [: K& i- }8 x% o; {程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?9 D3 E; [% X8 Y7 _" t2 d% g

3 f- Y& R1 F3 e; Z2 o, h另外一个小建议,就是move,所有的move都可以这样% o1 E" c. V3 j; `+ l; S" t$ T
if not move() then debug end4 u' i$ w$ c& Y  A" C
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。% r$ ]6 i  }3 x5 _# O
plant simulation中的free libraries有AGV模板,/ M5 }; E# g. `  d, h$ b' i) u
里面也有案例。
3 B3 v% H: m5 i+ Y3 E我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
/ {# d3 |( \* y! k! g4 E) W
& q2 G1 e% B! r我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
! k7 a0 O6 v: Y5 o3 G! i. x' r" @/ ^6 y& k
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ) {8 B) H9 C) ]: [& ^
这是AGV_putin中arrive的method。
& e0 j/ q# F( ~: i" N: M/ t! R7 e/ t' D5 v6 o
当到达物料速度越高时,这个报警更多,

1 N: _( p4 [* k) C8 o9 K# R另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-18 17:55 , Processed in 0.014693 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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