2014美赛_NaSch模型matlab完整代码

合集下载

2014美赛B数学建模美赛B题 数据

2014美赛B数学建模美赛B题  数据

2009 2011 1987 1945 1980 1997 1955 1939 1916 1905 1928 2012 1983 1975 1971 1920 1910 1925 1937 1923 1922 1978 1990 1907 1896 1926 1946 1924 1943 1922 1902 1992 1926 1918 1918 1917 1946 1944 1935 1904 1926 1923 1912 1945 1914 1912 1901
Brown Hawaii Fresno State Fordham Towson Stephen F. Austin Murray State Maine Tulsa Oregon State Rochester (NY) Lipscomb Oral Roberts Saint Louis Oklahoma State Georgia Tech St. John's (NY) Kent State Louisville Navy Kentucky Marshall Tennessee State Kansas State Yale DePaul Saint Mary's (CA) Rice Chicago Santa Clara Bloomsburg Sacramento State Utah Virginia Military Institute Muhlenburg Boston University South Carolina Denison Wichita State Brown Valparaiso Rice Roanoke Nevada North Dakota Arizona State Mount Union
names

美国大学生数学建模比赛2014年B题

美国大学生数学建模比赛2014年B题

Team # 26254
Page 2 oon ............................................................................................................................................................. 3 2. The AHP .................................................................................................................................................................. 3 2.1 The hierarchical structure establishment ....................................................................................................... 4 2.2 Constructing the AHP pair-wise comparison matrix...................................................................................... 4 2.3 Calculate the eigenvalues and eigenvectors and check consistency .............................................................. 5 2.4 Calculate the combination weights vector ..................................................................................................... 6 3. Choosing Best All Time Baseball College Coach via AHP and Fuzzy Comprehensive Evaluation ....................... 6 3.1 Factor analysis and hierarchy relation construction....................................................................................... 7 3.2 Fuzzy comprehensive evaluation ................................................................................................................... 8 3.3 calculating the eigenvectors and eigenvalues ................................................................................................ 9 3.3.1 Construct the pair-wise comparison matrix ........................................................................................ 9 3.3.2 Construct the comparison matrix of the alternatives to the criteria hierarchy .................................. 10 3.4 Ranking the coaches .....................................................................................................................................11 4. Evaluate the performance of other two sports coaches, basketball and football.................................................... 13 5. Discuss the generality of the proposed method for Choosing Best All Time College Coach ................................ 14 6. The strengths and weaknesses of the proposed method to solve the problem ....................................................... 14 7. Conclusions ........................................................................................................................................................... 15

交通流中地NaSch模型及MATLAB代码元胞自动机

交通流中地NaSch模型及MATLAB代码元胞自动机

元胞自动机 NaSch模型及其MATLAB代码作业要求根据前面的介绍,对NaSch模型编程并进行数值模拟:●模型参数取值:Lroad=1000,p=0.3,Vmax=5。

●边界条件:周期性边界。

●数据统计:扔掉前50000个时间步,对后50000个时间步进行统计,需给出的结果。

●基本图(流量-密度关系):需整个密度范围内的。

●时空图(横坐标为空间,纵坐标为时间,密度和文献中时空图保持一致, 画500个时间步即可)。

●指出NaSch模型的创新之处,找出NaSch模型的不足,并给出自己的改进思路。

●流量计算方法:密度=车辆数/路长;流量flux=density×V_ave。

在道路的某处设置虚拟探测计算统计时间T内通过的车辆数N;流量flux=N/T。

●在计算过程中可都使用无量纲的变量。

1、NaSch模型的介绍作为对184号规则的推广,Nagel和Schreckberg在1992年提出了一个模拟车辆交通的元胞自动机模型,即NaSch模型(也有人称它为NaSch模型)。

●时间、空间和车辆速度都被整数离散化。

● 道路被划分为等距离的离散的格子,即元胞。

● 每个元胞或者是空的,或者被一辆车所占据。

● 车辆的速度可以在(0~Vmax )之间取值。

