设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6284|回复: 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'* Q" r: _5 j! {& n; w' {
*/) F; l" Y. o. l( k7 ?* p0 K, h2 w! \
is4 q2 _5 F9 D2 h, t* m5 d
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ `6 b1 Q* j1 o6 z* A. D* gdo, U$ z( T- U( l1 I% X3 h9 W5 f
        Lan := rootfolder.Internal.Tools.AOLlanguage;, z9 ]4 U! ]6 U
        if current = @.Destination -- else return
0 r) T& {! H0 F8 V4 Y" p3 f1 f( ?        then
) g. {, O! L4 v: c                @.Destination := void;- }$ }( @( e& [
                if @.occupied then( ~. _, T) \  O/ t" p+ k7 E. b
                        part := @.cont;0 J, X$ H8 Y- W% X5 W" q$ ~
                        @.transpOrder := void;
. D: r# e* E* @/ \                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' g: P3 Z/ z; V! X" n6 B                                @,root.eventcontroller.simTime);
6 J! u5 s& {. E8 P0 }5 j                        @.HasOrder := false;
, W4 H4 L4 p: |                        @.DrivingHome := true;' f% _) q, J5 t2 l% ?
                        rgManager.tryToStartTransOrder;5 c( ]" w! e/ `* F6 O# f% T* P
                        if @.Destination = void" H0 ]- X, d/ P# k: Z" }) m, K- q
                        then -- no transport order for vehicle @$ z$ I2 t' X# q  u8 `
                                @.Destination :=6 R( D% K3 {5 T
                                rgManager.nearestFreeStation(@,track.~);
( K: L5 q# R, P                                newDirection(@);   & K# ~" i/ E: Y0 J, x4 p$ C2 i
                                if @.Destination /= void then
! ]+ ^0 S9 [* w" U, n. o7 K                                        @.Destination.NumReservation :=
8 o4 r, ]9 D9 x1 B$ Y8 Y: v                                        @.Destination.NumReservation + 1;
; V4 \, q, d, o0 V' D                                end;! ?! k  B. v) c9 D( Z6 I! }
                                @.CurrIcon := "drivingHome";
* {% Q- r8 f) w" {' K" A4 }, n                                @.DrivingHome := true;8 @) V2 c! m5 m! k" X1 i( O
                        end;
, q7 A. N6 e9 k" _                else -- the vehicle @ is empty, both vehicle and part are in the same dock station% P: i& o! v( i) W% L
                        part := @.transpOrder;- [/ E+ n( T- e0 `
                        part.move(@);-- load part1 `8 I% J2 C4 w3 U' Q% \
                        @.CurrIcon := "load";( G6 x$ M9 T9 o( x6 l
                        GlobalDistObj := part.globDestination;
  W/ j5 z& \( f, ?# m6 R6 d* p) X" @9 ~                        assignLObj := rgmanager.rgAssignL;
( R. w3 U) Y4 C6 P4 b                        row := assignLObj.getRowNo(GlobalDistObj);. A$ b) L# b0 ^- U! L* r4 }# s
                        if Row = -1 then -- since 70# \% s; E# h- O3 B% a  b2 S
                                if lan=1 then. G2 i5 }# Z$ r1 U; W/ |0 J, w
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! q9 M/ R) d- J- d1 n; E, ~! H
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
8 I: _% j% F( x% x! X                                else& v& A& P* B/ f# A! {6 ^
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: O( F" E7 }: s
                                                to_str("in docking station: \"",?.~.name,"\""));                                ( d+ l3 n: j" t1 U8 b9 l$ |5 k( b
                                end;  E1 Y5 K. o: k4 k9 I% _+ v. x# O& C
                        else
9 ~1 }& |4 P5 z1 e* I- y7 Y                                @.Destination := assignLObj[1,row];
' f2 e5 g6 H. e* g9 D0 X                        end;                       
5 F) H" \" s0 H                        newDirection(@);
4 s( b% W6 g# v9 V  Z5 l                        @.HasOrder := true;
: F+ m8 {$ S$ z. x1 F7 n                end;
: K4 G& S( w( u! X        end;
2 y. k/ M: S' E4 c5 }/ ~5 l1 V, Pend;        -- of the method
( y, v) {- J+ N7 ~3 g- y, a
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 " n4 e/ _  H% y

' h8 A* g; B3 b  `; t这是AGV_putin中arrive的method。3 X* o% S  p" [4 V" C

# Y! }" M% k  a7 x当到达物料速度越高时,这个报警更多,
+ G* m) s7 U+ d$ G, E+ y: d% \) {可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。0 k; f2 a, y+ r
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
' O& k+ P! B$ \- y/ c- T7 H6 t" X" ]8 g
另外一个小建议,就是move,所有的move都可以这样7 X4 E% Q' `& l7 S: \; L. L
if not move() then debug end. a4 u3 Y2 X+ c) L! g$ d
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。9 G* X, a# N% k9 |- g" X
plant simulation中的free libraries有AGV模板,! A  v1 k5 K3 y* L2 {: Y
里面也有案例。
# `% h9 a$ ], {& d  a" M& _/ c0 P我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
2 C0 o" g5 u& k0 o! R/ ~9 a. Y" F! J0 t  w( S* A
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
6 T0 j' \+ E1 o9 q( H3 D7 T6 e0 D
4 v8 c0 Y% A6 Q7 p0 c. x) L9 i那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 5 j  h: D# Z, y; B; h! z3 e4 i" R
这是AGV_putin中arrive的method。0 V1 {) H& A) H6 m& k$ I/ G

& {2 o" B& r% U当到达物料速度越高时,这个报警更多,
5 Z, Y) [0 }% z: m( |
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-28 18:29 , Processed in 0.026362 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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