设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7542|回复: 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'
2 ^! \, |- L0 \*/2 |# @2 V: h+ m/ C* V' C6 o
is
" a! ^8 r' \2 \' M1 A        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, D7 ~: x% X0 \. Ndo
; E8 w# D( @, t! [! W4 P        Lan := rootfolder.Internal.Tools.AOLlanguage;
$ R. ^, D/ w6 X  o0 ^# |  c: V# ]  f        if current = @.Destination -- else return9 U0 ~' g9 H& `; C! k( d5 K3 S
        then
) o- q& p6 E& l7 ?8 y5 ?                @.Destination := void;, @: [5 ]+ J( W% f' L
                if @.occupied then1 i* A5 V) }& f- j# Y
                        part := @.cont;
! _/ |& P6 }: v7 |( G# q' Q                        @.transpOrder := void;
9 s' x; S, }/ f# h                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, c- z# [. v- I! u% h9 Y                                @,root.eventcontroller.simTime);9 w5 w! L( X+ R4 C9 E" a8 p2 v. T1 _% _
                        @.HasOrder := false;3 f' p+ h9 E3 C% D+ H2 p, c% \
                        @.DrivingHome := true;
, `4 X9 p6 V/ M" s" H: W- u+ @8 f3 a5 P3 c                        rgManager.tryToStartTransOrder;
+ V7 X: i; Z" ^; M+ m                        if @.Destination = void
) R% v, b, B( c! ~9 G                        then -- no transport order for vehicle @
/ D' ]! B3 `) P- M3 L' z  d2 y, }                                @.Destination :=
# X9 v' V" z5 h+ @                                rgManager.nearestFreeStation(@,track.~);- d( O8 ?7 g7 j6 X5 s3 j! h
                                newDirection(@);   
0 r( [- l9 R, Z" x2 o: y                                if @.Destination /= void then
# @2 z; V4 a" B, \, W                                        @.Destination.NumReservation :=
9 U* f" c) [2 O                                        @.Destination.NumReservation + 1;
+ a% t. ]: W6 J$ W! U7 g                                end;
+ T) V: b* ?( q: Y0 e, i                                @.CurrIcon := "drivingHome";" {/ n" m! }/ J9 }5 A$ d" w
                                @.DrivingHome := true;) z" Q" E+ I% U# u& Y
                        end;
# N8 Z! E# V# l9 q                else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 f4 F% k# O; W$ M0 C0 }# m
                        part := @.transpOrder;1 D" A, p9 \+ e) C) ~
                        part.move(@);-- load part
* H2 N8 x6 {5 p% M                        @.CurrIcon := "load";
3 M" ?. W6 J1 h* X$ l                        GlobalDistObj := part.globDestination;! m3 a/ w/ E0 ?5 E
                        assignLObj := rgmanager.rgAssignL;- b4 K8 b! z7 I( v/ J
                        row := assignLObj.getRowNo(GlobalDistObj);+ f2 w3 E1 z( V
                        if Row = -1 then -- since 70+ d/ e# b" z- Q) K+ t9 E
                                if lan=1 then
' ?- E+ n$ j0 R( ?( s! v6 _                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# C, k- U) Q. k# H- b# W& U) |                                                to_str("in der Andockstation: \"",?.~.name,"\""));
5 g  o4 K+ a" V+ d) x2 p                                else
1 n& o/ g6 E' C8 [; ^, G* w                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ P0 X4 @( ^+ c: j8 K5 x! H
                                                to_str("in docking station: \"",?.~.name,"\""));                               
( s5 m8 ~3 l' R6 }+ s. ^2 ^                                end;- O# g3 v; [! v3 G' I( S
                        else
0 k, y. _* E6 {                                @.Destination := assignLObj[1,row];
/ R, ^& H8 b! ^* U9 s* e                        end;                        6 \* Y* t+ k, l( x1 ]
                        newDirection(@);- Y0 G1 a0 T' Q; B& w
                        @.HasOrder := true;9 Q. G6 ~2 x5 {$ j5 q
                end;
) F: h1 k7 j0 _        end;
6 m7 u2 V" ~" m2 a$ [9 x% S  n1 t, S8 uend;        -- of the method4 h' q% j7 p3 f( }& E9 C
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
$ |9 c$ M6 y4 e7 X- X: o: t6 u: q3 {; v2 _0 P, A% W
这是AGV_putin中arrive的method。
; O- Y4 z3 t3 ^- e" r* M8 [
7 D+ p4 `# l8 U# ?/ I当到达物料速度越高时,这个报警更多,2 p6 X2 @# @! D4 `8 N+ b
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
5 B6 l& f3 e1 l3 `程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?# p( F9 ?8 ^. |: ?% ~4 ^

' K3 g, E, W1 t4 f' S" Z另外一个小建议,就是move,所有的move都可以这样% U" T$ H" X- V( R! F: l
if not move() then debug end( v5 e' d- L- Q  K1 K
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。# Q" r+ ?0 R* c  }+ Z1 A" r
plant simulation中的free libraries有AGV模板,
1 f: E2 C) \" j6 S3 f& [里面也有案例。
+ R' `3 k4 q5 [我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。9 W' x- p* w) H: M1 A4 Y( @6 Y6 I' W
4 @7 _) \$ u+ z% T/ w
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
! V8 H" R' [( C( c8 @
" z  V- W( j6 b4 ^那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 8 J1 O' n; g+ @, j  t
这是AGV_putin中arrive的method。
+ p2 P# H( Z- r' e$ A& h
& G  `: C( n; ^7 |* c当到达物料速度越高时,这个报警更多,

1 S' `  V$ i& S1 a' T另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-17 05:50 , Processed in 0.019251 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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