码迷,mamicode.com
首页 > 其他好文 > 详细

Abstract

时间:2015-01-31 23:12:17      阅读:233      评论:0      收藏:0      [点我收藏+]

标签:

Abstract 

In order to get the best combination of the optimal accommodation type and the travel days, we use three indicators to measure it : the total number of camp points , travel teams, utilization of camp points.

First of all, the related parameters are calculated.To assume that the whole point being camp uniform distribution,set the point for this camp. For rivers stretching out 225 miles, the distance between each camp point is  .According to the number of days to accommodation, the accommodation camps points have been confirmed, so visitors should arrive in the specified camp point in the night , sailing distance every day they need is ,the specified camp point is .For example, the 3th camp and the next 4 th camp, if the ship had arrive over the 3 th camp and the next 4 th camp point in the middle of the  3 th  camp, the ship should settle  in the 3 th camp point . If not, settle in the 4 th camp point.

Then, using the C language and Excel to analyze data and processing,select a relatively small . What can be based on the same day camp point location will not overlap on the number of species and stay relatively the corresponding accommodation time interval value d.In addition ,based on the accommodation and the corresponding time period of each reservation camp point location, we then program to filter out data classification summary. Under different, we can get many kinds of way to travel,  remember to k, the camps within the corresponding time points change into a k*18 matrix. With the comparison of the matrix elements of every lines , we can select the row vector without repeating other elements corresponding to the accommodation time, the results is the way that visitors can voyage every day .With the comparison of the matrix elements from the first column and the last column , it’s easy to select  the maximum interval value of the same element in the different column, which is a sea cycle of k .

Moreover, choose the maximum and minimum value of the matrix, what are the end and the beginning of the tour group camp point, we can get all the cases of value minus the camp before starting and ending camp points to and get the actual camp after the point  with assuming uniform, the pruning makes its location  is not use to the camp in the entire voyage, but retain all the camps between the firs and  the last camp,just because the topic request camp uniform distribution between points.

Finally, with the counting of the application of no duplicates in the matrix , that is, for the entire cycle which is used to all the camp point number S.We can use  the value to divide  the actual camp points , to get the utilization of camp point .

Key words: Matrix  A computer simulation

 

 

I. Introduction

1.1 Problem Background 

Visitors to the Big Long River (225 miles) can enjoy scenic views and exciting white water rapids. The river is inaccessible to hikers, so the only way to enjoy it is to take a river trip that requires several days of camping. River trips all start at First Launch and exit the river at Final Exit, 225 miles downstream. Passengers take either oar- powered rubber rafts, which travel on average 4 mph or motorized boats, which travel on average 8 mph. The trips range from 6 to 18 nights of camping on the river, start to finish. The government agency responsible for managing this river wants every trip to enjoy a wilderness experience, with minimal contact with other groups of boats on the river. Currently, X trips travel down the Big Long River each year during a six month period (the rest of the year it is too cold for river trips). There are Y camp sites on the Big Long River, distributed fairly uniformly throughout the river corridor. Given the rise in popularity of river rafting, the park managers have been asked to allow more trips to travel down the river. They want to determine how they might schedule an optimal mix of trips, of varying duration (measured in nights on the river) and propulsion (motor or oar) that will utilize the campsites in the best way possible. In other words, how many more boat trips could be added to the Big Long River’s rafting season? The river managers have hired you to advise them on ways in which to develop the best schedule and on ways in which to determine the carrying capacity of the river, remembering that no two sets of campers can occupy the same site at the same time. In addition to your one page summary sheet, prepare a one page memo to the managers of the river describing your key findings.

1.2 Our Work 

Our goal is to establish a mathematical model, by combination of computing time and advancing the tool to find out camping sites in different combinations, at the same time, to determine the maximum bearing capacity of the river. In this article, the most important part is the determination of camping sites Y because it affects the daily number of visitors and tourists to visit camping swimming time and the choice of the ways of the river. We use the control variables, the optimal model and the method of computer simulation of choice in different values of the camping sites, find out the most number of visitors and camp high utilization rate of combinations.

II. Symbols, Definitions and Assumptions

2.1 Symbols and Definitions 

Symbol

 Definition

 

 Is accommodation days (unit: day), the values range from 6 to 18

 

Is accommodation days (unit: day), the values range from 6 to 18  (in miles per hour)

 

Under different accommodation time to choose the distance between two camps (unit: miles)

 

Camping tour point under different accommodation time to choose the location of the unit: (a)

 

The length of the river (unit: miles), ontology for 225 miles

 

The actual camp point number (unit: a)

 

The number of camp point in the conditions

 

Number (unit: a) existing in the tour group

 

The total travel time span (unit: days), subject of for 180 days

 

Tour groups from the camp of the NTH accommodation to the camp of n + 1 times accommodation between the need of time

 

Camp point always used the number of the proportion of total camp point, and camp point of utilization

 

0choseoar- powered rubber rafts;1: motorized boats

 

Camp point of utilization

 

,  Combination of the class  Number of accommodation and tools (kanu or electric boat) to 26 kinds of combinations

Table 2.1

 

 

 

 

 

2.2 General Assumptions 

l There is no limit to the kanu and number of electric vehicle

l Suppose the camp point the full uniform

l  The camp point d, the distance between the number and length of rivers to stay night, has nothing to do with the tool of choice

l  If the ship line more than the first camp point and the first half of + 1 camp point, that is, into the first camp at check-in, otherwise, just check in the first camp point, don‘t go to walk.

l Assuming that the walking direction to the flow direction of the ship.

l  Visitors can only be decided to choose accommodation number and match way, for example, need the location of the camp every day (13) of the different values, so the first day to the team there are 26 kinds of option (number of accommodation and time), the second team way of 24 kinds of choices...So on, so the last day to only one way.

l Because each team‘s camp point is decided by the choice of accommodation number, so the just to advise tourists arrived in camp point in time, the rest of the time can be freely assigned by tourists.

l Assume that all visitors within the travel is not an accident is not unexpected.

l Tourists can only be decided to choose accommodation number and match way, for example, need the location of the camp every day (13) of the different values, so the first day to the team there are 26 kinds of option (number of accommodation and time), the second team way of 24 kinds of choices...So on, so the last day to only one way.

l Because each team‘s camp point is decided by the choice of accommodation number, so the just to advise tourists arrived in camp point in time, the rest of the time can be freely assigned by tourists.

l  Assume that all visitors within the travel is not an accident is not unexpected

 

2.3组合方式

 

Navigation tools and accommodation time number and content

 

Serial number

Accommodation time and tools

Serial number

Accommodation time and tools

1

Accommodation 6 days,

oar- powered rubber rafts

2

Accommodation 6 days,

motorized boats

3

Accommodation 7 days,

oar- powered rubber rafts

4

Accommodation 7 days,

motorized boats

5

Accommodation 8 days,

oar- powered rubber rafts

6

Accommodation 8 days,

motorized boats

7

Accommodation 9 days,

oar- powered rubber rafts

8

Accommodation 9 days,

motorized boats

9

Accommodation 10 days,

oar- powered rubber rafts

10

Accommodation 10 days,

motorized boats

11

Accommodation11 days,

oar- powered rubber rafts

12

Accommodation11 days,

motorized boats

13

Accommodation 12 days,

oar- powered rubber rafts

14

Accommodation 12 days,

motorized boats

15

Accommodation13 days,

oar- powered rubber rafts

16

Accommodation13 days,

motorized boats

17

Accommodation 14 days,

oar- powered rubber rafts

18

Accommodation 14 days,

motorized boats

19

Accommodation 15 days,

oar- powered rubber rafts

20

Accommodation 15 days,

motorized boats

21

Accommodation 16 days,

oar- powered rubber rafts

22

Accommodation 16 days,

motorized boats

23

Accommodation 17 days,

oar- powered rubber rafts

24

Accommodation 17 days,

motorized boats

25

Accommodation 18 days,

oar- powered rubber rafts

26

Accommodation 18 days,

motorized boats

 

 

III. Articulate our metrics

As these agencies, we adopt control variables, the optimal model.Since camp point is evenly distributed, so in the first camping ground and the adjacent two camp point distance are identified, namely:

 

Then each group under the condition of different accommodation time to choose, to reach into the night every day night at camp point position number:

 

According to the assumption that a ship to go over the first camp, into the first camp at check-in, or a camp in the first point.Number and the location of visitors need to camp points on the day of formula (1) calculate the result is not consistent.If they choose not to walk forward, you need to study is the amount of camp point position, for the location of the actual point after the camp:

 

Under different accommodation time choice, every day to reach the corresponding specified time needed for camp point:

 

Under the assumptions of camp actually has not been fully used by tourists, such as part of the camp near the end point. According to the hypothesis, camp points evenly distributed, so used in camp point position and the smallest camp point between camp site location is not even used, nor deduction. So the actual camp point point minus the total quantity is the conditions of camp camp points of the used minimum camp points position in front of the camp, subtracting camp points of the used the camp after the camp site location. So the actual camp point total number:

 

