设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8113|回复: 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'
- g- w; V. z# y+ L( [2 I  ^*/
/ f0 R6 E& M1 S( u: @$ Jis& E; L* W  D- M
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;& b! [0 [9 Z6 |
do  Y7 u% Z5 E& A6 ^3 x2 ?! N5 f
        Lan := rootfolder.Internal.Tools.AOLlanguage;7 O& J1 s- w  M  r) X1 c
        if current = @.Destination -- else return7 {3 H  V( a! W( }
        then
! z- u% e4 d; x" j$ Q2 O% f, }                @.Destination := void;
! T  D5 M% t/ z( A& q                if @.occupied then& T% o- {2 b5 s. q5 `- `1 J
                        part := @.cont;
+ _) z* G$ r5 \' \8 i' t+ C. ?. o                        @.transpOrder := void;
$ ]. g: W# D5 j; {# v8 q) h                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 e; L5 _; v- C
                                @,root.eventcontroller.simTime);
+ g# y% A# d2 C7 s                        @.HasOrder := false;
0 Z4 X5 }# w: B( W! a, X                        @.DrivingHome := true;
8 [; Y" J) k! G% t: F$ L; c3 C$ \                        rgManager.tryToStartTransOrder;
9 X4 e" e7 ^" l1 C# ^7 \8 {  O                        if @.Destination = void7 Q3 ]: ^7 ^! U# v' M
                        then -- no transport order for vehicle @
$ E' t/ K! x: p- h2 w, J( |                                @.Destination :=
+ a+ G; n2 D2 O7 l! L$ a                                rgManager.nearestFreeStation(@,track.~);( E& L2 h, n/ E
                                newDirection(@);   
  i9 p! q9 b. ^: Y! ?5 G4 [: ^% a  @                                if @.Destination /= void then) H$ w" p$ [% {( s; S( ^% j8 X! y
                                        @.Destination.NumReservation :=
+ r( [6 N9 q; @0 \* T                                        @.Destination.NumReservation + 1;
5 x# \- K3 u: c* U0 w" h0 p                                end;
- l9 G/ [% n% i! W                                @.CurrIcon := "drivingHome";
# Z" b1 M. C! Z  A1 |9 z/ [% g                                @.DrivingHome := true;+ F3 c! V* i5 o8 [2 r2 E, Z. `
                        end;
: Q+ i2 D# t0 E( I& }  k0 C; F                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' |' B; i0 R$ X: m( L* |- O                        part := @.transpOrder;
- L1 t; ^' [( ?  m                        part.move(@);-- load part
0 N  k) ~* k) u/ J: D4 p                        @.CurrIcon := "load";
, `3 i/ m$ R" l                        GlobalDistObj := part.globDestination;, s6 g! f2 g3 n' ]" H/ r9 h8 T
                        assignLObj := rgmanager.rgAssignL;
- w- p7 I# N7 {, {: I1 C+ ~; b                        row := assignLObj.getRowNo(GlobalDistObj);! N0 H7 H* G2 T( _
                        if Row = -1 then -- since 70: h4 o# F* e) X- v1 @
                                if lan=1 then
* j7 ~2 V1 T* p3 V. [' q5 Y8 Q                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. E. U4 ?: x: _2 E; i, Z
                                                to_str("in der Andockstation: \"",?.~.name,"\""));5 K* R7 r  R8 I( X7 d& r3 U
                                else2 k: |0 `; y1 _. P4 X
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 |: I5 L3 Q- e; ?
                                                to_str("in docking station: \"",?.~.name,"\""));                               
2 l0 f4 n* c0 X" b                                end;
0 Y7 r4 J7 `9 z9 i' G; R                        else
/ f6 V" o" T2 t' C                                @.Destination := assignLObj[1,row];
$ _, l; {  Y; f! Z6 \# K* a8 J7 d                        end;                        8 O8 K  k6 G  C( n' D
                        newDirection(@);& U2 L$ n# [5 i7 q
                        @.HasOrder := true;5 `1 V* F3 K$ C0 r4 X/ ]
                end;8 L- g) J4 f1 G! K
        end;
9 Z$ ?4 P1 \4 T& k/ r8 Xend;        -- of the method& Q. I0 D4 p. U$ A+ _, x
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑   ]8 d& ]2 K# p4 k/ z* C
- W" G/ v9 s& A) {) n* }, H
这是AGV_putin中arrive的method。
- ]8 u# K" I4 j8 B  C
! A/ H+ x' j! X, L当到达物料速度越高时,这个报警更多,- O6 t* ~: S2 s
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。+ W( ?+ _; u. s% a
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?$ Z: E# k$ ^& D9 e

# {5 g! ?- d/ W. d2 Z# f; c另外一个小建议,就是move,所有的move都可以这样: ?7 N8 N/ _" o/ }1 T1 L
if not move() then debug end4 ~4 F$ t3 b8 I0 Y  u4 |( Z
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
4 r: i; M3 a+ M9 K: h5 jplant simulation中的free libraries有AGV模板,3 f2 u/ G0 G( R0 R- n0 t8 O1 a
里面也有案例。
! r/ x! U2 [3 Q$ C我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
7 |4 H5 g, B2 T
/ P7 y# d% e/ A( U' Z9 _; g  [我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 0 R1 {, y$ X1 |

4 i/ s9 q, d/ w6 [1 A那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 7 R/ m( @: P% p, X. |  j  b
这是AGV_putin中arrive的method。% D3 n7 `. H1 s' x9 m0 Y2 T  S

6 n/ ?+ w0 ]0 _1 K# _当到达物料速度越高时,这个报警更多,
( G4 B6 F, e2 [! C' [9 q. d
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-15 14:41 , Processed in 0.023790 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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