设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7949|回复: 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'; D7 r/ H: B( m
*/
) Y8 }: i7 B* r% N$ i# ris. Q8 |6 n1 B4 i  k
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 h, D) @5 x& J, v
do2 |+ Z: k' f7 g0 Z2 u
        Lan := rootfolder.Internal.Tools.AOLlanguage;
+ e0 S7 V+ I1 X4 i+ i  k2 p        if current = @.Destination -- else return3 Q3 Q/ U$ f  o
        then# `9 l. x" n9 j5 a3 z* G4 X
                @.Destination := void;
+ O3 y3 _) f: |- y; U& I                if @.occupied then
" n6 y1 B9 ]- D( g                        part := @.cont;
3 ^3 F! E, y- {                        @.transpOrder := void;
) T) q9 {. ]# n! K                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 j+ H: f5 D0 F% C4 J$ x
                                @,root.eventcontroller.simTime);- h+ z0 [6 H, y. ^/ J
                        @.HasOrder := false;2 a: ]3 k7 L& }5 i1 q, i
                        @.DrivingHome := true;
- O. O4 B# R, j: r9 \' l                        rgManager.tryToStartTransOrder;
! B! ?& V! t; D3 X6 A2 Z; k                        if @.Destination = void* o* c& l, \7 y0 O4 L0 W% v, x
                        then -- no transport order for vehicle @
4 l: }2 t! ]3 I2 E                                @.Destination :=0 _! d0 s6 ~3 d0 G
                                rgManager.nearestFreeStation(@,track.~);% Z' h3 O1 S' `3 f! y+ C1 ?5 O+ H
                                newDirection(@);   $ h4 o& V5 ]$ M9 ?  H+ ]9 j
                                if @.Destination /= void then
$ a* e# ?6 ?( |+ C                                        @.Destination.NumReservation :=; I8 ^6 ], U" O( }" \. D- E. v7 ^; f
                                        @.Destination.NumReservation + 1;/ M! [: ]/ Z# l% h1 s  l2 q6 ]
                                end;  P* l% A% `, _/ S8 o
                                @.CurrIcon := "drivingHome";3 o" T6 {& `" o- I' J
                                @.DrivingHome := true;
# y7 a8 }+ Y* ?- Q( s; ?                        end;
5 ~  d% k+ a+ S, b5 k2 ^                else -- the vehicle @ is empty, both vehicle and part are in the same dock station  h- a; F. b$ K
                        part := @.transpOrder;
1 l' b, J' @# x( x, w, V- D                        part.move(@);-- load part
' |9 k" d3 A: z; _                        @.CurrIcon := "load";$ ]: P+ W2 s0 T0 H3 }; P  G* Q
                        GlobalDistObj := part.globDestination;5 C; g3 @3 R/ e, \
                        assignLObj := rgmanager.rgAssignL;
$ l6 h- h: m/ Q4 J8 F                        row := assignLObj.getRowNo(GlobalDistObj);
( X- [- ?: C& t* b8 |2 I2 z& x1 ^                        if Row = -1 then -- since 70
/ v" X2 s+ a. l9 Y( \                                if lan=1 then
2 z- L. U+ T/ A! D6 c                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 t; \% C. G' J' }  O4 Z4 J
                                                to_str("in der Andockstation: \"",?.~.name,"\""));3 N- j" o! R& h$ [
                                else
+ ?  S3 e# u9 s5 l  t                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 \) r/ J- a" k$ v5 Z                                                to_str("in docking station: \"",?.~.name,"\""));                               
+ _& o6 T4 s) m; r3 f                                end;
9 H/ S" ?) ]" v% C- z                        else
3 i. v8 g: u% x- d- ?  x                                @.Destination := assignLObj[1,row];* G0 V3 z, M9 w, X) d
                        end;                        - u9 l3 h- M- K  y5 D* E* q
                        newDirection(@);( L3 [& k# l3 B1 w" l2 Y- O; s
                        @.HasOrder := true;
/ q8 Y$ i) c, E                end;/ P  `, o% G/ [$ D" h% A" h
        end;( H) V; A) E, g' t6 t) s
end;        -- of the method! o5 {. m9 k3 h: j
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 6 ^; ~- _/ M8 {8 H' O  @$ [

( K# Y# w, R6 w5 H( h5 k* Y这是AGV_putin中arrive的method。4 H* J1 a  Z* b

6 E3 ^3 o' w. M) W/ e当到达物料速度越高时,这个报警更多,
- {8 _0 o0 V( l3 p% e可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。% f7 i# F9 X7 ~: q+ L
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?" y* I6 e+ L( a. f* j
3 G! Q; e+ R/ N6 q) b
另外一个小建议,就是move,所有的move都可以这样
8 c( X- q! F6 L+ Aif not move() then debug end, q" M# {9 \9 [2 i$ _
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
# \% `8 u/ ^9 a. k3 {) A: Tplant simulation中的free libraries有AGV模板,7 R2 Q& B  I% l: X  e0 B3 ]
里面也有案例。
( o5 }+ _" c, Q3 d$ G; I% G我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
3 ~% d' a4 _+ r9 ^1 N" L
/ u/ W, \3 V& [/ Q7 c我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 . |! W' _9 ]' }

/ g' J$ d9 [0 H& R" r那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 4 s- D% ]; j. p- b: r
这是AGV_putin中arrive的method。6 ^/ m3 `( l! c$ H3 K
$ J6 S; t4 v1 W! {% m
当到达物料速度越高时,这个报警更多,

) v5 A' O' p3 T; h" i另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-7 04:13 , Processed in 0.014834 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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