设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9018|回复: 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'
$ l7 F7 A$ I7 t3 @# c*/$ p; Q8 _" G) r4 B. ^! P
is
1 P0 j9 T% {) R1 }        part, GlobalDistObj, assignLObj:object;row,Lan:integer;- R# ]3 H# R5 q( v$ i# M% e. F8 m
do, i3 ]. W1 ]6 ?( d
        Lan := rootfolder.Internal.Tools.AOLlanguage;
& |5 A6 Y* E( T9 D( H        if current = @.Destination -- else return
. {$ Y+ H6 }+ [6 t        then
1 T" B1 q/ U% h) a; s  \) ?) }                @.Destination := void;7 K2 @2 U! ]- _, Y5 x" R8 {8 u
                if @.occupied then
3 w5 Y. T. X! e: {& ?                        part := @.cont;) y4 j2 ^) K7 w! p! ~7 D2 V$ R
                        @.transpOrder := void;: t+ T- I- U) g
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: ]8 j9 b$ f3 ^3 Y
                                @,root.eventcontroller.simTime);
3 d- t1 Z  Z; W8 a, }: `. w! u9 X/ L                        @.HasOrder := false;* p) I0 H7 z- ]+ s+ A% ]; G
                        @.DrivingHome := true;* g: d! y7 e3 ^6 f( Z7 b
                        rgManager.tryToStartTransOrder;( B1 G6 p4 t( v1 e" n/ e! O
                        if @.Destination = void
+ f9 _( z: s# ]9 m; a" Y                        then -- no transport order for vehicle @
4 A2 t. |/ a& n0 m                                @.Destination :=0 O& x' p* h$ p, h4 f
                                rgManager.nearestFreeStation(@,track.~);
# l. s7 p% h6 a5 g; D6 W                                newDirection(@);   
$ V+ K7 d7 l! K                                if @.Destination /= void then
$ W: b: z9 j& _/ A+ ^                                        @.Destination.NumReservation :=
. v0 w% N* W+ d0 Q- N5 `                                        @.Destination.NumReservation + 1;
3 w5 E4 h4 l- |: q- k2 }                                end;7 W# }% q( }7 l
                                @.CurrIcon := "drivingHome";0 |2 `# S. E( C2 c
                                @.DrivingHome := true;
2 \$ t( w' u% a2 U                        end;2 C  \$ P' D* X& u9 b, }
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 a$ c  m; Y+ u& G5 v                        part := @.transpOrder;
: b3 Y" o1 S$ {                        part.move(@);-- load part+ J0 N. n# E( D( b5 H8 Z
                        @.CurrIcon := "load";' b7 V- U$ q0 Y7 O
                        GlobalDistObj := part.globDestination;8 {( M, V7 {/ S8 L+ [3 X
                        assignLObj := rgmanager.rgAssignL;8 D7 L. Q) J4 @0 t* {! P1 m1 E
                        row := assignLObj.getRowNo(GlobalDistObj);- D: s6 ?1 ^. _& `6 g1 w+ v2 D
                        if Row = -1 then -- since 70
4 \4 E+ D% S% H# k                                if lan=1 then; h8 N1 }& M) x) X
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 `: d% x; z* {  a                                                to_str("in der Andockstation: \"",?.~.name,"\""));
6 c( m! A; q# |+ N4 Q( ^                                else% B7 z/ e" I2 F& j! E
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* \  W7 }8 t* V. ?# {& n6 |) \                                                to_str("in docking station: \"",?.~.name,"\""));                                " Q: g/ t' Z. m- p) u2 s" g8 X4 I
                                end;1 v% v7 B* ?" a
                        else
/ `0 N3 F9 U2 d" s8 E- V) b                                @.Destination := assignLObj[1,row];
5 ~4 G% R: o* |                        end;                       
+ d1 o5 g* d- c                        newDirection(@);, `# a' [% ]& a- B7 C& _) _5 }
                        @.HasOrder := true;) x# g  L9 B. n  X" x" n
                end;  d3 Q7 b* u3 ^$ G
        end;
- \) d+ I. M3 i# V! {- Xend;        -- of the method
& G7 Y$ M% Z. E5 w
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 / Q1 S* x7 @- c% F* {
* |, k9 D  Y2 j
这是AGV_putin中arrive的method。
0 l1 G3 q% P3 E* E! V
* e9 n" X  w0 N0 u当到达物料速度越高时,这个报警更多,
1 w% f# x" J1 W$ c可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。, ]3 I6 L' g* _& _. p6 r" [
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
4 F8 L1 d3 L$ O: b
& T+ I- ], w& P另外一个小建议,就是move,所有的move都可以这样: J$ l, o' o  n1 _( ~# {
if not move() then debug end
5 u- U; V' |8 {) a! p' T, c5 J这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。0 L: b+ R: n2 x. c
plant simulation中的free libraries有AGV模板,
- T3 H- _  t8 z3 ^5 g" @' v里面也有案例。
6 s6 u1 h* b6 `" j" I( Y我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。' h; x5 H$ Q& O" g; u" W2 z9 B
- @! p6 Y3 m) H2 I) K
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 3 d9 Q0 Q9 C* X8 ^& t  @2 J

: n) s4 }: P: K" P: Z/ }8 T* v那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 - z2 \4 C1 }! M; N
这是AGV_putin中arrive的method。* Q# Y* u% y- e# R0 E

1 @3 k. Y0 Y1 [6 i% ?" T5 M7 L当到达物料速度越高时,这个报警更多,

$ ]5 h+ D7 Q- L3 A另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-9 05:49 , Processed in 0.017718 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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