设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7540|回复: 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'! }5 h# X+ m. O  K
*/
& J" z' |5 O6 J6 ^7 e/ I- yis
7 E$ ?. W( f' A2 V+ @        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' G6 i4 H; R  E8 Tdo1 y# U5 c& j/ m
        Lan := rootfolder.Internal.Tools.AOLlanguage;
: [/ o0 }) j3 p0 U4 m# [% F. d        if current = @.Destination -- else return0 t. K/ U: e* _" M5 Z" e9 V6 L
        then
+ ?2 e+ A* ~& B                @.Destination := void;
, |. `0 u% [7 C, ]# y                if @.occupied then" \& G3 @+ }# n  ^: ~: U; J
                        part := @.cont;+ i7 D7 V9 \2 h0 f
                        @.transpOrder := void;
% M9 X9 M$ R6 C) X. H8 X                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; M8 r6 Y( F# a4 H* G6 S                                @,root.eventcontroller.simTime);. _6 r4 h6 R! P' J: e% P0 h# |
                        @.HasOrder := false;
. _( g* _* u! ^; `, A                        @.DrivingHome := true;% W1 h8 C4 m7 ^! v  e
                        rgManager.tryToStartTransOrder;
; B% p5 f) }% z9 O+ ~) q& C- _1 s                        if @.Destination = void
( a  U3 O9 e  D( j9 F# `  U                        then -- no transport order for vehicle @
9 ?2 i. d: h5 l6 t" e! J                                @.Destination :=
2 c. G1 f' Z" w1 t/ d                                rgManager.nearestFreeStation(@,track.~);
7 f0 R: S) i6 X' U1 d                                newDirection(@);   7 A+ k9 r# V4 V0 a/ ]' W
                                if @.Destination /= void then# W3 P9 g1 e6 U7 d& q( L0 M
                                        @.Destination.NumReservation :=
: s) O, G4 D0 x! q* W                                        @.Destination.NumReservation + 1;
$ e1 S4 D/ d3 v) l" t                                end;; O; q! n7 D+ B! V
                                @.CurrIcon := "drivingHome";- r# A4 b$ }1 \, x% W. r
                                @.DrivingHome := true;8 G, C& G; b# c6 S4 y7 O
                        end;4 b0 R+ s$ r+ ^+ a
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 r6 [. Y9 c# A# y9 {$ f                        part := @.transpOrder;
0 w. |: W* m1 J) U7 w# c                        part.move(@);-- load part% Z2 Y% H! E' k3 z- o
                        @.CurrIcon := "load";  g8 h. W8 o+ n! V* b
                        GlobalDistObj := part.globDestination;, ~/ c4 s* J$ c) {3 x
                        assignLObj := rgmanager.rgAssignL;
9 t) P* Y. o1 D; ]- \2 A% |                        row := assignLObj.getRowNo(GlobalDistObj);/ M6 p* Q% D, R
                        if Row = -1 then -- since 70
0 E+ P4 D+ A8 K/ i. O0 L% W                                if lan=1 then$ ~5 f7 b5 x, o) S- a; K) Q7 w. g
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! P2 h9 s# w, @                                                to_str("in der Andockstation: \"",?.~.name,"\""));
! J' \: O: x  I- o                                else
# s- y8 H) I2 q) d5 S" ^/ R                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' ?6 p8 m" q( a* A) Q3 G                                                to_str("in docking station: \"",?.~.name,"\""));                                + G3 X0 {" ?* G) P  m
                                end;
) ~" E+ H1 @# E% t. z7 W8 \$ z                        else1 l8 l7 f( x# c/ n+ f2 s- v
                                @.Destination := assignLObj[1,row];
& f. A& O& ~$ ?, T' l) l6 @                        end;                       
9 `8 \7 P/ v2 C3 d2 N" v4 @0 }4 G                        newDirection(@);& w! O# ^9 s; Y7 L+ v4 L9 a2 L
                        @.HasOrder := true;
& l6 w7 v" P: Z0 }" r                end;1 J- [8 S7 }7 t6 A7 M
        end;
/ C, C: G5 a% E% @end;        -- of the method
& D3 Q5 n/ _/ [: z7 Q- S
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 - r* Z  w8 R$ v. s+ B/ V
7 z2 J% G8 t, e2 o
这是AGV_putin中arrive的method。
7 P  t9 j% H7 y  O4 m5 B) J& V" y0 u7 j9 }6 s% a
当到达物料速度越高时,这个报警更多,: C4 g) g9 A2 G/ u" s
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
5 W& A/ Y, l( p3 f, _& e  v程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; |5 h+ T' c: H4 m

: y4 B$ P7 |! B2 z另外一个小建议,就是move,所有的move都可以这样' Z) x) V9 S6 V, j
if not move() then debug end) O/ u+ [7 U! d( i
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。8 |- Y& v% E/ s. U
plant simulation中的free libraries有AGV模板,
% |# M5 q7 L6 a# V  `里面也有案例。
. \4 n: ]9 ^' {3 t5 O' Y' h) S) d我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
# Z4 o# i7 P4 U8 M. p
* R: z; U1 X) A0 N& H8 t我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
$ B& r  }8 z* m- w8 F, {1 @% Z
4 q( V  I6 |' V8 N. [9 G' o; z那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 & z% _9 c) L) H, C+ v; s( x
这是AGV_putin中arrive的method。* P7 G$ J0 [2 {% u1 u

1 `4 |0 o0 Q2 e- Q: |当到达物料速度越高时,这个报警更多,

/ c8 z2 t, \0 X7 y另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-17 03:04 , Processed in 0.024039 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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