设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7830|回复: 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'% b3 W& J2 V# Q) I1 M  x* W
*/- j) e: l) T( K* |+ x5 x
is
, G  ^3 A# j7 ^! w) O# w# d        part, GlobalDistObj, assignLObj:object;row,Lan:integer;( V' ?9 J: @, w* J( f5 c9 f, X; p
do
) Y3 i0 \5 y' o( c        Lan := rootfolder.Internal.Tools.AOLlanguage;
( P* O5 {* @7 M- C0 z        if current = @.Destination -- else return
4 F8 U/ m% t" L7 D0 b        then! V6 Y5 d1 E9 ]+ g" |
                @.Destination := void;
8 g' k8 a  B" P$ A+ ]; Y2 _. h                if @.occupied then
" y6 `" h' H! J: F                        part := @.cont;( x" X; g9 w! }, x; Y7 [
                        @.transpOrder := void;2 n7 R$ A  j" t
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 Y5 l# ~4 B  C  I5 I- O# M; G                                @,root.eventcontroller.simTime);! I) b* W/ e: d  k0 c& C
                        @.HasOrder := false;  V/ H6 g$ {; L# o4 a
                        @.DrivingHome := true;
; H$ n- a8 {% ^! V                        rgManager.tryToStartTransOrder;
$ z( g1 T& c8 \" F4 W4 A                        if @.Destination = void( w% O4 C" |' r0 R1 ]
                        then -- no transport order for vehicle @
) n: ^) Q/ ~" \. m& C( a! g7 S                                @.Destination :=3 q, k* D9 K  s) i& Q" Q6 b
                                rgManager.nearestFreeStation(@,track.~);+ ^6 _4 q" z9 v4 i
                                newDirection(@);   
; d$ O8 \. i' s6 F# w* ^                                if @.Destination /= void then! j9 A, l- C; ~" l! Z) |
                                        @.Destination.NumReservation :=, ^- H/ j) a& i
                                        @.Destination.NumReservation + 1;
  E$ W! L5 a; L3 R& j                                end;
3 K/ ~2 p0 C3 U$ N) |9 l6 h% E                                @.CurrIcon := "drivingHome";
2 O* z* F" M0 G/ p' P                                @.DrivingHome := true;& _" d! }! H( v9 n+ }. A
                        end;- X" T- @( t# Q+ b/ t
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 h9 Y0 a- x4 u
                        part := @.transpOrder;7 o& f0 u5 w9 U( D  M. M/ c$ b
                        part.move(@);-- load part
9 d5 O! y" b# ?) R( L                        @.CurrIcon := "load";
9 a5 o2 E; v7 @                        GlobalDistObj := part.globDestination;! U1 J: D) T3 ~, l2 ~0 r
                        assignLObj := rgmanager.rgAssignL;! e* }: }6 k# c# \
                        row := assignLObj.getRowNo(GlobalDistObj);
& E0 E* z. R6 }, R  I( A! n                        if Row = -1 then -- since 70& Q! t" C5 ^/ s7 P& i
                                if lan=1 then8 g3 ^6 j7 z/ m( `$ g1 J
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 W6 `# V: E4 B+ u0 Z5 }                                                to_str("in der Andockstation: \"",?.~.name,"\""));
) U/ a9 Q6 `6 R" N- k                                else
- P1 B) Y9 I1 }8 j' \                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 S- {: r/ N8 i2 t* F7 D( u
                                                to_str("in docking station: \"",?.~.name,"\""));                                ) o& }: T5 z" v& x
                                end;2 y6 Y9 U! g' n. _* u
                        else
% X, l" y, |) F( N' H% l                                @.Destination := assignLObj[1,row];
& j! f. \6 T& ~" \! e9 X: q% V                        end;                        $ a- k: D% ^6 i# E
                        newDirection(@);$ p6 ~5 ?  p6 b' O
                        @.HasOrder := true;) Q$ S" I  W* H! Y6 x- t+ j/ z. Y
                end;
/ L6 W4 H. n. G4 \        end;- H$ M; R. e& s2 b' F6 y" n7 S1 B
end;        -- of the method
. t, Q) {  A; \: R0 B' B* h  q/ p6 K
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 6 D, }6 p1 @/ s" k2 a
) G& h( S4 k# w! C; Y' m! c0 @/ p2 Y
这是AGV_putin中arrive的method。
% Q! _, q  z9 ^' }
- W3 E6 T9 w! D当到达物料速度越高时,这个报警更多,
- q9 I' V$ o. u/ B# e$ v" d可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。1 N# ?$ ?1 P! R
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?3 r+ s- Y5 _' L# r

( |7 M  b( T  `7 l% m另外一个小建议,就是move,所有的move都可以这样7 G( ]& a; `9 x" {8 [
if not move() then debug end/ {( q0 p9 v2 d! U2 }0 _
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。# A+ v5 i6 O9 U# j$ E
plant simulation中的free libraries有AGV模板,
& N! H- E& X( g1 l6 S8 \里面也有案例。
( t2 T5 E# X' e+ t# e; K0 l3 Z+ P我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。! _9 z# O7 Z8 l" d3 d4 I
, `! {) o7 W/ }, h: \/ B
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 0 d( g/ S  l8 b

- D/ @8 X5 f% \9 d) C; o6 T& |3 n! u那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
' D3 c7 [, U1 l& N这是AGV_putin中arrive的method。
" T" [9 l7 K& t% B; V3 i; T& e9 d6 `: }% }5 p; w
当到达物料速度越高时,这个报警更多,

1 [5 N* e0 T3 E  `0 M2 s另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-30 21:41 , Processed in 0.018819 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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