设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6400|回复: 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'
  Q2 v, v) B6 D0 b# F) b+ L; C*/
: t0 R' m! G# V% v" R3 c' U# bis
7 E/ U, u& e8 z. ^3 ]0 m" _; n        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( O5 q' Z5 S5 F( D3 Ido8 N3 x' Y  X3 F! ^' s1 @9 a
        Lan := rootfolder.Internal.Tools.AOLlanguage;' V( ~6 |' o: x* }5 b
        if current = @.Destination -- else return
% W! h% @+ d1 a( A. C% ^        then4 q3 n+ E  ^( A' g# S
                @.Destination := void;
  U6 R, |: Q, W8 ^* Y0 z                if @.occupied then
% {6 A  d- y/ ?, O2 r% o7 m                        part := @.cont;: z( V* D9 S" a( a5 T
                        @.transpOrder := void;2 h( P2 G- [3 H5 H
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ n$ z3 l# |' V' N
                                @,root.eventcontroller.simTime);" x' `" N" ^5 v: F* T
                        @.HasOrder := false;
1 T$ o# P# H" h7 ?3 G' G) T                        @.DrivingHome := true;6 t" T, ]3 Z3 m3 k2 @" X! O
                        rgManager.tryToStartTransOrder;
; p0 }' m* u: l6 X                        if @.Destination = void& O% g5 h/ F. x! n7 F! D
                        then -- no transport order for vehicle @
1 E; M1 g, w  R5 {4 E" E% m6 D5 ^5 d& @                                @.Destination :=
- k4 d! H- y) v( }. f/ q% V( V                                rgManager.nearestFreeStation(@,track.~);
9 q+ Z1 d7 {) F: @5 z; o                                newDirection(@);   
( `. X1 p& R. N, w( J                                if @.Destination /= void then* q2 _% d5 ^# k0 G+ q: _% T
                                        @.Destination.NumReservation :=' Z  b/ P3 d, w! G' j
                                        @.Destination.NumReservation + 1;, H6 i" {6 s: F' Z( S
                                end;! l4 B" H; h5 I- s
                                @.CurrIcon := "drivingHome";
' X. |( n5 x% ?$ S. C                                @.DrivingHome := true;# u: ], r) H5 r
                        end;) p7 k. @, ]! Y4 V& ~) K0 h
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* C( S( s* v) ]5 H8 Q+ w4 q) t                        part := @.transpOrder;
( W  ]- N# `! b( s                        part.move(@);-- load part
  y% T2 t; |7 q& `& U2 ^) ~                        @.CurrIcon := "load";
2 w. V) a/ |% T! O6 c5 j                        GlobalDistObj := part.globDestination;
2 w* ]9 Q, e0 D5 t; ?                        assignLObj := rgmanager.rgAssignL;
* S3 I( V4 P& L                        row := assignLObj.getRowNo(GlobalDistObj);  ]1 K3 `' Z0 P/ C5 W
                        if Row = -1 then -- since 70- X, v& A# ?, V. c9 s+ @
                                if lan=1 then
. i5 p% @  [/ R- H- Q                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; M7 }* j1 \1 v2 {3 u& b+ o6 b0 N                                                to_str("in der Andockstation: \"",?.~.name,"\""));
1 E% {5 m; G/ @1 q, a- ^+ X                                else
% x" ^6 v/ ?) K+ q4 F7 f6 R                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( C7 F( ^+ r7 ]* u
                                                to_str("in docking station: \"",?.~.name,"\""));                                . ^' N% O- w/ s" ?6 I4 @
                                end;
$ [- q9 R; l& a$ Z$ n6 Q                        else
+ b; k! v& ]( O) m" \                                @.Destination := assignLObj[1,row];
) g' j8 m/ }# N) I( k                        end;                       
$ q) u& n) t. W4 l, m, Z                        newDirection(@);
# {( H, n6 U, ]                        @.HasOrder := true;
0 c" |/ }; n# U' e) e  {                end;
; E: w: |5 `" c6 K        end;
# U* n- a+ x. Bend;        -- of the method# d. |2 j. X* V: `8 J# y# H
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ' p9 G1 G, n0 f; g1 g( y
. l0 [# N" B8 \
这是AGV_putin中arrive的method。
0 s, {+ ~4 T" Y: Q) o1 x  X5 f3 G* E0 R$ d. p; P
当到达物料速度越高时,这个报警更多,/ g% W4 K4 j- \/ `
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
" {' {( Z* ?/ S6 i3 [程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?/ b. K; t9 }0 ~4 b& Z$ P

  _8 H2 @$ e! H8 m7 Z" `( ?另外一个小建议,就是move,所有的move都可以这样6 s' ~: z' g& U9 m
if not move() then debug end
! W# B$ j  b9 `这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。, ?/ b3 W9 f# L9 G
plant simulation中的free libraries有AGV模板,
4 |4 D  p1 l6 r3 n里面也有案例。
$ X* d0 Y1 V+ r) |% M我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
$ x0 p' M& W/ m% X" V5 ^. T$ D5 w: T% s% V9 V! J0 q$ @
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 / j0 a3 d# x- A' d- \( ^

  @8 ]! N" k+ n4 z, j8 x& O" n7 a那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ) h; R4 ?0 ^2 e3 h5 q! s6 v4 m% a
这是AGV_putin中arrive的method。6 \+ h* |! C. J! e4 |
$ ~9 N3 Y) X7 t+ M
当到达物料速度越高时,这个报警更多,
% k; B5 F/ m( B" q' f
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-4 13:07 , Processed in 0.049315 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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