设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6525|回复: 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'9 Y8 \) Q, b# \  ?6 \! k5 l8 p
*/6 [; N% h1 l, T! s" P# M
is2 g1 n7 L8 o- y
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ V" Z6 P$ U: |$ C4 j8 K  b
do
8 D2 E# x/ {! g5 u3 ^" N$ t$ H        Lan := rootfolder.Internal.Tools.AOLlanguage;
* e  c' I& T" r0 u" n2 y' e* L        if current = @.Destination -- else return
) h" ]; o& m! S4 r0 \- n4 g        then
5 m: s* s5 s2 h- O) V2 o9 ~1 J5 s                @.Destination := void;; x) L, X& |( q0 k+ k
                if @.occupied then
+ `) Z1 d# L* u) s* D                        part := @.cont;2 K' Z* Z6 Y. K
                        @.transpOrder := void;
, {. C" t# p) S  O$ Z' O) J+ n                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ u  _; c0 [6 D* D$ e) @" u
                                @,root.eventcontroller.simTime);) O8 r& b7 V& V# t
                        @.HasOrder := false;
8 p: ]+ I% r% n& b$ V                        @.DrivingHome := true;
" Q8 m0 P( O+ F4 [: N) a4 {                        rgManager.tryToStartTransOrder;
. q7 q/ a+ Y. ~. F. r7 E                        if @.Destination = void( p; B& _( c! Q+ f/ `; [
                        then -- no transport order for vehicle @* q2 T: I" b* W" g  |* u" R9 C
                                @.Destination :=
6 \; `+ S6 ?. g% l1 @* G; H                                rgManager.nearestFreeStation(@,track.~);
8 @% e1 Y- {7 l& Z9 E0 {                                newDirection(@);   
& d0 {+ m" b! q% |; C                                if @.Destination /= void then
9 K6 H$ m2 f( `* R" w                                        @.Destination.NumReservation :=
$ ]" ^5 y% j* T# ]) a1 ^' q                                        @.Destination.NumReservation + 1;9 o+ k3 r$ R/ t% g* }3 E2 C
                                end;8 j; h6 r6 Y8 m/ v
                                @.CurrIcon := "drivingHome";
% ]: A) b) J7 S! R( A! `                                @.DrivingHome := true;- d' K! n) D* f! }9 ~+ s$ O$ M
                        end;! G  I: i4 n1 z
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 Q: F7 p4 s9 v0 q" n                        part := @.transpOrder;
" H/ L. e* s2 t. u+ {  ?                        part.move(@);-- load part
* G( l' J! M/ ~; M/ O! }* G  X                        @.CurrIcon := "load";
6 E1 z; A! z/ D; A. |7 _1 Z                        GlobalDistObj := part.globDestination;
2 [. [, r# @' p/ m5 r                        assignLObj := rgmanager.rgAssignL;
6 N3 D* A# H, a$ H' R$ O                        row := assignLObj.getRowNo(GlobalDistObj);5 V( d( U2 u0 t; x3 F  j
                        if Row = -1 then -- since 70
0 @" \0 i; u6 D- T/ \3 H% L2 n1 z- R                                if lan=1 then
: }! h. ^( G  C6 C                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 j% j. S# m4 A5 m  C4 I
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
- ?: [6 g5 x2 E4 m                                else  d1 K) m% t; g5 d/ ^$ s
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! K# s% w, ^6 G
                                                to_str("in docking station: \"",?.~.name,"\""));                               
* U5 a( m& S: N8 ~/ q3 h+ [1 F                                end;: D8 v+ B6 F4 T1 e$ P
                        else
% r9 o) a  k/ O/ @                                @.Destination := assignLObj[1,row];% X: h5 E4 H6 m) c3 E* c& K% g- t
                        end;                       
5 a1 L; \. h& L% _! y% K  W6 V                        newDirection(@);
. e' [* ~# @9 I1 ~- k                        @.HasOrder := true;
7 `/ i7 y/ B- k, S. J                end;
( f6 Z3 h/ H' `/ S4 ~- @- ]* I        end;& U7 l  M/ `9 S! t
end;        -- of the method
" Q9 T$ K" i1 o
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 4 p2 }8 y0 A( j$ t
3 T. R; `0 K/ J8 Y* x
这是AGV_putin中arrive的method。
- t3 q% f- j' C/ U. g9 u
& t5 O$ @" Z% m/ H: b# s当到达物料速度越高时,这个报警更多,7 D3 I4 T) }  z; g/ p
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。1 e" G% q2 K2 a8 y
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?- d- H, z) W9 [# q7 f, R! n
# H: \3 e7 R5 O5 x; W6 }
另外一个小建议,就是move,所有的move都可以这样2 }6 A4 T# E! E- `+ W
if not move() then debug end
2 D4 w$ T* E* h4 s3 [& Y这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
$ x5 G( T. [4 b* O5 l5 ~) H, ~7 @plant simulation中的free libraries有AGV模板,( R1 K& g5 n" q1 m; n9 d' W0 y9 o
里面也有案例。! B0 `* N, B$ a7 t% b6 Q0 Z
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
4 L- `# u. A1 g+ ]
4 o. e) h. b4 M/ Q* D+ E8 j6 O: y我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 : Y7 `0 ~, G) P# V

9 q- T9 U6 \0 ^) @1 h6 \: i那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 % O) D/ Q5 ~/ B
这是AGV_putin中arrive的method。6 E8 B/ Z' B0 N( |# T  h7 }

6 F1 C3 ?2 v' g; l, o当到达物料速度越高时,这个报警更多,
# `( z6 g2 M) @* H9 H3 `5 C
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-10 19:21 , Processed in 0.015481 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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