设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9581|回复: 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'% P+ _" J+ \% C  r# s- J! q
*/) j2 t$ e3 i' ]8 O- V/ r
is4 x  k2 M6 s4 ?1 O4 V1 a
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;* L* t" h- G2 M% q7 S
do
) H% v* k! P- b8 K        Lan := rootfolder.Internal.Tools.AOLlanguage;
) K1 u5 J8 I% V' V) x; E( @. m        if current = @.Destination -- else return, x: K/ \5 f$ _
        then
; f$ x1 y9 W: A- d5 a& o                @.Destination := void;
, U& F- N* g1 {- w1 b                if @.occupied then5 m9 I4 a% j5 t* S+ }5 ~
                        part := @.cont;, B  i, W; f) G. |9 G
                        @.transpOrder := void;2 ^/ x/ V* ^( ?6 {
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 e3 q; F5 P& N2 A; V& f9 c
                                @,root.eventcontroller.simTime);
! W3 L. \5 m! u( Y6 d4 ^9 ?1 Z1 y                        @.HasOrder := false;" V6 g* t$ h- c: ]0 G, k1 e
                        @.DrivingHome := true;
( t$ `% S" Q( J  w( C1 X! T0 B% A. P                        rgManager.tryToStartTransOrder;
/ b6 |$ R' @' [# c- K                        if @.Destination = void
8 \2 R1 E7 q1 j- o4 ^" i& r                        then -- no transport order for vehicle @# R0 i. R: t* P& }7 H
                                @.Destination :=
7 n, X6 y2 @9 g! j' r) i                                rgManager.nearestFreeStation(@,track.~);
  J- x  P8 \( Q) v! U. u                                newDirection(@);   , g1 b1 `: c5 {( U+ |7 z+ ^
                                if @.Destination /= void then
. ^- S2 ~; Q% o3 j0 U! b; n                                        @.Destination.NumReservation :=
( p& a: |& N7 ]4 N% W                                        @.Destination.NumReservation + 1;
/ {1 N4 ?! b0 Z' T7 z$ Q: u  s5 Q                                end;
' }; _; I% A3 v% g- R$ x                                @.CurrIcon := "drivingHome";
, z; l+ m# P- _                                @.DrivingHome := true;$ G1 M/ c) r' p1 q
                        end;
, i; N- b7 b$ L: h                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" q" ~. w) e) n: x                        part := @.transpOrder;/ d& P. I% s6 b& P. X
                        part.move(@);-- load part
* g& I9 z* {7 J, A5 _                        @.CurrIcon := "load";
% U& v& t) V( V  {# b5 K) d                        GlobalDistObj := part.globDestination;
; P3 [- m5 i" i1 D7 O                        assignLObj := rgmanager.rgAssignL;2 {; `! |' x% E, ]: C* N
                        row := assignLObj.getRowNo(GlobalDistObj);
* j5 s& f! i! t5 n, z" S                        if Row = -1 then -- since 70
6 S; P% \9 y5 j! m( Z                                if lan=1 then5 H  q- G2 |; }
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% x" N% q* r  j+ n; Q0 F/ X* X
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
/ Z1 A9 _) K$ [$ L2 H5 X- f8 g                                else
: z! Q5 Y! i. f3 o7 `                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* r) o. w& @0 f2 y' s" O% F5 j
                                                to_str("in docking station: \"",?.~.name,"\""));                               
7 a* C6 h: l8 b, L6 W: y1 _                                end;
4 b' T( R% f* ~) X9 F2 R) Y                        else! B, d  V# H0 ~: ?$ M
                                @.Destination := assignLObj[1,row];2 o8 v/ ^* H+ h+ L+ g' [; V% J1 s
                        end;                        ) S' G8 {& t( t
                        newDirection(@);
& v* b( J7 O- `1 z% p                        @.HasOrder := true;
! W1 l9 C2 A1 C+ z                end;/ F5 L- r5 F% ]" e& A4 z8 k9 S! |; P
        end;+ Z4 m; T2 v! {3 u1 f. G
end;        -- of the method
; b1 n* `* m. m  o$ o' D
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 - k7 g- B- r1 Y2 C. W, Z

+ m8 q( @3 @- V( x8 G" g" ]2 C这是AGV_putin中arrive的method。5 @; D5 E1 d4 V! s/ }% V: q1 j
$ M# y+ ]2 P2 F
当到达物料速度越高时,这个报警更多,$ I3 Z4 p/ m, F" G: i  {  K
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。& X$ t4 m. z8 _7 ]" w
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
5 Q/ q- T$ @0 \- E& z9 m" U) q! j  _( \) M
另外一个小建议,就是move,所有的move都可以这样
  U9 U  @, X- s, E4 S' `4 O9 Vif not move() then debug end
/ H' x' J+ v1 Y  a这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
8 f# ^3 B; ?3 `  ~% Cplant simulation中的free libraries有AGV模板,$ K0 W+ {# N. @4 }8 x7 ]
里面也有案例。
8 o! {. y% G! O! G$ {, O: [, k. i. z我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。, \( J9 K% t$ k: r/ {' E5 N
  K5 x- l* ]. }0 _: n2 I5 `
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 9 ^7 P6 @) B% d" `& R
$ g0 f5 [# Y/ r# f* c& L
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
( r: K" R3 ^' Q这是AGV_putin中arrive的method。% w6 R& G( [; ~
* b, ~! `0 M1 K7 y7 _: a9 l  O
当到达物料速度越高时,这个报警更多,
4 X6 T7 v* t- t2 \: `
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-9 16:59 , Processed in 0.025152 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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