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

美国数模论文The Big Long River仿真程序

时间:2015-01-24 12:54:12      阅读:169      评论:0      收藏:0      [点我收藏+]

标签:

 1 基于贪心算法,我们认为每只船只尽可能到达规定河段的最远营地,依次尾随,有空位则补上。每只船我们作为一个对象,记录类型,露营剩余时间,所在河段,然后依次连接形成一个队列,队列随时间依次拉长,当船只到到达第六个河段且露营天数只剩一天,那么可以从队列拉出。每天第一个河段都有剩余营地数,那么该天出发的船只数等于第一河段剩余营地,船只的分配按照一定的权重。
 2 步骤如下:
 3 当露营地个数为90个时:
 4 当u1=0.2,u2=0.6,u3=0.2 5 第一天白天,第一区域有15个营地。
 6 第一天白天出发,出发3个类型1旅游船,9个类型2旅游船,3个类型3旅游船。
 7 第一天晚上扎营3个类型1旅游船,9个类型2旅游船,3个类型3旅游船。
 8 第二天白天,第一区域走了三只类型1旅游船,剩下9只类型2旅游船,3只类型3旅游船,也就是,第一区域剩下3个营地。
 9 第二天白天出发,根据算法将剩下的3个营地根据比例分配,可以根据比例算出应出发3*0.2=0.6只类型1旅游船,3*0.6=1.8只类型2旅游船,3*0.2只类型3旅游船,按船只向上或向下取整,则出发0只类型1旅游船,两只类型2旅游船,一只类型3旅游船。
10 第二天晚上扎营0个类型1旅游船,10个类型2旅游船,4个类型3旅游船。
11 第三天白天,扎了两天晚上的9只类型2旅行船出发,也就是第一区域走了9只类型2旅行船。剩下九个营地。
12 第三天.....
13 
14 其他区域以此类推。

 

River.java

/* River Queue(can be use to contain a lot of boat) */
public class River<E>{
	private java.util.LinkedList<E> list=new java.util.LinkedList<E>();
	
	public void enter(E e){     //A new boat enter the river
		list.addLast(e);        //begin a trip
	}
	
	public E out(){             //A boat out the river
		return list.removeFirst(); //end a trip
	}
	public E get(int index){
		return list.get(index);
	}
	public int getsize(){
		return list.size();
	}
	public void remove(int index){
		list.remove(index);
	}
}

  

Boat.java

/* Boat class */
public class Boat {
	public int type=0;     
	/* The type of boat,
	 	1 stand for the boat stay one night in every segment
	 	2 stand for the boat stay two night in every segment
	 	3 stand for the boat stay three night in every segment
	 */ 
	public int segment=0;     //now in which river segment
	public int number=0;      //the number of the same type boat in the same begin day
	public int beginday=0;    //the begin day of the camping
	public int surplusday=0;  //the surplus day of the camping
	public Boat() {
		// TODO Auto-generated constructor stub
	}
	public Boat(int beginday,int type,int number) {
		days(type);          //auto method to give value to another values
		// TODO Auto-generated constructor stub
		this.number=number;
		this.type=type;
	}
	
	// change the river segment of the boat  
	public void changesegment(int segment){
		this.segment=segment;
	}
	
	// change the river surplus day of the boat 
	public void changesurplusday(){
		this.surplusday--;
	}
	// get the river surplus day of the boat
	public int getsurplusday(){
		return this.surplusday;
	}
	
	// get the segment
	public int getsegment(){
		return this.segment;
	}
	// get the number of the same boat in the same begin day
	public int getboatnumber(){
		return this.number;
	}
	
	public int getboattype(){
		return this.type;
	}
	public void days(int type){ //auto method 
		if(type==1){
			this.surplusday=6;
		}
		else if(type==2){
			this.surplusday=12;
		}
		else{
			this.surplusday=18;
		}	
	}
}

  

 

 

Time.java

