设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6580|回复: 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'
: H# _- ^" i% {' S6 [% L; e. D*/
2 H: h& X6 b! D8 i7 vis
8 `0 |% v- a5 M: r! S        part, GlobalDistObj, assignLObj:object;row,Lan:integer;) y0 v$ Y  B7 Y! Y7 p
do
: p: R( }6 u9 p5 S9 F        Lan := rootfolder.Internal.Tools.AOLlanguage;! V& ?# x+ t. |2 v
        if current = @.Destination -- else return# N6 c- }( N+ U1 G# N) M3 b8 y
        then; _& d7 _, A' H2 p; h: O! {
                @.Destination := void;. ~; C  }; t, ^+ c4 y: a1 }" f+ l
                if @.occupied then
( F# L; b9 ^0 U; S  Q) }* T                        part := @.cont;4 V4 v0 t, D( _# W$ o
                        @.transpOrder := void;% i8 g: G1 n& t& E. @
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ A6 V) T7 @+ s" G! l3 h8 M! e- f                                @,root.eventcontroller.simTime);
/ f1 v, c2 R( G/ O; ^4 Z/ I# a3 @                        @.HasOrder := false;, `; D" }$ D" w6 f  K( P. q0 t. l! s
                        @.DrivingHome := true;
- w; X: p7 m5 \& c0 g* v                        rgManager.tryToStartTransOrder;
8 [3 |" l  y$ |' q7 b                        if @.Destination = void
$ E0 C" P+ V$ {6 n5 o/ _                        then -- no transport order for vehicle @
, C7 R! k7 ]' y0 D; ?6 B                                @.Destination :=3 R% {. d' O4 {9 R9 k+ i) s0 W
                                rgManager.nearestFreeStation(@,track.~);: R  K* R$ D, p. f* W
                                newDirection(@);   $ p- u! K9 A3 p; B
                                if @.Destination /= void then( s! q: v0 p- }7 s+ I2 a& i' X# X7 }
                                        @.Destination.NumReservation :=- q; o+ |) A, U# w
                                        @.Destination.NumReservation + 1;
% R( D( Z6 }% l: ]4 n( P' E, k" ?                                end;
/ W( N7 ^: B' M4 M  e; c                                @.CurrIcon := "drivingHome";
9 D) f, W$ u) c7 A! l2 f                                @.DrivingHome := true;! K% a$ t& S# U2 i0 Z4 Y! q
                        end;
& D8 r" S  J- ^                else -- the vehicle @ is empty, both vehicle and part are in the same dock station; i" v$ n+ J+ v+ E# c( a
                        part := @.transpOrder;2 S2 D0 L' ~$ p) H
                        part.move(@);-- load part
/ K# t- N+ B$ a+ q8 ~                        @.CurrIcon := "load";
  y5 C( }4 m2 K& ~% h/ e                        GlobalDistObj := part.globDestination;7 X2 u! I1 {/ Y+ f1 A0 a$ d8 U4 N
                        assignLObj := rgmanager.rgAssignL;4 z% Z  W$ n8 N9 Q$ d) Q/ x# D
                        row := assignLObj.getRowNo(GlobalDistObj);
2 c& j. h! h+ Y: v3 c" f7 y                        if Row = -1 then -- since 701 N0 c2 r1 }7 e
                                if lan=1 then
( u- Q/ t# X; i. a3 E& R, V                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# D, s/ y6 g% c$ X: K6 w1 u                                                to_str("in der Andockstation: \"",?.~.name,"\""));
2 N6 t  }- S- R9 d                                else
  N. o/ V. s- K, P( i6 `                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 @+ \5 L+ a/ [. ]                                                to_str("in docking station: \"",?.~.name,"\""));                                # S5 F2 h( _- I" L
                                end;
9 v6 W' H* X/ N                        else  u3 f' w2 r/ d. g& X  v
                                @.Destination := assignLObj[1,row];) u. F9 z# G  |5 s
                        end;                       
' k9 g  m- D1 ]                        newDirection(@);$ E* v2 V. ?' i3 t& @
                        @.HasOrder := true;
0 v2 {& P$ Y9 f0 t3 D! [                end;$ F2 h* \$ b2 Q0 o
        end;0 Q. |5 P6 B7 k3 _7 |
end;        -- of the method
0 B7 I$ t! {% h- s" q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 , w& ]1 z1 A' B% @. i6 I6 h6 @  D

7 J7 ]4 a3 }. L& j这是AGV_putin中arrive的method。
6 x4 M2 o2 T1 b
' }; }6 s- w: m  i9 Q! c1 w当到达物料速度越高时,这个报警更多,
0 s; Z6 j1 z7 \; s9 s, I% h可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
$ Y* m  V/ K3 j8 G" U程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?2 F0 }( c- C1 }/ h

2 j% T8 D6 ^4 ]7 i8 L另外一个小建议,就是move,所有的move都可以这样3 l2 |2 y( h5 [
if not move() then debug end. D9 l! `- E7 l- S8 T5 w& ^
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
( p% J# |6 L/ ?: _plant simulation中的free libraries有AGV模板,
  w. R1 A* j% [) Q4 V8 c' T  x/ p里面也有案例。
6 F2 d6 ]' A" b# `* P* V3 ?0 c5 S& ~1 U我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
# X: j$ A6 |' s: l) N; l
2 V7 {" q: c+ H& O2 k7 y+ t我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 2 o6 C3 E; ?  |  x: ^) M) K

% P5 N& c2 M( v8 W那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 % @/ v+ g# R" [$ s( \3 v* c: J3 N2 ^
这是AGV_putin中arrive的method。
, d6 t4 a: F& g. j8 l% u3 u) k( L2 X6 r+ ^# \( P9 R
当到达物料速度越高时,这个报警更多,

) P7 H9 K% u; {2 Y另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-14 02:21 , Processed in 0.019535 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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