设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5774|回复: 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 A! E) c( F5 R- c
*/3 @& P; b9 W' C. S
is
" u8 t: C+ {' f( i+ L" p5 K        part, GlobalDistObj, assignLObj:object;row,Lan:integer;" R  R$ {1 }1 l4 R. ]  ^( K4 `4 m
do$ K* Q% p( b! v' o1 {$ O
        Lan := rootfolder.Internal.Tools.AOLlanguage;1 s7 ]- ?6 m! U  F2 j$ o
        if current = @.Destination -- else return
1 G. @3 [3 E. I" `* V        then
+ B2 E/ o( s. R0 O4 i, ?% t. _                @.Destination := void;
8 U, s$ X# z* i7 ]) B" W                if @.occupied then
) Q% ]  O: g9 I& v                        part := @.cont;
5 p" e; j3 Q7 E# _8 z! L                        @.transpOrder := void;1 K, B. i7 c' e( N, n
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 W' E' O; c  O                                @,root.eventcontroller.simTime);
" w. S4 d- W* ~) F                        @.HasOrder := false;0 O$ {  l7 L: d1 q3 _' Z
                        @.DrivingHome := true;) X/ {) {  `3 }( s( m5 R% z6 v8 P6 z# F
                        rgManager.tryToStartTransOrder;' `5 H8 |; C, Y* ]# F
                        if @.Destination = void
! t" ~' v0 ?. ~9 L) R6 K                        then -- no transport order for vehicle @
6 }$ Q4 @+ l9 [" v                                @.Destination :=
$ {( p% M; E; J  }3 J  T% |                                rgManager.nearestFreeStation(@,track.~);
4 O( y8 r0 z5 g! q                                newDirection(@);   
3 k. x* L0 h. z                                if @.Destination /= void then4 l! @& W! }6 X) G$ C1 b/ Z
                                        @.Destination.NumReservation :=
/ }0 V& _1 L7 d1 J7 U; W                                        @.Destination.NumReservation + 1;
4 h7 v  _1 T9 M3 B                                end;
. R2 R5 X) r+ U/ g* e" W, Y                                @.CurrIcon := "drivingHome";
7 e8 z. D" ^  p& a                                @.DrivingHome := true;1 }& V- _" T8 A" p  n7 e) d
                        end;
' T2 ~8 t; Z. {/ x) _0 }                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 q3 L0 `; n/ S  A( T                        part := @.transpOrder;$ m/ f4 c9 T* C) N! e9 N: h
                        part.move(@);-- load part4 z' s7 R1 z! M9 g: G; O
                        @.CurrIcon := "load";# k/ g. a, t4 Y; d
                        GlobalDistObj := part.globDestination;
7 X8 O$ m; R. o3 G) T2 }) ]                        assignLObj := rgmanager.rgAssignL;
8 a* l" h8 y, [. S9 ?8 y                        row := assignLObj.getRowNo(GlobalDistObj);
" k0 J3 Z7 d( V1 N                        if Row = -1 then -- since 70
- L5 K) s- H  T; V9 v% n9 ]( ^8 i                                if lan=1 then
0 k8 ]! h8 E: F. ~                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: c' g1 Y0 s% @! d7 i6 H0 o                                                to_str("in der Andockstation: \"",?.~.name,"\""));
) y, b. Z. [! h3 ]3 c5 R1 T) E                                else
( ]7 y6 X& v! P  h6 e% l* y                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: P. w8 n0 O' j& B9 S. _
                                                to_str("in docking station: \"",?.~.name,"\""));                                1 T9 r2 _; Z" V9 K
                                end;- k: k' T3 r" A% ~% F% m
                        else
: x  m, n9 a  Y+ a                                @.Destination := assignLObj[1,row];! `6 H* O9 {. m! n
                        end;                       
% T$ X: \! w) Z& R$ M                        newDirection(@);2 X* X) E* l' D4 W" p4 k
                        @.HasOrder := true;# X' g" J* c$ Y7 p/ s
                end;1 H' f- c% E% S9 G- T
        end;
* Z- |" i$ X9 _' t/ W( @) d$ iend;        -- of the method3 v9 j' d3 c- U) W" D6 S1 S
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 / ~% [9 C! T1 r) V) u/ h
+ y' z- t1 A" K
这是AGV_putin中arrive的method。
" o; L( X9 k* N
) P5 x$ g0 W4 }6 X+ j当到达物料速度越高时,这个报警更多,1 H+ v+ M# W5 \" u
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
, d) X$ Q9 f; E4 N& L3 N程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
) N$ r& ?, r9 i3 z2 Q% ?: a" T  {! m8 |4 ~* [
另外一个小建议,就是move,所有的move都可以这样1 N" X$ P2 P# L
if not move() then debug end
! L" ^- V$ [: S; P这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。" K  _5 U( R. P+ m# I
plant simulation中的free libraries有AGV模板,  e4 g1 |0 ^/ E5 c& ^: o, p
里面也有案例。- i2 a4 {3 x9 p4 U) t
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
: Z( a8 U- `, U! x+ o" Q% y% j' o0 p& m( v! U5 i( p( D
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
% b' d+ ]  S8 H7 _) \' q/ p+ {5 c- @/ j' E% l4 [3 T3 \
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 - p# ^& @0 @; [: {2 b6 S8 y
这是AGV_putin中arrive的method。
9 ]2 W. _) a+ O. [7 j* S) h6 D. o0 j
当到达物料速度越高时,这个报警更多,
& |0 x: t. g' E- D! m. d9 e/ w
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-19 03:40 , Processed in 0.018516 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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