设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5649|回复: 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'
& O1 o/ F! M+ X0 X4 y" @& t. d& h9 \*/8 D1 A* [0 c# g' ^4 i' J; \5 d
is- T0 y* n" W' a" \) T" o* d
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;. W4 o+ ]) W8 D2 h; ^  o
do( _( {! @4 i2 F) ]7 N
        Lan := rootfolder.Internal.Tools.AOLlanguage;
' G7 G. x7 }7 [0 C4 A& {* D; m        if current = @.Destination -- else return
" j/ F6 b& n% Q- s0 D4 l% U1 ?        then( o% p7 Z  n- b5 r6 Q; a7 ~
                @.Destination := void;; B$ Z% q" Y. [0 A, E7 V7 O8 q
                if @.occupied then
8 k2 f& `- j* r3 C                        part := @.cont;# V$ w* O. w9 _8 ]
                        @.transpOrder := void;/ v6 F4 x1 e# T- H! [6 S
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# l4 V, n9 F' T$ B
                                @,root.eventcontroller.simTime);8 X' I6 r* ~7 W3 E
                        @.HasOrder := false;; C; y$ f) |' `5 S1 H  k
                        @.DrivingHome := true;; O7 y$ \  A/ _7 T
                        rgManager.tryToStartTransOrder;/ |7 C; H* ~; y& s
                        if @.Destination = void
+ Z' w4 l( j$ S                        then -- no transport order for vehicle @* N" F' V' @) `7 n* e
                                @.Destination :=6 J5 {% }" _- o, S. g- a9 P
                                rgManager.nearestFreeStation(@,track.~);
) y' C+ t7 t! h8 s9 M: x+ t9 a                                newDirection(@);   ! C: P% s) {! ^, s
                                if @.Destination /= void then
: F5 b5 k, B& r  ]5 v$ X& y                                        @.Destination.NumReservation :=  j8 r6 {7 s, A1 F5 ~3 V, t
                                        @.Destination.NumReservation + 1;8 k  t7 v2 W% O" P$ E/ W2 o2 z
                                end;
6 ^, k4 z# |& O# M% S8 u                                @.CurrIcon := "drivingHome";
0 P3 I# x% _7 O( @. L                                @.DrivingHome := true;9 L; p) W8 S5 T, b& i% u& W0 f2 T
                        end;
7 r$ E0 B7 {. r6 k6 d, U0 _- e                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 X$ i. }. A. G3 e                        part := @.transpOrder;: A5 b6 ?" y9 G+ W* V0 y1 m2 M
                        part.move(@);-- load part
3 Y- B, U# k" A8 t$ r( n                        @.CurrIcon := "load";3 Y3 Y; r3 Q& \8 _0 n
                        GlobalDistObj := part.globDestination;# _6 @5 p# }. B# |/ A( \
                        assignLObj := rgmanager.rgAssignL;
( ?* n2 ?- \) c" q                        row := assignLObj.getRowNo(GlobalDistObj);
9 u8 f6 m# [* b, `6 C9 k                        if Row = -1 then -- since 70) Y, t' `7 r5 A- m
                                if lan=1 then! Z: @3 N$ Q* G9 J& g/ M
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" z" ?) H8 Z% w; N1 X7 q/ T                                                to_str("in der Andockstation: \"",?.~.name,"\""));
  q' @4 m4 a& h  r1 v; U, R                                else- p3 k* {0 `; O) F/ ^& T/ \$ m
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 t7 R+ o3 M' S; x$ U  V3 \/ l: K
                                                to_str("in docking station: \"",?.~.name,"\""));                                ) {# l- J7 D5 Q- J$ Z+ u
                                end;/ F) s3 i% W% |/ H
                        else6 L6 ^  J+ a! z! c
                                @.Destination := assignLObj[1,row];
+ D9 x; h8 P" r' y8 f0 N( I                        end;                        . [- K% ^6 h/ E2 x8 b3 w' E
                        newDirection(@);4 \' O" i2 \. [4 {& b1 q+ }) y
                        @.HasOrder := true;9 i0 _; y2 Q3 i% y
                end;( f* c) c) u2 U, `- _: u
        end;
+ O# j+ K- f, [9 O5 W  Rend;        -- of the method
" ^6 H2 ^) Y% ?% c
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
' J6 r6 i) [9 B0 L, j
3 @5 j2 z" }# p" Q这是AGV_putin中arrive的method。- G5 }" \+ E6 A8 \
9 `' g- I/ `. S( e
当到达物料速度越高时,这个报警更多,: x3 g! `. H( I: L- V2 _% q
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
: p+ V$ ~5 S# G  _9 Z; p: v程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
( e* Q! D) X+ `. A$ M7 @: C% y! V! r" ?! i- C6 M3 X/ o5 e+ b8 g
另外一个小建议,就是move,所有的move都可以这样' g! J! r* C* s* Z1 }  ^
if not move() then debug end
% c' t6 v/ k7 v! n2 G这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。! E9 B6 m. |9 Z
plant simulation中的free libraries有AGV模板,0 |9 A  l- c& y9 H' r) l' A
里面也有案例。
6 ?6 Z7 J1 Y, f& H) V3 X我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。4 K5 r4 D& e6 V

6 S+ ~5 J! |$ i$ c* H* {我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ; v; A/ p, D5 U; ^; M

" k8 s  c! Q! v2 _9 _. Q9 m6 A" U  O那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
; L% R/ k5 N: p" f9 g3 q; t: ~这是AGV_putin中arrive的method。& \: w% D2 r6 b0 Y9 f; T* `, ]
( m5 y) i+ G# i7 W8 i4 f% N
当到达物料速度越高时,这个报警更多,

2 u4 V" T8 K! J另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-11 12:56 , Processed in 0.018705 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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