设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8721|回复: 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'
7 |6 B9 t6 P) u3 \) c$ \*/
& k- [% O! z* ]4 `is% ~6 _1 c* j; [8 Z
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 B$ U4 K7 B! i* j6 k' @6 J; y2 l
do
' u! G1 }( R. H' \        Lan := rootfolder.Internal.Tools.AOLlanguage;: r; \3 f3 ], |9 M  S
        if current = @.Destination -- else return2 A+ c1 S6 }8 R" V* K
        then+ o1 S& @4 ~/ {( D& V/ h1 k9 S
                @.Destination := void;& D! w3 q) e* @8 U; E! a  ?
                if @.occupied then) P4 P! M6 Q! V  Y9 c
                        part := @.cont;+ E1 n! b4 C3 }' V6 \3 u  i. v
                        @.transpOrder := void;+ T" ?: F9 n2 e/ f% w: v
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- B& m3 ]. ?8 [7 Q" e; c; ]                                @,root.eventcontroller.simTime);, ?8 H1 O& J& U& v, ~7 N
                        @.HasOrder := false;0 Q( O+ X: a8 i7 L7 a! s" w. _6 y
                        @.DrivingHome := true;' q3 n' w( H: c* f( O, {# Q
                        rgManager.tryToStartTransOrder;& O: B6 E, Q3 Z! h1 m
                        if @.Destination = void+ @: _9 B9 \0 N' {" G
                        then -- no transport order for vehicle @
# r  N3 ]# v; B- A                                @.Destination :=
. D# g; P9 O* {7 T2 R. [0 [                                rgManager.nearestFreeStation(@,track.~);
4 |+ r9 k7 b2 ?8 I                                newDirection(@);   ; H" L6 h. [- z7 o, [
                                if @.Destination /= void then
; d/ _1 d& K* W+ s8 z                                        @.Destination.NumReservation :=
9 D. P9 s2 J4 D- {/ J) {                                        @.Destination.NumReservation + 1;
* L. S2 ]+ l. \9 g" b; p$ U& ?                                end;: Q1 |- p+ W0 l1 Q  m5 @( y5 G
                                @.CurrIcon := "drivingHome";
. E2 u- F& ]/ _) l0 u. G8 P                                @.DrivingHome := true;
8 z! j" e9 ]  N& N$ {7 U! U8 i1 U                        end;" E( a" ^7 _. ^& t# p7 \0 ]
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 T0 W6 T. f6 y! }4 D
                        part := @.transpOrder;
/ J- S, P$ K8 J( I" A1 j                        part.move(@);-- load part+ t+ _7 z* V; v* S% c8 Z
                        @.CurrIcon := "load";
# w7 k! Z* o# \/ T  {; g                        GlobalDistObj := part.globDestination;/ D- D6 Q7 W+ `+ k
                        assignLObj := rgmanager.rgAssignL;2 r4 d1 ?, o, d$ r$ ~4 ^
                        row := assignLObj.getRowNo(GlobalDistObj);8 ^6 V6 O1 f7 _9 O
                        if Row = -1 then -- since 70
/ t# b5 \' J/ u# o# M                                if lan=1 then& O1 X! q5 f1 j1 X7 i, d, ^
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( v6 E* W2 T! d& P: h' t0 y- V
                                                to_str("in der Andockstation: \"",?.~.name,"\""));4 ]5 C* K4 U' `  u$ `0 q' W9 f
                                else
, d7 {% \, v0 b8 ^                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- X( Q2 z( w( T& P+ @1 l
                                                to_str("in docking station: \"",?.~.name,"\""));                                ( [. S  L% B& l- A+ S; V. Q
                                end;
, D% k( S1 h9 I! F                        else9 M7 Y; o' q. F9 U. n; a* B. G
                                @.Destination := assignLObj[1,row];
- B0 b4 s- r0 Q: d' \                        end;                       
+ M  Z( j. W' U2 j# l  A' V                        newDirection(@);( D( w* t& c' D( V. M8 G
                        @.HasOrder := true;5 N: l. A$ |" Z, Z% d
                end;( e7 K* G& W/ m7 J0 }/ M
        end;5 e6 c% Z& ?+ y9 O  g( ?6 J
end;        -- of the method; Q' U$ `5 t: h2 _, b
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 0 q) j& M2 U1 t( H5 @& o6 W
/ C# l) U& s& K: `* t
这是AGV_putin中arrive的method。5 H' e7 o0 U4 |, d2 A
# @$ T; _* ]* Q2 S3 e  H& @
当到达物料速度越高时,这个报警更多,
0 h& h, m( a- u# _可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。" U% E- K* K' R
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?: E% ?0 }+ G- w
) q, j) y9 t, O2 O3 ]
另外一个小建议,就是move,所有的move都可以这样4 ~7 W; p/ C- j" v- s
if not move() then debug end+ W$ Q( U& Q( b1 m# a+ W) n
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。# h8 O, X  D! Q0 l: X
plant simulation中的free libraries有AGV模板,
. x) X! F+ }; ~; E里面也有案例。
4 M7 h, X- b# Y2 z2 d+ W/ {我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
- N3 C5 T# T& b0 y) E; z( Y0 _& G& D# Y
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
* M4 q7 `) c1 r5 N: b% V! y- a/ h2 H5 S! e; t. D' c! B& c
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 4 ]1 W3 @2 w5 O3 Q; r2 t
这是AGV_putin中arrive的method。
8 C! y3 G" d/ E# `4 N8 W  }2 P+ z6 f4 v1 H
当到达物料速度越高时,这个报警更多,
5 K1 J) o; O" v
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-22 12:04 , Processed in 0.016228 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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