设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9513|回复: 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'+ z9 q/ E  R- S; V5 N6 N0 p
*/
+ U0 h6 Z/ O) u2 Nis
6 j2 E" Q8 A: I5 ?- T& q        part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 V# b$ H8 E( |# U2 U) g! W
do
' p  n6 ?  ?( |! [1 q        Lan := rootfolder.Internal.Tools.AOLlanguage;
* F1 v1 l1 |) ~6 A  \5 C        if current = @.Destination -- else return6 C& E7 q% O; e( e5 w3 j$ q
        then4 w; y* S+ k+ ?1 n
                @.Destination := void;
; t8 l, l. F1 W                if @.occupied then
  X3 D0 O" v; u- j7 Y) M                        part := @.cont;
6 j; L; k- T, c6 e- B                        @.transpOrder := void;
  [( r; g. s2 A' T' Q& R" V                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- p2 J- P2 j5 g8 r' t& D2 D                                @,root.eventcontroller.simTime);
' b2 J6 {2 X7 K. k                        @.HasOrder := false;5 Q( ?, E" V) ~2 F$ G- q
                        @.DrivingHome := true;4 L# ~) w& g$ p5 \
                        rgManager.tryToStartTransOrder;
2 h- n$ A& t+ o( l& D3 `: b                        if @.Destination = void
! ?. u2 H, l0 Z  ]2 R! [                        then -- no transport order for vehicle @6 k8 j. K' ^( g" i
                                @.Destination :=
& z8 y, @9 r; q# z                                rgManager.nearestFreeStation(@,track.~);
- J2 Q' m3 b: O) d" ]3 ?                                newDirection(@);   9 g# Y4 n9 N0 n- H) l& y$ l
                                if @.Destination /= void then9 a3 u2 `1 m; P9 a1 I+ k. {5 J
                                        @.Destination.NumReservation :=! w: v$ H+ Y1 ]0 ?' Z' t/ Z7 h" ^
                                        @.Destination.NumReservation + 1;' I7 U7 _2 m' r
                                end;  p9 A: u- x, Z/ J
                                @.CurrIcon := "drivingHome";
# z* n! a1 V' m) X4 ]                                @.DrivingHome := true;  X' m4 ^( W# v# {$ w# h
                        end;
" B" Z1 r6 y7 S3 R9 P4 `4 m                else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 K- G' W4 K: s/ S# R: k; l% Z
                        part := @.transpOrder;) J7 _* x0 y! s/ W: ~2 w- {# d
                        part.move(@);-- load part
- m  R8 L0 d9 F- ?8 y+ M                        @.CurrIcon := "load";
  c: U' E) |% o! z                        GlobalDistObj := part.globDestination;0 P& C4 u  N( V% H
                        assignLObj := rgmanager.rgAssignL;
* Z- k" c  H- A* o$ [                        row := assignLObj.getRowNo(GlobalDistObj);
5 b$ A' H5 i7 z- N( h                        if Row = -1 then -- since 70- v" V8 p# S( |  u" c; t
                                if lan=1 then
! w: t8 s+ J. [# a9 g                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 T2 N3 ~9 V6 B7 r  f+ @9 A! b0 K
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
- r# |  R  F+ ]6 M  K8 R' I5 m/ }                                else
; X( O1 S- |, c1 Y0 w                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
  H3 v3 G1 O  C0 {                                                to_str("in docking station: \"",?.~.name,"\""));                                # [- z# H9 d0 N7 m% J
                                end;
- a/ M5 _$ U+ B1 W* ~                        else3 U. Z0 ~& }; I9 a6 X) m* _
                                @.Destination := assignLObj[1,row];
# n1 _2 G8 K0 Q' T# Q, |                        end;                        . M% \& T7 n3 Y2 K! _
                        newDirection(@);
  Z- q9 |( |# L& \, A2 G! J                        @.HasOrder := true;
8 A4 p; e$ h5 V+ e8 k9 x' C9 f0 U                end;
2 A. E3 H* v6 Y6 A6 d        end;) w" x" `9 O8 _& L
end;        -- of the method& v, ~$ a7 L/ j5 |( {: B6 i  Q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 / W% n8 Z; P' M2 w
* q. _: e$ L2 q1 B2 l: u) Y
这是AGV_putin中arrive的method。  \* O4 T& Q6 }) D4 B$ w+ I

8 m. O6 y' m1 a+ R" @当到达物料速度越高时,这个报警更多,) k! |1 O, h; N; J1 A7 X2 q" y7 R
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。0 G. L+ Z# X: ^9 K: P+ c9 h) E
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
3 D& A* k* U- \5 j  B) U5 S; P$ U. P) T5 s$ u9 F) z2 V& w
另外一个小建议,就是move,所有的move都可以这样
( T' A1 t. q5 V2 @% J" ], ~* Fif not move() then debug end( z1 D; l  u2 j' `
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
- ^; X( t7 N( C2 e" P1 t5 }4 @3 Jplant simulation中的free libraries有AGV模板,
& P% B1 v. u- A6 u$ Y8 `# f" z里面也有案例。
+ N; ]3 n5 ~' E我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
- C- B) {2 ~( r# y% j, _: |1 h; l- v! v3 c: K
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
# b8 R. c3 @0 k( W
* _7 _1 F9 o) d( Y/ A那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
1 s) l/ W$ F1 ^3 E8 I# o1 E, H这是AGV_putin中arrive的method。3 J7 n" T2 G2 O$ w7 p

, c- N3 ?& i+ J当到达物料速度越高时,这个报警更多,
7 O/ \' m+ ]5 w: Q
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-5 09:07 , Processed in 0.014971 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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