/* Boat change with times */
public class Time {
	public static int day=180;          //trip sum day
	public static int campnumber=15;  //Every segment‘s camp number
	public static int firstcampnumber=15;//surplus camp in the first segment
	public static  double u1=0.2;     //type 1 boat weight
	public static  double u2=0.6;      //type 2 boat weight
	public static  double u3=0.2;       //type 3 boat weight
	public static int overu1=0;         //The sum number of trip of type 1 in 180 days 
	public static int overu2=0;			//The sum number of trip of type2 in 180 days 
	public static int overu3=0;			//The sum number of trip of type 3 in 180 days 
	public static int boatinriver=0;    //the number of boat in the river
	public static Boat temp=new Boat();        //temp variable
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		River<Boat> river=new River<Boat>(); //create a queue of boat
		for(int i=1;i<=day;i++){
			int[][] segemntboat=new int[7][3];  
			//every type of boat in every segment,segment7 stand for end the trip
			int type1number=(int) (firstcampnumber*u1);//floor the boat number
			int type2number=(int) (firstcampnumber*u2);
			int type3number=firstcampnumber-type1number-type2number;
			river.enter(new Boat(i,1,type1number));//enter boat
			river.enter(new Boat(i,2,type2number));
			river.enter(new Boat(i,3,type3number));
			boatinriver=river.getsize();           //get the number of boat in the river
			for(int j=0;j<boatinriver;j++){       //one day past
				temp=river.get(j);                 //get the boat
				temp.changesurplusday();           // decrease camping day
				switch(temp.getboattype()){        // change river segment 
					case 1:{                       //if the type of boat is type 1
						int k=0;
						switch(temp.getsurplusday()){
							case 6:k=1;           //surplus day is  6,it in segment 1
							break;
							case 5:k=2;           //surplus day is  5,it in segment 2
							break;
							case 4:k=3;
							break;
							case 3:k=4;
							break;
							case 2:k=5;
							break;
							case 1:k=6;
							break;
							case 0:
								k=7;           //boat of end trip 	
						}
						temp.changesegment(k); 
						segemntboat[k-1][0]+=temp.getboatnumber();
					}
					break;
					case 2:{                       //if the type of boat is type2
						int k=0;
						switch(temp.getsurplusday()){
							case 11: ;             //surplus day is  11.12,it in segment 1
							case 12:k=1;
							break;
							case 10: ;             //surplus day is  9.10,it in segment 1
							case 9:k=2;
							break;
							case 8: ;
							case 7:k=3;
							break;
							case 5: ;
							case 6:k=4;
							break;
							case 3: ;
							case 4:k=5;
							break;
							case 1: ;
							case 2:k=6;
							break;
							case 0:
								k=7;           //boat of end trip 	
						}
						temp.changesegment(k); 
						segemntboat[k-1][1]+=temp.getboatnumber();
					}
					break;
					case 3:{				//if the type of boat is type3
						int k=0;
						switch(temp.getsurplusday()){
							case 18: ;		//surplus day is  18. 17.16,it in segment 1
							case 17: ;				
							case 16:k=1;
							break;
							case 15: ;              //surplus day is  15.14.13,it in segment 2
							case 14: ;
							case 13:k=2;
							break;
							case 12: ;
							case 11: ;
							case 10:k=3;
							break;
							case 9: ;
							case 8: ;
							case 7:k=4;
							break;
							case 6: ;
							case 5: ;
							case 4:k=5;
							break;
							case 3: ;
							case 2: ;
							case 1:k=6;
							break;
							case 0:
								k=7;                 //boat of end trip 	
						}
						temp.changesegment(k); 
						segemntboat[k-1][2]+=temp.getboatnumber();
					}
				}
				
			}
			for(int j=0;j<boatinriver;j++){       //some boat leave
				temp=river.get(j);
				if((temp.getsurplusday())==0){
					river.remove(j);               //the boat over
					j--;
					boatinriver=river.getsize();
				}
			}
		overu1+=segemntboat[6][0];        //get the sum number of type 1 in all 180 days;
		overu2+=segemntboat[6][1];
		overu3+=segemntboat[6][2];
		int zone1=segemntboat[0][1]+segemntboat[0][0]+segemntboat[0][2];
		int zone2=segemntboat[1][1]+segemntboat[1][0]+segemntboat[1][2];
		int zone3=segemntboat[2][1]+segemntboat[2][0]+segemntboat[2][2];
		int zone4=segemntboat[3][1]+segemntboat[3][0]+segemntboat[3][2];
		int zone5=segemntboat[4][1]+segemntboat[4][0]+segemntboat[4][2];
		int zone6=segemntboat[5][1]+segemntboat[5][0]+segemntboat[5][2];
		int zone7=segemntboat[6][1]+segemntboat[6][0]+segemntboat[6][2];
		firstcampnumber=campnumber-zone1;   //zone 1 has some empty camp
		/*  boat change */
		//System.out.printf("The %d Day:15,%d,%d,%d,%d,%d,Leave :%d\n",i,
         //zone2,zone3,zone4,zone5,zone6,zone7); //System.out.println("have empty camp number:"+firstcampnumber); //System.out.printf("The %d Day:%d,%d,%d,%d,%d,%d,Leave :%d\n",i+1,
          //zone1,zone2,zone3,zone4,zone5,zone6,zone7); //System.out.println("Enter boat:"+firstcampnumber); System.out.printf("%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d\n",i, segemntboat[0][0],segemntboat[0][1],segemntboat[0][2], segemntboat[1][0],segemntboat[1][1],segemntboat[1][2], segemntboat[2][0],segemntboat[2][1],segemntboat[2][2], segemntboat[3][0],segemntboat[3][1],segemntboat[3][2], segemntboat[4][0],segemntboat[4][1],segemntboat[4][2], segemntboat[5][0],segemntboat[5][1],segemntboat[5][2], segemntboat[6][0],segemntboat[6][1],segemntboat[6][2] ); } /* some other input */ //System.out.printf("Sum leave type 1:%d leave type 2:%d leave type 3:%d\n total boat:%d\n",
         // overu1,overu2,overu3,overu1+overu2+overu3);//End of 180 days //System.out.printf("The total boat %d",(overu1+overu2+overu3)*2); //System.out.printf("%.2f %.2f %.2f %d %d %d %d\n",u1,u2,u3,overu1*2,overu2*2,overu3*2,
         //(overu1+overu2+overu3)*2); //System.out.printf("%d %d %d %d %d\n",campnumber*6*2,overu1*2,overu2*2,overu3*2,
         //(overu1+overu2+overu3)*2); overu3=overu2=overu1=0; } }

  

Result:

1 0 9 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 0 1 5 0 9 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0
3 0 5 5 1 10 3 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0
4 0 3 4 1 6 5 1 9 0 0 0 0 3 0 0 0 0 0 0 0 0
5 0 4 4 1 8 8 1 10 0 1 0 0 0 0 0 3 0 0 0 0 0
6 0 4 5 1 7 6 1 6 3 1 9 0 1 0 0 0 0 0 3 0 0
7 0 3 4 1 8 7 1 8 5 1 10 0 1 0 0 1 0 0 0 0 0
8 0 4 5 1 7 6 1 7 8 1 6 0 1 9 0 1 0 0 1 0 0
9 0 3 5 1 7 7 1 8 6 1 8 3 1 10 0 1 0 0 1 0 0
10 0 4 4 1 7 7 1 7 7 1 7 5 1 6 0 1 9 0 1 0 0
11 0 4 4 1 7 7 1 7 6 1 8 8 1 8 0 1 10 0 1 0 0
12 0 4 4 1 8 7 1 7 7 1 7 6 1 7 3 1 6 0 1 9 0
13 0 4 4 1 8 6 1 7 7 1 7 7 1 8 5 1 8 0 1 1 0
14 0 4 4 1 8 6 1 8 7 1 7 6 1 7 8 1 7 0 1 5 0
15 0 4 4 1 8 6 1 8 7 1 7 7 1 7 6 1 8 3 1 3 0
16 0 4 4 1 8 6 1 8 6 1 8 7 1 7 7 1 7 5 1 4 0
17 0 4 4 1 8 6 1 8 6 1 8 7 1 7 6 1 7 8 1 4 0
18 0 4 4 1 8 6 1 8 6 1 8 7 1 8 7 1 7 6 1 3 3
19 0 4 4 1 8 6 1 8 6 1 8 6 1 8 7 1 7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 1 8 6 1 8 6 1 8 6 1 4 2
160 0 4 4 1 8 6 1 8 6 1 8 6 1 8 6 1 8 6 1 4 2
161 0 4 4 1 8 6 1 8 6 1 8 6 1 8 6 1 8 6 1 4 2
162 0 4 4 1 8 6 1 8 6 1 8 6 1 8 6 1 8 6 1 4 2
163 0 4 4 1 8 6 1 8 6 1 8 6 1 8 6 1 8 6 1 4 2
164 0 4 4 1 8 6 1 8 6 1 8 6 1 8 6 1 8 6 1 4 2
165 0 4 4 1 8 6 1 8 6 1 8 6 1 8 6 1 8 6 1 4 2
166 0 4 4 1 8 6 1 8 6 1 8 6 1 8 6 1 8 6 1 4 2
167 0 4 4 1 8 6 1 8 6 1 8 6 1 8 6 1 8 6 1 4 2
168 0 4 4 1 8 6 1 8 6 1 8 6 1 8 6 1 8 6 1 4 2
169 0 4 4 1 8 6 1 8 6 1 8 6 1 8 6 1 8 6 1 4 2
170 0 4 4 1 8 6 1 8 6 1 8 6 1 8 6 1 8 6 1 4 2
171 0 4 4 1 8 6 1 8 6 1 8 6 1 8 6 1 8 6 1 4 2
172 0 4 4 1 8 6 1 8 6 1 8 6 1 8 6 1 8 6 1 4 2
173 0 4 4 1 8 6 1 8 6 1 8 6 1 8 6 1 8 6 1 4 2
174 0 4 4 1 8 6 1 8 6 1 8 6 1 8 6 1 8 6 1 4 2
175 0 4 4 1 8 6 1 8 6 1 8 6 1 8 6 1 8 6 1 4 2
176 0 4 4 1 8 6 1 8 6 1 8 6 1 8 6 1 8 6 1 4 2
177 0 4 4 1 8 6 1 8 6 1 8 6 1 8 6 1 8 6 1 4 2
178 0 4 4 1 8 6 1 8 6 1 8 6 1 8 6 1 8 6 1 4 2
179 0 4 4 1 8 6 1 8 6 1 8 6 1 8 6 1 8 6 1 4 2
180 0 4 4 1 8 6 1 8 6 1 8 6 1 8 6 1 8 6 1 4 2

 

test.java

public class test {

	public static double a=0.5;
	public static double b=0;	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
	Time Sensitivity=new Time();
	/* Initial  */
	Sensitivity.campnumber=15;
	Sensitivity.firstcampnumber=15;
	Sensitivity.u1=0.2;
	Sensitivity.u2=0.6;
	Sensitivity.u3=0.2;
	for(int i=1;i<=10;i++){
		/* weight */
		Sensitivity.u1=a;   
		Sensitivity.u2=b;
		Sensitivity.u3=1-a-b;
		b=b+0.05;
		//Sensitivity.campnumber=i;
		//Sensitivity.firstcampnumber=i;
		Sensitivity.main(args);
	
	}
	//Sensitivity.main(args);
	}

}

  

美国数模论文The Big Long River仿真程序

标签:

原文地址:http://www.cnblogs.com/nima/p/4245723.html

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