设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9016|回复: 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'
  X8 [5 O8 |/ y/ L0 m*/# T  b1 i0 O0 ?8 y$ u/ K5 Z% n
is
" b2 r; W; d" G1 A$ U8 o        part, GlobalDistObj, assignLObj:object;row,Lan:integer;# |* {: ^+ H+ Z0 D6 G; g
do3 m' L. ]% \' L
        Lan := rootfolder.Internal.Tools.AOLlanguage;
4 {7 w" U+ |+ O; c2 I$ `        if current = @.Destination -- else return
* ~' q# U" c8 Z9 N$ @( {! l! r        then
: O: _2 q  [7 _4 {. L6 V2 ]                @.Destination := void;$ g/ c6 S2 P' s) ~" i: D/ L- A
                if @.occupied then: C2 ~; C& y3 T0 A
                        part := @.cont;
1 R6 x3 q7 U  u; E                        @.transpOrder := void;
- f8 S# U2 e/ i. x, Y, |                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 }! r/ C% ^- j& J6 d5 g2 Z% g6 y$ E                                @,root.eventcontroller.simTime);
5 K% X2 c* J5 ^- `+ k                        @.HasOrder := false;
/ n0 z" a8 x) {% W+ n1 L2 R                        @.DrivingHome := true;
% Y9 n! b) [& V* ~' o. ?& p                        rgManager.tryToStartTransOrder;
' ^4 ]: B& S( n6 L                        if @.Destination = void* D2 Z3 Y5 p) B: i% q3 K5 \
                        then -- no transport order for vehicle @
7 X$ D, m4 ~5 @7 N% t1 |9 F6 f7 W                                @.Destination :=1 d! c1 Z( l+ ^. q7 \* `) @
                                rgManager.nearestFreeStation(@,track.~);
  l8 u: G( Y# U9 {- E                                newDirection(@);   : P. l, `) U8 N5 K. ^
                                if @.Destination /= void then
) _0 t; E; Z* ~( Z                                        @.Destination.NumReservation :=' X, V* f2 R+ |8 I) F0 z
                                        @.Destination.NumReservation + 1;0 E6 I; ]( \/ t# L! S! o
                                end;: F9 E5 ]2 P9 |) R' C  n! D# M
                                @.CurrIcon := "drivingHome";  W" a% t" Q, x) c# A
                                @.DrivingHome := true;2 J3 }& a9 u& f  d/ f) n
                        end;0 o9 {( f# r4 x; b+ W2 M& a
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 N1 u. G" |+ T0 D
                        part := @.transpOrder;
' C* V, D4 X% d: u+ |5 `1 ~1 J/ v                        part.move(@);-- load part& N4 `7 U8 K9 x
                        @.CurrIcon := "load";
4 L. H( S7 {% Z1 ]! l  }3 W                        GlobalDistObj := part.globDestination;" F8 K1 F8 z3 E2 ?* D) ?0 R
                        assignLObj := rgmanager.rgAssignL;3 {7 v' B) B9 B& S! d% ~- _
                        row := assignLObj.getRowNo(GlobalDistObj);
9 R9 L' @# h+ m2 l1 k1 y                        if Row = -1 then -- since 70
9 K* f# `& @/ A" ^6 b/ @. L" A* I7 D                                if lan=1 then
9 O! n1 O. B/ q+ ?                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; d- V. {- x+ w5 K1 R3 H% |& h                                                to_str("in der Andockstation: \"",?.~.name,"\""));9 t5 u8 T3 j0 [4 o8 p, u
                                else
7 j3 S) r$ c, @# z                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 |% W4 _. \* g( @' g" d. R
                                                to_str("in docking station: \"",?.~.name,"\""));                               
  b  r7 d% w3 S- R# G" h4 \                                end;
3 @, t$ _& G5 ?$ X. ^- ~                        else3 b) D8 x1 C6 L6 \8 r' L
                                @.Destination := assignLObj[1,row];5 d& Z$ h$ N4 f3 y
                        end;                        ! E% R$ g0 R; i4 S
                        newDirection(@);) l" y$ D, c$ A
                        @.HasOrder := true;
3 |' Q1 d$ G$ x1 B                end;& H# T; z- V# N9 |
        end;9 h9 j4 U2 `  d- r' U
end;        -- of the method# ?, Z7 m6 a: u) m
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
. Q3 E& j+ _# u7 u  b" x* }' s% }0 y
这是AGV_putin中arrive的method。
% j$ \, D6 C6 @' V0 h- R8 C# @; c* c; @# ?; U) }6 c( m1 ^  w' _- q0 ^
当到达物料速度越高时,这个报警更多,1 ]& ^: h* [% @, C; v* y3 j
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
' j! W  D! \1 w0 Q% n' Y9 ]程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?! u0 G9 Y7 H4 e  B

( g/ L3 b) T! e5 y另外一个小建议,就是move,所有的move都可以这样
1 H5 A  z4 z9 v( N" N6 Tif not move() then debug end  q! v# `6 J( A' J0 Y: E- A
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
: y; ^- o) b  Z; |9 ~, b) O. Wplant simulation中的free libraries有AGV模板,& o! C4 h! q' f8 \
里面也有案例。3 M+ i7 `. E1 a5 l
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
3 l$ n! I; g) u9 U- `! k$ B0 x! W" f6 h; H
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
% A# b- @5 N) F4 U" _, E8 E9 T. K" F9 a
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
0 i) `% J2 X9 P0 G9 W- @这是AGV_putin中arrive的method。; m7 z% X0 I/ h/ B

4 \8 r1 p2 k9 u4 z9 r/ l当到达物料速度越高时,这个报警更多,

+ C5 \) J0 a+ Y" r4 u- G) W( L% |另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-9 04:44 , Processed in 0.020546 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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