设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9079|回复: 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'9 h% G7 g& B& W4 V) D
*/2 O0 L, M( ~5 c$ q4 c- q/ f
is
: E- ^) O6 \7 f# O$ _! X0 R' }$ z        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- R5 X6 Y! l  G. ]2 k3 u" b5 Mdo
- O' ~  ?3 d( t/ C4 U        Lan := rootfolder.Internal.Tools.AOLlanguage;
7 W! ^: x! a( z1 l        if current = @.Destination -- else return
* }' u- s/ N3 H" q! \4 j) k        then2 w5 M" h! I- n2 F- @* B0 o4 m
                @.Destination := void;4 i3 \0 `1 H8 j4 }2 ^- R' V
                if @.occupied then5 a2 [) N1 c" i0 S- A4 {
                        part := @.cont;
0 E4 Q# ^% I& W# x2 a7 g  A                        @.transpOrder := void;
0 p. L4 |  t6 e7 Y' |0 g9 v( f                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," E0 ]' z1 {8 }7 I& R
                                @,root.eventcontroller.simTime);
- j! h5 x  j$ ~4 d2 p; z- T                        @.HasOrder := false;
. w9 f9 C' Z2 P3 x0 q! n                        @.DrivingHome := true;
% P$ \6 g: \* g- S                        rgManager.tryToStartTransOrder;" P( _3 e+ Y$ e$ u9 X; U7 r6 `
                        if @.Destination = void: D5 g' Z  g4 _
                        then -- no transport order for vehicle @& m/ g* Q8 T8 L: E$ @3 q6 R
                                @.Destination :=
& n( j7 P3 f' M8 j! V                                rgManager.nearestFreeStation(@,track.~);( {- L$ ^. o5 G3 n( E
                                newDirection(@);   ( {, u- z; m5 k5 r1 p8 U1 [
                                if @.Destination /= void then
. O5 H3 }( ]) }+ D7 Q                                        @.Destination.NumReservation :=8 e5 m: {, @1 L) ]1 h6 h
                                        @.Destination.NumReservation + 1;
5 `8 [" S5 a- ]: g                                end;/ c% M% U) x. Q: X+ u! Q( B0 w
                                @.CurrIcon := "drivingHome";
$ A+ f3 i! @) [9 i                                @.DrivingHome := true;
0 q2 W! V7 @) N. M                        end;6 O2 o( j7 w( }: e8 q6 L8 {
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! U( f* e7 p% w0 s3 g. e* Z                        part := @.transpOrder;
: m! W" {. R) J! {' z9 c2 q                        part.move(@);-- load part
% D6 {, F( h$ q5 X% Q* C                        @.CurrIcon := "load";1 W7 P0 r. b; I. ^: r' Z, G
                        GlobalDistObj := part.globDestination;7 Q, a) H7 t4 q3 B+ f* a
                        assignLObj := rgmanager.rgAssignL;
3 w0 e5 w  r3 v, o                        row := assignLObj.getRowNo(GlobalDistObj);
0 u/ h7 w0 l% I- z/ {  R                        if Row = -1 then -- since 704 o5 S8 ]) s& a/ M. q
                                if lan=1 then
( R' U% i( z" t' T/ D- ?                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 f3 J9 [% u& i& _! S% x
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
0 f/ x4 J8 N/ ]) ^+ l                                else
$ v1 h& y- S& u, N* @& |                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 g/ \. V, w+ Z# T! D& V- e; j
                                                to_str("in docking station: \"",?.~.name,"\""));                                # r1 s% s. m4 I1 a2 W
                                end;
- k$ B6 G4 h: D6 a. c                        else
9 A# b1 f9 ]: p: r" p" A                                @.Destination := assignLObj[1,row];# z7 B4 m$ M* a% c% S
                        end;                       
; ~! G' ?; }  t$ C) D6 ^                        newDirection(@);$ T3 e0 b9 k& T2 M. \9 X1 A
                        @.HasOrder := true;- x' P* r3 m- W: x1 t2 k. x# \
                end;
- V& E# U/ z9 `+ z        end;
" ~4 @4 J- ?( N; f4 P; Y) j, iend;        -- of the method* ~$ w( i$ X: w
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
* Z: [- l: v, X) v% Y* q/ U6 _/ _- J: z
这是AGV_putin中arrive的method。
' k5 U/ P; J' C. A" |" I; o; E: v# N2 E. `! x. v% }
当到达物料速度越高时,这个报警更多,# f) D2 Y5 f! W; Z2 i
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。1 R" c) z6 k4 u; k) N
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
- F$ X  a: _* l& Z) ]% D" O: h+ T5 C7 }& C2 l+ I0 H4 ~
另外一个小建议,就是move,所有的move都可以这样
4 E  P2 J4 f! M6 W* t1 vif not move() then debug end
  u5 T, D- q' h# n! g这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
( S! {3 P9 A8 i" t3 b* Qplant simulation中的free libraries有AGV模板,
$ E4 _8 n# `; h( B& v( K里面也有案例。
( P) i$ S' l4 [% ]5 ~# H3 O我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。4 C0 J- [) Z7 H3 ?7 H
, g. O" D/ R; J5 b$ r& S  J
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
: z4 p+ _- A6 R; l+ O9 s. Z
! O/ c0 e2 D6 L: M. w那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
4 h# ]! W% n! h1 n3 I9 Z* Y2 A这是AGV_putin中arrive的method。1 I. e, H, U4 h* R
& [7 d! U3 k8 U2 F$ r$ n7 }  q5 J
当到达物料速度越高时,这个报警更多,

5 F* }8 T6 ]2 T9 B- P另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-12 09:09 , Processed in 0.015696 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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