设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6223|回复: 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'" l& Y) ^& `4 V7 @) A3 A
*/3 ^4 B$ @0 W( Y
is
9 z9 Z: L/ }5 s+ e) H; ~        part, GlobalDistObj, assignLObj:object;row,Lan:integer;' C' @4 ~* k8 F3 H. E
do
4 o" f- `2 n" ?( u        Lan := rootfolder.Internal.Tools.AOLlanguage;, Z  ^: y" A8 y
        if current = @.Destination -- else return$ n: H, q' i' i- K4 B
        then9 F, T1 w6 B) @5 Z
                @.Destination := void;
, z! j! z: _/ W. z+ ^( C' b                if @.occupied then& Y7 o" X3 d+ l+ @
                        part := @.cont;! L! ]9 U  `: A; [" K
                        @.transpOrder := void;, K3 {( j& l4 t  L6 g& _
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* R2 P. C7 A6 p& Y' r                                @,root.eventcontroller.simTime);- x2 a) q' b/ @1 ]8 N/ O5 m
                        @.HasOrder := false;
+ }# b6 i" B8 C& m" n                        @.DrivingHome := true;# l. P. k5 _6 V4 @
                        rgManager.tryToStartTransOrder;. p% Z- F* Z( g, I; l, H" _  W5 L
                        if @.Destination = void
5 A! Y% }" \8 m                        then -- no transport order for vehicle @
' |! j( W& q  q2 x1 j# P3 S- @                                @.Destination :=2 A! `8 ?$ p8 a% [' n
                                rgManager.nearestFreeStation(@,track.~);
% ^& v/ j' ~! ?. n  q5 a: Z                                newDirection(@);   
5 C0 T1 `: Z# H7 H$ ]& C                                if @.Destination /= void then
3 l, l$ O* c% i! c+ J4 c. F                                        @.Destination.NumReservation :=
" L4 U6 i4 J# t- M                                        @.Destination.NumReservation + 1;4 u0 a# Q  b* s+ x# v
                                end;. |( G9 S7 [8 l5 o/ S1 P1 ?  E
                                @.CurrIcon := "drivingHome";
! ?% d7 w0 C' t( g& T& W% z& o                                @.DrivingHome := true;" D( d4 j) F! z* X7 O4 H' R
                        end;0 ^7 [' g$ k0 c6 \7 P4 ?
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 j! D+ ~$ P- W0 v) t4 c7 y# x
                        part := @.transpOrder;; x; Z/ Z: _! Y: i+ [" m
                        part.move(@);-- load part; a0 {1 H. h, t$ }7 o4 K0 Y
                        @.CurrIcon := "load";, x1 I+ x# N) a, f6 [; ?: N
                        GlobalDistObj := part.globDestination;( ^9 |' m; E) N8 Y) z+ x
                        assignLObj := rgmanager.rgAssignL;6 x2 l' o5 }6 B6 ?) h
                        row := assignLObj.getRowNo(GlobalDistObj);% n9 R6 V$ F& F* d  `' S- V) \
                        if Row = -1 then -- since 70
8 {( m7 p( \. r8 N( Q                                if lan=1 then
# O. ~1 F, o2 ?4 V' z                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 R& D. U0 L* Y                                                to_str("in der Andockstation: \"",?.~.name,"\""));
0 U" u* ~% o3 N                                else/ ~2 @6 H9 Q+ l' X( h& f
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: v" S, o4 q( f( |# Q' n
                                                to_str("in docking station: \"",?.~.name,"\""));                               
& C% w( F$ m5 n- Y  D( X2 N5 n                                end;
0 N5 P: N& z( M                        else3 I- ~- Y' C# Z% n  s6 c) O5 e
                                @.Destination := assignLObj[1,row];4 C7 @+ i, E: X# B
                        end;                       
1 I4 z3 w0 o+ V$ E) g                        newDirection(@);
. s- [! M8 L, a5 z: x                        @.HasOrder := true;5 p; s4 H) X) _* A. T
                end;
5 g8 i9 P1 G. K        end;% ]( j( X+ P, |$ f; S6 k
end;        -- of the method
( a% i" g! o5 e# U
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 7 y) E# O: w/ k( t6 w

2 {9 t' f/ d3 w/ ]7 Z- w" v- M这是AGV_putin中arrive的method。
4 Z& U5 q' z% l' a" m5 n* L1 ^6 U# B3 h# D  s. s$ M
当到达物料速度越高时,这个报警更多,4 B3 L! h# C* j9 L
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。% M% i% A& g$ o: n  [% O5 P! f* s6 y
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?0 g5 i0 A+ Q- n' [3 `  ~

1 |7 |$ e# Q7 p1 [; W另外一个小建议,就是move,所有的move都可以这样
# b. [6 d6 Y! eif not move() then debug end& X: z8 {, r/ k# K1 i# D4 j3 f
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
0 z+ `+ E- f: ?; R5 D1 nplant simulation中的free libraries有AGV模板,( s1 a5 J! q# W4 b
里面也有案例。
( A. G1 o& p/ ^0 c1 i我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
7 _1 r' u- Q" W4 y! r" K
2 g" H; x9 K0 ?5 X/ F3 `我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 5 B' K6 D) a" a( M% n5 E/ e. ~+ C
5 |/ d- @$ G  E2 p3 o9 L
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 * [) C5 g! u0 b8 W
这是AGV_putin中arrive的method。- C5 ^4 p6 x4 d- g' O9 K1 y

) [- O* L7 a! Z8 Z4 F  P) c1 z当到达物料速度越高时,这个报警更多,
8 D0 r! g/ q3 d, N
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-25 18:40 , Processed in 0.029691 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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