Through computer simulation of a camp points can be used, we used in camp points accounted for the proportion of the total camp points to measure the actual utilization of camp point, namely:

 

 

 

IV. Model  application

4.1 data application 

Through the C language to choose the best number of camping sites Y. We take Y range for 8 ~ 500, because the accommodation for the longest time on the evening of 18, but Y nor too big. If Y is too big, so our cost is high. Due to the choice of corresponding to each of the different combination, different tourists after a number of camping sites on the same day d, only decided by the river length and lodging the number of days, then two kinds of accommodation time corresponding to calculate the value of d is the same, also means that the same d value of combination of tourism cannot start on the same day. In this way, we can through the C language within the reasonable value range of the Y value, can give different camp points corresponding to the d value of Y type number. Shown in the table below:

 

 

 

 

 

 

 

 

 

 

 

 

Table 4.1

Camp point number (unit: a) Y

D region when the camp doesn‘t repeat situation (unit:)

Camp point number (unit: a) Y

D region when the camp doesn‘t repeat situation (unit:)

18~23

3

115~122

10

28~30

126~136

24~27

4

142~148

31~37

161

38~44

5

137~141

11

47~51

149~160

45~46

6

162~174

52~58

180~187

66

199~201

59~65

7

175~179

12

67~75

188~198

76~93

8

202~216

94~114

9

218~231

123~125

237~246

 

256~262

275~279

294~296

217

13

232~236

247~255

263~274

280~293

297~1000

 

For the convenience of display, we can reflect the value of d is obtained by SPSS species number and the number of Y diagram, as shown below:

 

 

From the table above shows, with the increase of camping sites Y, camp point location d value is bigger and bigger.So we should choose different d value corresponding to the minimum Y value comparison.
Then the optimum condition is total travel team, the most different d value of camping sites Y minimum at the same time.So travel team a total of:

 

Among them, L said the largest interval between different accommodation number of days the same camp point;Said the first day to start N individuals;T said travel cycle;Said the camp during the whole trip point is not with the accommodation time to determine the number of accommodation in the camp that point.

4.2 two examples

4.2.1 the first example

Below we to camp point number for 18 for example, is analyzed.

 

 

 

 

Table 4.2

Camp point number Y: 18 camp point between the interval of a: 11.84

Mix the sorting

Accommodation number of C

Choose tools ( 0,1)

speed

v

Each d point at a camp

Correction of d (d ‘)

Time of arrival in camp point t

1

6

0

4

2.714285714

3

8

2

6

1

8

2.714285714

3

4

3

7

0

4

2.375

2

7

4

7

1

8

2.375

2

3.5

5

8

0

4

2.111111111

2

6.25

6

8

1

8

2.111111111

2

3.125

7

9

0

4

1.9

2

5.75

8

9

1

8

1.9

2

2.875

9

10

0

4

1.727272727

2

5

10

10

1

8

1.727272727

2

2.5

11

11

0

4

1.583333333

2

4.75

12

11

1

8

1.583333333

2

2.375

13

12

0

4

1.461538462

1

4.25

14

12

1

8

1.461538462

1

2.125

15

13

0

4

1.357142857

1

4

16

13

1

8

1.357142857

1

2

17

14

0

4

1.266666667

1

3.75

18

14

1

8

1.266666667

1

1.875

19

15

0

4

1.1875

1

3.5

20

15

1

8

1.1875

1

1.75

21

16

0

4

1.117647059

1

3.25

22

16

1

8

1.117647059

1

1.625

23

17

0

4

1.055555556

1

3.25

24

17

1

8

1.055555556

1

1.625

25

18

0

4

1

1

3

26

18

1

8

1

1

1.5

 

In the table above, we can come to the conclusion that data in the table below. So for lodging less time preference, management should choose lodging days for 6,7,12 travel combination, the three teams in the same day, the accommodation time type in this 180 days are not a boat.

Table 4.3

Camp point total of 18

Accommodation days

Camp point location

6

Every three points at camp

7~11

Every two points at camp

12~18

Every point at camp

 

 

 

 

 

 

    The first column represents the first day to enter the first tour group, the second column that each batch of visitors only three Tours can only select 6 night accommodation, 7 night accommodation and hotel on the evening of 12, and cannot appear accommodation date of repetition, the tools used are optional. After day 1 to enter the first, if the second day go to a second group, two groups of people will appear conflict camp point, as shown in the above, in the third days, the second batch of tour groups choose lodging 6 days and 7 days of the first tour group choose lodging camp point is the same, but it is not in conformity with the requirements, and the second batch of could not enter in 2 day, in the same way, in 3 ~ 7 days also can appear the same situation, day 8, will not appear camp point of conflict, so eight days is a cycle, through the data analysis, we found that visitors enter the cycle is the largest interval between different accommodation days camp same point, at the camp for 32, only provide accommodation six,7,12 days under the condition of three kinds of travel time, 12th camp

 

So a total of 180 days, can participate in the river tour group number:

 

Be used minimum camp point location:

 

Be used max camp point location:

 

the actual camp points:

 

utilization of camp points are as follows:

 

When the total number of camping sites is 18, camping sites Settings as shown in the figure below. Fore and aft of camping sites were used, in the middle is not being used, camp point of utilization rate of 83.33%.

 

 

 

 

4.2.2 The second model

 For camping Y for a total of 232 examples were analyzed, and the following table:

Table 4.4

Camp Y point number: 232

A camp point between intervals

 

numbers

C

 

(0,1)

Speed v

 

     

1

6

0

4

33.28571429

33

8

2

6

1

8

33.28571429

33

4

3

7

0

4

29.125

29

7

4

7

1

8

29.125

29

3.5

5

8

0

4

25.88888889

26

6.25

6

8

1

8

25.88888889

26

3.125

7

9

0

4

23.3

23

5.75

8

9

1

8

23.3

23

2.875

9

10

0

4

21.18181818

21

5

10

10

1

8

21.18181818

21

2.5

11

11

0

4

19.41666667

19

4.75

12

11

1

8

19.41666667

19

2.375

13

12

0

4

17.92307692

18

4.25

14

12

1

8

17.92307692

18

2.125

15

13

0

4

16.64285714

17

4

16

13

1

8

16.64285714

17

2

17

14

0

4

15.53333333

16

3.75

18

14

1

8

15.53333333

16

1.875

19

15

0

4

14.5625

15

3.5

20

15

1

8

14.5625

15

1.75

21

16

0

4

13.70588235

14

3.25

22

16

1

8

13.70588235

14

1.625

23

17

0

4

12.94444444

13

3.25

24

17

1

8

12.94444444

13

1.625

25

18

0

4

12.26315789

12

3

26

18

1

8

12.26315789

12

1.5

 

  From the table we can see that as choice accommodation number of days to add, once upon a time a camping spot the shorter the time of arrival in the next camping sites. So different accommodation days are corresponding to the number of the location of the camping sites (as shown in the figure below), there will not be a coincidence.

Table 4.5

Camp pointFor the 232

 

A camp every 12 point

 

A camp every 12 point

6

Every 33 points at a camp

7

Every 29 points at a camp

8

Every 26 points at camp

9

Every 26 points at camp

10

Every 21 points at a camp

11

Every 19 points at a camp

12

Every 18 points at a camp

13

Each camp of 17 points

14

Every 16 points at a camp

15

Every 15 points at a camp

16

Every 14 points at a camp

17

Every 13 points at a camp

18

A camp every 12 point

 

For different accommodation days, there are different number of accommodation point location. The diagram below for details

 

 

 

Can be seen from the above 7,9,11 day camp point and accommodation with other different days accommodation choice (accommodation days six,8,10,12,13,14,15,16,17,18 days) as the accommodation during the whole trip point is different, so the three can travel every day, the remaining 10 kinds of accommodation overlap, it must be within 180 days, according to cycle analysis results by C language, to get the same of the reorganization data of maximum interval for eight days, so in eight days for a cycle, eight days are arranged as following:

 

 

 

So a total of 180 days, can trip on the number of tourist groups to participate in the river

      

Among them: used the minimum camp point location

 

Location is used too much the camp site

 

The actual camp points

 

The utilization of camp point is

 

 

 

The results shown in the figure below, near the location of the inlet and outlet, there are some have not been using camp point, camp, the utilization rate of 52.8%.

 

 

 

4.2.3Contrastive Analysis

     In 180 days, to the camp for a total of 18 can accommodate the number of visitors at 88, camp point of utilization rate is 83.33%; To camp for a total of 232 can accommodate the number of visitors at 760, camp point of utilization rate of 52.8%. With the increase of the total number of camps, camps utilization rate of decline. Although camp for a total of 232 camp utilization ratio is lower than a total of 18, but can see clearly that an acceptable volume is far higher than a total of 18 point of camping.

 

 

 

IV.Promotion of the model

 

 

