设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9432|回复: 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') X: r/ ?% z" `9 x& k$ g/ w3 _
*/6 d* a% T% F. ~: L& s
is3 W* m! m0 U1 z, `) Q  f7 M
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 w4 S2 r4 S9 X
do
, `* Q. x  [1 s, r$ Z, A. T        Lan := rootfolder.Internal.Tools.AOLlanguage;
2 y. R! f+ l/ q& A; J. }% R        if current = @.Destination -- else return( e: n8 A) S  X8 g0 k! x) `
        then
0 S7 k, E" y* g; Z" ]. }                @.Destination := void;
3 e9 K  C7 G+ u2 L. q4 n                if @.occupied then
9 O/ q4 [: N/ n# Y3 [1 I3 t                        part := @.cont;0 f5 r( @4 r4 R2 f9 j' w9 }& [
                        @.transpOrder := void;
! ^5 q* c( I8 G. _7 d0 k. h4 n                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& d  A4 _" k6 a: Q# j7 Z
                                @,root.eventcontroller.simTime);7 K6 ?7 }; o( l# z, o
                        @.HasOrder := false;5 H4 k0 k9 }7 N0 }
                        @.DrivingHome := true;: e" F$ P4 k% T9 T# C
                        rgManager.tryToStartTransOrder;
# b. R. Q) w* m2 h5 @                        if @.Destination = void  Y( J! R1 }1 J, w# R! B
                        then -- no transport order for vehicle @
6 l. ?% m: w9 V  x% y                                @.Destination :=6 p7 j* ?7 Q! {
                                rgManager.nearestFreeStation(@,track.~);
9 E' z5 h  N' c2 L; W) y                                newDirection(@);   - e1 Q4 t4 L- G
                                if @.Destination /= void then! y9 s( h1 f; K' v2 ?) F! N: [, I. L
                                        @.Destination.NumReservation :=% \  k; V& s' P8 Y
                                        @.Destination.NumReservation + 1;
8 s7 E, l+ Y; n7 o9 v                                end;! g: z  o: u1 ?* V7 p
                                @.CurrIcon := "drivingHome";$ q! N: o: {/ {4 j& s. F8 v
                                @.DrivingHome := true;. X! v$ \: k* p* D
                        end;+ Z, {+ h! d& E4 f+ E
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 i7 p0 \; D7 d5 F/ e$ T9 h! q                        part := @.transpOrder;
7 R: d+ n" A$ n/ _/ y                        part.move(@);-- load part- F7 {. u$ o/ ?
                        @.CurrIcon := "load";1 p3 `- [" }: ?$ k  l
                        GlobalDistObj := part.globDestination;/ }& Y3 M8 ?- @7 n" F7 p4 g
                        assignLObj := rgmanager.rgAssignL;' @$ J8 T* U7 m+ c5 t5 @& M* R: q5 I
                        row := assignLObj.getRowNo(GlobalDistObj);& N: _. b% A, z: N- S
                        if Row = -1 then -- since 70% f" h$ ~" O, {0 y# Y! Y5 t0 E
                                if lan=1 then
" ]0 K, I! ?% s5 K6 h0 z. @                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, s- d9 Q; m: ?
                                                to_str("in der Andockstation: \"",?.~.name,"\""));* j# |' e: {7 ~; R4 P( O
                                else
) Y0 n! `8 @( r  }5 }4 O4 I                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! O7 M: v* ~1 U3 c' V( L7 x
                                                to_str("in docking station: \"",?.~.name,"\""));                               
* [3 a, D4 b) i) M0 Z$ ?, g1 N* e                                end;
! X& J: B5 }/ W$ \5 p, _" [) l                        else6 ?7 x7 @) ]% ~- G+ ^: `! G
                                @.Destination := assignLObj[1,row];+ y! Y5 \0 B4 N3 r( A. u# m: Y
                        end;                        " T4 |1 D. ~7 k' _8 E, R! k
                        newDirection(@);9 S  p2 c! t, b8 f  L& Z
                        @.HasOrder := true;
7 m- l0 _, \8 s: r* X* D& h& C$ C                end;
$ i0 K2 z: ]7 _# B+ U        end;
  X3 I  n. Q% J& y+ Aend;        -- of the method
0 @# ^3 K3 |7 F( U9 L+ L  [
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
" a- `) i" R% F6 I+ D
% L7 W+ A8 O: |& q/ d5 ~7 ]这是AGV_putin中arrive的method。; j2 u6 a3 ]# a/ x6 {
6 `4 `! V" x1 \8 T+ S
当到达物料速度越高时,这个报警更多,% K1 L* s. C) J8 F% {- w
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
5 X3 \* J, V& s4 G" B程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
) A6 W/ @* Y$ \/ p, p' w, p
2 S4 ?& r* t7 I6 ~$ {另外一个小建议,就是move,所有的move都可以这样
- B7 S5 g: E3 Q8 B. W4 e, yif not move() then debug end' Q8 ?4 |5 Y" U6 L2 x& c
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。9 k5 k6 e6 a% ~! d2 m8 v; a3 @, M& \
plant simulation中的free libraries有AGV模板,
7 L: V7 B+ T0 n9 S5 p里面也有案例。3 s* C" z4 l! Q( k
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
2 d: I) A1 m, }. _0 @) W6 N' g3 ?+ x& r& I; V- X! V
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
, I, G6 y5 x6 a9 z
+ m" S' [3 r- Z" o6 H那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
: q4 N4 [( P& R% m1 O, K0 w. V7 ~这是AGV_putin中arrive的method。
5 f! g7 {: H/ ~! W7 N
" I2 |1 B7 Z0 H, x) T当到达物料速度越高时,这个报警更多,

. f4 Y% }8 F) v; N) d# ?另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-1 01:24 , Processed in 0.019113 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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