设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6207|回复: 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'
# P, {$ y1 @" O2 o- i  T*/, \+ F' h7 F3 X" H0 `" Y2 Z
is* r, a0 {) k9 s3 f/ H
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. e9 w5 O8 c1 kdo' y9 g: ~9 P: J, m2 B/ v9 D
        Lan := rootfolder.Internal.Tools.AOLlanguage;
5 P9 Y$ l* a* k8 v4 J) i        if current = @.Destination -- else return
; ?# z( Z1 f: Q' |        then+ B: x* g6 R7 M( V6 F3 f
                @.Destination := void;
. j/ _3 s: b8 U$ i                if @.occupied then! `9 U& n: ?+ ]3 Q$ w4 @
                        part := @.cont;7 \2 ]+ V" U) Q9 q' q
                        @.transpOrder := void;
9 \% a4 E: P5 T6 \' i6 g/ W+ k0 I                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 s' H+ E4 ]9 M4 b; d9 p- k5 U. n
                                @,root.eventcontroller.simTime);3 v/ s7 K) R4 X* ^% h9 r
                        @.HasOrder := false;
6 t, z2 V9 R" |/ O) s1 J                        @.DrivingHome := true;
! Y3 h( I2 s* l) X                        rgManager.tryToStartTransOrder;
! Q; Z! I9 i7 ^$ L; Y                        if @.Destination = void
1 z6 S5 [. u3 w' w                        then -- no transport order for vehicle @
# a' m2 h. r6 w                                @.Destination :=
9 _& [' @5 w: x& o0 F8 X                                rgManager.nearestFreeStation(@,track.~);# A- h; c$ x  R( T* z2 k
                                newDirection(@);   
+ r* E6 d% h4 ?/ t1 P; w5 W                                if @.Destination /= void then
' s7 L! U, O% H1 _, [+ q                                        @.Destination.NumReservation :=
& K" v9 {7 a1 N7 j. Y3 o                                        @.Destination.NumReservation + 1;6 {) x% d9 H/ }, Q& F& a& p
                                end;; ^1 |1 z8 @* n. ^' j
                                @.CurrIcon := "drivingHome";+ w* B; w% J9 b7 k
                                @.DrivingHome := true;
- d: i2 e- [, g9 f$ i' l% Z& O( I6 v6 w6 b% \                        end;9 F: V* b& A  t  h6 j9 t! v
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# Q- _5 J4 S' _9 q3 J                        part := @.transpOrder;3 N/ s, v* s1 w9 h& c8 ~) k4 q, n. f
                        part.move(@);-- load part
, u2 M' b% B5 {# W- f                        @.CurrIcon := "load";
* F0 s  \- w4 H  F5 m; S% W                        GlobalDistObj := part.globDestination;% Z0 u. o+ s& k3 Y5 f3 B5 b2 Y
                        assignLObj := rgmanager.rgAssignL;
. D7 h: ?1 L0 N; \6 C2 t+ q! r, E                        row := assignLObj.getRowNo(GlobalDistObj);
1 a$ z. W" \9 Z5 q- C                        if Row = -1 then -- since 70' n6 J1 a  f  a2 u
                                if lan=1 then
" c/ H* h3 o4 n( C                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( ~6 W% r  x7 K' r
                                                to_str("in der Andockstation: \"",?.~.name,"\""));1 S; o5 [9 |" V. c: r
                                else
# U( m# R. f6 w                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 E2 x: w1 |& ?2 D3 k- V8 P2 |
                                                to_str("in docking station: \"",?.~.name,"\""));                               
4 D6 i  h* d# l5 B% E! k                                end;- I* J) f; W! U+ q2 }
                        else5 x; C; Z3 u) M- L$ d0 F: p/ S
                                @.Destination := assignLObj[1,row];5 H9 x8 H) L( J# M% k0 Y
                        end;                       
; I& a" C! B# Z                        newDirection(@);$ @9 b9 S, |6 d6 n" A- |( y( h
                        @.HasOrder := true;4 r% n1 g+ p7 w/ x/ n
                end;$ T3 r6 B0 |9 R9 q: M
        end;
8 o: ?( O8 k8 V8 pend;        -- of the method
; J- d7 }' o+ k2 Z9 p- {# l, z% q* o
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 6 b) s& r6 g5 Q+ X. b
" u  p: |6 f6 m  r9 b# s
这是AGV_putin中arrive的method。, D! a  T' c! S( }3 x0 \/ r
( |( U/ K) K  [  i0 {
当到达物料速度越高时,这个报警更多,5 O5 @8 I# R8 S( w) b: x- x
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。+ P4 ]2 Z0 I  o5 E
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?/ l3 q8 @6 ~! w% f, \+ h7 U

/ q. G+ Z  M& `: X$ @另外一个小建议,就是move,所有的move都可以这样" j7 J3 D) N% H3 C; o
if not move() then debug end
7 ^& x7 m6 v' Q5 g这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。5 W$ J2 i+ z$ C$ ]( z; i' F( m
plant simulation中的free libraries有AGV模板,
2 K) t+ M! S" F7 j: q& Z1 A里面也有案例。
6 {% U' S9 l% S% E我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。: p/ b  K7 U1 c7 \( [

- U" u% z$ z5 ~9 v* Z  |+ |4 k我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 8 j. P% v8 \* m" s4 i9 J( Q# I

  i4 p8 t7 r" v: R# {  w那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
$ d* n0 V3 Y0 t+ U% x. l这是AGV_putin中arrive的method。
2 U3 ^3 d4 |3 N
  M% Q( t! f/ z当到达物料速度越高时,这个报警更多,
/ c: N, s6 L) J* m6 Q4 ?+ D& U
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-24 22:23 , Processed in 0.018695 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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