For each different river, river has a corresponding length and water flow rate. Corresponding park river tourism introduce different days camping and crossing the river travel tools is tie-in, can be applied. You can according to the characteristics of every river, using the same method, it is concluded that the optimal number of camping sites, up to and large number of camping utilization.

 

 

VI.The analysis of the model

 

6.1  advantage

l Method is logical and strong applicability

l Application of computer simulation run, easy to calculate

l Traffic was under control, convenient and park managers management

6.2 weakness

l We take the way of tour is booked, did not consider the change of the capacity in different seasons, especially in the peak tourist season, it will lose some tourists

l Camping point set though is optimal under this model, but in the use of camping sites among the presence of idle, it will waste of resources

l Driving tool, even though we consider different rules of tourists to swim the river way, and   to calculate the best camping sites, from the perspective of park management point of view, is  a more convenient management, but lose some consumers.

 

 

 

VII.Promotion of the model  

By model shortcomings, we can use probability estimates the change of the traffic, according to relevant statistics estimates of tourists preference, then can reasonably arrange different number of camping and push the tool. Driving tools according to the tourists and the number of camping, estimate the customer to each of the different sequence of camping sites, by use of related software, to simulate it is concluded that utilization of the highest number of camping sites.

 

 

 

 

 

    

 

 

 

 

 

 

 

 

 

VIII. Reference

 [1]Tang Qiusheng, by lu. Bus parking platform based on multi-channel queuing theory optimization study [J]. Journal of hunan institute of technology (natural science edition), 2013, 2013:18-21 + 87

[2] 2009.Victor nee. the order processing system based on queuing theory modeling and simulation [D]. Beijing jiaotong university, 2009.

 

[3]  xue-ping wang. The application of queuing theory in the medical system [D]. Central China normal university, 2008.

[4]zhou ling again, Shi Gongwen, Martin, Chang Jun dry. Queuing theory in the computation of city bus rapid transit station parking number application [J]. Journal of railway computer applications, 2006, 11:41-44.

[5] Joshua huang. Tang all hospital outpatient queuing system optimization research [D]. Northwest university, 2014.

 

IX. Appendix:

 

Code 1: conflict between camp statistical output (3-13)

 

#include<stdio.h>

 

int round1( float x)

{

 return ((int)(x+0.5));

}

void main()

{

int c[13]={6,7,8,9,10,11,12,13,14,15,16,17,18};

int i,j,y1,y2,p;

float y,s=225,a;

int e[13];

float d[13];

int count1[13]={0,0,0,0,0,0,0,0,0,0,0,0,0}; int count2=0;int count[13]={0,0,0,0,0,0,0,0,0,0,0,0,0}; int count3=0;

int sm[14][20]; int se=0;

int m=0,n,k=0,kk=0;int n2=0;

int am[400]={0,0};

int bm[13]={1,2,3,4,5,6,7,8,9,10,11,12,13};

printf("输入区间最小营地数=");

scanf(" %d",&y1);

printf("输入区间最大营地数=");

scanf(" %d",&y2);

printf("D的不同重复项输入值=");

scanf(" %d",&p);

 

for(y=y1;y<=y2;)//输入不同的y。可以算出距离项e[j]

{

a=s/(y+1);

 

for ( i=0;i<13;i++)//对每个不同的e[j]取整

{

 

d[i]=(y+1)/(c[i]+1);

e[i]=round1(d[i]);

 

 

for (j=1;j<19;j++)//用另一个矩阵进行保存

{  

{if(j<=c[i])

sm[i][j-1]=e[i]*j;

else sm[i][j-1]=0;}

}

}

for(i=0;i<13;i++)

{

for (j=0;j<13;j++)

{

if(e[j]!=e[j+1])

count1[i]=count1[i]+1;//对不同的距离项记数

 

}

 

                 for (n2=0;n2<13;n2++) //增加一列相同项

sm[n2][19]=sm[n2][0];

for (n2=0;n2<13;n2++)//可能出错的地方

{

if (sm[n2][19]==sm[n2+1][19])

   for(j=0;j<18;j++)

    sm[n2+1][j]=0;

}

 

/* for (n2=0;n2<13;n2++) //输出修正后的矩阵

{ printf("%d,",n2+1);

for(j=0;j<18;j++)

printf("%d ",sm[n2][j]);

putchar(‘\n‘);

 

}*/

}

for(i=0;i<13;i++)

{

if(count1[i]==p)//12个不同的距离项

 

{ k=0;kk=0;count3=0;

for (i=0;i<12;i++)

 

   for(j=0;j<18;j++)

   { if(sm[i][j]==0)break;

else 

for( n=i+1;n<13;n++)

for ( m=j;m<18;m++)

  if(sm[i][j]==sm[n][m])//sm[i][j]和下一行的全部进行比较,计算相同数字的组数

 {am[k]=i+1;am[k-1]=n+1;k=k+2;/*printf("%d,%d   ",i+1,n+1);*/ }//输出不同行数

   }

 

}

kk=k-2;

for(k=0;k<=kk;k++) 

{

if(am[k]==1)

count[0]=1+count[0];

if(am[k]==2)

count[1]=1+count[1];

if(am[k]==3)

count[2]=1+count[2];

if(am[k]==4)

count[3]=1+count[3];

if(am[k]==5)

count[4]=1+count[4];

 

if(am[k]==6)

count[5]=1+count[5];

if(am[k]==7)

count[6]=1+count[6];

if(am[k]==8)

count[7]=1+count[7];

if(am[k]==9)

count[8]=1+count[8];

if(am[k]==10)

count[9]=1+count[9];

if(am[k]==11)

count[10]=1+count[10];

if(am[k]==12)

count[11]=1+count[11];

if(am[k]==13)

count[12]=1+count[12];

 

 

}

 

printf("营地数=%.0f\n",y);

for(n=0;n<13;n++)

if (count[n]==0)//分别输出没有出现过相同项的队数的编码

if (sm[n][0]!=0)

{

printf("没有出现重复项的编号=%d",n+1);

count3=count3+1;

}

printf("没有出现重复项编号的总数=%d ",count3);

putchar(‘\n‘);

for(i=0;i<13;i++)//对记数项清零

count[i]=0;

 

 

}

 

}

 

for(i=0;i<13;i++)//对记数项清零

count1[i]=0;

 

 

y++ ;

 

 

}

 

}

 

Code 2: comparison matrix maximum minimum location

 

 

#include<stdio.h>

 

int round1( float x)

{

 return ((int)(x+0.5));

}

 

void main1()

{

int c[13]={6,7,8,9,10,11,12,13,14,15,16,17,18};

int i,j;  int i1=0,i2=0,i3=0;int max=0,min=0;

int sm[13][18];int d[13],e[13];int n2;

float y,s=225,a;

 

for(y=18;y<=23;y++)//输入不同的y。可以算出距离项e[j]

{

a=s/(y+1);

 

for ( i=0;i<13;i++)//对每个不同的e[j]取整

{

 

d[i]=(y+1)/(c[i]+1);

e[i]=round1(d[i]);

 

 

for (j=1;j<19;j++)//用另一个矩阵进行保存

if(j<=c[i])

sm[i][j-1]=e[i]*j;

else sm[i][j-1]=0;

 

 

 

}

 

                for (n2=0;n2<13;n2++) //增加一列相同项

sm[n2][18]=sm[n2][0];

 

 

for (n2=0;n2<12;n2++)

{if (sm[n2][18]==sm[n2+1][18])

   for(j=0;j<18;j++)

    sm[n2+1][j]=0;}

 

for (n2=0;n2<13;n2++) //输出修正后的矩阵

{ printf("%d,",n2+1);

for(j=0;j<18;j++)

printf("%d ",sm[n2][j]);

putchar(‘\n‘);

 

}

 

putchar(‘\n‘);

max=sm[0][0];

   for (i1=0;i1<13;i1++)

   for(i2=0;i2<18;i2++)

   if(sm[i1][i2]>max)max=sm[i1][i2];

min=sm[0][0];

   for (i1=0;i1<13;i1++)

   for(i2=0;i2<18;i2++)

  if(sm[i1][i2]!=0) if(sm[i1][i2]<min)min=sm[i1][i2];

 

printf("\n%d,%d\n",max,min);

 

putchar(‘\n‘);

}

 

 

}

 

 

Code 3: conflict between camp in statistical output is not revised)

 

#include<stdio.h>

 

int round1( float x)

{

 return ((int)(x+0.5));

}

 

void main()

