设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7619|回复: 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'/ @. ~4 H7 I8 `2 Z
*// u# f% k6 P( o! U+ w9 R% }: `
is6 j  h5 T- E0 r, [- R, i
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 g1 C4 H! b6 C" K' g4 K9 I" m. s# t
do. g$ `, @7 K" U) h9 w
        Lan := rootfolder.Internal.Tools.AOLlanguage;) D2 `" F3 N  U: \" }5 S  \2 T0 v# t
        if current = @.Destination -- else return
/ @# N. X( L' \; N: B        then, w0 {( \$ o! [4 ~
                @.Destination := void;8 B5 C, }3 s2 `# F+ U
                if @.occupied then
; n6 o6 G, X8 z. x1 n, w0 n                        part := @.cont;
6 P* H% e) f0 S) j' f! x, W4 ~  k9 @                        @.transpOrder := void;
8 j& q7 L$ w( w) H4 h                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. V0 {  Z2 v0 G- K                                @,root.eventcontroller.simTime);
4 n& \  X7 O3 N/ w3 M( o                        @.HasOrder := false;1 _! Q+ s; b( K6 l1 E0 Z8 f. z& R
                        @.DrivingHome := true;* P, Q% q; |9 M# @. B: f1 m
                        rgManager.tryToStartTransOrder;
  k1 O% ~2 l4 U( D. ]+ [, [; n; T                        if @.Destination = void: L5 _( F( G( q; H, V
                        then -- no transport order for vehicle @3 j5 _5 G8 P+ W' y2 a4 M
                                @.Destination :=; p9 K; D8 U) x' v5 c# L
                                rgManager.nearestFreeStation(@,track.~);
' u8 i% E8 m2 b/ K                                newDirection(@);   . \/ s# P0 d; `7 @7 N0 Z
                                if @.Destination /= void then
$ d4 Y7 j0 M2 x( M0 I% n                                        @.Destination.NumReservation :=5 ^/ d: q3 L* D5 K
                                        @.Destination.NumReservation + 1;* a& s) B7 y" I! R. \* r* V
                                end;
6 p7 U0 p* G) L* B- T3 \6 }# w- u( I                                @.CurrIcon := "drivingHome";, V* |4 }# b3 V# b
                                @.DrivingHome := true;! L. e+ G: Z# y' u9 j/ F0 [
                        end;
* ]. B3 `9 X5 X* f. X. Y                else -- the vehicle @ is empty, both vehicle and part are in the same dock station" B" u6 {) u% z- |. @; d
                        part := @.transpOrder;7 x: n" n9 ^5 S' M
                        part.move(@);-- load part/ K& x3 H, f+ d0 O( A0 m& A1 ~
                        @.CurrIcon := "load";6 s) L: \* I0 n6 q3 b; |
                        GlobalDistObj := part.globDestination;
* u% f+ x) e, W7 T  D2 l- Q                        assignLObj := rgmanager.rgAssignL;
4 P' }5 L& v1 }4 Z  q0 z                        row := assignLObj.getRowNo(GlobalDistObj);
% G6 S3 s8 K$ Q' ]                        if Row = -1 then -- since 70
; F: @& f$ w3 N( T) d0 d                                if lan=1 then* M5 p" x7 Y( v2 _
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! t, ]6 G( k, W+ @( v7 d% |1 z; i                                                to_str("in der Andockstation: \"",?.~.name,"\""));( R( P+ g8 H) a- Z  C4 I* a
                                else
) M9 Y% p+ i% F: p( G* m                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ \5 o3 U; F# F, m% K' i                                                to_str("in docking station: \"",?.~.name,"\""));                                + g4 c% ~1 [& H( h1 z2 B- ^$ H2 O& o
                                end;$ d+ O0 a2 `6 r9 ?, J
                        else' \3 h; E$ t# ~3 e
                                @.Destination := assignLObj[1,row];1 J6 U. Q7 A) t4 @# y- N  g
                        end;                        " u% Z& d3 X5 X: H! k) H. k- B: a  a
                        newDirection(@);
- h% M, N- i# L/ G( h- t                        @.HasOrder := true;
5 ^7 U- M  r8 W, Z$ v3 V                end;
; D0 |5 e4 u- x4 x  D" l4 @        end;
" ?  y/ `4 f5 n2 R; d' Fend;        -- of the method
5 K, V2 n3 b5 P6 D' n3 |  K
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
" U3 p* \7 a+ @+ C2 W" n9 G0 l, J; H" m( o
这是AGV_putin中arrive的method。. x! A' P, _& M$ f1 L
5 N3 S4 C* Q) e' B, d: P
当到达物料速度越高时,这个报警更多,
% `# D) B' W. l0 F可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
5 ?/ d* Q# `* o. R0 M% j" X程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
8 C) h- G. O: r8 K$ a; {
, x4 x* p& [, K% C$ m另外一个小建议,就是move,所有的move都可以这样! Z8 ~5 q3 T5 N+ a  [6 J
if not move() then debug end
) Y/ i. |' n  K' t( K+ v这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
, m" K8 m, i+ s. Aplant simulation中的free libraries有AGV模板,
$ \1 G4 u/ M& q1 C, j3 G里面也有案例。
$ }2 I; {9 m8 M+ H我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。/ ?* T' m  E9 ]3 P

( y! m- s1 G. h6 n/ g0 [我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
' K8 r# ~8 `0 e" p' C5 r
0 ~- r5 n# v  D" `7 _那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
: ?8 f* ~. R1 D4 ^: J- N这是AGV_putin中arrive的method。
1 V- [5 B% x* T. R" o( i( V, B& Y
& a7 h- h% c% w. A$ S8 ?, d当到达物料速度越高时,这个报警更多,
, z  x& t- V: `
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-20 15:31 , Processed in 0.017157 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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