设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5845|回复: 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'7 Q% X+ {5 C' ]6 S5 m  P
*/5 p( ?( R: u  z
is$ y: H1 j7 H0 Z4 P# w
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 M4 _8 R* M# fdo
6 {1 `7 Z! }3 V# e$ R; A        Lan := rootfolder.Internal.Tools.AOLlanguage;
9 `8 r- H4 D0 O7 p7 K        if current = @.Destination -- else return2 M0 F8 v; Y8 Y
        then
. o, D9 y" k% n: ?  {8 o5 k' B& G                @.Destination := void;
  \8 ~3 C3 R/ {; U" W2 O  }                if @.occupied then
- ~7 c3 P  {' ?; q% U                        part := @.cont;
5 f+ q9 y1 G9 V* r; c0 a) g# Q& Z                        @.transpOrder := void;# l6 Y# l; l3 X; S! L
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% m$ L! l5 G3 L+ h# a
                                @,root.eventcontroller.simTime);
! N: D6 s6 g* e                        @.HasOrder := false;
$ U$ ]2 e0 s5 f  Z4 b                        @.DrivingHome := true;
  |3 c5 [  ]! O& |- Y* s0 ]/ |                        rgManager.tryToStartTransOrder;- a; Y2 c5 N$ q. R1 z3 D  g9 L
                        if @.Destination = void
& m. t' c! K, N( {9 ~( `7 K: h                        then -- no transport order for vehicle @- t# \  x1 C8 n7 ^0 c7 G2 z3 w
                                @.Destination :=8 o3 n# Y5 O6 ]' S3 L& O+ q7 f
                                rgManager.nearestFreeStation(@,track.~);
, n8 ?& |% X6 ?' J                                newDirection(@);   
9 V! L, {/ C0 v' D- t/ b                                if @.Destination /= void then
- Y3 Q* ?* `/ ?& X                                        @.Destination.NumReservation :=+ Z( P% E" n. J4 K  ~0 |) E! Y
                                        @.Destination.NumReservation + 1;8 `' t7 F3 O3 [! B4 k
                                end;
% w1 g) A% V9 s9 y% V/ x( l; j                                @.CurrIcon := "drivingHome";
; R6 g2 l- i" h                                @.DrivingHome := true;3 E0 K# M4 F6 I+ S* E
                        end;- M' T5 \, D2 R: `
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 e& k; t  S3 ~/ t( x* ]* b: Q                        part := @.transpOrder;$ o) b( j- r# W6 [) R3 n
                        part.move(@);-- load part
: B! E) L6 ?) E' l( P                        @.CurrIcon := "load";
$ y! f; z0 u* d- b5 C/ s                        GlobalDistObj := part.globDestination;
4 r1 g8 S0 t4 Y8 E; Q1 \. v                        assignLObj := rgmanager.rgAssignL;# y( K7 h$ `* q7 p3 a$ t5 p
                        row := assignLObj.getRowNo(GlobalDistObj);
7 s' S" z, B) _6 j) q                        if Row = -1 then -- since 709 g6 x  q! _& Q/ u/ i
                                if lan=1 then" d' W; [& M* S% ^
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% Q: i* r' [4 y5 O2 T( p# B
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
$ N' v6 w0 c3 \                                else
4 O, Z5 o0 r+ y: q# C& q7 A                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- ]4 W) ]. s; Q                                                to_str("in docking station: \"",?.~.name,"\""));                               
7 l4 K0 a* X- R( p$ G! e                                end;" {2 Z. k2 ?4 b2 U( x* e* ~& x' \! x
                        else
: H6 @0 B' r- V' z- @. j# ~: K                                @.Destination := assignLObj[1,row];, j' @* i  r! W& G% _9 ~
                        end;                       
+ J- Z$ n1 R2 a( t* q, o                        newDirection(@);
. ^4 T9 h+ z! G7 }                        @.HasOrder := true;
& l- a' t  l7 J! y- ^                end;
; A; u& N+ A2 u, J8 J/ I( T% v        end;
. [5 t- I7 e. @6 R2 T+ L7 Iend;        -- of the method
2 R8 E/ O1 T% ~$ j/ ~5 E
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑   F' g; b( g# b
1 e- a+ p5 [) c7 E& o/ c+ Q
这是AGV_putin中arrive的method。: O7 L) r+ Y) t) p+ ^, V6 C' V

2 _6 F  p0 W: }当到达物料速度越高时,这个报警更多,
3 Q( B; _  i3 j  H可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
: S' S4 M- N! H  h& S- G. Y4 O程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
2 V; `' G$ c% d' o9 e& c2 h$ e6 p$ Y
; E# E( }8 E1 E7 r! I8 J另外一个小建议,就是move,所有的move都可以这样! `* h& @$ ^) e! f8 M; ~0 R) Q
if not move() then debug end' p- ]. S: [: c! |1 Z
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。- I4 c0 g9 \. ]8 _# I# J) P
plant simulation中的free libraries有AGV模板,. m% S4 T' p: W  F4 x( Y" H
里面也有案例。
4 D1 @& z5 W+ T- b* u我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。. w+ _# m) v6 h. i

! k+ J/ ^8 \# |+ V% v* r我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
* F- ]4 _/ m. M- T& L3 N5 }
# D$ M7 c- w4 P那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 4 D+ z  v$ f0 |8 o- I# G6 }0 J: f' h
这是AGV_putin中arrive的method。
+ j* G- j7 K+ g9 x! N! j* ]8 J  o. i; a
当到达物料速度越高时,这个报警更多,

4 p# e3 p- j3 }; ]4 N5 Q) b# V! ~  n另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-26 04:46 , Processed in 0.016356 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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