设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5342|回复: 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'5 |  k4 [5 x4 f3 h$ Z7 T
*/; Z$ l, u+ f. g( [
is3 F3 y/ m  N# ^( V0 T* b1 I) B
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 T! q) v  l2 a. T3 f7 ado
, k9 ~: G, S9 k3 z2 E6 w        Lan := rootfolder.Internal.Tools.AOLlanguage;. y: B1 }" t7 I# f$ m, K/ Y: N0 H
        if current = @.Destination -- else return
. g  G$ S) u& k$ U: T0 V        then
4 R) ~) u8 j' O8 [1 y                @.Destination := void;' ~% W; I" o  O' N
                if @.occupied then. q2 I2 ?, j7 L8 J- a) g  ^( R) m% r
                        part := @.cont;+ V! z( U$ q- S2 `& y* S
                        @.transpOrder := void;: B6 q2 u5 \1 N9 W1 i9 C2 E# R
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! Z' W+ n9 E" R1 z3 Z
                                @,root.eventcontroller.simTime);
. y* g0 i0 E6 M6 y7 U" A& c- O                        @.HasOrder := false;
1 {, ^. @: ?9 b9 P: n                        @.DrivingHome := true;
  L0 ~2 ^5 x3 W/ j- y5 r                        rgManager.tryToStartTransOrder;& Y- L- p9 M& p& P- @
                        if @.Destination = void, c% b' I# M6 L# a8 r$ z& u
                        then -- no transport order for vehicle @1 n+ K8 u% P4 D3 A) K6 R( I
                                @.Destination :=7 i6 d9 U4 D  F3 r; c5 \
                                rgManager.nearestFreeStation(@,track.~);+ ~" Z8 I, N8 s" f) q" u
                                newDirection(@);   
. W9 z3 g5 p, M8 q                                if @.Destination /= void then* y$ [' R" Q1 |$ ?" I# D% K1 x
                                        @.Destination.NumReservation :=
" p$ v' _3 y, y/ D& k0 y- t                                        @.Destination.NumReservation + 1;8 K% j* y' _+ |1 h( B( [
                                end;+ L$ |0 u- _1 \2 ?% N, O3 e2 L, g5 d
                                @.CurrIcon := "drivingHome";
( ]- b- Q# q( w, H                                @.DrivingHome := true;0 L+ q" H8 M) e6 i
                        end;
* @9 F5 k  l9 M1 n, ]  F0 S                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" \+ E& y- `+ i# G" u6 [                        part := @.transpOrder;
  }3 b8 G1 e2 A                        part.move(@);-- load part* T' h4 f1 u, l
                        @.CurrIcon := "load";
  c. T8 W1 d% Y" n4 V# b                        GlobalDistObj := part.globDestination;* r" ]# q" D# V( J
                        assignLObj := rgmanager.rgAssignL;
$ ^$ `' L$ T) ~8 C0 _( j" \4 Y3 V                        row := assignLObj.getRowNo(GlobalDistObj);
$ f% k  L! h9 a/ Y3 x- e  P                        if Row = -1 then -- since 70
* [$ ?9 S9 {9 y/ s                                if lan=1 then; }0 _0 g0 i# `+ N3 L; X
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( c# U. M1 Z2 E0 Z# ^; Z                                                to_str("in der Andockstation: \"",?.~.name,"\""));
. \+ p' u! V6 l) @* S2 F                                else, A% p% z3 M+ F. ^) G, g
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 _" q9 P( Z* f+ G                                                to_str("in docking station: \"",?.~.name,"\""));                               
. R/ B5 {# J4 Q: B$ \                                end;
1 t5 M& \8 h& `/ P3 m8 }+ b                        else8 x" ?2 J( @/ J! I
                                @.Destination := assignLObj[1,row];4 ?* ?  h. y8 J- k
                        end;                       
  u/ i9 o/ z) C% Q! f9 p                        newDirection(@);
& [/ E, |" q+ r4 q1 i# }0 f                        @.HasOrder := true;6 C2 T/ l% z; P8 P" `0 O
                end;  P" P1 [3 x3 I; G5 A% i
        end;
9 j% {; y6 t3 C; Zend;        -- of the method7 x: }( X$ i  N/ k
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ' P  W9 B1 \2 ]
! \5 d7 _' [/ d2 B. p' [
这是AGV_putin中arrive的method。6 l  e* `7 Y0 H0 z' M

9 A! o) r  y  F当到达物料速度越高时,这个报警更多,
: B, O' `" \# y2 A可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
# R$ u+ p; n4 q' j/ C程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?: t" l. s% s) Z* C
9 a" s* p: ], Y! T
另外一个小建议,就是move,所有的move都可以这样* b8 Q( q7 I3 v5 n
if not move() then debug end$ x% V2 L: e3 \
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
0 D2 d3 W9 e3 ?( |* O" Iplant simulation中的free libraries有AGV模板,9 @+ c- O3 B. V. |- G
里面也有案例。; h' x  S0 r0 _, h
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
$ F. Q& W7 M9 d3 P- z  I& r- f
$ Y$ {+ L! ]: p0 S, A我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
% N$ z& H8 F' l8 o" e. z
3 C: V8 @4 R# o7 r- T那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 : K+ m4 ^' T3 L! z
这是AGV_putin中arrive的method。
6 ~* s5 X( o& I3 j6 r  ~6 Y3 t3 _! \# z) v6 a
当到达物料速度越高时,这个报警更多,
& E; m2 x( Q0 m
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-13 22:02 , Processed in 0.020139 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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