设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8531|回复: 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'8 l: }" E6 d5 v$ Q/ w3 j8 h
*/: E, i, q0 G( s3 a- {( Z- ~* Q
is
8 m, V- @, Z) A& ~3 a# }  q        part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ n- o- k! f  U6 z9 J
do
5 O6 B8 d: y& J8 f        Lan := rootfolder.Internal.Tools.AOLlanguage;
1 y  k% Y( |+ w( @1 l" P1 k- h        if current = @.Destination -- else return
- t- x1 {! W9 q2 H        then
* }& _/ b" }& k! X' y$ d" L2 ^8 x0 ?                @.Destination := void;
6 y' }- ^% z- a# }                if @.occupied then7 f! k6 P' D5 _0 O
                        part := @.cont;
  g6 a, x8 Q; h                        @.transpOrder := void;  ?5 w( v0 t" B5 Y+ W' @$ t
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) X& o2 M* w7 }
                                @,root.eventcontroller.simTime);
. j7 h5 E. u6 w; y" M8 u, Z$ v                        @.HasOrder := false;5 s* T8 `2 v0 o5 `$ h0 W- W$ m
                        @.DrivingHome := true;  L! z1 \9 }& {" D& Y
                        rgManager.tryToStartTransOrder;' K: F" v0 Q4 B! p
                        if @.Destination = void8 i7 j; b( K9 t$ c  N/ S7 Z7 m
                        then -- no transport order for vehicle @7 s: I* s6 Z/ H% q# V; O0 ?
                                @.Destination :=
. L# }% B* ]. \1 [% q8 x* Q0 g                                rgManager.nearestFreeStation(@,track.~);% d, \8 [2 z; I$ n6 @4 E  w
                                newDirection(@);   
8 Z, ?: X& \' X: ~9 `0 \% c2 \                                if @.Destination /= void then+ v* v7 i. I  r' K* Y
                                        @.Destination.NumReservation :=
4 \& Y' P) A8 U3 v& J! J0 |8 `                                        @.Destination.NumReservation + 1;
7 W3 ~9 W, a8 u9 n                                end;
2 J! b7 m6 a) _4 q                                @.CurrIcon := "drivingHome";: {3 z# n1 ~: U9 N) A1 M3 }
                                @.DrivingHome := true;
/ i) M8 N9 e! U0 q                        end;
# I* s7 \. N4 C6 K; r! S( E' r9 @                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* ], J! ^  x% ?                        part := @.transpOrder;
. i. Q: |/ |9 F2 e0 b; `                        part.move(@);-- load part
  D' M9 w# K1 c$ V& s7 X                        @.CurrIcon := "load";
* `# Q3 I* y6 h1 C% K  u2 q                        GlobalDistObj := part.globDestination;
2 v7 l+ g  U) S. a( G: e/ X6 h                        assignLObj := rgmanager.rgAssignL;
6 W, E5 y2 J* {/ A% W                        row := assignLObj.getRowNo(GlobalDistObj);6 D. O- g/ j! c" r1 F
                        if Row = -1 then -- since 70
" {, o# `0 L) V7 t3 c                                if lan=1 then
: q- k; w) O, _: h  V6 _                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ \1 B7 T1 z0 h, f) J! Q3 W, _                                                to_str("in der Andockstation: \"",?.~.name,"\""));% `; T$ Z9 [" n; E; d
                                else
3 I3 L: C) ^( c! f' g" L                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 T' N3 X) [2 l* x- |9 O                                                to_str("in docking station: \"",?.~.name,"\""));                               
' G' n: L. n8 I( g                                end;
' y/ P0 A, F9 o  }% d                        else$ \- V  E+ b0 u2 w# g
                                @.Destination := assignLObj[1,row];
; [# E: v5 Q, @1 s% U                        end;                       
( ?5 p  G( [6 n9 l6 L. K) Q1 W) b8 \                        newDirection(@);3 [2 m% @3 y9 P3 k
                        @.HasOrder := true;* `7 `* ]1 ]: v6 B# x
                end;
1 T& G% O+ Z8 |+ b        end;
; e9 ?( {5 u, F/ N6 X9 Oend;        -- of the method8 y( T" [+ E8 \
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 , W: d. `' x9 _7 l# q; J

4 K, p$ D$ [& z* Z" |这是AGV_putin中arrive的method。
5 D' s4 w1 K- R- u8 l- }" d+ w" d
! ~/ J7 {, [7 d2 v) v0 @3 y; x当到达物料速度越高时,这个报警更多,% z6 B- [% N$ }0 ]' b
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。; p. \8 L: E/ k0 |. H
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?6 d6 _2 y. Y8 K/ O3 v. O, M

& W/ J+ K1 D9 g. x6 I1 E2 ]* _另外一个小建议,就是move,所有的move都可以这样
# I2 q4 r2 Z& ?if not move() then debug end
- E1 E! r5 r' b7 T7 u这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。6 ?( e1 y3 p4 W
plant simulation中的free libraries有AGV模板,
2 T6 n6 e; J0 J  p% f" T# x& l里面也有案例。
/ \+ p9 {, S; D* J, N0 {; J# r我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。9 b/ c! q+ F/ ?9 m  ~+ D

/ U* h+ y' [. E' C  b4 \我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ( L* b) L8 V0 L7 T& ]" l

* W) g7 g' d) K! E) X! b那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 2 ?6 i4 x, \0 c: z
这是AGV_putin中arrive的method。0 a) E1 J; y/ J" f' Z  r+ D6 V

% p1 j" Q0 M0 F. G7 }: W当到达物料速度越高时,这个报警更多,
7 x* q- F+ }0 b8 ~9 W& F9 X2 c
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-9 12:29 , Processed in 0.020173 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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