设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7693|回复: 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'
* G. ~& H1 _' u9 @3 Q*/. W% r1 B' T* V5 y$ w$ |- D+ k8 z2 n
is( _1 K! l$ p5 E: r/ M
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ Q4 T  ~- `% e% p; J( ^do
0 r+ M6 g' M8 ^  q        Lan := rootfolder.Internal.Tools.AOLlanguage;* L1 e: x: {& w1 l6 l1 H
        if current = @.Destination -- else return7 v- y- ]2 I9 A
        then2 x5 z0 h2 c7 p3 A2 |! |
                @.Destination := void;6 |9 o( S7 U. M8 b# t
                if @.occupied then$ G0 i, Z8 S+ T8 D% I$ W6 V0 a
                        part := @.cont;4 d' S; B! N' D: E  F
                        @.transpOrder := void;
6 s& M! V! p1 d; H* [( k6 W& y                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- H  A" d' \, D' n1 m7 e                                @,root.eventcontroller.simTime);
" b* q; P! R9 ~/ O) P7 y5 g                        @.HasOrder := false;
  p7 N, s+ v) f" }  d                        @.DrivingHome := true;+ n0 @0 r7 i# l9 n+ H1 [+ Z' T3 u
                        rgManager.tryToStartTransOrder;
% u8 j  N4 |3 r) t: N$ x% l0 Z                        if @.Destination = void
( B: H/ ~! f! R, o1 z                        then -- no transport order for vehicle @& q. X  d! C- |, U* Q
                                @.Destination :=; M, E- a: y0 b1 ]
                                rgManager.nearestFreeStation(@,track.~);
. ^+ @3 x/ ~, y+ j/ v5 v9 ~& c                                newDirection(@);   
' A" N+ Q) u9 R% ^+ b                                if @.Destination /= void then
& |6 V: N" ~- t                                        @.Destination.NumReservation :=
5 c* b( G# A+ n  u                                        @.Destination.NumReservation + 1;
. ]0 j6 a' ?2 Q                                end;
5 m: C% G& U( \9 P                                @.CurrIcon := "drivingHome";
% E% K# a) i+ I/ i                                @.DrivingHome := true;
2 ]1 y. M* |! C: H+ y  f6 e) u                        end;9 \1 e! R& b* Y
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station* B6 P( d% a7 q' z* N
                        part := @.transpOrder;
- ^: n' B$ R6 I                        part.move(@);-- load part
+ M- a- ^1 R+ i5 r                        @.CurrIcon := "load";
5 ~- f* e" p; ]; F# u                        GlobalDistObj := part.globDestination;
* n) t# J. w7 C# `% h4 y+ y                        assignLObj := rgmanager.rgAssignL;8 E* h) ^3 Y# X0 }
                        row := assignLObj.getRowNo(GlobalDistObj);
) p) W& _7 l# ?" ?                        if Row = -1 then -- since 70
6 ?$ o# p* Z( ?5 [. Y: P9 J, ^                                if lan=1 then
, Q( c  G+ _3 V1 y( h& ~- V3 [                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 |) Z2 C# \2 p$ M
                                                to_str("in der Andockstation: \"",?.~.name,"\""));6 @( I2 a1 h& _/ N0 X
                                else( g9 z% x; q) W) A
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: x8 a6 M3 c0 z+ J( o+ H- N
                                                to_str("in docking station: \"",?.~.name,"\""));                                  p! @( V! D' x3 j5 ]4 F  F4 t) ^
                                end;+ K) g. z. n6 U# o
                        else3 N: c" P5 O* g6 t7 g# F
                                @.Destination := assignLObj[1,row];7 f! ~$ H$ {" G5 U4 }
                        end;                        * ]) A4 s$ v% N0 d
                        newDirection(@);1 O: Y# h) j# Y" V. a% |  f4 h) [
                        @.HasOrder := true;
  C% f% Q$ u7 a* ^                end;
$ D2 W" t$ Z2 y  t: A        end;# T4 `3 a- P! |- n! r; C
end;        -- of the method
  E/ A+ S! i; {, T5 m$ f- _
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 / N! ]* Y6 U6 ?- \4 A- \2 R2 ^
6 k; {' ]/ Z0 X' j: F5 f
这是AGV_putin中arrive的method。
* \3 ?4 l. d, K. M' K
& E6 E4 W- ?3 U* Z: X2 z当到达物料速度越高时,这个报警更多,
4 }$ L$ `( c: C: m' |) R可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
# Z: |# V4 y# _" X3 o- j程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
% s; F1 L% i9 w, Q$ L
/ `* [* z4 A" S. y( s; ^6 S" h另外一个小建议,就是move,所有的move都可以这样$ y7 n& P* a3 ]' j. e: F
if not move() then debug end
6 b# ]! B+ i+ E! \5 k6 A这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
9 n4 N" n4 W: oplant simulation中的free libraries有AGV模板,- C7 k( I/ o2 g0 Q* K
里面也有案例。
0 [# c! }% \4 R# P) s; {8 U8 b8 O我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
# u8 }6 \, ~  p- F3 l0 q  \. O# J5 I3 y2 w, B. {0 n+ O  u3 B
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 - K% j2 {' u6 ]% c. `

7 V- d  d0 ~! G- _5 g! g那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 6 t/ g! H5 ?3 _+ Q' F* C2 R# _& ~. u) x
这是AGV_putin中arrive的method。* S; r  F1 |( o. }- E( |9 {/ L

9 V5 n7 e2 u4 r" G; q7 D6 y: e2 D当到达物料速度越高时,这个报警更多,

8 a+ A& _8 o/ ~( p9 }% p另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-24 16:28 , Processed in 0.016798 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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