{

int c[13]={6,7,8,9,10,11,12,13,14,15,16,17,18};

int i,j,y1,y2,p;

float y,s=225,a;

int e[13];

float d[13];

int count1[13]={0,0,0,0,0,0,0,0,0,0,0,0,0}; int count2=0;int count[13]={0,0,0,0,0,0,0,0,0,0,0,0,0}; int count3=0;

int sm[13][18]; int se=0;

int m=0,n,k=0,kk=0;int n2=0;

int am[400]={0,0};

int bm[13]={1,2,3,4,5,6,7,8,9,10,11,12,13};

printf("输入区间最小营地数=");

scanf(" %d",&y1);

printf("输入区间最大营地数=");

scanf(" %d",&y2);

printf("D的不同重复项输入值=");

scanf(" %d",&p);

 

for(y=y1;y<=y2;)//输入不同的y。可以算出距离项e[j]

{

a=s/(y+1);

 

for ( i=0;i<13;i++)//对每个不同的e[j]取整

{

 

d[i]=(y+1)/(c[i]+1);

e[i]=round1(d[i]);

 

 

for (j=1;j<19;j++)//用另一个矩阵进行保存

{  

{if(j<=c[i])

sm[i][j-1]=e[i]*j;

else sm[i][j-1]=0;}

}

 

 

 

}

for(i=0;i<13;i++)

{

for (j=0;j<13;j++)

{

if(e[j]!=e[j+1])

count1[i]=count1[i]+1;//对不同的距离项记数

 

 

}

putchar(‘\n‘);

     

for (i=0;i<13;i++)

  if(sm[i][0]==sm[i+1][0])

 

  {for(j=0;j<18;j++) sm[i+1][j]=0;i++;}//把相同的距离的队数清零

putchar(‘\n‘);

                 for (n2=0;n2<13;n2++) //增加一列相同项

sm[n2][18]=sm[n2][0];

 

 

for (n2=0;n2<12;n2++)

{if (sm[n2][18]==sm[n2+1][18])

   for(j=0;j<18;j++)

    sm[n2+1][j]=0;}

 

}

     

for(i=0;i<13;i++)

{

if(count1[i]==p)//12个不同的距离项

 

{ k=0;kk=0;count3=0;

for (i=0;i<12;i++)

 

   for(j=0;j<18;j++)

   { if(sm[i][j]==0)break;

else 

for( n=i+1;n<13;n++)

for ( m=j;m<18;m++)

  if(sm[i][j]==sm[n][m])//sm[i][j]和下一行的全部进行比较,计算相同数字的组数

  {am[k]=i+1;am[k-1]=n+1;k=k+2;/*printf("%d,%d   ",i+1,n+1);*/ }

   }

 

}

kk=k-2;

 

for(k=0;k<=kk;k++) 

{

if(am[k]==1)

count[0]=1+count[0];

if(am[k]==2)

count[1]=1+count[1];

if(am[k]==3)

count[2]=1+count[2];

if(am[k]==4)

count[3]=1+count[3];

if(am[k]==5)

count[4]=1+count[4];

 

if(am[k]==6)

count[5]=1+count[5];

if(am[k]==7)

count[6]=1+count[6];

if(am[k]==8)

count[7]=1+count[7];

if(am[k]==9)

count[8]=1+count[8];

if(am[k]==10)

count[9]=1+count[9];

if(am[k]==11)

count[10]=1+count[10];

if(am[k]==12)

count[11]=1+count[11];

if(am[k]==13)

count[12]=1+count[12];

 

 

}

 

printf("营地数=%.0f\n",y);

for(n=0;n<13;n++)

if (count[n]==0)//分别输出没有出现过相同项的队数的编码

if (sm[n][0]!=0) { printf("没有出现重复项的编号=%d",n+1);count3=count3+1;}

printf("没有出现重复项编号的总数=%d ",count3);

putchar(‘\n‘);

for(i=0;i<13;i++)//对记数项清零

count[i]=0;

 

 

}

 

}

 

for(i=0;i<13;i++)//对记数项清零

count1[i]=0;

 

 

y++ ;

 

 

}

 

}

 

 

 

Schedule:

 

Exhibit a: camp and the camp interval

 

 

营地点数

d的不同项数

营地点数

d的不同项数

18~23

3

137~141

11

28~30

3

149~160

11

24~27

4

162~174

11

31~37

4

180~187

11

38~44

5

199~201

11

47~51

5

175~179

12

45~46

6

188~198

12

52~58

6

202~216

12

66

6

218~231

12

59~65

7

237~246

12

67~75

7

256~262

12

76~93

8

275~279

12

94~114

9

294~296

12

123~125

9

217

13

115~122

10

232~236

13

126~136

10

247~255

13

142~148

10

263~274

13

161

10

280~293

13

 

 

297~1000

13

Table 2: a boat between the camp and conflict

 

营地点

没出现的组别

第一行比较无重复项

营地点

没出现的组别

第一行比较无重复项

没出现的行数

没出现的行数

9

124

1

13

152

1

 

 

9

125

1

13

232

2

4

6

7

67

1

12 

179

2

 

 

7

69

1

12

188

4

 

 

7

71

1

12

189

4

 

 

7

73

1

12

190

4

 

 

7

75

1

12

191

4

 

 

8

76

1

12

192

4

 

 

8

77

1

12

193

4

 

 

8

78

1

12

206

3

5

 

8

79

1

12

207

3

5

 

8

80

1

12

208

3

5

 

8

81

1

12

209

3

5

 

8

82

1

12

210

3

5

 

8

83

1

12

211

5

 

 

8

84

1

12

212

5

 

 

8

85

1

12

213

1

5

 

8

86

1

12

214

1

 

 

8

87

1

12

215

1

 

 

8

88

1

12

216

1

 

 

8

89

1

12

218

1

 

 

8

90

1

12

219

1

 

 

8

91

1

12

224

4

6

 

8

92

1

12

225

4

6

 

8

93

1

12

226

4

6

 

9

94

1

12

227

4

6

 

9

95

1

12

228

4

6

 

9

96

1

12

229

4

6

 

9

97

1

12

230

4

6

 

9

98

1

12

231

4

6

 

9

99

1

12

242

7

 

 

9

100

1

12

243

7

2

 

9

101

1

12

244

7

2

 

9

102

1

12

245

7

2

 

9

103

1

12

246

7

2

 

9

104

1

12

256

1

3

5

9

105

1

12

257

1

3

5

9

106

1

12

258

1

3

8

9

107

1

12

259

1

3

8

9

108

1

12

260

1

3

8

9

109

1

12

261

1

3

8

9

110

1

12

262

1

 

 

9

111

1

12

278

3

6

9

9

112

1

12

279

3

6

9

9

113

1

12

294

2

7

 

9

114

1

12

295

2

7

10

9

123

1

12

296

2

7

10

5

49

1

11

152

2

 

 

5

50

1

11

153

2

 

 

5

51

1

11

154

2

 

 

6

45

1

11

157

1

 

 

6

46

1

11

158

1

 

 

6

52

1

11

159

1

 

 

6

53

1

11

160

1

 

 

6

54

1

11

170

1

3

 

6

55

1

11

171

1

3

 

6

56

1

11

172

1

3

 

6

57

1

11

173

1

3

 

6

58

1

11

174

1

3

 

6

66

1

11

180

2

 

 

7

59

1

11

181

2

 

 

7

60

1

11

182

2

 

 

7

61

1

11

183

2

 

 

7

62

1

11

184

2

4

 

7

63

1

11

185

2

4

 

7

64

1

11

186

2

4

 

7

65

1

11

187

4

 

 

233

2

 

10

115

1

 

 

3

18

1

10

116

1

 

 

3

19

1

10

117

1

 

 

3

21

1

10

118

1

 

 

3

22

1

10

119

1

 

 

3

28

1

10

120

1

 

 

3

29

1

10

121

1

 

 

3

30

1

10

122

1

 

 

4

24

1

10

126

1

 

 

4

25

1

10

127

1

 

 

4

27

1

10

128

1

 

 

4

31

1

10

129

1

 

 

4

32

1

10

130

1

 

 

4

33

1

10

131

1

 

 

4

34

1

10

132

1

 

 

4

35

1

10

133

1

 

 

4

36

1

10

134

1

 

 

4

37

1

10

135

1

 

 

5

38

1

10

136

1

 

 

5

39

1

10

142

1

 

 

5

40

1

10

143

1

 

 

5

41

1

10

144

1

 

 

5

42

1

10

145

1

 

 

5

43

1

10

146

1

 

 

5

44

1

10

147

1

 

 

5

47

1

10

148

1

 

 

5

48

1

10

161

1

 

 

 

 

 

The number of table and 2 camp rule summary

 

重复营地点编号

旅行天数天数

住宿天数

营地点编号

旅行天数

住宿天数

36

2

12

126

6

10

3

18

7

12

48

3

14

130

9

16

4

18

5

8

60

4

15

132

10

17

5

18

4

6

72

4

12

11

18

6

18

144

8

12

78

3

8

9

14

6

17

12

18

84

4

10

156

6

8

6

16

12

17

7

18

13

18

90

5

12

168

8

10

6

15

12

16

96

6

14

14

18

8

18

165

5

6

104

4

8

11

15

8

17

180

10

12

105

5

10

12

15

7

15

15

18

108

6

12

182

13

16

9

18

14

17

112

7

15

7

8

8

16

210

10

10

120

8

15

14

15

10

18

15

16

198

6

6

221

13

13

11

12

17

17

208

8

8

224

14

