设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10139|回复: 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 }0 z( T& @9 `9 w: ^& P# Y; ]*/
0 [1 B* D- K  r, d8 {  bis
5 E2 \7 C8 J5 @3 _" Y        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 F9 \$ U, _' m  f8 f- qdo
" W' L" E+ a! R( P( ~        Lan := rootfolder.Internal.Tools.AOLlanguage;
- e2 N$ p5 X  o% m5 k+ f2 z        if current = @.Destination -- else return7 E/ u8 s! {% S8 T) _4 n% T
        then" N- j% p8 V7 l- Y7 l
                @.Destination := void;; {; n  s; |0 e) S- y6 r
                if @.occupied then8 ?# {; Z3 v. k8 x/ R. f2 m
                        part := @.cont;1 b6 ?0 h( C: [4 e, G) w$ v3 \
                        @.transpOrder := void;3 }9 h+ r) w2 G  j; ]
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ w# Q3 z, m8 t% ^" u2 P2 g4 x                                @,root.eventcontroller.simTime);
! [+ R3 A( `( w% D                        @.HasOrder := false;/ w3 E! r# R6 B3 E: H5 F
                        @.DrivingHome := true;
# V) x+ t% a- b- w                        rgManager.tryToStartTransOrder;
7 X4 K) i8 c# v- i4 ~5 _                        if @.Destination = void% A+ P: P  L, j
                        then -- no transport order for vehicle @
" R: s( k# S7 W9 E! |* P% y                                @.Destination :=% m; }7 O& s% _. o6 o; f/ Y* V
                                rgManager.nearestFreeStation(@,track.~);/ x3 v3 i7 q8 s% X
                                newDirection(@);   9 }' L& `5 k$ y( t/ C
                                if @.Destination /= void then
0 w% y* j4 x* Y* \% f                                        @.Destination.NumReservation :=/ y1 M) F0 g; Y# e) U
                                        @.Destination.NumReservation + 1;; I" V, w! Y- A" c% u
                                end;
% e) s1 b0 N' T) o6 w0 x6 y9 g                                @.CurrIcon := "drivingHome";
: V: v, O9 l2 p+ l0 W                                @.DrivingHome := true;
4 m4 |$ ~7 W) H/ w0 ~0 V                        end;
8 [( R4 _1 M) ]* r5 D) ?: G8 V                else -- the vehicle @ is empty, both vehicle and part are in the same dock station; G0 h/ i* H/ r6 |4 t9 t! ?) t0 K
                        part := @.transpOrder;
1 r, j' ?' g! ~6 M4 ^7 y+ s                        part.move(@);-- load part+ I# X5 ]- h& v( y0 t' Z7 M0 u
                        @.CurrIcon := "load";
5 t+ l' z( ?' D1 h                        GlobalDistObj := part.globDestination;! p  w" h7 I! v  ]8 u' I
                        assignLObj := rgmanager.rgAssignL;
. ]- H' r3 v% M                        row := assignLObj.getRowNo(GlobalDistObj);
3 N" U# F# e$ ?                        if Row = -1 then -- since 70
1 R. F: Z) k$ v                                if lan=1 then* f, F; U/ G" B; v5 I% J% q5 x
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 I6 O% N# \" ^8 X6 W- g, i+ i                                                to_str("in der Andockstation: \"",?.~.name,"\""));" B, g7 G6 D- A# O3 o
                                else7 N, x  k, J: y. q( ?  P6 ^
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 n8 r0 s5 Q- T0 F, k1 I* Z* t                                                to_str("in docking station: \"",?.~.name,"\""));                               
6 S* ^3 r& |$ E- Q                                end;
' ^( g' h' b% c! }6 @# `: \                        else
5 Z$ T* ]0 P- y$ J                                @.Destination := assignLObj[1,row];1 C$ ~+ y" c% z1 A
                        end;                        , l2 R8 _  g' f* {
                        newDirection(@);
+ M+ j6 j3 t+ ^0 L; j3 t1 T! v                        @.HasOrder := true;
; f4 @/ ~2 q% }+ O# Q3 `                end;; H; i7 X9 u3 q3 f8 f: X* x
        end;
* `% F1 v& w3 p( }$ u  Q1 Cend;        -- of the method
+ a( m' W6 P; g7 P+ G
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
  @$ u2 ?* F; x! U& C$ J( R6 \, h# C7 H
这是AGV_putin中arrive的method。
: m6 W3 x" h9 L( d/ S/ i% i3 f9 u. K, m( A
当到达物料速度越高时,这个报警更多,. A' x" {: S) M) |4 t/ }+ Q
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。& F- s8 z# C% a) t' X
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
# t7 g/ u4 ~: A( ^( L* K) o5 y9 o  w& u- T
另外一个小建议,就是move,所有的move都可以这样  C2 w* Q) l1 ^$ G; t: _
if not move() then debug end
/ V( \" W! Q, c$ F& d2 D这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
6 x* I. a0 M% ~8 F( Q, H5 F3 l5 cplant simulation中的free libraries有AGV模板,0 F# ?5 b. l; N( s* a1 r
里面也有案例。! M% Z2 h& i9 F) i: x; s
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。/ L' b0 Q' m& w. K0 A7 L

8 V- c5 F5 L# ^4 L  [6 A" o我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
2 r0 W. f3 s/ f, Q+ f" V& S
6 l" l6 Y0 ~% y; D6 Z那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 & Q6 H( h; d3 A6 w8 z! F
这是AGV_putin中arrive的method。
! U: [# z$ O, Y3 r; o+ N
5 y, L, D# r& _. ?& t1 k当到达物料速度越高时,这个报警更多,

% ^. ^' [  x& F0 k另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-15 15:18 , Processed in 0.018774 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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