2、NaSch 模型运行规则在时刻t 到时刻t+1的过程中按照下面的规则进行更新:(1)加速:),1min(max v v v n n +→规则(1)反映了司机倾向于以尽可能大的速度行驶的特点。

(2)减速:),min(n n n d v v →规则(2)确保车辆不会与前车发生碰撞。

(3)随机慢化: 以随机概率p 进行慢化,令:)0,1-min(n n v v → 规则(3)引入随机慢化来体现驾驶员的行为差异,这样既可以反映随机加速行为,又可以反映减速过程中的过度反应行为。

这一规则也是堵塞自发产生的至关重要因素。

(4)位置更新:n n n v x v +→ ,车辆按照更新后的速度向前运动。

美赛数学建模专用-第四章 MATLAB的数值计算功能

美赛数学建模专用-第四章 MATLAB的数值计算功能

美赛数学建模专用-第四章MATLAB 的数值计算功能Chapter 4: Numerical computation of MATLAB一、多项式(Polynomial)`1.多项式的表达与创建(Expression and Creating of polynomial) (1) 多项式的表达(expression of polynomial)_Matlab用行矢量表达多项式系数(Coefficient),各元素按变量的降幂顺序排列,如多项式为:P(x)=a0x n+a1x n-1+a2x n-2…a n-1x+a n则其系数矢量(V ector of coefficient)为:P=[a0 a1… a n-1 a n]如将根矢量(V ector of root)表示为:ar=[ ar1 ar2… ar n]则根矢量与系数矢量之间关系为:(x-ar1)(x- ar2) … (x- ar n)= a0x n+a1x n-1+a2x n-2…a n-1x+a n(2)多项式的创建(polynomial creating)a)系数矢量的直接输入法利用poly2sym函数直接输入多项式的系数矢量,就可方便的建立符号形式的多项式。

例:创建多项式x3-4x2+3x+2poly2sym([1 -4 3 2])ans =x^3-4*x^2+3*x+2POLY Convert roots to polynomial.POL Y(A), when A is an N by N matrix, is a row vector withN+1 elements which are the coefficients of the characteristicpolynomial, DET(lambda*EYE(SIZE(A)) - A) .POL Y(V), when V is a vector, is a vector whose elements arethe coefficients of the polynomial whose roots are theelements of V . For vectors, ROOTS and POLY are inversefunctions of each other, up to ordering, scaling, androundoff error.b) 由根矢量创建多项式通过调用函数p=poly(ar)产生多项式的系数矢量, 再利用poly2sym函数就可方便的建立符号形式的多项式。

2014年美国大学生数学建模竞赛A题论文综述

2014年美国大学生数学建模竞赛A题论文综述

数学建模综述2014年美国大学生数学建模竞赛A题论文综述我们小组精读两篇14年美赛A题论文,选择了其中一篇来进行学习,总结。

1、问题分析The Keep-Right-Except-To-Pass Rule除非超车否则靠右行驶的交通规则问题:建立数学模型来分析这条规则在低负荷和高负荷状态下的交通路况的表现。

这条规则在提升车流量的方面是否有效?如果不是,提出能够提升车流量、安全系数或其他因素的替代品(包括完全没有这种规律)并加以分析。

在一些国家,汽车靠左形式是常态,探讨你的解决方案是否稍作修改即可适用,或者需要一些额外的需要。

最后,以上规则依赖于人的判断,如果相同规则的交通运输完全在智能系统的控制下,无论是部分网络还是嵌入使用的车辆的设计,在何种程度上会修改你前面的结果论文:基于元胞自动机和蒙特卡罗方法,我们建立一个模型来讨论“靠右行”规则的影响。

首先,我们打破汽车的运动过程和建立相应的子模型car-generation的流入模型,对于匀速行驶车辆,我们建立一个跟随模型,和超车模型。

然后我们设计规则来模拟车辆的运动模型。

我们进一步讨论我们的模型规则适应靠右的情况和,不受限制的情况, 和交通情况由智能控制系统的情况。

我们也设计一个道路的危险指数评价公式。

我们模拟双车道高速公路上交通(每个方向两个车道,一共四条车道),高速公路双向三车道(总共6车道)。

通过计算机和分析数据。

我们记录的平均速度,超车取代率、道路密度和危险指数和通过与不受规则限制的比较评估靠右行的性能。

我们利用不同的速度限制分析模型的敏感性和看到不同的限速的影响。

左手交通也进行了讨论。

根据我们的分析,我们提出一个新规则结合两个现有的规则(靠右的规则和无限制的规则)的智能系统来实现更好的的性能。

该论文在一开始并没有作过多分析,而是一针见血的提出了自己对于这个问题的做法。

由于题目给出的背景只有一条交通规则,而且是题目很明确的提出让我们建立模型分析。

2014建模美赛B题

2014建模美赛B题

For office use onlyT1________________ T2________________ T3________________ T4________________ Team Control Number27820Problem ChosenBFor office use onlyF1________________F2________________F3________________F4________________ 2014Mathematical Contest in Modeling (MCM/ICM) Summary Sheet(Attach a copy of this page to your solution paper.)Research on Choosing the Best College Coaches Based on Data Envelopment AnalysisSummaryIn order to get the rank of coaches in differ ent sports and look for the ―best all time college coach‖ male or female for the previous century, in this paper, we build a comprehensive evaluation model for choosing the best college coaches based on data envelopment analysis. In the established model, we choose the length of coaching career, the number of participation in the NCAA Games, and the number of coaching session as the input indexes, and choose the victory ratio of games, the number of victory session and the number of equivalent champion as the output indexes. In addition, each coach is regarded as a decision making unit (DMU).First of all, with the example of basketball coaches, the relatively excellent basketball coaches are evaluated by the established model. By using LINGO software, the top 5 coaches are obtained as follows: Joe B. Hall, John Wooden, John Calipari, Adolph Rupp and Hank Iba.Secondly, the year 1938 is chosen as a time set apart to divide the time line into two parts. And then, basketball coaches are still taken as an example to evaluate the top 5 coaches used the constructed model in those two parts, respectively. The evaluated results are shown as: Doc Meanwell, Francis Schmidt, Ralph Jones, E.J. Mather, Harry Fisher before 1938, and Joe B. Hall, John Wooden, John Calipari, Adolph Rupp and Hank Iba after 1938. These results are accordant with those best coaches that were universally acknowledged by public. It suggests that the model is valid and effective. As a consequence, it can be applied in general across both genders and all possible sports.Thirdly, just the same as basketball coaches, football and field hockey coaches are also studied by using the model. After the calculation, the top 5 co aches of football’s results are as follows: Phillip Fulmer, Tom Osborne, Dan Devine, Bobby Bowden and Pat Dye, and field hockey’s are Fred Shero, Mike Babcock, Claude Julien, Joel Quenneville and Ken Hitchcock.Finally, although the top 5 coaches in each of 3 different sports have been chosen, the above-mentioned model failed to sort these coaches. Therefore, the super- efficiency DEA model is introduced to solve the problem. This model not only can evaluate the better coaches but also can rank them. As a result, we can choose the ―best all time college coach‖ from all the coaches easily.Type a summary of your results on this page. Do not includethe name of your school, advisor, or team members on this page.Research on Choosing the Best College Coaches Based on DataEnvelopment AnalysisSummaryI n order to get the rank of coaches in different sports and look for the ―best all time college coach‖ male or female for the previous century, in this paper, we build a comprehensive evaluation model for choosing the best college coaches based on data envelopment analysis. In the established model, we choose the length of coaching career, the number of participation in the NCAA Games, and the number of coaching session as the input indexes, and choose the victory ratio of games, the number of victory session and the number of equivalent champion as the output indexes. In addition, each coach is regarded as a decision making unit (DMU).First of all, with the example of basketball coaches, the relatively excellent basketball coaches are evaluated by the established model. By using LINGO software, the top 5 coaches are obtained as follows: Joe B. Hall, John Wooden, John Calipari, Adolph Rupp and Hank Iba.Secondly, the year 1938 is chosen as a time set apart to divide the time line into two parts. And then, basketball coaches are still taken as an example to evaluate the top 5 coaches used the constructed model in those two parts, respectively. The evaluated results are shown as: Doc Meanwell, Francis Schmidt, Ralph Jones, E.J. Mather, Harry Fisher before 1938, and Joe B. Hall, John Wooden, John Calipari, Adolph Rupp and Hank Iba after 1938. These results are accordant with those best coaches that were universally acknowledged by public. It suggests that the model is valid and effective. As a consequence, it can be applied in general across both genders and all possible sports.Thirdly, just the same as basketball coaches, football and field hockey coaches are also studied by using the model. After the calculation, the top 5 coaches of football’s results are as follows: Phillip Fulmer, Tom Osborne, Dan Devine, Bobby Bowden and Pat Dye, and field hockey’s are Fred Shero, Mike Babcock, Claude Julien, Joel Quenneville and Ken Hitchcock.Finally, although the top 5 coaches in each of 3 different sports have been chosen, the above-mentioned model failed to sort these coaches. Therefore, the super- efficiency DEA model is introduced to solve the problem. This model not only can evaluate the better coaches but also can rank them. As a result, we can choose the ―best all time college coach‖ from all the coaches easily.Key words: college coach;data envelopment analysis; decision making unit; comprehensive evaluationContents1. Introduction (4)2. The Description of Problem (4)3. Models (5)3.1Symbols and Definitions (5)3.2 GeneralAssumptions (6)3.3 Analysis of the Problem (6)3.4 The Foundation of Model (6)3.5 Solution and Result (8)3.6 sensitivity analysis (17)3.7 Analysis of the Result (19)3.8 Strength and Weakness (19)4.Improved Model............................................................................................................................ .. (20)4.1super- efficiency DEA model (20)4.2 Solution and Result (21)4.3Strength and Weakness (25)5. Conclusions (25)5.1 Conclusions of the problem...............................................................................,.25 5.2 Methods used in our models (26)5.3 Applications of our models (26)6.The article for Sports Illustrated (26)7.References (28)I. IntroductionAt present, the scientific evaluation index systems related to college coach abilities are limited, and the evaluation of coach abilities are mostly determined by the sports teams’game results, and it lacks of systematic, scientific and accurate evaluation with large subjectivity and one-sidedness, thus it can not objectively reflect the actual training level of coaches. In recent years, there appear many new performance evaluation methods, which mostly consider the integrity of the evaluation system. Thus they overcome a lot of weaknesses that purely based on the evaluation of game results. However, it is followed by the complexity of evaluation process and index system, as well as the great increase of the implementation cost. Data envelopment analysis is a non-parametric technique for evaluating the relative efficiency of a set of homogeneous decision-making units (DMUs) with multiple inputs and multiple outputs by using a ratio of the weighted sum of outputs to the weighted sum of inputs. Therefore, it not only simplifies the number of indexes, but also avoids the interference of subjective consciousness, thus makes the evaluation system more just and scientific.Based on the investigation and research of the US college basketball coach for the previous century, this paper aims at establishing a scientific and objective evaluation index system to assess their coaching abilities comprehensively. It provides reference for the relating sports management department to evaluate coaches and continuously optimize their coaching abilities. For this purpose, the DEA is successfully introduced into this article to establish a comprehensive evaluation model for choosing the best college coaches. It makes the assessment of the coaches in different time line horizon, different gender and different sports to testify the validity and the effectiveness of this approach.II. The Description of the Problem In order to find out the ―best all time college coach‖ for the previous century, a comprehensive evaluation model is needed to set up. Therefore, a set of scientific and objective evaluation index system should be established, which should meet the following principles or requirements:The principle of sufficiency and comprehensivenessThe index system should be sufficiently representative and comprehensivelycover the main contents of the coaches’ coaching abilities.The principle of independenceEach of the index should be clear and comparatively independent.The principle of operabilityThe data of index system comes from the existing statistics data, thus copying the unrealistic index system is not allowed.The principle of comparabilityThe comparative index should be used as far as possible to be convenientlycompared for each coach.After the establishment of evaluation index system, it requires the detailed model to make assessment and analysis for each coach. Currently, the comprehensive assessment is mostly widely used, but most of them need to be gave a weight. It is more subjective and not very scientific and objective. To avoid fixing the weight, the DEA method is adopted, which can figure out coaches’ rank eventually from the coach’s actual data.For the different time line horizon, the coaches’ rank is inevitably influenced by the team’s l evel and the sports, thus it requires discussion in different time line horizon to get the further results.Finally, the DEA model is applied to all coaches (either male or female) and all possible sports to get the rank, and then the model’s whole assessm ent basis and process should be explained to the readers in understandable words.III. Models3.1 Terms Definitions and Symbols Symbol ExplanationDMU k the k th DMU0DMU the target DMU, which is one of the nevaluated DMUs;ik x the i th input variable consumed0i x the i th input variable consumedjk y the j th output variable produced0j y the j th output variable produced1I The length of coaching career2I The number of taking part in NCAAtournament3I coaching session1Ovictory ratio of game3.2 General AssumptionsThe same level game difficulty in different regions and cities is equal for all teams.The value of the champion in different regions and cities is equal (without regard to team’s number in the region, the power and strength of the teams and other factors).The same game’s value is equal in different years (without regard to the team number in the year and other factors).The college’s level has no influence to the coach’s coaching performance.3.3 Analysis of the ProblemFor the current problem, first of all, a comprehensive evaluation model is needed to set up. Therefore, a set of scientific and objective evaluation index system should be established. The evaluation system of the coaches is comparatively mature, but it mainly based on the people’s subjective consciousness, thus the evaluation system we build requires more data to explain the problem, and it tries to assess each coach in a objective and just way without the interference of subjective factors.Secondly, the evaluation system we used is different due to the different games in different time periods. So the influence of different time periods to the evaluation results should be taken into account when we deal with the problem. Furthermore, it should be discussed in different cases.3.4 The Foundation of ModelData Envelopment Analysis (DEA), initially proposed by Charnes, Cooper and Rhodes [3], is a non-parametric technique for evaluating the relative efficiency of a set of homogeneous decision-making units (DMUs) with multiple inputs and multiple outputs by using a ratio of the weighted sum of outputs to the weighted sum of inputs. 2O the number of victory session3O The number of equivalent champion1Q the number of regular games champion2Q the number of league games champion3Qthe number of NCAA league gameschampionOne of the basic DEA models used to evaluate DMUs efficiency is the input-oriented CCR model, which was introduced by Charnes, Cooper and Rhodes [1]. Suppose that there are n comparatively homogenous DMUs (Here, we look upon each coach as a DMU), each of which consumes the same type of m inputs and produces the same type of s outputs. All inputs and outputs are assumed to be nonnegative, but at least one input and one output are positive.DMU k : the k th DMU, 1,2,,=k n ;0DMU : the target DMU, which is one of the n evaluated DMUs;ik x : the i th input variable consumed by DMU k , 1,2,,=i m ; 0i x : the i th input variable consumed by 0DMU , 1,2,,=i m ;jk y : the j th output variable produced by DMU k , 1,2,,=j s ;0j y : the j th output variable produced by 0DMU , 1,2,,=j s ; i u : the i th input weight, 1,2,,=i m ;In DEA model, the efficiency of 0DMU , which is one of the n DMUs, isobtained by using a ratio of the weighted sum of outputs to the weighted sum of inputs under the condition that the ratio of every entity is not larger than 1. The DEA model is formulated by using fractional programming as follows:()()000111112121,1,2,...,..,,,0,,,0max sr rj r m j i ij i sr rj r m i ij i T m T s j n s t v v v v u u u u y u hv x y u v x =====⎧⎪⎪≤=⎪⎪⎨⎪=≥⎪⎪=≥⎪⎩∑∑∑∑ (2)The above model is a fractional programming model, which is equivalent to the following linear programming model:00111010,1,2,...,..1,0,1,2,..;1,2,...,max s j r rj r sm i ij r rj r i m i ij i ir j n s t i m r sy h y w x w x w μμμ=====⎧-≤=⎪⎪⎪=⎨⎪⎪≥==⎪⎩∑∑∑∑ (3) Turned to another form is:101min ..0,1,2,,nj j j n j j j j x x s t j ny y θλθθλλ==⎧≤⎪⎪⎪⎪≥⎨⎪⎪≥=⎪⎪⎩∑∑无约束 3.5 Solution and Result3.5.1 Establishing the input and output index systemIn the DEA model, it requires defining a set of input index and a set of output index, and all the indexes should be the common data for each coach. Regarding the team as an unit, then the contribution that the coach made to the team can be regarded as input, while the achievement that the team made can be regarded as reward. In the following, we take the basketball coaches of NACC as an example to establish the input and output index system. These input indexes could be chosen as follows:1I :The length of coaching careerThe more game seasons a coach takes part in, the more abundant experience he has. This ki nd of coach’s achievement is easily affirmed by others. As the Figure 1 shows, the famous coach mostly experienced the long-time coaching career.Furthermore, the time the coach has contributed to the team is fundamental if they want to have a good result in the game. Thus the length of coaching career can be regarded as an index to evaluate the coach’s contribution to the team.Figure 1 The relationship between the length of coaching career and the number ofchampionsI: The number of taking part in NCAA tournament2Whether the coach takes the team to a higher level game has a direct influence on the team’s performance, and also it can reflect the coach’s coaching abilities, level and other factors.I: coaching session3For the reason of layers of elimination, the coaching session is not necessarily determined by the length of coaching career. It can be shown in the comparison between Figure 2 and Figure 3. Thus the number of coaching session can also be regarded as an index.Figure 2These output indexes could be chosen as follows:O: victory ratio of game1The index reflects the coach’s ability of command and control, and it a ttaches great importance to the evaluation of coach’s coaching abilities.O: the number of victory session2The case that the number of victory session reflected is different from that of victory ratio, only if get the enough number of victory session in a large number of coaching session, the acquired high victory ratio can reflect the coach’s high coaching level. If the victory occurs in a limited games, this kind of high victory ratio can not reflect the rules. It can be shown in the comparison between Figure 3 and Figure 4.Figure 3Figure 43O :The number of equivalent championThe honor that US college basketball teams acquired can be divided into three types: 1Q : the number of regular games champion; 2Q : the number of league games champion; 3Q : the number of NCAA league games champion. The threechampionship honor has different levels, and their importance is increasing in turn according to the reference. The weight 0.2、0.3、0.5 can be given respectively, and the number of equivalent champion can be figured out and used as an output index, as it shown in Table 1.5.0Q 3.0Q 2.0Q O 3213⨯+⨯+⨯=Table 1 Coach names Number of regular games champion (weight 0.2) Number of league games champion (weight 0.3) Number of NCAA league games championNumber of equivalent championAccording to Internet, the data of input and output are given by Table 2.Table 2(weight 0.5)Phog Allen 24 0 1 5.3 Fred Taylor 7 0 1 1.9 Hank Iba 15 0 2 4 Joe B. Hall 8 1 1 2.4 Billy Donovan 7 3 2 3.3 Steve Fisher 3 4 1 2.6 John Calipari 14 11 1 6.6 Tom Izzo 7 3 1 2.8 Nolan Richardso 9 6 1 3.9 John Wooden 16 0 10 8.2 Rick Pitino 9 11 2 6.1 Jerry Tarkanian 18 8 1 6.5 Adolph Rupp 28 13 4 11.5 John Thompson 7 6 1 3.7 Jim Calhoun 16 12 3 8.3 Denny Crum 15 11 2 7.3 Roy Williams 15 6 2 5.8 Dean Smith 17 13 2 8.3 Bob Knight 11 0 3 3.7 Lute Olson 13 4 1 4.3 Mike Krzyzewski 12 13 4 8.3 Jim Boeheim 11 5 1 4.2 Doc Meanwell 10 0 0 2 Ralph Jones 4 0 0 0.8 Francis Schmidt61.2Coach namesInput indexOutput index1I2I3I1O 2O3ONCAA tourament Thelength of coaching careerCoaching session Win-Lose %WinsNumber of equivalent championPhog Allen 4489780.735 719 5.3 Fred Taylor 5 18 455 0.653 297 1.9 Hank Iba84010850.6937524Since the opening of NACC tournament in 1938, thus the year 1938 is chosen as a time set apart. The finishing time point of coaching before 1938 is a period of time, while after 1938 is another period of time.For the time period before 1938, take the length of coaching career 1I , coaching session 3I as input indexes, and then take W-L %1O , victory session 2O , the number of regular games champion 1Q as output indexes. The results is shown in Table 3 after the data statistics of each index.For the time period after 1938, because they all take part in NACC, the input index and output index are just the same as that of all time period. The data statistics is just as shown in Table 3.Table 3Coach namesInput indexOutput index1I3I1O2O1QThe lengthof coachingcareerCoachingsessionW-L % WinsNumber of regular games championJoe B. Hall 10 16 463 0.721 334 2.4 Billy Donovan 13 20 658 0.714 470 3.3 Steve Fisher 13 24 739 0.658 486 2.6 John Calipari 14 22 756 0.774 585 6.6 Tom Izzo 16 19 639 0.717 458 2.8 Nolan Richardson 16 22 716 0.711 509 3.9 John Wooden 16 29 826 0.804 664 8.2 Rick Pitino 18 28 920 0.74 681 6.1 Jerry Tarkanian 18 30 963 0.79 761 6.5 Adolph Rupp 20 41 1066 0.822 876 11.5 John Thompson 20 27 835 0.714 596 3.7 Jim Calhoun 23 40 1259 0.697 877 8.3 Denny Crum 23 30 970 0.696 675 7.3 Roy Williams 23 26 902 0.793 715 5.8 Dean Smith 27 36 1133 0.776 879 8.3 Bob Knight 28 42 1273 0.706 899 3.7 Lute Olson 28 34 1061 0.731 776 4.3 Mike Krzyzewski 29 39 1277 0.764 975 8.3 Jim Boeheim303812560.759424.2Louis Cooke 27 380 0.654 248 5 Zora Clevenger 15 223 0.677 151 2 Harry Fisher 14 249 0.759 189 3 Ralph Jones 17 245 0.792 194 4 Doc Meanwell 22 381 0.735 280 10 Hugh McDermott 17 291 0.636 185 2 E.J. Mather 14 203 0.675 137 3 Craig Ruby 16 278 0.651 181 4 Francis Schmidt 17 330 0.782 258 6 Doc Stewart 15 291 0.663 193 2 James St. Clair162630.58215323.5.2 Solution and ResultIn this section, take Phog Allen as an example and make calculation as follows:Taking Phog Allen as 0DMU , then the input vector is 0x , the output vector is 0y , while the respective input and output weight vector are:From the Figure 2 it can be inferred thatT x )978,48,4(0= T y )3.5,719,735.0(0=After the calculation by LINGO then the efficiency value h 1 of DMU 1 is0.9999992.For other coaches, their efficiency value is figured out by the above calculation process as shown in Table 4.Table 4Coach namesInput indexOutput indexEfficiency value 1I2I3I1O 2O3ONCAA Tourna ment Thelength of coachin g careerCoachin g session W-L % Wins Number ofequivalent championJoe B. Hall 10 16 463 0.721 334 2.4 1John Wooden 16 29 826 0.804 664 8.2 1John Calipari 14 22 756 0.774 585 6.6 1Adolph Rupp 20 41 1066 0.822 876 11.5 1Hank Iba 8 40 1085 0.693 752 4 1Mike Krzyzewski 29 39 1277 0.764 975 8.3 1Roy Williams 23 26 902 0.793 715 5.8 1Jerry Tarkanian 18 30 963 0.79 761 6.5 0.9999997 Fred Taylor 5 18 455 0.653 297 1.9 0.9999996 Phog Allen 4 48 978 0.735 719 5.3 0.9999992 Tom Izzo 16 19 639 0.717 458 2.8 0.9785362 Dean Smith 27 36 1133 0.776 879 8.3 0.9678561 Jim Boeheim 30 38 1256 0.75 942 4.2 0.941031 Billy Donovan 13 20 658 0.714 470 3.3 0.9405422 Rick Pitino 18 28 920 0.74 681 6.1 0.9401934 Nolan Richardson 16 22 716 0.711 509 3.9 0.920282 Lute Olson 28 34 1061 0.731 776 4.3 0.9114966 John Thompson 20 27 835 0.714 596 3.7 0.8967647 Jim Calhoun 23 40 1259 0.697 877 8.3 0.8842854 Denny Crum 23 30 970 0.696 675 7.3 0.8823837 Bob Knight 28 42 1273 0.706 899 3.7 0.8769902 Steve Fisher 13 24 739 0.658 486 2.6 0.8543039For those coaches in the time period after 1938, the efficiency values, which is shown in Table 5, are figured out from the similar calculation process as Phog Allen.Table 5Coach namesInput index Output indexEfficiencyvalue 1I3I1O2O1QThelengthofcoaching careerCoaching sessionW-L % WinsNumberof regularchampionDoc Meanwell 22 381 0.735 280 10 1Francis Schmidt 17 330 0.782 258 6 1Ralph Jones 17 245 0.792 194 4 1E.J. Mather 14 203 0.675 137 3 0.9999999Harry Fisher 14 249 0.759 189 3 0.999999 Zora Clevenger 15 223 0.677 151 2 0.9328517 Doc Stewart 15 291 0.663 193 2 0.8910155 Craig Ruby 16 278 0.651 181 4 0.859112 Louis Cooke 27 380 0.654 248 5 0.8241993 Hugh McDermott 17 291 0.636 185 2 0.8091489 James St. Clair 16 263 0.582 153 2 0.7468237Choose basketball, football and field hockey and make calculationsThe calculation result statistics of basketball is shown in Table 4.The calculation result statistics of football is shown in Table 6.Table 6Coach NamesInput index Output indexEfficiencyvalue Total ofthe BowlThelength ofcoachingcareerCoachingsessionW-L % WinsNumberofchampionPhillip Fulmer 15 17 204 0.743 151 8 1 Tom Osborne 25 25 307 0.836 255 12 1 Dan Devine 10 22 238 0.742 172 7 1 Bobby Bowden 33 40 485 0.74 357 22 1 Pat Dye 10 19 220 0.707 153 7 1 Bobby Dodd 13 22 237 0.713 165 9 1Bo Schembechler 17 27 307 0.775 234 5 1 Woody Hayes 11 28 276 0.761 205 5 1.000001 Joe Paterno 37 46 548 0.749 409 24 1 Nick Saban 14 18 228 0.748 170 8 0.9999993 Darrell Royal 16 23 249 0.749 184 8 0.9653375 John Vaught 18 25 263 0.745 190 10 0.9648578 Steve Spurrier 19 24 300 0.733 219 9 0.9639218 Bear Bryant 29 38 425 0.78 323 15 0.9623039 LaVell Edwards 22 29 361 0.716 257 7 0.9493463 Terry Donahue 13 20 233 0.665 151 8 0.9485608 John Cooper 14 24 282 0.691 192 5 0.94494 Mack Brown 21 29 356 0.67 238 13 0.9399592 Bill Snyder 15 22 269 0.664 178 7 0.9028372 Ken Hatfield 10 27 312 0.545 168 4 0.9014634 Fisher DeBerry 12 23 279 0.608 169 6 0.9008829 Don James 15 22 257 0.687 175 10 0.8961777Bill Mallory 10 27 301 0.561 167 4 0.8960976 Ralph Jordan 12 25 265 0.674 175 5 0.8906943 Frank Beamer 21 27 335 0.672 224 9 0.8827047 Don Nehlen 13 30 338 0.609 202 4 0.8804766 Vince Dooley 20 25 288 0.715 201 8 0.8744984 Jerry Claiborne 11 28 309 0.592 179 3 0.8731701 Lou Holtz 22 33 388 0.651 249 12 0.8682463 Bill Dooley 10 26 293 0.558 161 3 0.8639017 Jackie Sherrill 14 26 304 0.595 179 8 0.8435327 Bill Yeoman 11 25 276 0.594 160 6 0.8328854 George Welsh 15 28 325 0.588 189 5 0.820513 Johnny Majors 16 29 332 0.572 185 9 0.807564 Hayden Fry 17 37 420 0.56 230 7 0.792591The calculation result statistics of field hockey is shown in Table 7.Table 7Coach namesInput index Output indexEfficiencyvalue Total ofthe BowlThelength ofcoachingcareerCoachingsessionW-L % WinsNumberofchampionFred Shero 110 10 734 0.612 390 2 1 Mike Babcock 131 11 842 0.63 470 1 1 Claude Julien 97 11 749 0.61 411 1 1 Joel Quenneville 163 17 1270 0.617 695 2 1 Ken Hitchcock 136 17 1213 0.602 642 1 1 Marc Crawford 83 15 1151 0.556 549 1 0.9999998 Scotty Bowman 353 30 2141 0.657 1244 9 0.9999996 Hap Day 80 10 546 0.549 259 5 0.9999995 Toe Blake 119 13 914 0.634 500 8 0.9999994 Eddie Gerard 21 11 421 0.486 174 1 0.999999 Art Ross 65 18 758 0.545 368 1 0.9854793 Peter Laviolette 82 12 759 0.57 389 1 0.9832692 Bob Hartley 84 11 754 0.56 369 1 0.9725678 Jacques Lemaire 117 17 1262 0.563 617 1 0.9706553 Glen Sather 127 13 932 0.602 497 4 0.9671556 John Tortorella 89 14 912 0.541 437 1 0.9415468 John Muckler 67 10 648 0.493 276 1 0.9379403 Lester Patrick 65 13 604 0.554 281 2 0.9246999 Mike Keenan 173 20 1386 0.551 672 1 0.8921282 Al Arbour 209 23 1607 0.564 782 4 0.8868355 Frank Boucher 27 11 527 0.422 181 1 0.8860263Pat Burns 149 14 1019 0.573 501 1 0.8803399 Punch Imlach 92 14 889 0.537 402 4 0.8795251Darryl Sutter 139 14 1015 0.559 491 1 0.8754745Dick Irvin 190 27 1449 0.557 692 4 0.8688287Jack Adams 105 20 964 0.512 413 3 0.8202896 Jacques Demers 98 14 1007 0.471 409 1 0.7982191 3.6 sensitivity analysisWhen determining the number of equivalent champion, the weight coefficient is artificially determined. During this process, different people has different confirming method.Consequently, we should consider that when the weight coefficient changes in a certain range, what would happen for the evaluation result?For the next step, we will take the basketball coaches as example to illustrate the above-mentioned case.The weight coefficient changes is given by Table 12. The changes of evaluation results is shown in Table 13.Table 12Coach names Number ofregulargameschampion(weight0.2)Number ofleaguegameschampion(weight 0.4)Number ofNCAA leaguegameschampion(weight0.4)Number ofequivalentchampionPhog Allen 24 0 1 5.2 Fred Taylor 7 0 1 1.8 Hank Iba 15 0 2 3.8 Joe B. Hall 8 1 1 2.4 Billy Donovan 7 3 2 3.4 Steve Fisher 3 4 1 2.9 John Calipari 14 11 1 7.6 Tom Izzo 7 3 1 3 NolanRichardso9 6 1 4.4 John Wooden 16 0 10 7.2 Rick Pitino 9 11 2 7 JerryTarkanian18 8 1 7.2 Adolph Rupp 28 13 4 12.4 JohnThompson7 6 1 4.2 Jim Calhoun 16 12 3 9.2 Denny Crum 15 11 2 8.2 Roy Williams 15 6 2 6.2Dean Smith 17 13 2 9.4 Bob Knight 11 0 3 3.4 Lute Olson 13 4 1 4.6 MikeKrzyzewski12 13 4 9.2 Jim Boeheim 11 5 1 4.6Table 13Coach namesI nput index O utput indexEfficiencyvalue 1I2I3I1O2O3ONCAATournamentThelength ofcoachingCareerCoachingsessionW-L %WinsNumber ofequivalentchampionJohn Wooden 16 29 826 0.804 664 7.2 1.395729 John Calipari 14 22 756 0.774 585 7.6 1.318495 Joe B. Hall 10 16 463 0.721 334 2.4 1.220644 Adolph Rupp 20 41 1066 0.822 876 12.4 1.157105Hank Iba 8 40 1085 0.693 752 3.8 1.078677 Roy Williams 23 26 902 0.793 715 6.2 1.034188 Fred Taylor 5 18 455 0.653 297 1.8 1.013679 Jerry Tarkanian 18 30 963 0.79 761 7.2 1.007097 Phog Allen 4 48 978 0.735 719 5.2 0.999999 Jim Boeheim 30 38 1256 0.75 942 4.6 0.984568Tom Izzo 16 19 639 0.717 458 3 0.978536 Dean Smith 27 36 1133 0.776 879 9.4 0.96963Mike Krzyzewski 29 39 1277 0.764 975 9.2 0.960445 Rick Pitino 18 28 920 0.74 681 7 0.940614 Billy Donovan 13 20 658 0.714 470 3.4 0.940542 Nolan Richardson 16 22 716 0.711 509 4.4 0.920282 Lute Olson 28 34 1061 0.731 776 4.6 0.911496 John Thompson 20 27 835 0.714 596 4.2 0.896765 Jim Calhoun 23 40 1259 0.697 877 9.2 0.884227 Denny Crum 23 30 970 0.696 675 8.2 0.882805 Bob Knight 28 42 1273 0.706 899 3.4 0.87699 Steve Fisher 13 24 739 0.658 486 2.9 0.854304From the Table 13, it can been seen that the top 5 coaches are: John Wooden, John Calipari, Joe B. Hall, Adolph Rupp, Hank Iba. The result is in accordance with。

2014美赛A题讲解

2014美赛A题讲解
多车道FI模型则是在单车道FI模型的基础上增加了车 辆换道规则,要求在各条车道上行驶的车辆要遵守FI规 则, 在进行车道变换时遵循车辆换道规则。
2021/3/7
CHENLI
10
用CA模型描述交通流,主要是通过对驾驶员驾车行为的 分析,建立驾驶员或车辆的行为输出规则,从而建立元胞 自动机的运行规则,然后仿真实际交通背景,模拟整体元 胞群的动态过程,从中得到解决交通问题的方法或信息。 这类模型考虑的主要问题包括:如何用微观规则的建模来 描述元胞的运动过程;如何用宏观规则的建模来描述高速 公路运行车辆的随机性,这是交通现象的重要特征。
2021/3/7
CHENLI
13
2)平均车速( v ):
在固定路段内不同车道上所有车辆的平均时速的平均值,
过程中提取;其次,建立高速公路上车辆的运行状态随时间
变化的微观规则模型,特别是“右行左超车”的规则模型;
第三是运行车辆的不同运行状态改变的宏观概率分布,这是
由交通问题的随机性决定的, 而随机性是交通问题的一个特
别重要的特性;最后是设计元胞自动机的仿真对比试验,特
2别021/是3/7元胞群空间、初始元胞群CH密ENL度I 、分布与状态等。
2014美赛A题建模与求解
讲解人:王永丽
2014年8月11日
2021/3/7
CHENLI
1
提纲
问题描述 求解方案
1、问题分析与模型建立 2、模型求解与计算机仿真
模型优缺点分析与改进
2021/3/7
CHENLI
2
问题描述
题目:除非超车否则靠右行驶的交通规则
问题:在一些汽车靠右行驶的国家(比如美国,中国等),
2021/3/7
CHENLI

2014美国大学生数学建模竞赛外文文献检索方法与技巧(82页)

2014美国大学生数学建模竞赛外文文献检索方法与技巧(82页)

知网翻译
读秀 /
• 读秀知识库收录238万种中文图书题录信息,目前我馆通过该 平台可看的全文图书达到100万种。用户可以通过读秀知识库 平台对图书的题录、目录和全文进行检索,在线浏览封面页、 版权页、前言页、目录页和正文前30页,部分图书还可浏览各 章节的部分页。 • 对于没有“本馆电子全文”链接的电子图书,用户可通过文献 传递服务在线阅读全文的其它部分。方法是点击“图书馆文献 传递中心”链接,指定需要阅读的全文页码,如30-50页,但单 次指定的页数不可超过50页,一周内指定的页数不可超过全书 总页数的20%左右(百分比根据图书等级而定),填写您的Email地址,收到“FirstDRS参考咨询服务回复”邮件后,点击邮 件中的页码链接,用IE浏览器即可在线阅读您指定的全文内容 • 注:从校园网图书馆电子资源进入
2014美国大学生数学建模竞赛 外文文献检索方法
By at352693585@
美赛讨论qq群39200557 美赛论坛 /forum.php?mod=forumdisplay&fid=41
有极好的免费资料
1
文献检索的方法与技巧
校园网没有的数据库怎么办? 1.去/forum.php?mod=forumdisplay&fid=57 文献求助 (求助必须有全文链接和文题 )
校园网没有的数据库怎么办?
2.去 人大经济论坛 国内外文献账号区 /forum-109-1.html
施普林格出版公司——世界出版巨人的 150年历程
• 在各大学图书馆的书架上,我们可以看到大量数学类的“黄皮书”;在北图 书馆的工具书阅览室中,在外文书店销售的影引版外文图书中,最齐全的是 《研究生数学教程丛书(GTM)》;我们大概知道,它们都出自于同一个出 版社施普林格出版公司。 • 德国的施普林格出版公司(Springer-Verlag GmbH & Co. KG)是世界上 最大的私营科技出版社,迄今已有150年的历史,其总部设在德国的柏林和海 德堡,分部所在的城市有纽约、伦敦、巴黎、东京、香港、巴塞罗那、布达 佩斯和维也纳,全世界的雇员有1300人。它的作者包括全世界众多著名科学 家,其中许多是诺贝尔奖获得者和各学科的领先人物。 • 施普林格出版公司现有库存17000种图书,其中60%为英文图书。目前每 年出版1700中新书,约300种科学期刊。其出版量如此之众多,权威性如此之 高,销售量如此之广(64%的书刊销往国外),以至于我们完全可以这样说 :西方世界几乎没有一个科学家、工程师或医生没有读过一本该公司的图书 或期刊。 • 150年前,亦即1842年5月10日,出版社的创始人尤利乌斯· 施普林格( Julius Springer)在柏林开设了一家书店,并同时开始其科学图书的出版工作 。

元胞自动机NaSch模型及其MATLAB代码

元胞自动机NaSch模型及其MATLAB代码

元胞自动机NaSch模型及其MATLAB代码作业要求根据前面的介绍,对NaSch模型编程并进行数值模拟:模型参数取值:Lroad=1000,p=0.3,Vmax=5。

边界条件:周期性边界。

数据统计:扔掉前50000个时间步,对后50000个时间步进行统计,需给出的结果。

基本图(流量-密度关系):需整个密度范围内的。

时空图(横坐标为空间,纵坐标为时间,密度和文献中时空图保持一致, 画500个时间步即可)。

指出NaSch模型的创新之处,找出NaSch模型的不足,并给出自己的改进思路。

流量计算方法:密度=车辆数/路长;流量flux=density×V_ave。

在道路的某处设置虚拟探测计算统计时间T内通过的车辆数N;流量flux=N/T。

在计算过程中可都使用无量纲的变量。

1、NaSch模型的介绍作为对184号规则的推广,Nagel和Schreckberg在1992年提出了一个模拟车辆交通的元胞自动机模型,即NaSch模型(也有人称它为NaSch模型)。

时间、空间和车辆速度都被整数离散化。

道路被划分为等距离的离散的格子,即元胞。

每个元胞或者是空的,或者被一辆车所占据。

车辆的速度可以在(0~Vmax)之间取值。

2、NaSch模型运行规则在时刻t到时刻t+1的过程中按照下面的规则进行更新:(1)加速:vnmin(vn1,vmax)规则(1)反映了司机倾向于以尽可能大的速度行驶的特点。

(2)减速:vnmin(vn,dn)规则(2)确保车辆不会与前车发生碰撞。

(3)随机慢化:以随机概率p进行慢化,令:vnmin(vn-1,0)规则(3)引入随机慢化来体现驾驶员的行为差异,这样既可以反映随机加速行为,又可以反映减速过程中的过度反应行为。

这一规则也是堵塞自发产生的至关重要因素。

(4)位置更新:,车辆按照更新后的速度向前运动。

其中vn,xn 分别表示第n辆车位置和速度;l(l≥1)为车辆长度;p表示随机慢化概率;表示n车和前车n+1之间空的元胞数;vmax为最大速度。

2014美赛A题元胞自动机完整代码,做出来了有木有~

2014美赛A题元胞自动机完整代码,做出来了有木有~

2014美赛A题元胞自动机完整代码,做出来了有木有~ 2014美赛相关MATLAB程序(基于NS模型)主程序:NaSch_3.m程序代码% 单车道最大速度3个元胞开口边界条件加速减速随机慢化 clfclear all%build the GUI%define the plot button plotbutton=uicontrol('style','pushbutton',... 'string','Run', ...'fontsize',12, ...'position',[100,400,50,20], ...'callback', 'run=1;');%define the stop buttonerasebutton=uicontrol('style','pushbutton',... 'string','Stop', ...'fontsize',12, ...'position',[200,400,50,20], ...'callback','freeze=1;');%define the Quit button quitbutton=uicontrol('style','pushbutton',... 'string','Quit', ...'fontsize',12, ...'position',[300,400,50,20], ...'callback','stop=1;close;');number = uicontrol('style','text', ... 'string','1', ...'fontsize',12, ...'position',[20,400,50,20]);%CA setupn=100; %数据初始化z=zeros(1,n); %元胞个数z=roadstart(z,5); %道路状态初始化,路段上随机分布5辆 cells=z;vmax=3; %最大速度v=speedstart(cells,vmax); %速度初始化 x=1; %记录速度和车辆位置memor_cells=zeros(3600,n);memor_v=zeros(3600,n);imh=imshow(cells); %初始化图像白色有车,黑色空元胞 set(imh,'erasemode', 'none')axis equalaxis tightstop=0; %wait for a quit button push run=0; %wait for a draw freeze=0; %wait for a freeze(冻结)while (stop==0)if(run==1)%边界条件处理,搜素首末车,控制进出,使用开口条件a=searchleadcar(cells);b=searchlastcar(cells);[cells,v]=border_control(cells,a,b,v,vmax);i=searchleadcar(cells); %搜索首车位置for j=1:iif i-j+1==n[z,v]=leadcarupdate(z,v);1continue;else%======================================加速、减速、随机慢化if cells(i-j+1)==0; %判断当前位置是否非空continue;else v(i-j+1)=min(v(i-j+1)+1,vmax); %加速%=================================减速k=searchfrontcar((i-j+1),cells); %搜素前方首个非空元胞位置if k==0; %确定于前车之间的元胞数d=n-(i-j+1);else d=k-(i-j+1)-1;endv(i-j+1)=min(v(i-j+1),d);%==============================%减速%随机慢化v(i-j+1)=randslow(v(i-j+1));new_v=v(i-j+1);%======================================加速、减速、随机慢化%更新车辆位置z(i-j+1)=0;z(i-j+1+new_v)=1;%更新速度v(i-j+1)=0;v(i-j+1+new_v)=new_v;endendendcells=z;memor_cells(x,:)=cells; %记录速度和车辆位置memor_v(x,:)=v;x=x+1;set(imh,'cdata',cells) %更新图像%update the step number diaplaypause(0.2);stepnumber = 1 + str2num(get(number,'string'));set(number,'string',num2str(stepnumber))endif (freeze==1)run = 0;freeze = 0;enddrawnowend//////////////////////////////////////////////////////////////////// ///函数:border_control.m程序代码Function[new_matrix_cells,new_v]=border_control(matrix_cells,a,b,v,v max)%边界条件,开口边界,控制车辆出入%出口边界,若头车在道路边界,则以一定该路0.9离去n=length(matrix_cells);if a==n2rand('state',sum(100*clock)*rand(1));%??ÒåËæ?úÖÖ×Óp_1=rand(1); %产生随机概率if p_1<=1 %如果随机概率小于0.9,则车辆离开路段,否则不离口matrix_cells(n)=0;v(n)=0;endend%入口边界,泊松分布到达,1s内平均到达车辆数为q,t为1s if b>vmax t=1;q=0.25;x=1;p=(q*t)^x*exp(-q*t)/prod(x); %1s内有1辆车到达的概率rand('state',sum(100*clock)*rand(1));p_2=rand(1);if p_2<=pm=min(b-vmax,vmax);matrix_cells(m)=1;v(m)=m;endendnew_matrix_cells=matrix_cells;new_v=v;//////////////////////////////////////////////////////////////////// ///函数:leadcarrupdate.m程序代码function [new_matrix_cells,new_v]=leadcarupdate(matrix_cells,v) %第一辆车更新规则n=length(matrix_cells);if v(n)~=0matrix_cells(n)=0;v(n)=0;endnew_matrix_cells=matrix_cells;new_v=v;//////////////////////////////////////////////////////////////////// ///函数:randslow.m程序代码function [new_v]=randslow(v)p=0.3; %慢化概率rand('state',sum(100*clock)*rand(1));%??ÒåËæ?úÖÖ×Ó p_rand=rand; %产生随机概率if p_rand<=pv=max(v-1,0);endnew_v=v;//////////////////////////////////////////////////////////////////// ///3函数:roadstart.m程序代码function [matrix_cells_start]=roadstart(matrix_cells,n) %道路上的车辆初始化状态,元胞矩阵随机为0或1,matrix_cells初始矩阵,n初始车辆数k=length(matrix_cells);z=round(k*rand(1,n));for i=1:nj=z(i);if j==0matrix_cells(j)=0;elsematrix_cells(j)=1;endendmatrix_cells_start=matrix_cells;//////////////////////////////////////////////////////////////////// ///函数:searchfrontcar.m程序代码function[location_frontcar]=searchfrontcar(current_location,matrix_cells) i=length(matrix_cells);if current_location==ilocation_frontcar=0;elsefor j=current_location+1:iif matrix_cells(j)~=0location_frontcar=j;break;elselocation_frontcar=0;endendend//////////////////////////////////////////////////////////////////// ///函数:searchlastcar.m程序代码function [location_lastcar]=searchlastcar(matrix_cells) %搜索尾车位置for i=1:length(matrix_cells)if matrix_cells(i)~=0location_lastcar=i;break;else %如果路上无车,则空元胞数设定为道路长度location_lastcar=length(matrix_cells);endend//////////////////////////////////////////////////////////////////// ///4函数:searchleadcar.m程序代码function [location_leadcar]=searchleadcar(matrix_cells)i=length(matrix_cells);for j=1:iif matrix_cells(i-j+1)~=0location_leadcar=i-j+1;break;elselocation_leadcar=0;endend//////////////////////////////////////////////////////////////////// ///函数:speadstart.m程序代码function [v_matixcells]=speedstart(matrix_cells,vmax) %道路初始状态车辆速度初始化v_matixcells=zeros(1,length(matrix_cells)); for i=1:length(matrix_cells)if matrix_cells(i)~=0v_matixcells(i)=round(vmax*rand(1));endend5。

(完整word版)马氏链模型及matlab程序

(完整word版)马氏链模型及matlab程序

一、用法,用来干什么,什么时候用 二、步骤,前因后果,算法的步骤,公式 三、程序 四、举例五、前面国赛用到此算法的备注一下马氏链模型用来干什么马尔可夫预测法是应用概率论中马尔可夫链(Markov chain )的理论和方法来研究分析时间序列的变化规律,并由此预测其未来变化趋势的一种预测技术。

什么时候用应用马尔可夫链的计算方法进行马尔可夫分析, 主要目的是根据某些变量现在的情 况及其变动趋向,来预测它在未来某特定区间可能产生的变动,作为提供某种决策的依 据.马尔可夫链的基本原理我们知道,要描述某种特定时期的随机现象如某种药品在未来某时期的销售情况,比如说第n 季度是畅销还是滞销,用一个随机变量X n 便可以了,但要描述未来所有时期的情况,则需要一系列的随机变量 X 1,X 2,…,X n ,….称{ X t ,t ∈T ,T 是参数集}为随机过程,{ X t }的取值集合称为状态空间.若随机过程{ X n }的参数为非负整数, X n 为离散随机变量,且{ X n }具有无后效性(或称马尔可夫性),则称这一随机过程为马尔可夫链(简称马氏链).所谓无后效性,直观地说,就是如果把{ X n }的参数n 看作时间的话,那么它在将来取什么值只与它现在的取值有关,而与过去取什么值无关.对具有N 个状态的马氏链,描述它的概率性质,最重要的是它在n 时刻处于状态i 下一时刻转移到状态j 的一步转移概率:N j i n p i X j X P j i n n ,,2,1,)()|(1 ====+若假定上式与n 无关,即 ====)()1()0(n p p p j i j i j i ,则可记为j i p (此时,称过程是平稳的),并记⎪⎪⎪⎪⎪⎭⎫⎝⎛=N N N N N N p p p p p p p p p P212222111211(1) 称为转移概率矩阵.转移概率矩阵具有下述性质:(1)N j i p j i ,,2,1,,0 =≥.即每个元素非负.(2)N i p Nj j i ,,2,1,11 ==∑=.即矩阵每行的元素和等于1.如果我们考虑状态多次转移的情况,则有过程在n 时刻处于状态i ,n +k 时刻转移到状态j 的k 步转移概率:N j i n p i X j X P k j i n k n ,,2,1,)()|()( ====+同样由平稳性,上式概率与n 无关,可写成)(k j i p .记⎪⎪⎪⎪⎪⎭⎫ ⎝⎛=)()(2)(1)(2)(22)(21)(1)(12)(11)(k N N k N k N k N k k k N k k k p p p p p p p p p P(2)称为k 步转移概率矩阵.其中)(k j i p 具有性质:N j i p k ji ,,2,1,,0)( =≥; N i p Nj k j i ,,2,1,11)( ==∑=.一般地有,若P 为一步转移矩阵,则k 步转移矩阵⎪⎪⎪⎪⎪⎭⎫ ⎝⎛=)()(2)(1)(2)(22)(21)(1)(12)(11)(k N N k N k N k N k k k N k k k p p p p p p p p p P(3) (2)状态转移概率的估算在马尔可夫预测方法中,系统状态的转移概率的估算非常重要.估算的方法通常有两种:一是主观概率法,它是根据人们长期积累的经验以及对预测事件的了解,对事件发生的可能性大小的一种主观估计,这种方法一般是在缺乏历史统计资料或资料不全的情况下使用.二是统计估算法,现通过实例介绍如下.例3 记录了某抗病毒药的6年24个季度的销售情况,得到表1.试求其销售状态的转移概率矩阵.表1 某抗病毒药24个季度的销售情况季度 销售状态 季度 销售状态 季度 销售状态 季度 销售状态 1 1 (畅销) 7 1(畅销) 13 1(畅销) 19 2(滞销) 2 1(畅销) 8 1(畅销) 14 1(畅销) 20 1(畅销) 3 2(滞销) 9 1(畅销) 15 2(滞销) 21 2(滞销) 4 1(畅销) 10 2(滞销) 16 2(滞销) 22 1(畅销) 5 2(滞销) 11 1(畅销) 17 1(畅销) 23 1(畅销) 62(滞销)122(滞销)181(畅销)241(畅销)分析表中的数据,其中有15个季度畅销,9个季度滞销,连续出现畅销和由畅销转入滞销以及由滞销转入畅销的次数均为7,连续滞销的次数为2.由此,可得到下面的市场状态转移情况表(表2).表2 市场状态转移情况表现计算转移概率.以频率代替概率,可得连续畅销的概率:1170.5151p ===-连续出现畅销的次数出现畅销的次数分母中的数为15减1是因为第24季度是畅销,无后续记录,需减1.同样得由畅销转入滞销的概率:1270.5151p ===-畅销转入滞销的次数出现畅销的次数滞销转入畅销的概率:2170.789p ===滞销转入畅销的次数出现滞销的次数连续滞销的概率:2220.229p ===连续滞销的次数出现滞销的次数综上,得销售状态转移概率矩阵为:⎪⎪⎭⎫ ⎝⎛=⎪⎪⎭⎫ ⎝⎛=22.078.05.05.022211211p pp p P 从上面的计算过程知,所求转移概率矩阵P 的元素其实可以直接通过表2中的数字计算而得到,即将表中数分别除以该数所在行的数字和便可:77711+=p77712+=p 27721+=p 77222+=pMatlab 程序:format rat clca=[ 1 1 2 1 2 2 1 1 1 2 1 2,1 1 2 2 1 1 2 1 2 1 1 1]; for i=1:2 for j=1:2f (i,j)=length(findstr ([i j],a)); end end fni=(sum(f ’))' for i=1:2p(i,:)=f(i ,:)/ni(i ); end p由此,推广到一般情况,我们得到估计转移概率的方法:假定系统有m 种状态S 1,S 2,…,S m ,根据系统的状态转移的历史记录,得到表3的统计表格,以j i p ˆ表示系统从状态i 转移到状态j 的转移概率估计值,则由表3的数据计算估计值的公式如下:表3 系统状态转移情况表(3)带利润的马氏链在马氏链模型中,随着时间的推移,系统的状态可能发生转移,这种转移常常会引起某种经济指标的变化.如抗病毒药的销售状态有畅销和滞销两种,在时间变化过程中,有时呈连续畅销或连续滞销,有时由畅销转为滞销或由滞销转为畅销,每次转移不是盈利就是亏本.假定连续畅销时盈r 11元,连续滞销时亏本r 22元,由畅销转为滞销盈利r 12元,由滞销转为畅销盈利r 21元,这种随着系统的状态转移,赋予一定利润的马氏链,称为有利润的马氏链.对于一般的具有转移矩阵⎪⎪⎪⎪⎪⎭⎫⎝⎛=N N N N N N p p p p p p p p p P212222111211的马氏链,当系统由i 转移到j 时,赋予利润r ij(i ,j =1,2,…,N ),则称⎪⎪⎪⎪⎪⎭⎫⎝⎛=N N N N N N r r r r r r r r r R212222111211(5) 为系统的利润矩阵,r ij >0称为盈利,r ij <0称为亏本,r ij = 0称为不亏不盈.随着时间的变化,系统的状态不断地转移,从而可得到一系列利润,由于状态的转移是随机的,因而一系列的利润是随机变量,其概率关系由马氏链的转移概率决定.例如从抗病毒药的销售状态的转移矩阵,得到一步利润随机变量)1(1x 、)1(2x 的概率分布分别为:)1(1x r 12)1(2x r 21 r 22其中 p 11+ p 12 = 1 ,p 21+ p 22 = 1.如果药品处于畅销阶段,即销售状态为i =1,我们想知道,经过n 个季度以后,期望获得的利润是多少?为此,引入一些计算公式.首先,定义)(n i v 为抗病毒药现在处于)2,1(=i i ,经过n 步转移之后的总期望利润,则 一步转移的期望利润为:∑==+==212211)1()1()(j j i j i i i i i i i p r p r p r x E v其中)()1(i x E 是随机变量)1(i x 的数学期望.二步转移的期望利润为:∑=+=+++==21)1(2)1(221)1(11)2()2(][][][)(j j i j j i i i i i i i p v r p v r p v r x E v其中随机变量)2(i x (称为二步利润随机变量)的分布为:2,1,)()1()2(==+=j p v r x P j i j j i i例如,若⎪⎪⎭⎫ ⎝⎛=6.04.05.05.0P , ⎪⎪⎭⎫⎝⎛-=7339R则抗病毒药销售的一步利润随机变量:抗病毒药畅销和滞销时的一步转移的期望利润分别为:65.035.09)(12121111)1(1)1(1=⨯+⨯=+==p r p r x E v 36.074.03)(22222121)1(2)1(2-=⨯-⨯=+==p r p r x E v二步利润随机变量为:)2(1x 3—3)2(2x —7-3抗病毒药畅销和滞销时的二步转移的期望利润分别为:12)1(21211)1(111)2(1)2(1][][)(p v r p v r x E v +++==5.75.0)33(5.0)69(=⨯-+⨯+=22)1(22221)1(121)2(2)2(2][][)(p v r p v r x E v +++==4.26.0)37(4.0)63(-=⨯--+⨯+=一般地定义k 步转移利润随机变量),2,1()(N i x k i =的分布为:N j p v r x P ji k j j i k i ,2,1)()1()(==+=-则系统处于状态i 经过k 步转移后所得的期望利润)(k i v 的递推计算式为:j i k j Nj j i k i k i p v r x E v )()()1(1)()(-=+==∑∑∑∑=-=-=+=+=Nj j i k j i Nj ji k j Nj j i j i p v v p v p r 1)1()1(1)1(1(6)当k =1时,规定边界条件0)0(=i v .称一步转移的期望利润为即时的期望利润,并记N i q v i i ,2,1,)1(==.可能的应用题型题型一、市场占有率预测例题1在购买该药的总共1000家对象(购买力相当的医院、药店等)中,买A 、B 、C 三药厂的各有400家、300家、300家,预测A 、B 、C 三个厂家生产的某种抗病毒药在未来的市场占有情况。

(完整版)2014大学生数学建模美赛B题数据全

(完整版)2014大学生数学建模美赛B题数据全

1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956
29 BAA
WSC
30 BAA
WSC
31 BAA
WSC
32 NBA

33 NBA
BOS
34 NBA
BOS
35 NBA
BOS
36 NBA
BOS
37 NBA
BOS
38 NBA
BOS
39 NBA
BOS
34 0.585
56
21
35 0.375
82
39
43 0.476
82
26
56 0.317
16
8
8
0.5
70
12
58 0.171
Stan Albeck Stan Albeck Stan Albeck Stan Albeck Bob Bass
1979 1980 1981 1982 1983
K.C. Jones
41 NBA
CAP
46 ABA
SAA
40 NBA
NOJ
42 NBA
WSB
47 ABA
SAA
43 NBA
WSB
42 NBA
NOJ
43 NBA
NOJ
44 NBA
NOJ
51 NBA
SAS
42 NBA
DET
79
5722 0.722806020
0.75
80
58
22 0.725
80
59
21 0.738
80
62
18 0.775
Coach Season

Matlab 2014软件教程(完美版)

Matlab 2014软件教程(完美版)

Matlab 软件目录1、Matlab 帮助的使用 (3)2、Matlab 数据输入与类型 (4)3、Matlab 中的M 文件及程序调试 (12)4、Matlab 绘图命令 (17)5、Matlab 在高等数学中的应用 (34)6、Matlab 在线性代数中的应用 (60)7、Matlab 数据处理 (67)9、评价方法 (82)10、预测方法 (97)11、蒙特卡洛方法 (110)12、智能算法 (122)13、分形 (129)14、Simulink 初步 (134)15、Matlab 在概率统计中的应用 (147)参考文献 (151)作为和Mathematica、Maple 并列的三大数学软件。

其强项就是其强大的矩阵计算以及仿真能力。

要知道Matlab 的由来就是Matrix + Laboratory = Matlab,所以这个软件在国内也被称作《矩阵实验室》。

每次MathWorks 发布Matlab 的同时也会发布仿真工具Simulink。

在欧美很多大公司在将产品投入实际使用之前都会进行仿真试验,他们所主要使用的仿真软件就是Simulink。

Matlab 提供了自己的编译器:全面兼容C++以及Fortran 两大语言。

所以Matlab 是工程师,科研工作者手上最好的语言,最好的工具和环境。

Matlab 已经成为广大科研人员的最值得信赖的助手和朋友!目前MATLAB 产品族可以用来进行:-数值分析-数值和符号计算-工程与科学绘图-控制系统的设计与方针-数字图像处理-数字信号处理-通讯系统设计与仿真-财务与金融工程...Simulink 是基于MATLAB 的框图设计环境,可以用来对各种动态系统进行建模、分析和仿真,它的建模范围广泛,可以针对任何能够用数学来描述的系统进行建模,例如航空航天动力学系统、卫星控制制导系统、通讯系统、船舶及汽车等等,其中了包括连续、离散,条件执行,事件驱动,单速率、多速率和混杂系统等等。

2014美赛A题基于NS模型的超车模型Matlab代码新鲜出炉

2014美赛A题基于NS模型的超车模型Matlab代码新鲜出炉

plotbutt on=uic on trol('style','pushbutt on',...'stri ng','Ru n',...'fon tsize',12, ...'positio n',[100,400,50,20], ...'callback', 'run=1;');%defi ne the stop butt onerasebutt on=uic on trol('style','pushbutt on',...'stri ng','Stop', ...'fon tsize',12, ...'positio n',[200,400,50,20], ...'callback','freeze=1;');%defi ne the Quit butt onquitbutt on=uic on trol('style','pushbutt on',...'stri ng','Quit', ...'fon tsize',12, ...'positio n',[300,400,50,20], ...'callback','stop=1;close;');nu mber = uic on trol('style','text', ...'stri ng','1', ...'fon tsize',12, ...'positio n',[20,400,50,20]);%==============================%CA setupn=128;%in itialize the arrays z = zeros (n,n);cells =乙sum = z;%set a few cells to one cells( n/2,.25* n:.75* n) = 1; cells(.25* n: .75* n,n/2) = 1;%cells(.5* n-1,.5* n-1)=1;%cells(.5* n-2,.5* n-2)=1;%cells(.5* n-3,.5* n-3)=1;cells = (ran d( n,n ))<.5 ;%how long for each case to stability or simple oscillators %build an image and display it imh = image(cat(3,cells,z,z)); set(imh, 'erasemode', 'non e') axis equalaxis tight%in dex defi niti on for cell updatex = 2:n-1;y = 2:n-1;%Ma in event loopstop= 0; %wait for a quit butt on push run = 0; %wait for a draw freeze =0; %wait for a freezewhile (stop==0)if (run==1)%n earest n eighbor sumsum(x,y) = cells(x,y-1) + cells(x,y+1) + ... cells(x-1, y) + cells(x+1,y) + ... cells(x-1,y-1) + cells(x-1,y+1) + ... cells(3: n, y-1) +cells(x+1,y+1);% The CA rulecells = (sum==3) | (sum==2 & cells);%draw the new imageset(imh, 'cdata', cat(3,cells,z,z))%update the step nu mber diaplaystep nu mber = 1 + str2 nu m(get (nu mber,'stri ng')); set (nu mber,'stri ng' ,nu m2str(step nu mber)) endif (freeze==1) run = 0; freeze = 0;enddraw now %n eed this in the loop for con trols to workend2、Surface Tension %Co nway's life with GUI clf; clear all%============================================= %buil d the GUI%defi ne the plot butt onplotbutt on=uic on trol('style','pushbutt on',...'stri ng','Ru n',...'fon tsize',12, ...'positio n',[100,400,50,20], ...'callback', 'run=1;');%defi ne the stop butt onerasebutt on=uic on trol('style','pushbutt on',...'stri ng','Stop', ...'fon tsize',12, ...'positio n',[200,400,50,20], ...'callback','freeze=1;');%defi ne the Quit butt onquitbutt on=uic on trol('style','pushbutt on',...'stri ng','Quit', ...'fon tsize',12, ...'positio n',[300,400,50,20], ...'callback','stop=1;close;');nu mber = uic on trol('style','text', ...'stri ng','1', ...'fon tsize',12, ...'positio n',[20,400,50,20]);%============================================= %CA setupn=128;%in itialize the arraysz = zeros (n,n);cells =乙sum = z;%set a few cells to onecells( n/2,.25* n:.75* n) = 1;cells(.25* n: .75* n,n/2) = 1;%cells(.5* n-1,.5* n-1)=1;%cells(.5* n-2,.5* n-2)=1;%cells(.5* n-3,.5* n-3)=1;cells = (ran d( n,n ))<.5 ;%how long for each case to stability or simple oscillators%build an image and display itimh = image(cat(3,cells,z,z));set(imh, 'erasemode', 'non e')axis equalaxis tight%in dex defi niti on for cell updatex = 2:n-1;y = 2:n-1;%Ma in event loopstop= 0; %wait for a quit butt on push run = 0; %wait for a draw freeze = 0; %wait for a freezewhile (stop==0)if (run==1)%n earest n eighbor sumsum(x,y) = cells(x,y-1) + cells(x,y+1) + ... cells(x-1, y) + cells(x+1,y) + ... cells(x-1,y-1) + cells(x-1,y+1) + ...cells(3: n, y-1) + cells(x+1,y+1)+... cells(x,y);% The CA rulecells = ~((sum<4) | (sum==5));%draw the new imageset(imh, 'cdata', cat(3,cells,z,z))%update the step nu mber diaplaystep nu mber = 1 + str2 nu m(get (nu mber,'stri ng')); set (nu mber,'stri ng' ,nu m2str(step nu mber)) endif (freeze==1) run = 0; freeze = 0;enddraw now %n eed this in the loop for con trols to workend3、Percolation Cluster % Percolation Cluster clfclear all threshold = .63;% ax = axes('u nits','pixels','positi on ',[1 1 500 400],'color','k');text('units', 'pixels', 'position', [50,255,0],...'stri ng','BioNB','color','w','fo ntn ame','helvetica','fo ntsize',100)text('units', 'pixels', 'position', [120,120,0],...'stri ng','441','color','w','fo ntn ame','helvetica','fo ntsize',100)in itial = getframe(gca);[a,b,c]=size(i nitial.cdata);z=zeros(a,b);cells = double(i nitial.cdata(:,:,1)==255);visit = z ;sum = z;imh = image(cat(3,z,cells,z));set(imh, 'erasemode', 'non e')%returnfor i=1:100sum(2:a-1,2:b-1) = cells(2:a-1,1:b-2) + cells(2:a-1,3:b) + ...cells(1:a-2, 2:b-1) + cells(3:a,2:b-1) + ... cells(1:a-2,1:b-2) + cells(1:a-2,3:b) + ...cells(3:a,1:b-2) + cells(3:a,3:b);pick = ran d(a,b);%edges only%cells = (cells & (sum<8)) | ((sum>=1) & (pick>=threshold) & (visit==0)) cells = cells | ((sum>=1) &(pick>=threshold) & (visit==0)) ;visit = (sum>=1) ;%& (pick<threshold) ;set(imh, 'cdata', cat(3,z,cells,z))draw nowend returnfigure(2)image(cat(3,z,cells,z))4、Excitable media (BZ react ion or heart) %CA driver%excitable mediaclf; clear alln=128;z=zeros( n,n); cells=z;%cells( n/2,n *.25: n*.75) = 1;%cells( n*.25: n*.75, n/2) = 1;sum=z;imh = image(cat(3,cells,z,z));set(imh, 'erasemode', 'non e')axis equalcells = (rand(n,n ))<.1 ;axis tightx = [2: n-1]; y = [2: n-1];t = 6; % cen ter value=6; 7 makes fast patter n; 5 an aliati ng wavest1 = 3; % center value=3for i=1:1200sum(x,y) = ((cells(x,y-1)>0)&(cells(x,y-1)<t)) + ((cells(x,y+1)>0)&(cells(x,y+1)<t)) + ... ((cells(x-1, y)>0)&(cells(x-1, y)<t)) + ((cells(x+1,y)>0)&(cells(x+1,y)<t)) + ... ((cells(x-1,y-1)>0)&(cells(x-1,y-1)<t)) +((cells(x-1,y+1)>0)&(cells(x-1,y+1)<t)) + ... ((cells(x+1,y-1)>0)&(cells(x+1,y-1)<t)) +((cells(x+1,y+1)>0)&(cells(x+1,y+1)<t));cells = ((cells==0) & (sum>=t1)) + ...2*(cells==1) + ...3*(cells==2) + ...4*(cells==3) + ...5*(cells==4) + ...6*(cells==5) +...7*(cells==6) +...8*(cells==7) +...9*(cells==8) +...0*(cells==9);set(imh, 'cdata', cat(3,z,cells/10,z))draw nowend5、Forest Fire%CA driver% %forest fire clfclear all n=100;Plight ning = .000005;Pgrowth = .01; %.01 z=zeros( n,n); o=on es( n,n); veg=z; sum=z;imh = image(cat(3,z,veg*.02,z));set(imh, 'erasemode', 'non e')axis equalaxis tight% burning -> empty% green -> burning if one neigbor burning or with prob=f (lightning)% empty -> gree n with prob=p (growth)% veg = {empty=0 burnin g=1 gree n=2}for i=1:3000%n earby fires?sum = (veg(1: n,[n 1:n-1])==1) + (veg(1: n,[2:n 1])==1) + ...(veg([n 1: n-1], 1:n )==1) + (veg([2:n 1],1: n)==1);veg =...2*(veg==2) - ((veg==2) & (sum>0 | (ra nd( n,n )<Plight nin g))) + ... 2*((veg==0) &rand(n,n )<Pgrowth);set(imh, 'cdata', cat(3,(veg==1),(veg==2),z))draw nowend6、Gas dynamics%CA driver%HPP-gasclear allclfn x=52; %must be divisible by 4 ny=100;z=zeros( nx,n y);o=on es( nx,ny);sand = z ; san dNew = z; gnd = z ; diagl = z; diag2 = z;and12 =乙or12 = z;sums = z; orsum = z;gn d(1: nx,ny-3)=1 ; % right gro und line gnd(1:nx,3)=1 ; % left ground linegn d( nx/4: nx/2-2, ny /2)=1; %the hole line gnd(nx/2+2:nx,ny72)=1; %the hole line gnd(nx/4, 1:ny) = 1; %top line gn d(3* nx/4, 1: ny) = 1 ;%bottom line %fill the left sider = rand(nx,ny);san d( nx/4+1:3* nx/4-1,4:ny /2-1) = r(n x/4+1:3* nx/4-1,4:ny/2-1)<0.3;%sa nd(n x/4+1:3* nx/4-1, ny*.75:n y-4) = r(n x/4+1:3* nx/4-1, ny*.75: ny-4)<0.75;%sa nd(n x/2, ny/2) = 1;%sa nd(n x/2+1, ny /2+1) = 1;imh = image(cat(3,z,sa nd,g nd)); set(imh, 'erasemode', 'non e') axis equalaxis tight for i=1:1000p=mod(i,2); %margolis n eighborhood%upper left cell update xi nd = [1+p:2: nx-2+p];yind = [1+p:2: ny-2+p];%See if exactly one diago nal is ones%only (at most) one of the following can be true!diag1(x ind,yind) = (sa nd(x ind,yin d)==1) & (sa nd(x in d+1, yin d+1)==1) & ...(sa nd(x in d+1, yin d)==0) & (sa nd(x ind,yin d+1)==0);diag2(x ind,yind) = (sa nd(x in d+1, yin d)==1) & (sa nd(x ind,yin d+1)==1) & ...(sa nd(x ind,yin d)==0) & (sa nd(x in d+1, yin d+1)==0);%The diago nals both not occupied by two particlesand12(xind,yind) = (diag1(xind,yind)==0) & (diag2(xind,yind)==0);%One diago nal is occupied by two particlesor12(x ind,yind) = diag1(x ind,yind) | diag2(x ind,yin d);%for every gas particle see if it n ear the boun dary sums(x ind,yind) =gn d(x ind,yind) | gn d(x in d+1, yind) | ...gn d(x ind,yin d+1) | gn d(x in d+1, yin d+1);% cell layout:% x,y x+1,y% x,y+1 x+1,y+1%If (no walls) and (diag on als are both not occupied)%the n there is no collisi on, so move opposite cell to curre nt cell%If (no walls) and (only one diago nal is occupied)%the n there is a collisi on so move ccw cell to the curre nt cell%If (a wall)%the n don't cha nge the cell (causes a reflecti on)san dNew(x ind,yind)=...(an d12(x ind,yind) & ~sums(x ind,yind) & san d(x in d+1, yin d+1)) + ...(or12(x ind,yind) & ~sums(x ind,yind) & san d(x ind,yin d+1)) + ... (sums(x ind,yind) & san d(x ind,yin d));san dNew(x in d+1, yind)=...(an d12(x ind,yind) & ~sums(x ind,yind) & san d(x ind,yin d+1)) + ...(or12(x ind,yind) & ~sums(x ind,yind) & san d(x ind,yin d))+ ...(sums(x ind,yind) & san d(x in d+1, yin d));san dNew(x ind,yin d+1)=...(an d12(x ind,yind) & ~sums(x ind,yind) & san d(x in d+1, yin d)) + ...(or12(x ind,yind) & ~sums(x ind,yind) & san d(x in d+1, yin d+1))+ ... (sums(x ind,yind) & san d(x ind,yin d+1));san dNew(x in d+1, yin d+1)=...(an d12(x ind,yind) & ~sums(x ind,yind) & san d(x ind,yin d)) + ...(or12(x ind,yind) & ~sums(x ind,yind) & san d(x in d+1, yin d))+ ... (sums(x ind,yind) & san d(x in d+1, yin d+1));sand = san dNew;draw now endset(imh, 'cdata', cat(3,z,sa nd,g nd))8、Diffusion limited aggregation%diffusi on + dlaclear allclf nx=200; %must be divisible by 4 ny=200;z=zeros( nx,n y); o=on es( nx,ny); sand = z ;san dNew = z;sum = z;gnd = z;gn d( nx/2, ny/2) = 1 ;sand = rand(nx,ny) <.1;imh = image(cat(3,z,sa nd,g nd)); set(imh, 'erasemode', 'non e') axis equalaxis tight for i=1:10000p=mod(i,2); %margolis n eighborhood%upper left cell update xi nd = [1+p:2: nx-2+p];yind = [1+p:2: ny-2+p];%ran dom velocity choicevary = rand(nx,ny) <.5 ; vary1 = 1-vary;%diffusi on rule -- margolus n eighborhood%rotate the 4 cells to ran domize velocitysan dNew(x ind,yind)=...vary(x ind,yin d).*sa nd(x in d+1, yind) + ... %cw vary1(x ind,yin d).*sa nd(x ind,yin d+1) ; %ccwvary(x ind,yin d).*sa nd(x in d+1, yin d+1) + ...vary1(x ind,yin d).*sa nd(x ind,yind);san dNew(x ind,yin d+1)=...vary(x ind,yin d).*sa nd(x ind,yind) + ...vary1(x ind,yin d).*sa nd(x in d+1, yin d+1);san dNew(x in d+1, yin d+1)=...vary(x ind,yin d).*sa nd(x ind,yin d+1) + ...vary1(x ind,yin d).*sa nd(x in d+1, yind);sand = san dNew;%for every sand gra in see if it n ear the fixed, sticky cluster sum(2: nx-1,2: ny-1) = gn d(2: nx-1,1: ny-2)+ gn d(2: nx-1,3: ny) + ...gnd(1:nx-2, 2:ny-1) + gnd(3:nx,2:ny-1) + ... gn d(1: nx-2,1:ny-2) + gn d(1: nx-2,3: ny) + ...san dNew(x in d+1, yind)=...gn d(3: nx,1: ny-2) + gn d(3: nx,3: ny);%add to the clustergnd = ((sum>0) & (sa nd==1)) | gnd ;%and elim in ate the moving particlesan d(fi nd(g nd==1)) = 0;set(imh, 'cdata', cat(3,g nd,g nd,(sa nd==1)));draw nowend9、Sa nd pile%sa nd pileclear allclfn x=52; %must be divisible by 4 ny=100;Pbridge = .05;z=zeros( nx,n y); o=on es( nx,ny); sand = z ;san dNew = z;gnd = z ;gn d(1: nx,ny-3)=1 ; % the ground linegnd(nx/4:nx/2+4,ny_15)=1; %the hole linegnd(nx/2+6:nx,ny-15)=1; %the hole linegnd(nx/4, ny -15:ny) = 1; %side linegn d(3* nx/4, 1:ny) = 1 ;imh = image(cat(3,z',sa nd',g nd'));set(imh, 'erasemode', 'non e')axis equalaxis tightfor i=1:1000p=mod(i,2); %margolis n eighborhoodsand(nx/2,ny/2) = 1; %add a grain at the top%upper left cell updatexi nd = [1+p:2: nx-2+p];yi nd = [1+p:2: ny-2+p];vary = rand(nx,ny) <.95 ;vary1 = 1-vary;san dNew(x ind,yind)=...gn d(x ind,yin d).*sa nd(x ind,yind) + ...(1-g nd(x ind,yin d)).*sa nd(x ind,yin d).*sa nd(x ind,yin d+1) .* ...(sa nd(x in d+1, yin d+1)+(1-sa nd(x in d+1, yin d+1)).*sa nd(x in d+1, yin d));san dNew(x in d+1, yind)=...gn d(x in d+1, yin d).*sa nd(x in d+1, yind) + ...(1-g nd(x in d+1,yi nd)).*sa nd(xi nd+1,yi nd).*sa nd(x in d+1,yi nd+1) .* ... (sa nd(x ind,yin d+1)+(1-sa nd(x ind,yin d+1)).*sa nd(x ind,yin d));san dNew(x ind,yin d+1)=...san d(x ind,yin d+1) + ...(1-sand(xind,yind+1)) .* ...(san d(x ind,yin d).*(1-g nd(x ind,yin d)) + ...(1-sa nd(x in d,yi nd)).*sa nd(x in d+1,yi nd).*(1-g nd(xi nd+1,yi nd)).*sa nd(xi nd+1,yi nd+1));san dNew(x in d+1, yin d+1)=...san d(x in d+1, yin d+1) + ...(1-sand(xind+1,yind+1)) .* ...(san d(x in d+1, yin d).*(1-g nd(x in d+1, yin d)) + ...(1-sa nd(x in d+1, yin d)).*sa nd(x ind,yin d).*(1-g nd(x ind,yin d)).*sa nd(xind,yin d+1));%scramble the sites to make it look bettertempi = san dNew(x ind,yin d+1).*vary(x ind,yin d+1) + ...san dNew(x in d+1, yin d+1).*varyi(x ind,yin d+1);temp2 = san dNew(x in d+1, yin d+1).*vary(x ind,yin d+1) + ...san dNew(x ind,yin d+1).*vary1(x ind,yin d+1);san dNew(x ind,yin d+1) = temp1; san dNew(x in d+1, yin d+1) = temp2;sand = san dNew;set(imh, 'cdata', cat(3,z',sa nd',g nd')) draw nowend。

Matlab 2014软件教程(完美版)

Matlab 2014软件教程(完美版)

Matlab 软件目录1、Matlab 帮助的使用 (3)2、Matlab 数据输入与类型 (4)3、Matlab 中的M 文件及程序调试 (12)4、Matlab 绘图命令 (17)5、Matlab 在高等数学中的应用 (34)6、Matlab 在线性代数中的应用 (60)7、Matlab 数据处理 (67)9、评价方法 (82)10、预测方法 (97)11、蒙特卡洛方法 (110)12、智能算法 (122)13、分形 (129)14、Simulink 初步 (134)15、Matlab 在概率统计中的应用 (147)参考文献 (151)作为和Mathematica、Maple 并列的三大数学软件。

其强项就是其强大的矩阵计算以及仿真能力。

要知道Matlab 的由来就是Matrix + Laboratory = Matlab,所以这个软件在国内也被称作《矩阵实验室》。

每次MathWorks 发布Matlab 的同时也会发布仿真工具Simulink。

在欧美很多大公司在将产品投入实际使用之前都会进行仿真试验,他们所主要使用的仿真软件就是Simulink。

Matlab 提供了自己的编译器:全面兼容C++以及Fortran 两大语言。

所以Matlab 是工程师,科研工作者手上最好的语言,最好的工具和环境。

Matlab 已经成为广大科研人员的最值得信赖的助手和朋友!目前MATLAB 产品族可以用来进行:-数值分析-数值和符号计算-工程与科学绘图-控制系统的设计与方针-数字图像处理-数字信号处理-通讯系统设计与仿真-财务与金融工程...Simulink 是基于MATLAB 的框图设计环境,可以用来对各种动态系统进行建模、分析和仿真,它的建模范围广泛,可以针对任何能够用数学来描述的系统进行建模,例如航空航天动力学系统、卫星控制制导系统、通讯系统、船舶及汽车等等,其中了包括连续、离散,条件执行,事件驱动,单速率、多速率和混杂系统等等。

2014年数学建模美赛题目原文及翻译

2014年数学建模美赛题目原文及翻译

2014年数学建模美赛题目原文及翻译作者:Ternence Zhang转载注明出处:MCM原题PDF:PROBLEM A: The Keep-Right-Except-To-Pass RuleIn countries where driving automobiles on the right is the rule (that is, USA, China and most other countries except for Great Britain, Australia, and some former British colonies), multi-lane freeways often employ a rule that requires drivers to drive in the right-most lane unless they are passing another vehicle, in which case they move one lane to the left, pass, and return to their former travel lane.Build and analyze a mathematical model to analyze the performance of this rule in light and heavy traffic. You may wish to examine tradeoffs between traffic flow and safety, the role of under- or over-posted speed limits (that is, speed limits that are too low or too high), and/or other factors that may not be explicitly called out in this problem statement. Is this ruleeffective in promoting better traffic flow? If not, suggest and analyze alternatives (to include possibly no rule of this kind at all) that might promote greater traffic flow, safety, and/or other factors that you deem important.In countries where driving automobiles on the left is the norm, argue whether or not your solution can be carried over with a simple change of orientation, or would additional requirements be needed.Lastly, the rule as stated above relies upon human judgment for compliance. If vehicle transportation on the same roadway was fully under the control of an intelligent system –either part of the road network or imbedded in the design of all vehicles using the roadway –to what extent would this change the results of your earlier analysis?问题A:车辆右行在一些规定汽车靠右行驶的国家(即美国,中国和其他大多数国家,除了英国,澳大利亚和一些前英国殖民地),多车道的高速公路经常使用这样一条规则:要求司机开车时在最右侧车道行驶,除了在超车的情况下,他们应移动到左侧相邻的车道,超车,然后恢复到原来的行驶车道(即最右车道)。

2014年美国数学建模比赛B题(最佳教练)

2014年美国数学建模比赛B题(最佳教练)
F1________________ F2________________ F3________________ F4________________
B
Summary
2014 Mathematical Contest in Modeling (MCM) Summary Sheet
This paper mainly sets a model of selecting five “best all time college coach” in basketball, football and hockey respectively. The model is separated to six sub-problems and its solution in our paper:1)Selecting the best coach in one NCAA basketball season; 2)Screening the college coach at top-20 to top-30 in the past 100 years; 3)Further analysis to these selected coaches, and ranking the top-5; 4)Applying this model to football and hockey; 5)Gender impact analysis and time impact analysis; 6)Analyzing the reasons that some famous coach selected by some magazines and media are not on our ranking list. For sub-problem1:Identify four indicators, and confirm the weight of each indicator by Analytic Hierarchy Process, then transformer the indicator data into scores and add these scores multiplied by the weight of itself to get the final scores. The best coach in one season is the one with highest score. For sub-problem2: Use the method above to score for all of the coaches in the past 100 years , then select the top-20.For purpose of reducing the influence of subjective factors, we use Principal Component Analysis to get another ranking list, also, we select the top-20.And union these two top-20. For sub-problem3:Surveying these coaches in the union to learn how many NBA players they've respectively brought up. And regarding this as an indicator, then dividing all indicators into Experience,Leading ability and Ability of player cultivation three aspects, and using Multilevel Hierarchical Analysis to weight them. Next, score for each person by the Fuzzy Criterion of Composite and rank according to the scores. With the purpose of reducing the influence of subjective factors, using Grey Correlation Analysis to calculate the grey correlation degree between “perfect coach” and these coaches. After that, using t-test to judge whether the two results with significant differences. The conclusion obtained: There are no significant difference. Namely, this method is generality. For sub-problem4:Fine-tuning part of indicators and weights, then apply this model in football and hockey. For sub-problem5:As One-way Analysis of Variance used, and the conclusion obtained: gender doesn’t affect the overall score or the ranking of coaches, but female coach has unique advantages in women's basketball league. And the time has no significant effect on the comprehensive score ,but the most excellent coach were in the 70s. Combined with the history of NCAA development, we think that it is necessary to improve the weight of the indicator---champions that gotten recently, making this model better. .For sub-problem6: Comparing the data of their career with our standards to find the reasons.

2014美赛A题元胞数据模型仿真matlab源程序

2014美赛A题元胞数据模型仿真matlab源程序

主函数function [ ] = main_tca( ~ )%---------------------------------------------------------------------------------------------------------------------------------------------------------------%%%%%%%% %%-------------------------------------------------------------------------%%基础变量声明~%-------------------------------------------------------------------------%%%%% -------------------------------------------------------------------------%%基本仿真信息(或以配置文件方式直接获得)%-------------------------------------------------------------------------%[Volume SimTimeTimeStepLaneNumCellNum VMAX] = GetBasicInfo();%% -------------------------------------------------------------------------%%生成元胞空间%-------------------------------------------------------------------------%[CellSpace_currentCellSpace_nextstep] = GenerateCellSpace(LaneNum,CellNum);%% -------------------------------------------------------------------------%%生成车辆空间%-------------------------------------------------------------------------%[VehicleSpace] = GenerateVehicleSpace(Volume);%% -------------------------------------------------------------------------%%开始仿真%-------------------------------------------------------------------------%TrafficSimulating(SimTime,TimeStep, CellSpace_current, CellSpace_nextstep, VehicleSpace,VMAX);%% -------------------------------------------------------------------------%%展示结果ResultsPlotting();%-------------------------------------------------------------------------%endfunction [ CellSpace_nextstepVehicleSpace ] = TrafficSimulating( SimTime,TimeStep,CellSpace_current, CellSpace_nextstep, VehicleSpace,VMAX )%TRAFFICSIMULATING Summary of this function goes here% 仿真程序主体CellSpace_Init = CellSpace_nextstep;% 读取信号配时数据SignalCycleMat = load('SignalCycleInfo.ini');sCycle = SignalCycleMat(1);%周期长度sGreenTime = SignalCycleMat(2);%绿灯时长sRedTime = SignalCycleMat(3);%红灯时长%% 是否加载换道模型LaneChangingModelINIMat = load('LaneChangingModeInfo.ini'); UseLaneChangingModelFlag = LaneChangingModelINIMat(1);%%%时间步长和时长必须满足整除关系foriStep = 1:TimeStep:SimTime%判断信号配时tCurrentMod = mod(iStep,sCycle);iftCurrentMod<= sGreenTimesignalFlag = 0;elsesignalFlag = 1;end;%搜寻元胞上存在的车辆,获得每个元胞的车辆占用情况,以及占用车辆的编号[TakenMatTakenCarHeadMatTakenCarIDMat] = SearchCellSpaceForTaken(CellSpace_current);%计算每个车辆的更新信息[CellSpace_nextstepVehicleSpace] = CountingNextStepVehicleState(CellSpace_current,CellSpace_nextstep,VehicleSpace,TakenMat, TakenCarIDMat,VMAX,signalFlag,UseLaneChangingModelFlag);%判断是否发新车,并计算新车的更新信息%更新元胞空间[CellSpace_nextstepVehicleSpace] = AddingNewCarsToEntry(CellSpace_current,CellSpace_nextstep,VehicleSpace);%%统计相关信息%保持数据SavingDataAsFiles(CellSpace_current,VehicleSpace,TakenMat,TakenCarHeadMat,TakenCarIDMat);%绘制图像DrawingCellSpace(TakenMat);%进入下一轮循环CellSpace_current = CellSpace_nextstep;CellSpace_nextstep = CellSpace_Init;end;endfunctionistaken = IsCellTaken(CellSpace,laneid,startTag,endTag)%从startTag开始到endTag结束的这些元胞是否都是空闲,有一个及以上被占用返回1 fori = startTag:1:endTagifGetCellTakenState(CellSpace,laneid,i) == 1istaken = 1;return;end;end;istaken = 0;%这些元胞全部空闲endfunctionResultsPlotting()%% 读取配置信息SavingSettingsMat = load('OutputDataSettings.ini');%输出数据子文件夹subfoldername = SavingSettingsMat(1);%%lanenodatafile = [num2str(subfoldername) '\车辆占用车道数据.txt']; positiondatafile = [num2str(subfoldername) '\车辆所处位置.txt']; speeddatafile = [num2str(subfoldername) '\车辆每一时刻速度.txt']; cartypeinfofile = [num2str(subfoldername) '\车辆基本信息.txt'];%%LaneTakenDMat = importdata(lanenodatafile);VehPositionDMat = importdata(positiondatafile);SpeedDMat = importdata(speeddatafile);VehicleInfoMat = load(cartypeinfofile);%%[stepNum, carNum] = size(SpeedDMat);[Volume SimTimeTimeStepLaneNumCellNum VMAX] = GetBasicInfo();%%travelTime = zeros(1,carNum);%每辆车的旅行时间fori = 1:carNumtravelTime(1,i) = length(find(SpeedDMat(:,i)>=0));end;%%meanSpeed = zeros(stepNum,1);%平均速度meanQueue = zeros(stepNum,1);%平均排队长度volDensity = zeros(stepNum,1);%密度for j = 1:stepNumexistedCarIDs = find(SpeedDMat(j,:)>=0);volDensity(j,1) = sum(GetVehicleLength(existedCarIDs)) / (LaneNum * CellNum); meanQueue(j,1) = sum(GetVehicleLength(find(SpeedDMat(j,:)<=1)))/LaneNum; meanSpeed(j,1) = mean(SpeedDMat(j,SpeedDMat(j,:)>=0));end;%%%%%% %% end。

相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

减速随机慢化clfclear all%build the GUI%define the plot buttonplotbutton=uicontrol('style','pushbutton',...'string','Run', ...'fontsize',12, ...'position',[100,400,50,20], ...'callback', 'run=1;');%define the stop buttonerasebutton=uicontrol('style','pushbutton',...'string','Stop', ...'fontsize',12, ...'position',[200,400,50,20], ...'callback','freeze=1;');%define the Quit buttonquitbutton=uicontrol('style','pushbutton',...'string','Quit', ...'fontsize',12, ...'position',[300,400,50,20], ...'callback','stop=1;close;');number = uicontrol('style','text', ...'string','1', ...'fontsize',12, ...'position',[20,400,50,20]);%CA setupn=100; %数据初始化z=zeros(1,n); %元胞个数z=roadstart(z,5); %道路状态初始化,路段上随机分布5辆cells=z;vmax=3; %最大速度v=speedstart(cells,vmax); %速度初始化x=1; %记录速度和车辆位置memor_cells=zeros(3600,n);memor_v=zeros(3600,n);imh=imshow(cells); %初始化图像白色有车,黑色空元胞set(imh, 'erasemode', 'none')axis equalaxis tightstop=0; %wait for a quit button pushrun=0; %wait for a drawfreeze=0; %wait for a freeze(冻结)while (stop==0)if(run==1)%边界条件处理,搜素首末车,控制进出,使用开口条件a=searchleadcar(cells);b=searchlastcar(cells);[cells,v]=border_control(cells,a,b,v,vmax); i=searchleadcar(cells); %搜索首车位置for j=1:iif i-j+1==n[z,v]=leadcarupdate(z,v);continue;else%======================================加速、减速、随机慢化 if cells(i-j+1)==0; %判断当前位置是否非空continue;else v(i-j+1)=min(v(i-j+1)+1,vmax); %加速%=================================减速k=searchfrontcar((i-j+1),cells); %搜素前方首个非空元胞位置 if k==0; %确定于前车之间的元胞数d=n-(i-j+1);else d=k-(i-j+1)-1;endv(i-j+1)=min(v(i-j+1),d);%==============================%减速%随机慢化v(i-j+1)=randslow(v(i-j+1));new_v=v(i-j+1);%======================================加速、减速、随机慢化 %更新车辆位置z(i-j+1)=0;z(i-j+1+new_v)=1;%更新速度v(i-j+1)=0;v(i-j+1+new_v)=new_v;endendendcells=z;memor_cells(x,:)=cells; %记录速度和车辆位置memor_v(x,:)=v;x=x+1;set(imh,'cdata',cells) %更新图像%update the step number diaplaypause(0.2);stepnumber = 1 + str2num(get(number,'string'));set(number,'string',num2str(stepnumber))endif (freeze==1)run = 0;freeze = 0;enddrawnowend///////////////////////////////////////////////////////////////////////Function[new_matrix_cells,new_v]=border_control(matrix_cells,a,b,v,vmax) %边界条件,开口边界,控制车辆出入%出口边界,若头车在道路边界,则以一定该路0.9离去n=length(matrix_cells);if a==nrand('state',sum(100*clock)*rand(1));%¶¨ÒåËæ»úÖÖ×Óp_1=rand(1); %产生随机概率if p_1<=1 %如果随机概率小于0.9,则车辆离开路段,否则不离口matrix_cells(n)=0;v(n)=0;endend%入口边界,泊松分布到达,1s内平均到达车辆数为q,t为1sif b>vmaxt=1;q=0.25;x=1;p=(q*t)^x*exp(-q*t)/prod(x); %1s内有1辆车到达的概率rand('state',sum(100*clock)*rand(1));p_2=rand(1);if p_2<=pm=min(b-vmax,vmax);matrix_cells(m)=1;v(m)=m;endendnew_matrix_cells=matrix_cells;new_v=v;///////////////////////////////////////////////////////////////////////function [new_matrix_cells,new_v]=leadcarupdate(matrix_cells,v)%第一辆车更新规则n=length(matrix_cells);if v(n)~=0matrix_cells(n)=0;v(n)=0;endnew_matrix_cells=matrix_cells;new_v=v;///////////////////////////////////////////////////////////////////////function [new_v]=randslow(v)p=0.3; %慢化概率rand('state',sum(100*clock)*rand(1));%¶¨ÒåËæ»úÖÖ×Óp_rand=rand; %产生随机概率if p_rand<=pv=max(v-1,0);endnew_v=v;///////////////////////////////////////////////////////////////////////function [matrix_cells_start]=roadstart(matrix_cells,n)%道路上的车辆初始化状态,元胞矩阵随机为0或1,matrix_cells初始矩阵,n初始车辆数k=length(matrix_cells);z=round(k*rand(1,n));for i=1:nj=z(i);if j==0matrix_cells(j)=0;elsematrix_cells(j)=1;endendmatrix_cells_start=matrix_cells;///////////////////////////////////////////////////////////////////////function[location_frontcar]=searchfrontcar(current_location,matrix_cells)i=length(matrix_cells);if current_location==ilocation_frontcar=0;elsefor j=current_location+1:iif matrix_cells(j)~=0location_frontcar=j;break;elselocation_frontcar=0;endendend///////////////////////////////////////////////////////////////////////function [location_lastcar]=searchlastcar(matrix_cells)%搜索尾车位置for i=1:length(matrix_cells)if matrix_cells(i)~=0location_lastcar=i;break;else %如果路上无车,则空元胞数设定为道路长度location_lastcar=length(matrix_cells);endend///////////////////////////////////////////////////////////////////////function [location_leadcar]=searchleadcar(matrix_cells)i=length(matrix_cells);for j=1:iif matrix_cells(i-j+1)~=0location_leadcar=i-j+1;break;elselocation_leadcar=0;endend///////////////////////////////////////////////////////////////////////function [v_matixcells]=speedstart(matrix_cells,vmax)%道路初始状态车辆速度初始化v_matixcells=zeros(1,length(matrix_cells));for i=1:length(matrix_cells)if matrix_cells(i)~=0v_matixcells(i)=round(vmax*rand(1));endend。

相关文档
最新文档