设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9500|回复: 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'
6 a& u% L& S' X, H*/, C  @+ G1 A& Y
is" a) \9 i7 u  R1 ^& u: U
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;, E* x9 T* H- x9 n3 b3 [7 v! {# t
do
5 h& k9 B! O: y2 N6 o1 g. c2 w        Lan := rootfolder.Internal.Tools.AOLlanguage;+ k% c1 m4 x- p6 R  `
        if current = @.Destination -- else return
2 C3 Z2 c0 Z- `% a4 A) v' g: g        then
, D+ O% O* u# L) q3 F& W7 G  R. J                @.Destination := void;- Y0 j/ Y( j" W5 V* M9 K
                if @.occupied then3 S( c3 L) ~5 o9 m5 @) c
                        part := @.cont;1 M7 V: |6 @! _4 N2 N
                        @.transpOrder := void;8 _! I' ~3 r0 f4 o
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 a' P  N. q8 A! X0 M! q                                @,root.eventcontroller.simTime);; v9 E  l# m  W: V; N
                        @.HasOrder := false;
6 m+ S( c7 A2 l6 W5 q                        @.DrivingHome := true;% N9 ~* {; y, ~  ]
                        rgManager.tryToStartTransOrder;
- ^: ~, X; k  i8 K0 w                        if @.Destination = void
. x! x: k  x/ U" N                        then -- no transport order for vehicle @. }' f/ @4 [# f1 ^& r& l3 @
                                @.Destination :=) x4 Y( [1 A1 u6 L
                                rgManager.nearestFreeStation(@,track.~);4 N6 O" w+ v+ x0 o% h
                                newDirection(@);   
3 z, E; E# I6 T                                if @.Destination /= void then7 F, k- d% k3 J4 A! }* C/ I
                                        @.Destination.NumReservation :=
* Q- |$ D1 k. H/ `                                        @.Destination.NumReservation + 1;
* T2 }( f5 n% K1 t                                end;
; s( N6 e% d3 H0 a! i! Y7 w                                @.CurrIcon := "drivingHome";1 }5 n# b$ V+ Z  |" F6 [5 o
                                @.DrivingHome := true;
$ n" H% s) S9 W                        end;- i5 z9 y/ I1 p2 b
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station" ^$ a8 E8 B* F' a& `& E
                        part := @.transpOrder;, c$ W- s3 ]% n$ X# t' N2 o
                        part.move(@);-- load part2 A+ X8 g" B- F) q* ?; [7 {- y
                        @.CurrIcon := "load";
1 O* Z( q7 b+ m& K( H7 ?                        GlobalDistObj := part.globDestination;
- B3 B% ?/ _4 C- ~# I2 R1 a: Z                        assignLObj := rgmanager.rgAssignL;
; }+ E# g9 U% e                        row := assignLObj.getRowNo(GlobalDistObj);
+ K! ^/ J. s6 n) H                        if Row = -1 then -- since 70+ s: x" h* h/ {9 @9 Y9 M
                                if lan=1 then! u6 g9 h) l2 G: j0 C1 @
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 V8 c5 w9 P. U3 C) L                                                to_str("in der Andockstation: \"",?.~.name,"\""));8 d2 F5 Z* N* O3 A" E  B  |1 I
                                else
) b+ F1 Z  ]/ p! ?; I3 t                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 |1 ^  Q+ L# s3 V8 o                                                to_str("in docking station: \"",?.~.name,"\""));                                1 Z: Y2 L4 ]5 W* J3 d9 ~- [8 @
                                end;# ?, w6 H1 K. n; p4 \4 W! ^
                        else
: J6 ], y0 M6 x5 s  {4 n& q                                @.Destination := assignLObj[1,row];
" O; B: C( _  y7 ^4 O                        end;                        8 R8 X& A- ?3 p3 b- N% X: B2 T5 o
                        newDirection(@);( r/ j" E& \6 [2 S4 s- H
                        @.HasOrder := true;; i- ~$ ]3 ~, T! y
                end;
9 T6 @( [0 K& y6 W, w! W        end;- p3 L; }9 j5 c5 g& o
end;        -- of the method
8 i; I+ u' F( R
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
% O9 o8 ]/ E. w% w
  f4 @) J' R7 T" X& B* C/ a  E这是AGV_putin中arrive的method。
( w; G, `: y- a/ _3 m
, M; j% H+ Y$ z, [' M当到达物料速度越高时,这个报警更多,
+ U+ _4 _& k5 u8 J可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。1 T5 k) _; l. U1 f
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?# x  l- Z0 ?! x! {3 |+ X' v; E5 I; A

, e  r4 ~$ D* b1 T( k5 ?另外一个小建议,就是move,所有的move都可以这样
9 p. @' J4 z/ h2 rif not move() then debug end; z* S) c: C$ e/ Q+ d3 Q
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。1 ]- U9 x; I0 @; \. X# Q
plant simulation中的free libraries有AGV模板,
4 j' @/ t  m1 r) ^" [/ q* K6 \里面也有案例。
- @  C& b! I" f- x& v0 I5 d& r我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
3 Z. s* g) q+ H
) a9 C7 V2 M" d) Q, k' ]8 I5 P8 r我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 9 N0 J8 ]4 g- {) D3 a
- R+ e1 j* P( ~
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 6 y" C( n5 [1 m! G- Z0 ]. t& U$ X" O
这是AGV_putin中arrive的method。4 @3 U' Z( Z) N
9 _+ a: u7 y2 p& B9 G% R) H0 Y( R) ^; W
当到达物料速度越高时,这个报警更多,
  c$ E% E7 @# r" L* M8 j& s* v
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-4 13:41 , Processed in 0.019595 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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