设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6230|回复: 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'
- t- e* y6 w) o5 n3 C*/3 f6 f) _3 \" s! ~4 h
is$ X  h3 {) ?, v  k) n" I6 O3 U
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ D2 l7 A8 o  q: \$ Gdo
3 d3 F' [8 j) L  Z0 R- |        Lan := rootfolder.Internal.Tools.AOLlanguage;. q  v3 s/ B; k  H# ?  v! i; c( D
        if current = @.Destination -- else return; P, Q( d- R' r6 S/ m
        then: S  }' l  M/ q% z  e& H
                @.Destination := void;
4 U2 u  r0 G: w                if @.occupied then
* D: s/ [; V9 Y# W                        part := @.cont;' p0 d) X) z1 [( Z( B2 U- x, V& C
                        @.transpOrder := void;
2 ~) k* g$ J! _: B2 a1 e* v' a$ h                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- `- x, R' K% L                                @,root.eventcontroller.simTime);8 F0 G) x+ H% {$ N. _
                        @.HasOrder := false;
4 b% f  R- T0 p, y6 s4 t6 u                        @.DrivingHome := true;8 `+ H- s% m" e8 X) O( o. R" G9 N3 @
                        rgManager.tryToStartTransOrder;
, ?1 {/ r$ |, D. t$ {3 @                        if @.Destination = void: l9 X( x5 ?, n- I( c9 f* K$ B+ C
                        then -- no transport order for vehicle @- R8 B' s! L4 R1 u6 G4 E7 H( Y" k
                                @.Destination :=# b" D+ b2 p% n6 Y8 M
                                rgManager.nearestFreeStation(@,track.~);
2 j- h  c* ^$ f6 Q# M2 o                                newDirection(@);   
. X* l+ E, i) @! U- t: h" v                                if @.Destination /= void then; ]9 P, a  w7 q! G9 s# K
                                        @.Destination.NumReservation :=
: z( |/ U$ a) Q8 c                                        @.Destination.NumReservation + 1;
. ?: {7 R* `# {                                end;4 r3 [- m% L7 D; a
                                @.CurrIcon := "drivingHome";2 ]( L- ~/ R6 k2 i1 a
                                @.DrivingHome := true;" x! t" c3 o6 V, ~' h" i
                        end;
* c. Y/ \6 d/ `5 n+ \4 G7 E                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 \& o7 H) Q# G+ n: n/ ^5 x! M                        part := @.transpOrder;) p3 e4 A' ]6 m4 ]
                        part.move(@);-- load part
. o) @8 W  p9 g& f1 G! M, d                        @.CurrIcon := "load";
! B# I4 g& M$ q* v/ M2 X+ t                        GlobalDistObj := part.globDestination;" N# t* P3 H* F3 p
                        assignLObj := rgmanager.rgAssignL;
$ H% r; w1 U$ L: g' _                        row := assignLObj.getRowNo(GlobalDistObj);
* }8 I- \; _# b: `! D6 \( I0 v: h                        if Row = -1 then -- since 70
3 y6 M( D6 L4 v& `& Z  E# ?                                if lan=1 then6 Z3 t% R$ S' y+ A3 p+ a; Q
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 k$ S& K% k& V# R1 K
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
% k6 v9 w3 s, I; U5 Y; b' q) h' H                                else
9 O* B( Q4 f+ B5 P/ p9 v( A                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& n2 _6 C8 w& r6 c- l                                                to_str("in docking station: \"",?.~.name,"\""));                               
: v3 z% F  C) q6 S( n3 d+ k                                end;
! i% P. b$ X1 h" z5 q! t                        else
* ~( `) V/ T  R& ?: h                                @.Destination := assignLObj[1,row];
) Y- _8 _9 i% Y( |* _* w% q6 [                        end;                       
/ C$ L  B, I( }5 f; y# M) L* `                        newDirection(@);- Y% C0 k# j3 d% U# L
                        @.HasOrder := true;1 w7 r, u8 E% A/ s3 u# [3 o
                end;
& I9 Y  H2 e% Z/ R- k: [        end;
+ A* \; z! f+ _! Xend;        -- of the method
/ A6 t& A  _! [8 i
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
% ~/ j" Z7 ^' v* f4 S9 }, ~8 r9 _% f$ t' h: Y1 f) P# t+ C2 N
这是AGV_putin中arrive的method。
' o  k! N' J/ W6 x
/ p$ F8 m7 i2 R5 E) t当到达物料速度越高时,这个报警更多,
! v9 Z2 J  @# V5 y) m1 v( T  g( i可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
+ X4 g8 B* B& f% s9 J程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?7 Q; k/ ?8 j' b; _$ W; N3 M  Y/ U3 G

) _/ C3 Q# e. ]9 Q另外一个小建议,就是move,所有的move都可以这样8 Y5 z) @- H) H$ s+ d
if not move() then debug end
$ y$ I  [" A5 U. m# j) W& C& T1 r这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
1 G+ d3 k% h8 ~plant simulation中的free libraries有AGV模板,
  B3 R( e( i# K2 k* k里面也有案例。& [$ g1 i+ m; K4 j3 x+ W- Q
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。4 {; I  J" L; P7 Z" E( g* i+ |) K

7 a* \/ t' W' |2 [& D我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ) ]2 |1 l* _6 e, g
. q5 u+ v# A; d3 P; ^
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ( f5 R4 `/ l5 ~1 u! Q
这是AGV_putin中arrive的method。' b. n( L$ L0 f- X% a6 g! q
, i" \* ]) P0 m6 j6 G
当到达物料速度越高时,这个报警更多,
1 ?) y# v  L6 \0 C6 G9 Z1 l* ]
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-26 01:05 , Processed in 0.023738 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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