设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6216|回复: 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'3 `. U$ u9 P! Z+ h( A) u# w
*/
: W( O  f* W$ i7 }+ fis! T9 \( s2 A0 k* J0 Q5 p4 Y
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 r* T# C# d# m$ @/ `
do2 `5 h7 Z3 j% _; @4 ?( u4 ]
        Lan := rootfolder.Internal.Tools.AOLlanguage;
5 Q5 P" c6 F* t& v        if current = @.Destination -- else return
, d7 p1 }5 `" Z' M6 H( K        then
, @; |! \9 ~5 |! U1 \3 g                @.Destination := void;4 G. T% u  F+ |$ Q. j& V
                if @.occupied then' k; D1 m. N: ^+ ^6 Z5 y! T
                        part := @.cont;( ?: Z8 T$ `" T/ {* s
                        @.transpOrder := void;
' D: ~2 k0 A/ f! \: z# Y                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' M- s$ W+ Y) b& `                                @,root.eventcontroller.simTime);& `( i. a2 c3 O
                        @.HasOrder := false;
  @' Y& m6 e3 a1 q                        @.DrivingHome := true;' h/ G& p- p/ Z# i
                        rgManager.tryToStartTransOrder;6 Y4 Q' F1 t, j7 c: C0 D. D+ Y: j
                        if @.Destination = void. a- K& ~+ s1 Z( X% c; ^; ^- p3 z
                        then -- no transport order for vehicle @
6 G# K. ^6 A2 U9 ~                                @.Destination :=+ j0 Z7 B  j) R  q5 J9 F8 f
                                rgManager.nearestFreeStation(@,track.~);
. I% }* c3 T* n; R1 ^4 \                                newDirection(@);   $ b; \; t' G/ ?
                                if @.Destination /= void then
9 b% A, g/ e& D' h) Q8 Q                                        @.Destination.NumReservation :=$ i8 L" ?7 s6 J$ u, r& W' h4 Z
                                        @.Destination.NumReservation + 1;
' n: p& K6 m* ^7 H* q                                end;
3 S4 V$ p- i/ T$ }4 G4 d. O# J                                @.CurrIcon := "drivingHome";
6 c: o" V: r! e' {                                @.DrivingHome := true;4 l' e8 R& h2 e$ F% v# C0 p
                        end;
- j- L$ e5 B. X6 Y3 c4 p( ]                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 `% u9 x. b  E: E6 X( C                        part := @.transpOrder;! c' n  O, x- }5 y3 |! U! N) n3 X
                        part.move(@);-- load part
6 c/ @+ r, G2 ?  v8 F% x                        @.CurrIcon := "load";
* L: l; z. J- Z3 y  u" _                        GlobalDistObj := part.globDestination;" f2 h2 i% J& K5 o6 }$ g3 T: J
                        assignLObj := rgmanager.rgAssignL;
! @! a" H- I$ W                        row := assignLObj.getRowNo(GlobalDistObj);
7 M1 c: L9 J8 O, _! a$ Q2 Y% q                        if Row = -1 then -- since 709 e) O2 k4 @8 R6 @
                                if lan=1 then2 i7 y1 O# G! O+ F
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 O+ B$ [8 R4 n! C% D                                                to_str("in der Andockstation: \"",?.~.name,"\""));1 l5 D$ L$ z1 q. g( u
                                else
8 p8 f  l: ]; c2 f+ o$ u* d                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& V) P' s) n2 D+ l                                                to_str("in docking station: \"",?.~.name,"\""));                               
; i8 E5 f; c" l8 O                                end;
2 V% T4 W! [) n7 ], @5 T. |                        else
$ G# L0 m" C( m! F# a1 G( G5 ?1 r3 n                                @.Destination := assignLObj[1,row];
; h$ L# O0 ?8 f; v" M! \1 m                        end;                        7 X" b7 L* m' R" J0 w) s4 b
                        newDirection(@);/ t# a- q8 n+ A* _' c4 r: i" {# l! c; k
                        @.HasOrder := true;
  W9 C- |) e! x. ~( Y' w                end;4 n  c: N/ h' O& C( r
        end;
" D4 b! s% |& j3 i% g+ jend;        -- of the method
1 \1 n+ x- o$ X4 Q% Y/ N
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
( F9 |& h" P( a2 W$ |  }
# R3 H8 v% Y# Q这是AGV_putin中arrive的method。
% A+ v* d+ s! A2 r. h
- V% q# U$ J# t/ e当到达物料速度越高时,这个报警更多,
4 u* C8 D0 y' h" N可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
2 r6 J8 _6 [- q2 `程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
, v. e0 U) j* F/ R7 f# M; ]  X
% e- K) i2 e! L- [6 w另外一个小建议,就是move,所有的move都可以这样
9 i5 \9 S* R3 ~# J/ A) C6 uif not move() then debug end
( q& o0 G5 {5 i  e7 e/ R这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
$ f2 h5 B: [% c( n2 ?$ G& }plant simulation中的free libraries有AGV模板,
# ~3 y4 W. K# i) `: V. V里面也有案例。( r2 b; k9 b3 B' q5 Y
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。* O8 f) Q" c0 k+ U

2 L. c: D9 A- V5 \& a8 d6 M% O我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
( t8 v9 B( l3 G0 {- n0 s4 p+ u( ^" W4 o* d0 l1 q. R0 {
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ; u# ~- y$ y! _& Q  N% F
这是AGV_putin中arrive的method。
. I. O8 w) L$ A* F; \* a8 h, p* m0 _# b$ w% Z! g" O; x
当到达物料速度越高时,这个报警更多,

& M) k/ h5 C* W, ^  ^7 T另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-25 08:20 , Processed in 0.025978 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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