设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8064|回复: 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'/ ?, c# N) \9 G: X, ~5 ?0 l" W) O. M
*/
5 J( R% a% Q0 _6 ?8 F2 his$ n! h. e/ F9 q. O2 i
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;. g5 x6 K6 a2 F& a" D
do* o* L1 i2 b5 i0 s+ Y
        Lan := rootfolder.Internal.Tools.AOLlanguage;
! P! `2 F! v+ D* F        if current = @.Destination -- else return2 X3 g/ b& ~" A8 e
        then
* v5 c- A2 j- i. L0 k                @.Destination := void;
7 i0 p( H6 b6 c+ |3 I                if @.occupied then& |% Z& y. }3 R
                        part := @.cont;% t; k2 E; p: @0 e8 a+ h
                        @.transpOrder := void;
* M6 z& v4 x# c0 ]                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* f7 y: C( r! t7 E4 [0 ~
                                @,root.eventcontroller.simTime);
+ }( B' d- f* h, M2 k# g                        @.HasOrder := false;& q- g: G! K4 X
                        @.DrivingHome := true;
8 S8 @' K9 z6 T* E. H; ^                        rgManager.tryToStartTransOrder;8 k) ^' v7 U# V1 v3 F0 F# m
                        if @.Destination = void
% A2 Y% g0 Q2 [. G) i                        then -- no transport order for vehicle @- i/ ?- j0 c0 n
                                @.Destination :=
) g+ j5 H8 g, T+ m# H$ o/ a                                rgManager.nearestFreeStation(@,track.~);
6 W1 c2 p" C9 A                                newDirection(@);   ! @8 t5 d- H/ H  g* _- ~$ t
                                if @.Destination /= void then
3 O5 S/ c* X1 D& }: l                                        @.Destination.NumReservation :=
6 }6 K# ~2 |+ v* F' \                                        @.Destination.NumReservation + 1;9 D2 ~& I: T: y! s! c9 N  }
                                end;8 o/ y' R. }0 _0 e( P$ l
                                @.CurrIcon := "drivingHome";& a; E( `6 N$ \0 S
                                @.DrivingHome := true;2 G) y) P. L, k1 {9 b! I
                        end;
7 n$ _5 a; z, }7 q7 E                else -- the vehicle @ is empty, both vehicle and part are in the same dock station& _5 C5 j% }( r1 a
                        part := @.transpOrder;
. N2 R! L5 E+ q* ~( Y- d                        part.move(@);-- load part  u3 e% m; m. C
                        @.CurrIcon := "load";
2 c" Q$ D- G$ J9 J                        GlobalDistObj := part.globDestination;% `8 @* o- T7 s5 b( A6 ]6 \% X4 x
                        assignLObj := rgmanager.rgAssignL;
% }4 X8 V+ d% d! t6 b% g, K                        row := assignLObj.getRowNo(GlobalDistObj);4 Z! {: A: v! p* ?! X+ T9 {
                        if Row = -1 then -- since 70
) g0 Z8 v' B, J7 L                                if lan=1 then7 s. Z* u1 ?( ]7 Y4 f2 |" n
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 q7 Q, y3 ~1 X% n* I  O2 \
                                                to_str("in der Andockstation: \"",?.~.name,"\""));6 N! u! R- v0 T' B% ?8 j$ b9 u
                                else4 S9 \6 H3 u+ ]- d6 l& D
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 X4 S- E' U4 Y0 h9 _4 F                                                to_str("in docking station: \"",?.~.name,"\""));                               
9 R7 a+ w# u9 d; h* g5 I                                end;
  H$ X$ \, D$ F% W4 r  g                        else
  q- C- e# U- Y* w1 R                                @.Destination := assignLObj[1,row];, \! O: ^4 Q7 K8 a
                        end;                       
" }1 |: U4 M$ `. Z                        newDirection(@);
, ]7 P: p7 o% }, x3 l" H( z) w7 U                        @.HasOrder := true;1 y& l) e$ d) w2 s
                end;. N/ b8 }) h7 J8 t/ ^5 y2 Z# ^. l" b
        end;
9 N4 ^- |9 Z( n9 Oend;        -- of the method
: T  b1 P+ m/ ^' P3 N% H
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 0 [9 f# o" R% e- n6 G

3 c8 h' X1 F  W5 h4 c3 f: M这是AGV_putin中arrive的method。
/ ^2 ~$ E$ k8 a$ N
/ o% v% [+ [$ K, [当到达物料速度越高时,这个报警更多,
7 ]% n4 G' d, V3 Y! S  p2 r6 Y可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。4 E# g& V; @! @1 O- N
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
/ f: I4 f8 C2 f: Z# Z4 C+ c* F$ S; Z! @3 s' A* M
另外一个小建议,就是move,所有的move都可以这样2 R$ x7 `, ^& H, L; w& A: |  @
if not move() then debug end
, h8 r3 v, t7 ~/ Z9 X这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
. X3 a* N6 Q7 j) h% P1 q% yplant simulation中的free libraries有AGV模板,6 r% w' n* |# s4 a) [, d
里面也有案例。- @2 ]5 d3 {8 N' z* K4 J& ^* P
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
# A5 n6 W7 l, i& y' K+ l& G# \7 q" k7 R& |5 K( u
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
% S3 u$ e- m* k" E* y9 n5 x, ~! u8 ^! x& W/ ]
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
$ q% ~  e& w4 E" b! n3 l, m这是AGV_putin中arrive的method。8 y( r' _6 x; f' M( P* T
2 J1 P& K# w& Q. L2 \
当到达物料速度越高时,这个报警更多,
/ z! b  A( u8 ]2 @) ]  H
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-13 09:14 , Processed in 0.019517 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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