设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6308|回复: 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') G9 g; u  Y- r8 Q1 t1 {
*/
% m5 h" i* G: C% v, fis' [+ d4 q4 a2 S: y8 Y3 y  t% U" S1 H
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 D5 U) _* [9 U1 ]7 |9 B
do
( a) K# K6 I; `9 f' ]. v) g        Lan := rootfolder.Internal.Tools.AOLlanguage;$ B, T$ H2 p/ b( H% O1 X: T: w% d
        if current = @.Destination -- else return7 `( h8 j; J5 w* `* T0 O. F: y2 {$ k
        then! `5 ?$ `* Z) j6 J* N0 o. ]
                @.Destination := void;
- }, t" p9 C3 l7 h                if @.occupied then% ~8 G! C+ B+ k  S5 H2 B- j8 S
                        part := @.cont;
5 m/ \' V( N! ~( k9 d                        @.transpOrder := void;# A- I# S5 }9 {4 v7 X/ M0 m
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% o' l# A! x' R* _' i                                @,root.eventcontroller.simTime);7 O( c; A4 J1 a
                        @.HasOrder := false;" l  }( M# Y/ H' H
                        @.DrivingHome := true;9 }5 [/ ~5 C) L+ {/ W$ ?
                        rgManager.tryToStartTransOrder;. j% V3 A, k3 J6 T
                        if @.Destination = void( c, @; Z9 d7 q+ @0 p  r8 E: x+ _
                        then -- no transport order for vehicle @, R. _; @* J$ ~0 U
                                @.Destination :=
! v- _0 g2 `4 g3 I                                rgManager.nearestFreeStation(@,track.~);: X( f0 K$ m- X4 T, D7 p' e; g5 [
                                newDirection(@);   
# q4 a- t3 v& Y0 I9 k                                if @.Destination /= void then' l; e/ g0 P: x& F1 S2 V( t+ v8 g: U
                                        @.Destination.NumReservation :=" L3 ~; O# {4 x+ J2 _
                                        @.Destination.NumReservation + 1;, b* s0 h) y( ~( m4 F' d& B0 Y! P3 R
                                end;
6 s8 z  D- Y' I/ H% |                                @.CurrIcon := "drivingHome";+ A" `+ R' e1 Q6 X( X: K5 Y1 j; U
                                @.DrivingHome := true;
# h1 }0 }( L( o                        end;# p+ V, b( G3 X7 x2 ?; B. g& g
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ A% m3 i, ~. k                        part := @.transpOrder;7 I- k) [; {& n& C& ?
                        part.move(@);-- load part
  o* d6 O# Q1 \- K                        @.CurrIcon := "load";
4 Z% ~6 \* c3 d" q! p3 k$ C. S! J2 D* f                        GlobalDistObj := part.globDestination;$ ^3 z' j# i& `6 z: |- {5 |
                        assignLObj := rgmanager.rgAssignL;
0 S  j" Y( N$ e! p) F9 O$ v- [                        row := assignLObj.getRowNo(GlobalDistObj);
" \, e& m2 N1 e! R) L5 k/ V                        if Row = -1 then -- since 70- n( j" N5 d4 N9 q. V# O6 Z/ I1 }
                                if lan=1 then
) [/ f# i4 J4 M! M7 V9 ^$ m8 ?                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: M6 x) g. C0 g! P7 c7 d! ^8 t                                                to_str("in der Andockstation: \"",?.~.name,"\""));- M/ ~  X! G7 l+ q9 X: _! l/ [, x
                                else( r1 Z* w" i* ], x; d* y
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; V0 u/ g8 T9 d  b# T- k, @                                                to_str("in docking station: \"",?.~.name,"\""));                                / f& ^6 @3 z, r$ U/ ^9 ~; }9 o
                                end;2 l  ~! X! ]9 z4 B7 y6 W% A( N, n
                        else3 P/ i* V8 F4 b4 C
                                @.Destination := assignLObj[1,row];8 c/ U% ~! g6 `! ?
                        end;                       
( n) C& @# D& @. u! W" I0 d0 I  F                        newDirection(@);
% \, X! W* g$ _1 ^" N/ W9 V' z1 {7 w                        @.HasOrder := true;
( f3 k# z  ^5 ?6 D8 z9 T, M                end;, ?; Z, Q3 a% ?* \/ ?
        end;
9 b0 Q4 f1 H, eend;        -- of the method
6 f1 O* r2 Y0 y/ \# j. [, I( Z
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
+ W8 t; t. w* z2 ^! v( u
6 i9 q' m& N( q这是AGV_putin中arrive的method。* y& X3 Z3 f5 z& y
) U* E6 H* j' W) [7 P2 k' @& Q
当到达物料速度越高时,这个报警更多,. f, b; J1 ~& c$ ^
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。  o! f/ R8 Y  F
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
" d( q: ~4 r! k7 Z+ i) W* G3 I3 k# q0 j3 B4 h( r/ L. C5 V% \9 Z+ Q* i
另外一个小建议,就是move,所有的move都可以这样
: E" `% F. ^0 T' [) Mif not move() then debug end# Q' z6 h( k3 I8 ~% f0 K' G+ ]
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
3 b* S7 R( a+ a, v, t  V- bplant simulation中的free libraries有AGV模板,! G' O4 y' B7 V1 M; Y2 }/ U1 J; I
里面也有案例。
* s* k5 U$ y7 M4 A我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
4 ?( m, _* d. J- j! I% a7 N9 ^/ h! {! V0 e- S0 D2 v6 Z
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 t9 N! g6 P+ s1 L
8 k* t/ v& P0 @& c$ b" e那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08   I7 e( N1 s6 F- Q5 Z: K9 E. M0 m" c
这是AGV_putin中arrive的method。
* U& R% z+ T. n* j: N2 K* R8 i4 R8 Q9 x5 y* P0 Q" T3 L
当到达物料速度越高时,这个报警更多,

8 _7 f, C2 J, C' U' t. T" u另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-30 00:46 , Processed in 0.025164 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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