设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7247|回复: 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'" b5 U8 p7 E/ V  \7 a6 S9 `+ ^
*/
% @1 W8 a/ Q, Y* t- Ais
+ g0 h! Z$ w7 X1 e- a& r9 T# L8 K        part, GlobalDistObj, assignLObj:object;row,Lan:integer;. G+ ^4 r" @% m
do( |9 Z1 R' A) _8 w
        Lan := rootfolder.Internal.Tools.AOLlanguage;
& U8 x0 n5 ?$ z" V: d0 p        if current = @.Destination -- else return
% Q9 ]6 u: C3 {9 h6 z) G        then, f& n, ~, \+ o( n# [
                @.Destination := void;1 U$ I* F  D" }6 X5 c; x
                if @.occupied then
. n' t' B. P2 q, m- _                        part := @.cont;
2 O9 y; l, i; w2 ?                        @.transpOrder := void;# q" ?. y8 f: z9 u  b- s, q" j; D
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 R3 K0 x% Z6 b& T* X4 [
                                @,root.eventcontroller.simTime);
. I5 x7 }# Y; t! a) a8 K6 s                        @.HasOrder := false;
5 f8 `' B0 d1 E# i( g                        @.DrivingHome := true;
5 W5 H5 `* P1 v# ^& B) Q+ {2 ]                        rgManager.tryToStartTransOrder;9 ~: s7 i5 n: v) A3 C, I' l2 ~/ y
                        if @.Destination = void
0 Y$ q% U' W* U                        then -- no transport order for vehicle @8 r8 @' m( {4 N! H* ?7 z
                                @.Destination :=
( }3 Q( `4 l1 K6 }5 @                                rgManager.nearestFreeStation(@,track.~);  Y/ x! b- H. b' z: X
                                newDirection(@);   
" J- e+ {4 g" |. @% _                                if @.Destination /= void then- r/ a. M& S1 Q9 s9 r5 V  s4 C" w5 t; ?9 t3 J
                                        @.Destination.NumReservation :=
3 m& K6 M9 u5 w                                        @.Destination.NumReservation + 1;/ s! X8 \2 s7 I7 a% c6 ?
                                end;1 x: h  j+ \  S( W  R2 f
                                @.CurrIcon := "drivingHome";
4 h, f* \7 R( S  l5 J1 G* ]                                @.DrivingHome := true;
! z( ^& U. Q; X$ Q                        end;
8 i- [# p  ~: Y4 h! R9 }5 c. h                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 _# P! o2 z* ?2 W5 j# s                        part := @.transpOrder;
! F/ W+ _3 ]5 d# u6 o                        part.move(@);-- load part
( Z% A5 W. l% T, o5 A7 H                        @.CurrIcon := "load";1 n& o6 ]* _  G, ^9 R0 |$ c7 R
                        GlobalDistObj := part.globDestination;
0 p+ A6 F4 O0 @) n) J4 s+ `; T                        assignLObj := rgmanager.rgAssignL;
# y  ^3 `! ]  [1 c                        row := assignLObj.getRowNo(GlobalDistObj);
; e, e# o3 E. {/ H9 n8 }$ U) R                        if Row = -1 then -- since 702 d, d4 ^! N+ H
                                if lan=1 then
8 h( I7 I0 Q6 t# [% U5 u                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),  H- V1 @' L- \4 _6 {
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
1 Z4 X7 E( \% p9 ~' K/ J+ _  S                                else
, H. K9 N) F, q# b$ k                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) h" A' l- p( r                                                to_str("in docking station: \"",?.~.name,"\""));                                - p# E3 ?8 q6 p5 r' P/ p
                                end;
* i8 o$ Y+ }  y8 u$ C                        else
- a2 m! d- x9 {, t' N5 i3 l: B( U! C                                @.Destination := assignLObj[1,row];1 p4 q( y' i* O' e0 S2 L# f" E
                        end;                       
3 {/ _8 \5 i) b# }                        newDirection(@);
2 i5 r# z5 |- Q, e: q/ L+ J' q                        @.HasOrder := true;
( ^( a; }$ R+ S" g: C' c' q/ X0 r+ O                end;
1 _) b8 p( ?7 t% R9 f1 ^        end;. H  h' `8 Y+ S
end;        -- of the method
# j1 h! E- X' O; @) e" }: z
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 : A, z7 V! }% O3 P+ a
" f/ n" J0 `$ ~' n4 A) a0 k
这是AGV_putin中arrive的method。
+ i2 v4 {+ j6 _' y- E0 L, O1 Q1 ^( S+ |& e, a" B; `2 X
当到达物料速度越高时,这个报警更多,: a% r* X9 l6 D0 t0 N
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
( }6 \: f: P; K+ v2 \程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?- I3 n" V0 t& i1 U& f) k8 l

- T! o2 s" X3 Y9 h另外一个小建议,就是move,所有的move都可以这样
1 D8 g8 w4 |3 t2 Q2 |7 |# G6 Wif not move() then debug end
3 V; d* T. j7 {" A/ `6 m这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
' `$ V  \' d3 |% Nplant simulation中的free libraries有AGV模板,9 m6 u. l' {9 _- w" l- {; L
里面也有案例。/ r8 A4 k5 W9 b  @  A
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。* W! a0 Y4 \) F+ z; g" l2 m

( _7 c; [1 @5 }- F: d1 n: u* m- |& N我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 * ]4 ~+ U9 b3 i9 [5 o7 N# |
; Z, H; J8 S! j9 l, u; ]$ I+ j
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 # g  r( i/ L, o4 ?
这是AGV_putin中arrive的method。
8 k2 _) [% D2 k4 g' e0 g: }3 e+ V+ h
当到达物料速度越高时,这个报警更多,

8 }3 x) U1 Y' t% b5 H/ s另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-30 09:37 , Processed in 0.020272 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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