14

13

14

16

16

16

17

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Abstract 

In order to get the best combination of the optimal accommodation type and the travel days, we use three indicators to measure it : the total number of camp points , travel teams, utilization of camp points.

First of all, the related parameters are calculated.To assume that the whole point being camp uniform distribution,set the point for this camp. For rivers stretching out 225 miles, the distance between each camp point is  .According to the number of days to accommodation, the accommodation camps points have been confirmed, so visitors should arrive in the specified camp point in the night , sailing distance every day they need is ,the specified camp point is .For example, the 3th camp and the next 4 th camp, if the ship had arrive over the 3 th camp and the next 4 th camp point in the middle of the  3 th  camp, the ship should settle  in the 3 th camp point . If not, settle in the 4 th camp point.

Then, using the C language and Excel to analyze data and processing,select a relatively small . What can be based on the same day camp point location will not overlap on the number of species and stay relatively the corresponding accommodation time interval value d.In addition ,based on the accommodation and the corresponding time period of each reservation camp point location, we then program to filter out data classification summary. Under different, we can get many kinds of way to travel,  remember to k, the camps within the corresponding time points change into a k*18 matrix. With the comparison of the matrix elements of every lines , we can select the row vector without repeating other elements corresponding to the accommodation time, the results is the way that visitors can voyage every day .With the comparison of the matrix elements from the first column and the last column , it’s easy to select  the maximum interval value of the same element in the different column, which is a sea cycle of k .

Moreover, choose the maximum and minimum value of the matrix, what are the end and the beginning of the tour group camp point, we can get all the cases of value minus the camp before starting and ending camp points to and get the actual camp after the point  with assuming uniform, the pruning makes its location  is not use to the camp in the entire voyage, but retain all the camps between the firs and  the last camp,just because the topic request camp uniform distribution between points.

Finally, with the counting of the application of no duplicates in the matrix , that is, for the entire cycle which is used to all the camp point number S.We can use  the value to divide  the actual camp points , to get the utilization of camp point .

Key words: Matrix  A computer simulation

 

 

I. Introduction

1.1 Problem Background 

Visitors to the Big Long River (225 miles) can enjoy scenic views and exciting white water rapids. The river is inaccessible to hikers, so the only way to enjoy it is to take a river trip that requires several days of camping. River trips all start at First Launch and exit the river at Final Exit, 225 miles downstream. Passengers take either oar- powered rubber rafts, which travel on average 4 mph or motorized boats, which travel on average 8 mph. The trips range from 6 to 18 nights of camping on the river, start to finish. The government agency responsible for managing this river wants every trip to enjoy a wilderness experience, with minimal contact with other groups of boats on the river. Currently, X trips travel down the Big Long River each year during a six month period (the rest of the year it is too cold for river trips). There are Y camp sites on the Big Long River, distributed fairly uniformly throughout the river corridor. Given the rise in popularity of river rafting, the park managers have been asked to allow more trips to travel down the river. They want to determine how they might schedule an optimal mix of trips, of varying duration (measured in nights on the river) and propulsion (motor or oar) that will utilize the campsites in the best way possible. In other words, how many more boat trips could be added to the Big Long River’s rafting season? The river managers have hired you to advise them on ways in which to develop the best schedule and on ways in which to determine the carrying capacity of the river, remembering that no two sets of campers can occupy the same site at the same time. In addition to your one page summary sheet, prepare a one page memo to the managers of the river describing your key findings.

1.2 Our Work 

Our goal is to establish a mathematical model, by combination of computing time and advancing the tool to find out camping sites in different combinations, at the same time, to determine the maximum bearing capacity of the river. In this article, the most important part is the determination of camping sites Y because it affects the daily number of visitors and tourists to visit camping swimming time and the choice of the ways of the river. We use the control variables, the optimal model and the method of computer simulation of choice in different values of the camping sites, find out the most number of visitors and camp high utilization rate of combinations.

II. Symbols, Definitions and Assumptions

2.1 Symbols and Definitions 

Symbol

 Definition

 

 Is accommodation days (unit: day), the values range from 6 to 18

 

Is accommodation days (unit: day), the values range from 6 to 18  (in miles per hour)

 

Under different accommodation time to choose the distance between two camps (unit: miles)

 

Camping tour point under different accommodation time to choose the location of the unit: (a)

 

The length of the river (unit: miles), ontology for 225 miles

 

The actual camp point number (unit: a)

 

The number of camp point in the conditions

 

Number (unit: a) existing in the tour group

 

The total travel time span (unit: days), subject of for 180 days

 

Tour groups from the camp of the NTH accommodation to the camp of n + 1 times accommodation between the need of time

 

Camp point always used the number of the proportion of total camp point, and camp point of utilization

 

0choseoar- powered rubber rafts;1: motorized boats

 

Camp point of utilization

 

,  Combination of the class  Number of accommodation and tools (kanu or electric boat) to 26 kinds of combinations

Table 2.1

 

 

 

 

 

2.2 General Assumptions 

l There is no limit to the kanu and number of electric vehicle

l Suppose the camp point the full uniform

l  The camp point d, the distance between the number and length of rivers to stay night, has nothing to do with the tool of choice

l  If the ship line more than the first camp point and the first half of + 1 camp point, that is, into the first camp at check-in, otherwise, just check in the first camp point, don‘t go to walk.

l Assuming that the walking direction to the flow direction of the ship.

l  Visitors can only be decided to choose accommodation number and match way, for example, need the location of the camp every day (13) of the different values, so the first day to the team there are 26 kinds of option (number of accommodation and time), the second team way of 24 kinds of choices...So on, so the last day to only one way.

l Because each team‘s camp point is decided by the choice of accommodation number, so the just to advise tourists arrived in camp point in time, the rest of the time can be freely assigned by tourists.

l Assume that all visitors within the travel is not an accident is not unexpected.

l Tourists can only be decided to choose accommodation number and match way, for example, need the location of the camp every day (13) of the different values, so the first day to the team there are 26 kinds of option (number of accommodation and time), the second team way of 24 kinds of choices...So on, so the last day to only one way.

l Because each team‘s camp point is decided by the choice of accommodation number, so the just to advise tourists arrived in camp point in time, the rest of the time can be freely assigned by tourists.

l  Assume that all visitors within the travel is not an accident is not unexpected

 

2.3组合方式

 

Navigation tools and accommodation time number and content

 

Serial number

Accommodation time and tools

Serial number

Accommodation time and tools

1

Accommodation 6 days,

oar- powered rubber rafts

2

Accommodation 6 days,

motorized boats

3

Accommodation 7 days,

oar- powered rubber rafts

4

Accommodation 7 days,

motorized boats

5

Accommodation 8 days,

oar- powered rubber rafts

6

Accommodation 8 days,

motorized boats

7

Accommodation 9 days,

oar- powered rubber rafts

8

Accommodation 9 days,

motorized boats

9

Accommodation 10 days,

oar- powered rubber rafts

10

Accommodation 10 days,

motorized boats

11

Accommodation11 days,

oar- powered rubber rafts

12

Accommodation11 days,

motorized boats

13

Accommodation 12 days,

oar- powered rubber rafts

14

Accommodation 12 days,

motorized boats

15

Accommodation13 days,

oar- powered rubber rafts

16

Accommodation13 days,

motorized boats

17

Accommodation 14 days,

oar- powered rubber rafts

18

Accommodation 14 days,

motorized boats

19

Accommodation 15 days,

oar- powered rubber rafts

20

Accommodation 15 days,

motorized boats

21

Accommodation 16 days,

oar- powered rubber rafts

22

Accommodation 16 days,

motorized boats

23

Accommodation 17 days,

oar- powered rubber rafts

24

Accommodation 17 days,

motorized boats

25

Accommodation 18 days,

oar- powered rubber rafts

26

Accommodation 18 days,

motorized boats

 

 

III. Articulate our metrics

As these agencies, we adopt control variables, the optimal model.Since camp point is evenly distributed, so in the first camping ground and the adjacent two camp point distance are identified, namely:

 

Then each group under the condition of different accommodation time to choose, to reach into the night every day night at camp point position number:

 

According to the assumption that a ship to go over the first camp, into the first camp at check-in, or a camp in the first point.Number and the location of visitors need to camp points on the day of formula (1) calculate the result is not consistent.If they choose not to walk forward, you need to study is the amount of camp point position, for the location of the actual point after the camp:

 

Under different accommodation time choice, every day to reach the corresponding specified time needed for camp point:

 

Under the assumptions of camp actually has not been fully used by tourists, such as part of the camp near the end point. According to the hypothesis, camp points evenly distributed, so used in camp point position and the smallest camp point between camp site location is not even used, nor deduction. So the actual camp point point minus the total quantity is the conditions of camp camp points of the used minimum camp points position in front of the camp, subtracting camp points of the used the camp after the camp site location. So the actual camp point total number:

 

Through computer simulation of a camp points can be used, we used in camp points accounted for the proportion of the total camp points to measure the actual utilization of camp point, namely:

 

 

 

