设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9375|回复: 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'; q2 p: k2 o$ H) D: O4 c; u
*/' S+ q  C- x1 E- m- _
is
  T* l3 p) R: f7 t        part, GlobalDistObj, assignLObj:object;row,Lan:integer;' B" u4 Y: u" u1 R* H* A3 O
do0 J2 D2 z4 l6 t" x
        Lan := rootfolder.Internal.Tools.AOLlanguage;8 H8 b% S9 }$ U$ {, h
        if current = @.Destination -- else return
" C5 B1 C7 d9 b% y1 {        then
' ^/ E* N) H9 u/ _" s1 W                @.Destination := void;
& q, A5 S" t+ S9 r                if @.occupied then
8 J' f6 \3 D5 k                        part := @.cont;  O: N( }3 m& n0 u7 f8 p
                        @.transpOrder := void;
) A3 g* Z. [1 G                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 @( z2 ?) Z& {3 @                                @,root.eventcontroller.simTime);3 k3 U* _; R, \7 \- L* V
                        @.HasOrder := false;
( T* T! `5 e7 _! Q% U- p                        @.DrivingHome := true;0 B" A$ q0 _0 h4 G+ \
                        rgManager.tryToStartTransOrder;
3 I+ d) |* B0 Y                        if @.Destination = void( w1 ~# h/ z" ]/ P9 z! M
                        then -- no transport order for vehicle @
# ?, I( X  z( q5 I$ u7 |) P                                @.Destination :=" ?  R4 x) H' {+ I% E4 d3 A
                                rgManager.nearestFreeStation(@,track.~);
8 Q1 e: [; u' l6 J0 l3 d8 M' Q, ~                                newDirection(@);   . S2 w( O& _# p! L) X
                                if @.Destination /= void then
3 A$ O* [3 d9 m                                        @.Destination.NumReservation :=
+ f% W# G1 a- {$ ]/ V& y* h: W                                        @.Destination.NumReservation + 1;
- [' H+ d7 t4 {( a+ Z1 O# x                                end;
- h- M4 |) q& `1 J  ]                                @.CurrIcon := "drivingHome";" F, m+ Q0 q" E# s2 Z/ K
                                @.DrivingHome := true;4 r, H8 b- f! \/ f% }$ b0 y5 S
                        end;
9 w2 s% g* e1 Z1 a5 s                else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 B, |8 ]- h1 c
                        part := @.transpOrder;
& E; X" H- ^6 m5 g2 E                        part.move(@);-- load part* \9 t1 g) n6 e8 N
                        @.CurrIcon := "load";( g/ L3 V# O8 ]
                        GlobalDistObj := part.globDestination;
7 z/ M0 `1 g2 j3 \# J3 w) H                        assignLObj := rgmanager.rgAssignL;* y, m  a( e( Y- v! q
                        row := assignLObj.getRowNo(GlobalDistObj);
" V! f( B6 n' @& c9 \. s, L                        if Row = -1 then -- since 70
' {. T; \6 z1 K0 h: d                                if lan=1 then8 }& y" p0 Z$ L" c0 ?. m- I/ v
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: ]) b, c' D& l% P  H
                                                to_str("in der Andockstation: \"",?.~.name,"\""));1 R7 b2 P5 C' l( a
                                else! L+ q+ G& |& Z" E8 {6 D
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ S9 [+ U: V. M0 j) B
                                                to_str("in docking station: \"",?.~.name,"\""));                               
# b) t0 Y0 h' @# @2 @% S                                end;
+ i0 l) \2 a; h$ W# _' o; i                        else
1 P: _) v) o( G, P/ _# w                                @.Destination := assignLObj[1,row];
! X# d6 H4 m, b9 U( J                        end;                        : W. p- l& _# n
                        newDirection(@);
4 h( y5 A2 G2 d$ |) O                        @.HasOrder := true;
) r( Y1 f9 P; |7 B0 y! J                end;
# n3 q& U6 V8 e! E        end;7 H/ g7 W: K: h3 h* t0 L0 k. b
end;        -- of the method% v+ L" @( `7 [3 c# K
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 * t* Q% D; H  H. Z! H

$ L) H  a  `' f: L% x) ?这是AGV_putin中arrive的method。
  @$ J3 [1 u+ s1 u2 H) S* c3 ~* {4 |, W- L& F( S
当到达物料速度越高时,这个报警更多,
9 J& L% e; ^% Q9 g, t可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
* @/ m5 q% k4 ?. a! K6 v5 r+ {程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
" s7 D9 n6 b% k# i; ]( b- x7 P  w* m8 l, p) a7 n0 e+ j/ ^9 m! P7 ^; n
另外一个小建议,就是move,所有的move都可以这样
5 {1 U( B' Z6 F! L+ yif not move() then debug end
& P+ F$ t' k: `, `9 \1 E这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
9 a9 v5 v0 b2 t3 }plant simulation中的free libraries有AGV模板,+ `' _- P# @& l7 e
里面也有案例。  ~) a4 p, K2 W1 K2 r- V& j
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
8 s; q6 W1 w# Y7 u; N5 B/ M% p
( P& [3 u( F# d* d$ k/ i* R我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 & P% y: h0 _2 O) y3 g# l

, A, K. |. E- \* ?) q3 |6 {3 F那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 , b- d# i5 d4 i  k
这是AGV_putin中arrive的method。
7 p7 c, c( M! }5 R; k2 I3 E  c; O: G! V/ W  N
当到达物料速度越高时,这个报警更多,
  K1 k0 e! C, d: e
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-28 18:20 , Processed in 0.018032 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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