设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8565|回复: 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'' K5 N& j& A" Q, k9 P; k
*/  P- |  |: _- \
is
% U9 I4 a/ G  D1 W$ `& S        part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 u; l$ ?2 F, p% b' u
do! a! \5 D9 X8 a/ {8 R: N1 k8 x
        Lan := rootfolder.Internal.Tools.AOLlanguage;
) R( C6 r' B& Y. b        if current = @.Destination -- else return. K0 R/ M5 `, {! M) D3 L
        then6 e$ p9 y( Z5 p" o' B
                @.Destination := void;
6 M( U7 ?" u1 V                if @.occupied then% c5 f  y/ ]- r* d4 B
                        part := @.cont;
9 f/ w% ?7 ]5 b1 V! w4 s                        @.transpOrder := void;1 ~: f$ `& |+ M! N6 d
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ t2 ~1 a$ a3 O" \& e3 U
                                @,root.eventcontroller.simTime);* R5 h6 C; u: U( q* i# C" J: S
                        @.HasOrder := false;
& C9 Z9 |9 C5 d9 w& h# a3 \$ \. }                        @.DrivingHome := true;% X$ v- W& `. p+ Y! e9 Y, F  ]
                        rgManager.tryToStartTransOrder;
' A2 x; T! d* p# P+ H+ P                        if @.Destination = void. S& A7 K" D# Y  q4 k. y/ \0 H: E5 g
                        then -- no transport order for vehicle @
( Q; z: R6 a2 h! G) }& t                                @.Destination :=
& i/ \* h. R2 j( k6 r: d4 ?8 {" z                                rgManager.nearestFreeStation(@,track.~);
# l1 [3 s1 i( ]  `) Y4 c                                newDirection(@);   5 r$ g* f  ?- S+ M
                                if @.Destination /= void then
8 n2 u' [: P4 I) l7 ]9 t9 ^                                        @.Destination.NumReservation :=8 w* G# r( [' ]/ f  t0 c
                                        @.Destination.NumReservation + 1;
. l  q* v; d5 @                                end;. N9 n1 s, J9 j% W" n6 d
                                @.CurrIcon := "drivingHome";
2 w& D1 l- a* Q$ W5 ^3 X' S3 V                                @.DrivingHome := true;- N* i% s, w" A( ^; _
                        end;& U3 x) ?  a. y) ]) {
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( x7 Q; u# z- t9 q! W9 z                        part := @.transpOrder;6 `5 w- Y( K: D' O
                        part.move(@);-- load part) M2 k" o' C( ?& y  ?# z" D  D) f
                        @.CurrIcon := "load";) r3 z3 U$ U4 D( |) a4 M* b, A$ v8 `/ E
                        GlobalDistObj := part.globDestination;
* k8 P0 L; c2 X4 {- U( p                        assignLObj := rgmanager.rgAssignL;
) R* s" R9 c3 r/ W0 E                        row := assignLObj.getRowNo(GlobalDistObj);
5 q  q$ [+ H& Q" v7 S6 y) D2 o                        if Row = -1 then -- since 70" F+ a, o$ b: ^: ?; ^3 g1 e
                                if lan=1 then
3 q# }5 p3 o3 t3 u0 ]  }                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 C, A$ q5 S0 E$ ]7 {% @7 D$ e                                                to_str("in der Andockstation: \"",?.~.name,"\""));
& v, G& \1 e- K6 Q8 F) a% a                                else2 x& {4 R) e, Y! R, b
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 b& _) J. j5 l6 H
                                                to_str("in docking station: \"",?.~.name,"\""));                               
& i9 `( G* J) @& @( t( K8 b8 @                                end;
; }% F; ?) J6 X: u1 V+ S                        else
/ M" l- f* Q- P: J) y                                @.Destination := assignLObj[1,row];4 d$ O4 o; }) M, \8 W* V
                        end;                        8 l, C* T  E: x% |4 J! ?( B6 y! B
                        newDirection(@);# Q6 d1 L  Q1 o0 j" q. ?1 i
                        @.HasOrder := true;5 |& X' h5 L  Z  c/ M! a5 f, _
                end;
! R4 n- o$ o; ~, a. `; A) H        end;
1 @  w# w8 E1 Y3 v2 V1 Aend;        -- of the method7 p, ]& s" g! w7 b7 X4 O
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 5 s% U" f- n* H& }" \# V1 w# x3 e
$ {# N8 V. @- k! [
这是AGV_putin中arrive的method。
' F( c4 X  |3 w+ t4 P% \1 K0 t, V: V0 Z
当到达物料速度越高时,这个报警更多,7 {: B7 l% _# k$ {8 J
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。4 r2 _; K3 \* ?1 B/ G" {* ?
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
" h* H) U1 }. y( O& ]& w
4 m* O5 u8 J. z另外一个小建议,就是move,所有的move都可以这样
- c  i" R* s% H9 h5 v" M; ^: `if not move() then debug end4 ]/ _) d* k1 v6 K* Q& {
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
- ?9 T  E4 K  a2 W& k0 o  }8 k6 q% tplant simulation中的free libraries有AGV模板,% x% C$ _/ H4 _$ Q
里面也有案例。! F& j# n4 c1 P+ E# ]) S  F& _
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
/ [% ?5 T+ s2 y& F5 J+ a* I( H3 U# b; n+ \
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 N3 z2 a) j. W  a6 E% ~. |" g6 y% |3 A$ \5 o/ |
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 5 C) c. H% n, u; S
这是AGV_putin中arrive的method。% V6 t* C- ^0 I% j

/ Y( ^; a7 R  [) j当到达物料速度越高时,这个报警更多,

' ?% `: W* q. ~6 {$ S( \另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 07:22 , Processed in 0.017795 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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