IV. Model  application

4.1 data application 

Through the C language to choose the best number of camping sites Y. We take Y range for 8 ~ 500, because the accommodation for the longest time on the evening of 18, but Y nor too big. If Y is too big, so our cost is high. Due to the choice of corresponding to each of the different combination, different tourists after a number of camping sites on the same day d, only decided by the river length and lodging the number of days, then two kinds of accommodation time corresponding to calculate the value of d is the same, also means that the same d value of combination of tourism cannot start on the same day. In this way, we can through the C language within the reasonable value range of the Y value, can give different camp points corresponding to the d value of Y type number. Shown in the table below:

 

 

 

 

 

 

 

 

 

 

 

 

Table 4.1

Camp point number (unit: a) Y

D region when the camp doesn‘t repeat situation (unit:)

Camp point number (unit: a) Y

D region when the camp doesn‘t repeat situation (unit:)

18~23

3

115~122

10

28~30

126~136

24~27

4

142~148

31~37

161

38~44

5

137~141

11

47~51

149~160

45~46

6

162~174

52~58

180~187

66

199~201

59~65

7

175~179

12

67~75

188~198

76~93

8

202~216

94~114

9

218~231

123~125

237~246

 

256~262

275~279

294~296

217

13

232~236

247~255

263~274

280~293

297~1000

 

For the convenience of display, we can reflect the value of d is obtained by SPSS species number and the number of Y diagram, as shown below:

 

 

From the table above shows, with the increase of camping sites Y, camp point location d value is bigger and bigger.So we should choose different d value corresponding to the minimum Y value comparison.
Then the optimum condition is total travel team, the most different d value of camping sites Y minimum at the same time.So travel team a total of:

 

Among them, L said the largest interval between different accommodation number of days the same camp point;Said the first day to start N individuals;T said travel cycle;Said the camp during the whole trip point is not with the accommodation time to determine the number of accommodation in the camp that point.

4.2 two examples

4.2.1 the first example

Below we to camp point number for 18 for example, is analyzed.

 

 

 

 

Table 4.2

Camp point number Y: 18 camp point between the interval of a: 11.84

Mix the sorting

Accommodation number of C

Choose tools ( 0,1)

speed

v

Each d point at a camp

Correction of d (d ‘)

Time of arrival in camp point t

1

6

0

4

2.714285714

3

8

2

6

1

8

2.714285714

3

4

3

7

0

4

2.375

2

7

4

7

1

8

2.375

2

3.5

5

8

0

4

2.111111111

2

6.25

6

8

1

8

2.111111111

2

3.125

7

9

0

4

1.9

2

5.75

8

9

1

8

1.9

2

2.875

9

10

0

4

1.727272727

2

5

10

10

1

8

1.727272727

2

2.5

11

11

0

4

1.583333333

2

4.75

12

11

1

8

1.583333333

2

2.375

13

12

0

4

1.461538462

1

4.25

14

12

1

8

1.461538462

1

2.125

15

13

0

4

1.357142857

1

4

16

13

1

8

1.357142857

1

2

17

14

0

4

1.266666667

1

3.75

18

14

1

8

1.266666667

1

1.875

19

15

0

4

1.1875

1

3.5

20

15

1

8

1.1875

1

1.75

21

16

0

4

1.117647059

1

3.25

22

16

1

8

1.117647059

1

1.625

23

17

0

4

1.055555556

1

3.25

24

17

1

8

1.055555556

1

1.625

25

18

0

4

1

1

3

26

18

1

8

1

1

1.5

 

In the table above, we can come to the conclusion that data in the table below. So for lodging less time preference, management should choose lodging days for 6,7,12 travel combination, the three teams in the same day, the accommodation time type in this 180 days are not a boat.

Table 4.3

Camp point total of 18

Accommodation days

Camp point location

6

Every three points at camp

7~11

Every two points at camp

12~18

Every point at camp

 

 

 

 

 

 

    The first column represents the first day to enter the first tour group, the second column that each batch of visitors only three Tours can only select 6 night accommodation, 7 night accommodation and hotel on the evening of 12, and cannot appear accommodation date of repetition, the tools used are optional. After day 1 to enter the first, if the second day go to a second group, two groups of people will appear conflict camp point, as shown in the above, in the third days, the second batch of tour groups choose lodging 6 days and 7 days of the first tour group choose lodging camp point is the same, but it is not in conformity with the requirements, and the second batch of could not enter in 2 day, in the same way, in 3 ~ 7 days also can appear the same situation, day 8, will not appear camp point of conflict, so eight days is a cycle, through the data analysis, we found that visitors enter the cycle is the largest interval between different accommodation days camp same point, at the camp for 32, only provide accommodation six,7,12 days under the condition of three kinds of travel time, 12th camp

 

So a total of 180 days, can participate in the river tour group number:

 

Be used minimum camp point location:

 

Be used max camp point location:

 

the actual camp points:

 

utilization of camp points are as follows:

 

When the total number of camping sites is 18, camping sites Settings as shown in the figure below. Fore and aft of camping sites were used, in the middle is not being used, camp point of utilization rate of 83.33%.

 

 

 

 

4.2.2 The second model

 For camping Y for a total of 232 examples were analyzed, and the following table:

Table 4.4

Camp Y point number: 232

A camp point between intervals

 

numbers

C

 

(0,1)

Speed v

 

     

1

6

0

4

33.28571429

33

8

2

6

1

8

33.28571429

33

4

3

7

0

4

29.125

29

7

4

7

1

8

29.125

29

3.5

5

8

0

4

25.88888889

26

6.25

6

8

1

8

25.88888889

26

3.125

7

9

0

4

23.3

23

5.75

8

9

1

8

23.3

23

2.875

9

10

0

4

21.18181818

21

5

10

10

1

8

21.18181818

21

2.5

11

11

0

4

19.41666667

19

4.75

12

11

1

8

19.41666667

19

2.375

13

12

0

4

17.92307692

18

4.25

14

12

1

8

17.92307692

18

2.125

15

13

0

4

16.64285714

17

4

16

13

1

8

16.64285714

17

2

17

14

0

4

15.53333333

16

3.75

18

14

1

8

15.53333333

16

1.875

19

15

0

4

14.5625

15

3.5

20

15

1

8

14.5625

15

1.75

21

16

0

4

13.70588235

14

3.25

22

16

1

8

13.70588235

14

1.625

23

17

0

4

12.94444444

13

3.25

24

17

1

8

12.94444444

13

1.625

25

18

0

4

12.26315789

12

3

26

18

1

8

12.26315789

12

1.5

 

  From the table we can see that as choice accommodation number of days to add, once upon a time a camping spot the shorter the time of arrival in the next camping sites. So different accommodation days are corresponding to the number of the location of the camping sites (as shown in the figure below), there will not be a coincidence.

Table 4.5

Camp pointFor the 232

 

A camp every 12 point

 

A camp every 12 point

6

Every 33 points at a camp

7

Every 29 points at a camp

8

Every 26 points at camp

9

Every 26 points at camp

10

Every 21 points at a camp

11

Every 19 points at a camp

12

Every 18 points at a camp

13

Each camp of 17 points

14

Every 16 points at a camp

15

Every 15 points at a camp

16

Every 14 points at a camp

17

Every 13 points at a camp

18

A camp every 12 point

 

For different accommodation days, there are different number of accommodation point location. The diagram below for details

 

 

 

Can be seen from the above 7,9,11 day camp point and accommodation with other different days accommodation choice (accommodation days six,8,10,12,13,14,15,16,17,18 days) as the accommodation during the whole trip point is different, so the three can travel every day, the remaining 10 kinds of accommodation overlap, it must be within 180 days, according to cycle analysis results by C language, to get the same of the reorganization data of maximum interval for eight days, so in eight days for a cycle, eight days are arranged as following:

 

 

 

So a total of 180 days, can trip on the number of tourist groups to participate in the river

      

Among them: used the minimum camp point location

 

Location is used too much the camp site

 

The actual camp points

 

The utilization of camp point is

 

 

 

The results shown in the figure below, near the location of the inlet and outlet, there are some have not been using camp point, camp, the utilization rate of 52.8%.

 

 

 

4.2.3Contrastive Analysis

     In 180 days, to the camp for a total of 18 can accommodate the number of visitors at 88, camp point of utilization rate is 83.33%; To camp for a total of 232 can accommodate the number of visitors at 760, camp point of utilization rate of 52.8%. With the increase of the total number of camps, camps utilization rate of decline. Although camp for a total of 232 camp utilization ratio is lower than a total of 18, but can see clearly that an acceptable volume is far higher than a total of 18 point of camping.

 

 

 

IV.Promotion of the model

 

 

For each different river, river has a corresponding length and water flow rate. Corresponding park river tourism introduce different days camping and crossing the river travel tools is tie-in, can be applied. You can according to the characteristics of every river, using the same method, it is concluded that the optimal number of camping sites, up to and large number of camping utilization.

 

 

