package it.unimi.di.laren.smartwash.Model;

public class Valori {
	
	//calcolo acqua
	public int water1 = 0;
	public int water2 = 0;
	public float valH2o = 0;
	
	//calcolo co2
	public int soap = 0;
	public float valco2 = 0;
	
	//calcolo kWh
	public int spin1 = 0;
	public int spin2 = 0;
	public int spin3 = 0;
	public int time1 = 0;
	public int time2 = 0;
	public int time3 = 0;
	public int temperature1 = 0;
	public float valkWh = 0;
	
	//calcolo eff
	public int t1 = 0;
	public int s1 = 0;
	public int var_water = 5;
	public int var_time = 5;
	public int var_soap = 10;
	public int var_spin = 100;
	public int var_temp = 10;
	
	public float totSomma = 0;
	public float semiSomma = 0;
	public float valEff = 0;
	
	public Valori(){
		return;
	}
	
	public float totkWh(int s1, int s2, int s3, int t1, int t2, int t3, int te1, int w){
		valkWh = (float) Math.exp(Math.pow(((Math.pow(s1, 2))*t1)+((Math.pow(s2, 2))*t2)+((Math.pow(s3, 2))*t3)+(10*(Math.pow(te1, 2))*w), 2));
		return valkWh;
	}
	
	public float totH2O(int w1, int w2){
		int w = w1 + w2;
		valH2o = (float) Math.pow(w, -1);
		return valH2o;
	}
	
	public float totCO2(int s, float w){
		valco2 = s/w;
		return valco2;
	}
	
	public float calcEff_i(int t_i, int s_i, int var){
		float sig = (float) Math.sqrt(var);
		semiSomma = (float) Math.pow(((t_i - s_i)/sig),2);
		return semiSomma;
	}
	public float sommaEff(float e1, float e2, float e3, float e4, float e5, float e6, float e7, float e8, float e9, float e10){
		float somma = e1+e2+e3+e4+e5+e6+e7+e8+e9+e10;
		return somma;
	}
	public float totEff(float tot){
		valEff = (float) Math.exp(tot);
		return valEff;
	}
	

}
