设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9045|回复: 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'* f' v: t8 Z$ k. z6 H, P" F- M+ u
*/% x8 O( V# X) \- h7 J
is
3 \) r8 O) f1 K* |3 Q1 K; ~        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) f  x" S6 S7 h- o) Bdo
% b7 Y6 g) U( D1 d        Lan := rootfolder.Internal.Tools.AOLlanguage;- r+ v1 L0 ^6 n8 u$ r
        if current = @.Destination -- else return
: x" _$ R. n7 @, V& r        then
) v7 H9 ]1 d6 O: e                @.Destination := void;
- o$ E9 W8 H8 Q1 ^1 w                if @.occupied then
, v4 ^+ Y5 P# ^2 {: W# v                        part := @.cont;) A) L0 X# q: K
                        @.transpOrder := void;
. h  ]. d' `3 T$ g( U                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% V  [% x4 j8 h4 Y
                                @,root.eventcontroller.simTime);! @3 m# |9 |+ Z$ `& I# F: K
                        @.HasOrder := false;# z# Y& U5 ~  T, ]& N# h
                        @.DrivingHome := true;
0 R$ c- C% n0 B" {                        rgManager.tryToStartTransOrder;
% T  Z4 i' l, p4 B' m! r                        if @.Destination = void4 t8 h7 g/ R7 z% F! Q
                        then -- no transport order for vehicle @/ q, Q& a6 [# [( i  M
                                @.Destination :=7 P# t3 @" K4 \1 M+ N. Y" {2 A; Q
                                rgManager.nearestFreeStation(@,track.~);! ]+ ]8 Q0 @6 n7 y( v
                                newDirection(@);   7 o. r) P* P- c7 @; O: u
                                if @.Destination /= void then& o% X6 A: b5 i1 j3 }5 Y1 F! D  Z
                                        @.Destination.NumReservation :=4 Q+ x3 P# S1 B. m
                                        @.Destination.NumReservation + 1;
' w$ `2 w6 w6 K9 \8 a8 `                                end;
( F  j5 d& `3 P2 q: [  H: G                                @.CurrIcon := "drivingHome";) t6 R" M" m. Z2 a5 s
                                @.DrivingHome := true;' \" n: W# b- n  F' ?$ U" B$ K; r
                        end;
1 o4 y! {$ N, Q: H3 V6 F                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) w$ I+ Q* p2 b# ^6 l# ]: Q                        part := @.transpOrder;
( A' Z( K  l: ^* j) J" x' b" ]                        part.move(@);-- load part; P8 T5 w5 Y5 r8 C7 c
                        @.CurrIcon := "load";$ Y- D- |  z' n& m& d7 \
                        GlobalDistObj := part.globDestination;0 |- a, z4 U, j! C! R9 b
                        assignLObj := rgmanager.rgAssignL;2 H6 {% k% P  X1 ], K9 Z+ W/ n
                        row := assignLObj.getRowNo(GlobalDistObj);
* z3 Q  Z! q) N/ p/ p4 {! [* F                        if Row = -1 then -- since 70! H- O) h, h) g
                                if lan=1 then
! g2 i- y5 K( d: D+ C                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, q# r2 l& h% T+ ]( c( I- W+ f
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
" h) Z+ g. W& _5 n, f$ _; ^* j3 a1 N1 y                                else
- J* T3 @* c; l# s                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& B6 ~1 I3 W* F! O( ?
                                                to_str("in docking station: \"",?.~.name,"\""));                                6 Z5 R  |, E1 H4 A; ~( B  W; }
                                end;' I4 ~& T& I" D. v
                        else% P) D# z. \, h% y/ \* {2 Z. ^. f
                                @.Destination := assignLObj[1,row];
% d7 F1 ?9 x' A                        end;                        2 u, C3 u# }: ]1 t5 G, o
                        newDirection(@);% V8 k. L, u! d! a8 D! A
                        @.HasOrder := true;
8 T' R( ~) p1 {* H) J                end;$ w) Z1 {! b- x3 u- D
        end;
& s4 d' A7 E% l/ L8 l; P2 W+ J' R' Rend;        -- of the method* I. B+ E5 R+ E* ^( V$ m8 ^
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑   h3 A" b. O- d* V* q
$ E6 @% D0 G' a, [! a
这是AGV_putin中arrive的method。
% \! {0 _4 t3 `$ D6 @8 t* o- ~( M" |  g6 N7 x2 p
当到达物料速度越高时,这个报警更多,. n" u5 h3 o8 f$ Y5 o& Y
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
+ `$ ~4 H1 M- h( G7 \) L程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
9 {& ~* d7 X1 ?) D
; H9 z  I" Y# j  N' b; N另外一个小建议,就是move,所有的move都可以这样
4 N+ W, k$ L1 s6 R( _6 Wif not move() then debug end
( f1 k0 J- @% H$ ]' B这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。& [2 a5 B( x' x8 u" S# V3 w2 K
plant simulation中的free libraries有AGV模板,
% }, u8 I" B: U# e4 b  n9 U# F% }0 _: T里面也有案例。
" N1 v! B' ^& w$ ?我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。3 @2 ?2 `0 G+ j2 v) Y
9 G6 i" d$ `) S
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ( f7 I, ^6 j5 R0 a% n4 h0 E

) `% d9 K- G( s# k7 ]那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
6 t! X  s* T2 |% d4 @这是AGV_putin中arrive的method。  k, d3 @+ F) d; D. f
2 F# V- ]+ R& u; Y# O
当到达物料速度越高时,这个报警更多,

( x  ?! _. ^2 {另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-10 10:00 , Processed in 0.017520 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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