VI.The analysis of the model

 

6.1  advantage

l Method is logical and strong applicability

l Application of computer simulation run, easy to calculate

l Traffic was under control, convenient and park managers management

6.2 weakness

l We take the way of tour is booked, did not consider the change of the capacity in different seasons, especially in the peak tourist season, it will lose some tourists

l Camping point set though is optimal under this model, but in the use of camping sites among the presence of idle, it will waste of resources

l Driving tool, even though we consider different rules of tourists to swim the river way, and   to calculate the best camping sites, from the perspective of park management point of view, is  a more convenient management, but lose some consumers.

 

 

 

VII.Promotion of the model  

By model shortcomings, we can use probability estimates the change of the traffic, according to relevant statistics estimates of tourists preference, then can reasonably arrange different number of camping and push the tool. Driving tools according to the tourists and the number of camping, estimate the customer to each of the different sequence of camping sites, by use of related software, to simulate it is concluded that utilization of the highest number of camping sites.

 

 

 

 

 

    

 

 

 

 

 

 

 

 

 

VIII. Reference

 [1]Tang Qiusheng, by lu. Bus parking platform based on multi-channel queuing theory optimization study [J]. Journal of hunan institute of technology (natural science edition), 2013, 2013:18-21 + 87

[2] 2009.Victor nee. the order processing system based on queuing theory modeling and simulation [D]. Beijing jiaotong university, 2009.

 

[3]  xue-ping wang. The application of queuing theory in the medical system [D]. Central China normal university, 2008.

[4]zhou ling again, Shi Gongwen, Martin, Chang Jun dry. Queuing theory in the computation of city bus rapid transit station parking number application [J]. Journal of railway computer applications, 2006, 11:41-44.

[5] Joshua huang. Tang all hospital outpatient queuing system optimization research [D]. Northwest university, 2014.

 

IX. Appendix:

 

Code 1: conflict between camp statistical output (3-13)

 

#include<stdio.h>

 

int round1( float x)

{

 return ((int)(x+0.5));

}

void main()

{

int c[13]={6,7,8,9,10,11,12,13,14,15,16,17,18};

int i,j,y1,y2,p;

float y,s=225,a;

int e[13];

float d[13];

int count1[13]={0,0,0,0,0,0,0,0,0,0,0,0,0}; int count2=0;int count[13]={0,0,0,0,0,0,0,0,0,0,0,0,0}; int count3=0;

int sm[14][20]; int se=0;

int m=0,n,k=0,kk=0;int n2=0;

int am[400]={0,0};

int bm[13]={1,2,3,4,5,6,7,8,9,10,11,12,13};

printf("输入区间最小营地数=");

scanf(" %d",&y1);

printf("输入区间最大营地数=");

scanf(" %d",&y2);

printf("D的不同重复项输入值=");

scanf(" %d",&p);

 

for(y=y1;y<=y2;)//输入不同的y。可以算出距离项e[j]

{

a=s/(y+1);

 

for ( i=0;i<13;i++)//对每个不同的e[j]取整

{

 

d[i]=(y+1)/(c[i]+1);

e[i]=round1(d[i]);

 

 

for (j=1;j<19;j++)//用另一个矩阵进行保存

{  

{if(j<=c[i])

sm[i][j-1]=e[i]*j;

else sm[i][j-1]=0;}

}

}

for(i=0;i<13;i++)

{

for (j=0;j<13;j++)

{

if(e[j]!=e[j+1])

count1[i]=count1[i]+1;//对不同的距离项记数

 

}

 

                 for (n2=0;n2<13;n2++) //增加一列相同项

sm[n2][19]=sm[n2][0];

for (n2=0;n2<13;n2++)//可能出错的地方

{

if (sm[n2][19]==sm[n2+1][19])

   for(j=0;j<18;j++)

    sm[n2+1][j]=0;

}

 

/* for (n2=0;n2<13;n2++) //输出修正后的矩阵

{ printf("%d,",n2+1);

for(j=0;j<18;j++)

printf("%d ",sm[n2][j]);

putchar(‘\n‘);

 

}*/

}

for(i=0;i<13;i++)

{

if(count1[i]==p)//12个不同的距离项

 

{ k=0;kk=0;count3=0;

for (i=0;i<12;i++)

 

   for(j=0;j<18;j++)

   { if(sm[i][j]==0)break;

else 

for( n=i+1;n<13;n++)

for ( m=j;m<18;m++)

  if(sm[i][j]==sm[n][m])//sm[i][j]和下一行的全部进行比较,计算相同数字的组数

 {am[k]=i+1;am[k-1]=n+1;k=k+2;/*printf("%d,%d   ",i+1,n+1);*/ }//输出不同行数

   }

 

}

kk=k-2;

for(k=0;k<=kk;k++) 

{

if(am[k]==1)

count[0]=1+count[0];

if(am[k]==2)

count[1]=1+count[1];

if(am[k]==3)

count[2]=1+count[2];

if(am[k]==4)

count[3]=1+count[3];

if(am[k]==5)

count[4]=1+count[4];

 

if(am[k]==6)

count[5]=1+count[5];

if(am[k]==7)

count[6]=1+count[6];

if(am[k]==8)

count[7]=1+count[7];

if(am[k]==9)

count[8]=1+count[8];

if(am[k]==10)

count[9]=1+count[9];

if(am[k]==11)

count[10]=1+count[10];

if(am[k]==12)

count[11]=1+count[11];

if(am[k]==13)

count[12]=1+count[12];

 

 

}

 

printf("营地数=%.0f\n",y);

for(n=0;n<13;n++)

if (count[n]==0)//分别输出没有出现过相同项的队数的编码

if (sm[n][0]!=0)

{

printf("没有出现重复项的编号=%d",n+1);

count3=count3+1;

}

printf("没有出现重复项编号的总数=%d ",count3);

putchar(‘\n‘);

for(i=0;i<13;i++)//对记数项清零

count[i]=0;

 

 

}

 

}

 

for(i=0;i<13;i++)//对记数项清零

count1[i]=0;

 

 

y++ ;

 

 

}

 

}

 

Code 2: comparison matrix maximum minimum location

 

 

#include<stdio.h>

 

int round1( float x)

{

 return ((int)(x+0.5));

}

 

void main1()

{

int c[13]={6,7,8,9,10,11,12,13,14,15,16,17,18};

int i,j;  int i1=0,i2=0,i3=0;int max=0,min=0;

int sm[13][18];int d[13],e[13];int n2;

float y,s=225,a;

 

for(y=18;y<=23;y++)//输入不同的y。可以算出距离项e[j]

{

a=s/(y+1);

 

for ( i=0;i<13;i++)//对每个不同的e[j]取整

{

 

d[i]=(y+1)/(c[i]+1);

e[i]=round1(d[i]);

 

 

for (j=1;j<19;j++)//用另一个矩阵进行保存

if(j<=c[i])

sm[i][j-1]=e[i]*j;

else sm[i][j-1]=0;

 

 

 

}

 

                for (n2=0;n2<13;n2++) //增加一列相同项

sm[n2][18]=sm[n2][0];

 

 

for (n2=0;n2<12;n2++)

{if (sm[n2][18]==sm[n2+1][18])

   for(j=0;j<18;j++)

    sm[n2+1][j]=0;}

 

for (n2=0;n2<13;n2++) //输出修正后的矩阵

{ printf("%d,",n2+1);

for(j=0;j<18;j++)

printf("%d ",sm[n2][j]);

putchar(‘\n‘);

 

}

 

putchar(‘\n‘);

max=sm[0][0];

   for (i1=0;i1<13;i1++)

   for(i2=0;i2<18;i2++)

   if(sm[i1][i2]>max)max=sm[i1][i2];

min=sm[0][0];

   for (i1=0;i1<13;i1++)

   for(i2=0;i2<18;i2++)

  if(sm[i1][i2]!=0) if(sm[i1][i2]<min)min=sm[i1][i2];

 

printf("\n%d,%d\n",max,min);

 

putchar(‘\n‘);

}

 

 

}

 

 

Code 3: conflict between camp in statistical output is not revised)

 

#include<stdio.h>

 

int round1( float x)

{

 return ((int)(x+0.5));

}

 

void main()

