设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7133|回复: 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'( D5 }6 L6 x/ d) r+ B* X* `. E
*/
( W  a6 v# s8 l# I4 [/ d4 Eis
6 u4 Z/ E$ C- @. p2 B  }        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
  F* G1 n7 n0 C2 s9 m" ~% H% @do# z  F1 y8 a8 H, u4 l% N
        Lan := rootfolder.Internal.Tools.AOLlanguage;
3 u% F- N4 W4 u) Y  i        if current = @.Destination -- else return. Y( U. B% V1 B$ s' S
        then3 g, \% l' U7 W) `& o- g1 {
                @.Destination := void;
- E+ t# D* V: j                if @.occupied then
: q8 ?6 l% K8 g% _                        part := @.cont;
  A# ^1 Q# G% V! p$ ?                        @.transpOrder := void;7 h/ A' C* P1 }& ?( d9 i( T( d% m
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% [" F4 H( h5 H
                                @,root.eventcontroller.simTime);- b$ b" N1 L+ k% J0 T
                        @.HasOrder := false;
+ p+ w  _, L9 p# k; h                        @.DrivingHome := true;
& A5 D# K: [& T7 _( _* D                        rgManager.tryToStartTransOrder;
: ]. Q. T7 Y$ g  N8 l3 O# O5 D                        if @.Destination = void
8 I! `! }( f  ?9 {                        then -- no transport order for vehicle @% i' |, y9 Z1 O0 E* t7 c
                                @.Destination :=* Q, w( Y& ^! Z: |% G& C9 h0 W
                                rgManager.nearestFreeStation(@,track.~);
' v5 O" G- w0 a' A                                newDirection(@);   / k. k: k  U& A' q' u
                                if @.Destination /= void then
& |# Z. M  C! A& `: `& M                                        @.Destination.NumReservation :=$ _+ X; i* G8 j+ R/ {+ T
                                        @.Destination.NumReservation + 1;2 T- ^7 Y3 b# E0 H9 y
                                end;/ Y1 x  X, g, d' e
                                @.CurrIcon := "drivingHome";- N3 k0 T% Q3 o( z9 B1 H
                                @.DrivingHome := true;
  Z  {+ g$ Z3 L/ [2 P6 x% r& J5 T8 d                        end;
& a4 W" m* n0 C- U/ q                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ k' T& g# f$ W  c5 L                        part := @.transpOrder;
9 {$ g" Z$ v- R                        part.move(@);-- load part
1 P" z2 M) N. n9 ~9 h8 G4 D; ~3 {" t                        @.CurrIcon := "load";
& j; ]9 W* c4 g* @. @; m                        GlobalDistObj := part.globDestination;+ k3 \1 I2 j8 I# ?+ t1 Y6 `
                        assignLObj := rgmanager.rgAssignL;3 q5 G8 w1 j- v2 Q' b7 |
                        row := assignLObj.getRowNo(GlobalDistObj);
  }1 g7 `1 a& O$ g6 l                        if Row = -1 then -- since 70
" w) k6 z3 J' i  c9 y) i6 L                                if lan=1 then
/ V' u+ g$ Y& |6 B$ Y                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. P# e# c2 u4 N: ?: h9 S                                                to_str("in der Andockstation: \"",?.~.name,"\""));
/ v- ]" f9 j% y( x8 X                                else
4 d3 H" H/ I7 W$ L' y. _                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& K% h3 T4 u0 C6 G/ m/ r% U, e                                                to_str("in docking station: \"",?.~.name,"\""));                                1 t8 `5 q% t; z2 ]) P7 {$ L
                                end;
: M; J9 y; i; L( H" L& }' [. B                        else/ R+ D/ R) @8 k+ P6 \# W) v
                                @.Destination := assignLObj[1,row];$ N, X* Y( C* v8 n! y- M+ i
                        end;                       
  ~) e3 b. |/ l5 q5 t                        newDirection(@);+ n4 j( v5 H# g0 m! t
                        @.HasOrder := true;
! ^; ]- ~; `& l                end;) D6 J8 W( v; r. S2 `' b& n: c
        end;. s0 O  q: S4 J7 i( u( {( c
end;        -- of the method
, [" h' W9 _, J2 L1 C
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
. K" q# x& a) k0 W8 W% ]
6 O# r, w' K& m/ f' }- m6 l这是AGV_putin中arrive的method。
4 V; F4 G: k5 {' F: t5 z& g" E. J  Z7 Q7 |2 k
当到达物料速度越高时,这个报警更多,
  X3 v& o6 J- C可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。9 L( x6 h: d: y, V- W
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
* f. k$ S' v, O9 r) [
1 m* d3 ~! J, d另外一个小建议,就是move,所有的move都可以这样4 Y0 H" w. \! J, V, d" h
if not move() then debug end, ?/ i5 J  l4 V3 d5 X$ h. g
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
& W3 }8 a+ D$ x4 aplant simulation中的free libraries有AGV模板,
  D$ P% y: @& @) f  p里面也有案例。1 N  h" r& M# L6 s" n' q
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
6 ?4 w# j' ]% x- f- v$ ]4 \2 w8 H( F/ B  j/ K2 ^
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 @8 ?2 _' U: J
4 V1 T/ N% y3 }那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 3 D6 l1 O  m2 r2 p& ]
这是AGV_putin中arrive的method。
4 h& R! V' |# i# i
6 f5 \9 W2 K/ q0 d. k当到达物料速度越高时,这个报警更多,

8 s$ [0 C) a) D% i  s- o另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-20 22:21 , Processed in 3.236609 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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