设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9354|回复: 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'
+ J: z( _. u7 |, t( C1 j& ^1 u, R*/& L7 D9 A7 v' S7 t/ R! f
is
6 r0 e( }# w- b2 ]* H: W  a        part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 b! ]7 _) v: ?5 M4 X. e
do( _. Q+ q. A2 c! z1 z& K9 |
        Lan := rootfolder.Internal.Tools.AOLlanguage;3 e$ O7 X# R8 L# L) q3 ]
        if current = @.Destination -- else return, Z' b7 d! j( ?
        then8 R/ r0 E0 n1 ^0 i9 z  N3 A1 p/ _
                @.Destination := void;
/ `5 s, W& @  D* X- _                if @.occupied then; S4 q) t+ W5 V$ `: a$ s
                        part := @.cont;
; ~9 k6 [1 b! a  U# d/ R) v                        @.transpOrder := void;0 E0 ^' r* L) x& J; N' r
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 f+ ?) C8 v- [
                                @,root.eventcontroller.simTime);( C2 r) B5 j9 r% t
                        @.HasOrder := false;$ r5 ^% O4 x) q8 O7 W, P+ r/ T9 {0 G
                        @.DrivingHome := true;
. g8 I( v2 _( k5 {                        rgManager.tryToStartTransOrder;# h* f+ Q- ?. k, m
                        if @.Destination = void* G1 l4 P! t& G" ^
                        then -- no transport order for vehicle @
& l8 c% d  p" d+ b& g                                @.Destination :=
1 Q8 j" g+ R& B1 {3 P$ W4 B: B                                rgManager.nearestFreeStation(@,track.~);
' [4 o& M6 z, C/ q0 r6 G8 L) X. E                                newDirection(@);   6 X" X; F# k; G7 Q
                                if @.Destination /= void then" u6 d0 Y. U  A- v
                                        @.Destination.NumReservation :=1 h! D% P$ o% G6 p3 i7 s* U
                                        @.Destination.NumReservation + 1;
6 Y! I  X7 a8 x7 T                                end;
8 |, W0 K9 o4 N, X" M                                @.CurrIcon := "drivingHome";
% E' f3 D2 _/ ~1 ~  [. t0 a* b4 M                                @.DrivingHome := true;
, k( Q% h, J( N/ N! o: x5 P                        end;$ I0 u- W! o" l
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station* p& X* `/ m7 _. w+ v
                        part := @.transpOrder;' z# `+ P# w: ^; |  @  Q. M
                        part.move(@);-- load part
. N$ |- D+ v+ K; }" w                        @.CurrIcon := "load";, M  k, \6 t9 K6 _  \
                        GlobalDistObj := part.globDestination;
8 f6 ]7 n% W1 y$ S) o                        assignLObj := rgmanager.rgAssignL;* h9 d2 b% ]- r! B$ O3 w: _
                        row := assignLObj.getRowNo(GlobalDistObj);
4 B8 e5 B: i) V. F                        if Row = -1 then -- since 702 f+ z' _+ _9 s4 {; e2 |* N
                                if lan=1 then) i$ Z( i! h6 ~! l, b6 H6 W
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( s: L7 U: T& G* x& P& x                                                to_str("in der Andockstation: \"",?.~.name,"\""));
  L. C, W% }, X4 X) }) p' Y                                else
/ B* }7 K4 q) G" Z+ o                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; F8 m# z4 Y6 ~, `0 E2 z8 s
                                                to_str("in docking station: \"",?.~.name,"\""));                               
: G! m: y. I( N                                end;
& B0 a& b3 e- e  k7 K                        else
5 L: C& }+ x; ~/ Q; S* u                                @.Destination := assignLObj[1,row];) g% \1 t8 G9 U0 s
                        end;                        " `# R! A/ x" W5 y( M) M- D6 T) ^
                        newDirection(@);
' W4 \4 Z3 o: |9 x0 @7 Y                        @.HasOrder := true;/ S4 A% L% T5 H/ |) Y  V
                end;& O- E0 _; i& y" c
        end;& Y. I' l5 X) m! w
end;        -- of the method
6 A5 ~  U7 W1 j- _5 @$ `
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 3 O  h1 z$ ]4 _- y3 k6 g

5 {+ U! [$ Z- ~2 W1 N9 j) j- O) y) I这是AGV_putin中arrive的method。/ y# P' W3 T0 s; }3 P

* G' z( ?/ U2 g  \  f当到达物料速度越高时,这个报警更多,
9 M$ B5 f: S1 i8 Y7 U0 }可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
( Q& |3 r; \( _! P程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
4 o; N3 ?" O  I/ R. r8 E
/ r/ v! ?' u7 K6 _另外一个小建议,就是move,所有的move都可以这样
" g: B. T) q2 O/ X* r6 Pif not move() then debug end: W* f, t% Z* a/ e# S
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。$ e* i+ H5 ^5 U* Q
plant simulation中的free libraries有AGV模板,
8 P0 @( ?# s: l9 d+ o+ W$ a( B里面也有案例。
  _7 A. C: X% {/ T) _* F我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。; u4 o6 w+ [; ^& b) Y4 Q* X  a
4 z- V+ F, p; i- X
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 0 ^& q# w# A1 o" z/ o1 s) N
0 H8 ?9 v. H& u& e0 M
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 / W& Z/ H" i0 v6 V+ S; l
这是AGV_putin中arrive的method。; u1 r% e' J! j, j
8 v5 ~1 Z/ g. c7 v
当到达物料速度越高时,这个报警更多,

' z' C# t# G4 q另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-27 11:06 , Processed in 0.019358 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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