{

int c[13]={6,7,8,9,10,11,12,13,14,15,16,17,18};

int i,j,y1,y2,p;

float y,s=225,a;

int e[13];

float d[13];

int count1[13]={0,0,0,0,0,0,0,0,0,0,0,0,0}; int count2=0;int count[13]={0,0,0,0,0,0,0,0,0,0,0,0,0}; int count3=0;

int sm[13][18]; int se=0;

int m=0,n,k=0,kk=0;int n2=0;

int am[400]={0,0};

int bm[13]={1,2,3,4,5,6,7,8,9,10,11,12,13};

printf("输入区间最小营地数=");

scanf(" %d",&y1);

printf("输入区间最大营地数=");

scanf(" %d",&y2);

printf("D的不同重复项输入值=");

scanf(" %d",&p);

 

for(y=y1;y<=y2;)//输入不同的y。可以算出距离项e[j]

{

a=s/(y+1);

 

for ( i=0;i<13;i++)//对每个不同的e[j]取整

{

 

d[i]=(y+1)/(c[i]+1);

e[i]=round1(d[i]);

 

 

for (j=1;j<19;j++)//用另一个矩阵进行保存

{  

{if(j<=c[i])

sm[i][j-1]=e[i]*j;

else sm[i][j-1]=0;}

}

 

 

 

}

for(i=0;i<13;i++)

{

for (j=0;j<13;j++)

{

if(e[j]!=e[j+1])

count1[i]=count1[i]+1;//对不同的距离项记数

 

 

}

putchar(‘\n‘);

     

for (i=0;i<13;i++)

  if(sm[i][0]==sm[i+1][0])

 

  {for(j=0;j<18;j++) sm[i+1][j]=0;i++;}//把相同的距离的队数清零

putchar(‘\n‘);

                 for (n2=0;n2<13;n2++) //增加一列相同项

sm[n2][18]=sm[n2][0];

 

 

for (n2=0;n2<12;n2++)

{if (sm[n2][18]==sm[n2+1][18])

   for(j=0;j<18;j++)

    sm[n2+1][j]=0;}

 

}

     

for(i=0;i<13;i++)

{

if(count1[i]==p)//12个不同的距离项

 

{ k=0;kk=0;count3=0;

for (i=0;i<12;i++)

 

   for(j=0;j<18;j++)

   { if(sm[i][j]==0)break;

else 

for( n=i+1;n<13;n++)

for ( m=j;m<18;m++)

  if(sm[i][j]==sm[n][m])//sm[i][j]和下一行的全部进行比较,计算相同数字的组数

  {am[k]=i+1;am[k-1]=n+1;k=k+2;/*printf("%d,%d   ",i+1,n+1);*/ }

   }

 

}

kk=k-2;

 

for(k=0;k<=kk;k++) 

{

if(am[k]==1)

count[0]=1+count[0];

if(am[k]==2)

count[1]=1+count[1];

if(am[k]==3)

count[2]=1+count[2];

if(am[k]==4)

count[3]=1+count[3];

if(am[k]==5)

count[4]=1+count[4];

 

if(am[k]==6)

count[5]=1+count[5];

if(am[k]==7)

count[6]=1+count[6];

if(am[k]==8)

count[7]=1+count[7];

if(am[k]==9)

count[8]=1+count[8];

if(am[k]==10)

count[9]=1+count[9];

if(am[k]==11)

count[10]=1+count[10];

if(am[k]==12)

count[11]=1+count[11];

if(am[k]==13)

count[12]=1+count[12];

 

 

}

 

printf("营地数=%.0f\n",y);

for(n=0;n<13;n++)

if (count[n]==0)//分别输出没有出现过相同项的队数的编码

if (sm[n][0]!=0) { printf("没有出现重复项的编号=%d",n+1);count3=count3+1;}

printf("没有出现重复项编号的总数=%d ",count3);

putchar(‘\n‘);

for(i=0;i<13;i++)//对记数项清零

count[i]=0;

 

 

}

 

}

 

for(i=0;i<13;i++)//对记数项清零

count1[i]=0;

 

 

y++ ;

 

 

}

 

}

 

 

 

Schedule:

 

Exhibit a: camp and the camp interval

 

 

营地点数

d的不同项数

营地点数

d的不同项数

18~23

3

137~141

11

28~30

3

149~160

11

24~27

4

162~174

11

31~37

4

180~187

11

38~44

5

199~201

11

47~51

5

175~179

12

45~46

6

188~198

12

52~58

6

202~216

12

66

6

218~231

12

59~65

7

237~246

12

67~75

7

256~262

12

76~93

8

275~279

12

94~114

9

294~296

12

123~125

9

217

13

115~122

10

232~236

13

126~136

10

247~255

13

142~148

10

263~274

13

161

10

280~293

13

 

 

297~1000

13

Table 2: a boat between the camp and conflict

 

营地点

没出现的组别

第一行比较无重复项

营地点

没出现的组别

第一行比较无重复项

没出现的行数

没出现的行数

9

124

1

13

152

1

 

 

9

125

1

13

232

2

4

6

7

67

1

12 

179

2

 

 

7

69

1

12

188

4

 

 

7

71

1

12

189

4

 

 

7

73

1

12

190

4

 

 

7

75

1

12

191

4

 

 

8

76

1

12

192

4

 

 

8

77

1

12

193

4

 

 

8

78

1

12

206

3

5

 

8

79

1

12

207

3

5

 

8

80

1

12

208

3

5

 

8

81

1

12

209

3

5

 

8

82

1

12

210

3

5

 

8

83

1

12

211

5

 

 

8

84

1

12

212

5

 

 

8

85

1

12

213

1

5

 

8

86

1

12

214

1

 

 

8

87

1

12

215

1

 

 

8

88

1

12

216

1

 

 

8

89

1

12

218

1

 

 

8

90

1

12

219

1

 

 

8

91

1

12

224

4

6

 

8

92

1

12

225

4

6

 

8

93

1

12

226

4

6

 

9

94

1

12

227

4

6

 

9

95

1

12

228

4

6

 

9

96

1

12

229

4

6

 

9

97

1

12

230

4

6

 

9

98

1

12

231

4

6

 

9

99

1

12

242

7

 

 

9

100

1

12

243

7

2

 

9

101

1

12

244

7

2

 

9

102

1

12

245

7

2

 

9

103

1

12

246

7

2

 

9

104

1

12

256

1

3

5

9

105

1

12

257

1

3

5

9

106

1

12

258

1

3

8

9

107

1

12

259

1

3

8

9

108

1

12

260

1

3

8

9

109

1

12

261

1

3

8

9

110

1

12

262

1

 

 

9

111

1

12

278

3

6

9

9

112

1

12

279

3

6

9

9

113

1

12

294

2

7

 

9

114

1

12

295

2

7

10

9

123

1

12

296

2

7

10

5

49

1

11

152

2

 

 

5

50

1

11

153

2

 

 

5

51

1

11

154

2

 

 

6

45

1

11

157

1

 

 

6

46

1

11

158

1

 

 

6

52

1

11

159

1

 

 

6

53

1

11

160

1

 

 

6

54

1

11

170

1

3

 

6

55

1

11

171

1

3

 

6

56

1

11

172

1

3

 

6

57

1

11

173

1

3

 

6

58

1

11

174

1

3

 

6

66

1

11

180

2

 

 

7

59

1

11

181

2

 

 

7

60

1

11

182

2

 

 

7

61

1

11

183

2

 

 

7

62

1

11

184

2

4

 

7

63

1

11

185

2

4

 

7

64

1

11

186

2

4

 

7

65

1

11

187

4

 

 

233

2

 

10

115

1

 

 

3

18

1

10

116

1

 

 

3

19

1

10

117

1

 

 

3

21

1

10

118

1

 

 

3

22

1

10

119

1

 

 

3

28

1

10

120

1

 

 

3

29

1

10

121

1

 

 

3

30

1

10

122

1

 

 

4

24

1

10

126

1

 

 

4

25

1

10

127

1

 

 

4

27

1

10

128

1

 

 

4

31

1

10

129

1

 

 

4

32

1

10

130

1

 

 

4

33

1

10

131

1

 

 

4

34

1

10

132

1

 

 

4

35

1

10

133

1

 

 

4

36

1

10

134

1

 

 

4

37

1

10

135

1

 

 

5

38

1

10

136

1

 

 

5

39

1

10

142

1

 

 

5

40

1

10

143

1

 

 

5

41

1

10

144

1

 

 

5

42

1

10

145

1

 

 

5

43

1

10

146

1

 

 

5

44

1

10

147

1

 

 

5

47

1

10

148

1

 

 

5

48

1

10

161

1

 

 

 

 

 

The number of table and 2 camp rule summary

 

重复营地点编号

旅行天数天数

住宿天数

营地点编号

旅行天数

住宿天数

36

2

12

126

6

10

3

18

7

12

48

3

14

130

9

16

4

18

5

8

60

4

15

132

10

17

5

18

4

6

72

4

12

11

18

6

18

144

8

12

78

3

8

9

14

6

17

12

18

84

4

10

156

6

8

6

16

12

17

7

18

13

18

90

5

12

168

8

10

6

15

12

16

96

6

14

14

18

8

18

165

5

6

104

4

8

11

15

8

17

180

10

12

105

5

10

12

15

7

15

15

18

108

6

12

182

13

16

9

18

14

17

112

7

15

7

8

8

16

210

10

10

120

8

15

14

15

10

18

15

16

198

6

6

221

13

13

11

12

17

17

208

8

8

224

14

14

13

14

16

16

16

17

 

 

 

 

Abstract

标签:

原文地址:http://www.cnblogs.com/lpc1992/p/4264868.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!