设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9352|回复: 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'
- c  p8 x; y$ e- q*/& {8 u7 o* O. Z  P  S; e+ o- p
is4 N) D/ a" b# A& @
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 k' x! t- @: ~* e$ Edo
$ _6 a  ~7 s8 C; h  }        Lan := rootfolder.Internal.Tools.AOLlanguage;' o$ }" D/ j5 J) L0 C' W6 N
        if current = @.Destination -- else return
0 [7 E+ u5 k; a( `        then! x5 e- ~; b& T( U7 e; a
                @.Destination := void;
8 ]! Y) R( a& D5 U/ [$ f* M                if @.occupied then
/ S& D7 W: o$ K) J3 q' a) O                        part := @.cont;6 r/ v* {7 t* w- N, S
                        @.transpOrder := void;
/ B! M, a& b  a# f- l                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 ?& m' \! R5 a: [
                                @,root.eventcontroller.simTime);0 K( k# Z$ }& D+ c# G
                        @.HasOrder := false;- u7 [  t9 Q% q4 A! y5 [0 @6 C
                        @.DrivingHome := true;, h6 `( s' U" }' L/ M; [1 U
                        rgManager.tryToStartTransOrder;5 R# z- t  ~3 K& A/ P, E" ^
                        if @.Destination = void5 G* V- c  I3 L* i
                        then -- no transport order for vehicle @+ w$ T9 P3 X  W9 i) T
                                @.Destination :=
, @) T1 B0 D/ W. T4 ~! h) @/ b                                rgManager.nearestFreeStation(@,track.~);7 V+ i  U) O; @/ ^5 t  N; P
                                newDirection(@);   
' L/ S4 `; U) ]. X                                if @.Destination /= void then3 ~& q1 }1 g4 y
                                        @.Destination.NumReservation :=
7 s1 J# K8 q' q4 I& E2 \9 G                                        @.Destination.NumReservation + 1;: [9 g1 x5 [& Z
                                end;
1 f0 a: O1 {; F, Z8 k                                @.CurrIcon := "drivingHome";9 m. l8 R, z! W" m, K9 v. l! }6 ]/ S
                                @.DrivingHome := true;
1 y, E0 N+ |4 }& m) W% ?                        end;( o9 W; K8 m2 D" T5 O# r6 V
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ Y6 Q# _" ]* F# I( m
                        part := @.transpOrder;
, a5 P$ `* ?) M1 N1 ~                        part.move(@);-- load part) [# w0 W% o5 F2 P
                        @.CurrIcon := "load";6 j2 P# y" S( ?* T- @. O  e# c6 [
                        GlobalDistObj := part.globDestination;2 [/ _% h& X3 z% g4 d+ {% z
                        assignLObj := rgmanager.rgAssignL;
' U  d6 x3 B/ Z& i: a6 f                        row := assignLObj.getRowNo(GlobalDistObj);
3 m" [# r, L' R0 b5 v                        if Row = -1 then -- since 709 L, [2 D0 [- f0 B3 V2 S- M
                                if lan=1 then! s- ~3 j! s3 ]4 `
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& z+ k7 C9 a: }7 X
                                                to_str("in der Andockstation: \"",?.~.name,"\""));1 `: S- e& l* N; y9 \
                                else
( g, b  X' V; @5 X2 V" I9 ^+ _                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 ], a5 X1 u8 u7 C                                                to_str("in docking station: \"",?.~.name,"\""));                               
/ v. ]. X, U8 O% ~: q( G; t5 z: g                                end;& ^7 [$ |% J0 T
                        else& W: a) E: v0 j% [* ?/ T7 O
                                @.Destination := assignLObj[1,row];
5 B0 y1 i6 u- w6 K1 S                        end;                       
1 G( z8 V# Q. p8 y5 ~  O8 L% T                        newDirection(@);6 ]3 q- Q( G% A& q; L& I2 U. w
                        @.HasOrder := true;# W0 Y9 c' _) W) l3 N# c
                end;
( j8 h0 j& d2 Q: P        end;2 \0 q$ p6 j$ }. Q# i% |3 _( P
end;        -- of the method
. R! q8 |& j% j
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 # f' }# k6 k; N  n" f
8 d- t" n' l5 ~6 T* K6 I
这是AGV_putin中arrive的method。
2 G: B  U$ o- s+ I& u3 }; F* k! e5 w
当到达物料速度越高时,这个报警更多,
$ ]0 F" g: y2 a1 T1 [' C! I, W% z) E4 o可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
8 W8 \1 h. L4 z% z- D& p程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
* [5 J( U% F7 c% Z6 o5 h6 E: b8 L% A3 ?5 r
另外一个小建议,就是move,所有的move都可以这样
0 A% T3 H: f3 |9 Sif not move() then debug end, [) a! A- |7 i) g2 Z2 ^* V3 z1 l
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
* F! p9 u3 a5 x" o+ Hplant simulation中的free libraries有AGV模板,
# `3 q& N; p: {: @里面也有案例。
- g/ S3 J6 N& ^# C( k, M. ^3 t) Z/ q我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。% B1 v: }; q, J6 C
# G5 }/ j: G- w  C
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 5 ~$ A; x: q' Z0 \
: d+ K( }# d5 @
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
- I' w0 b- j. g  R5 K3 n. e( H/ v这是AGV_putin中arrive的method。0 a& B' F, v/ M9 n& Y
  _& @6 {0 P8 T
当到达物料速度越高时,这个报警更多,
9 d- n5 a( t; n; i7 y' s$ G
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-27 05:27 , Processed in 0.016460 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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