设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7857|回复: 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'
- [, e' K6 k1 [5 D, K% Y* D) A, Z*/
; y$ X4 e$ @9 C6 u$ {; F+ tis7 d* @5 j' F, C# |! I% X! M
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 W- Y5 u1 M: r9 V  l- g& V1 v8 Mdo
1 e0 _. c" s7 E, a        Lan := rootfolder.Internal.Tools.AOLlanguage;5 o- c  d9 @( M6 {- K
        if current = @.Destination -- else return* J* d% Q. X4 M/ R
        then
! q: V1 |  {4 C( q6 V4 c6 m/ ]/ b$ T. _                @.Destination := void;  X8 \) ]+ I9 I; n
                if @.occupied then
% j+ `" P% |, Z2 P+ ]% h6 l% r                        part := @.cont;% n9 L5 V. W3 ?( E4 N  l3 y+ ?1 M' c2 H
                        @.transpOrder := void;. ~8 z  m$ V7 s0 H. h: n0 l3 _
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# v9 }& z& X& Z8 ?
                                @,root.eventcontroller.simTime);
8 i$ X$ ~9 f' s# y                        @.HasOrder := false;
1 j; b. w- k+ V1 ?* b' x0 s5 k1 j                        @.DrivingHome := true;2 M# f* E+ |4 S4 f
                        rgManager.tryToStartTransOrder;
# V, ?3 K5 @/ L  z                        if @.Destination = void
  s: S1 Z) [* [8 i; o                        then -- no transport order for vehicle @
4 h+ ]( ]( z: V8 [: g; C                                @.Destination :=
' Z5 R6 [1 c! o3 a8 R5 Y- F                                rgManager.nearestFreeStation(@,track.~);
7 b/ \& N" t9 q8 M! O1 X$ c& x' u                                newDirection(@);   
  R9 W3 t, `. i8 ]- R! |' S                                if @.Destination /= void then
  h% R5 W, L' r) q6 M                                        @.Destination.NumReservation :=
+ Q/ M1 i/ W* y0 }5 C6 h! _                                        @.Destination.NumReservation + 1;3 ]: l( F6 m5 }6 f! `% {7 E
                                end;
6 g9 N- x- W) X; {- Q! i% U' G                                @.CurrIcon := "drivingHome";
# @0 ]# m3 L0 ?" S6 ?/ o/ T5 D                                @.DrivingHome := true;
- r: V) t* o9 ~7 \! ?1 ^                        end;/ H8 M3 P) R/ X& ^: u0 ~7 W
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) O5 r7 p" n: d9 G2 T% V                        part := @.transpOrder;( l* s, G5 q' W' S1 Q' d, Z
                        part.move(@);-- load part6 ?' M  W9 J& r5 Y
                        @.CurrIcon := "load";
8 i6 E8 h$ t) h" Q  `5 o0 \                        GlobalDistObj := part.globDestination;
9 s/ u& [7 F6 C3 o6 @5 g                        assignLObj := rgmanager.rgAssignL;
# g3 q$ }0 q, l) ]* e3 K                        row := assignLObj.getRowNo(GlobalDistObj);
6 m* |) ~2 L( O' A6 H1 u                        if Row = -1 then -- since 705 P- H9 |# `1 k4 P9 l  f, P
                                if lan=1 then
. {, J4 e  {8 x3 _0 f' N  ]                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
  _0 M  U- \- A# z$ H                                                to_str("in der Andockstation: \"",?.~.name,"\""));4 H# W( p3 u# V
                                else
! W1 L, @& H2 R/ M4 v                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 m$ P  w9 ^/ o' G" W; N                                                to_str("in docking station: \"",?.~.name,"\""));                                & |# a# X& Z& s& O; ]& J- @
                                end;
7 l' E" r& x# Y+ N8 M9 o6 U                        else
6 Z7 X, s. ~3 Y2 N& C7 m, i$ N6 z                                @.Destination := assignLObj[1,row];
& c3 F9 M" \( u& I6 B                        end;                       
( ?: S* v4 p/ x7 r. @% G                        newDirection(@);- X6 `: \6 {  q) Y! A
                        @.HasOrder := true;* J+ S) {, g: \' ?3 f
                end;
$ j2 x# K( v% q0 h! u5 p# x        end;
; H& F2 K) X) @9 X  L5 }: ]1 [1 mend;        -- of the method
+ X1 R1 z; q* N
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 7 ], d7 ]% t6 r- l2 `
9 [3 T8 \' m9 E6 i' J& A4 X
这是AGV_putin中arrive的method。
; K& _% m/ H9 C1 O( v" E- @4 }$ ?2 M% |' c" ~
当到达物料速度越高时,这个报警更多,
9 h: o: f- u1 ^# N& S可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
, W! D* z$ G0 n" A- A程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?5 o9 T1 u1 G3 w: S& j

* W, i1 @! b8 V- l另外一个小建议,就是move,所有的move都可以这样
2 L; ]) v! B7 S5 R  f% u8 T, Aif not move() then debug end- _% ~7 I7 A. ~( `$ H
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。+ k3 m% ?0 h. h# z( I& |
plant simulation中的free libraries有AGV模板,
! ^" S% V  g; \# \5 ^里面也有案例。, i$ E8 n* Y' ]$ n
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。! O$ C& l' {+ x4 J

+ E5 }" f( }, V- B9 [我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
* s& w3 @- w$ b  }4 s9 ]7 N- v5 g1 u) B0 D+ n8 P! q. b
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ! j" B9 M5 Y, d! |6 U, T. x
这是AGV_putin中arrive的method。
. G! V# v: k9 [/ ~: {, G. N
: T0 Z" [) ]7 c" P  F0 V5 G当到达物料速度越高时,这个报警更多,

3 O7 n0 k8 k" T+ T另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-2 03:28 , Processed in 0.017673 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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