def setUp(self):
    self.name = 'Test'
    self.ee = ExecutionEngine(self.name)
    self.year_start = 2020
    self.year_end = 2050
    self.time_step = 1
    self.years = np.arange(self.year_start, (self.year_end + 1), self.time_step)
    self.nb_per = round((((self.year_end - self.year_start) / self.time_step) + 1))
    data_dir = join(dirname(__file__), 'data')
    global_data_dir = join(dirname(dirname(__file__)), 'data')
    total_workforce_df = read_csv(join(data_dir, 'workingage_population_df.csv'))
    total_workforce_df = total_workforce_df[(total_workforce_df['years'] <= self.year_end)]
    workforce = ((total_workforce_df['population_1570'] * 0.659) * 0.509)
    self.workforce_df = pd.DataFrame({'years': self.years, 'workforce': workforce})
    brut_net = (1 / 1.45)
    share_indus = 0.37
    energy_outlook = pd.DataFrame({'year': [2010, 2017, 2018, 2025, 2030, 2035, 2040, 2050, 2060, 2100], 'energy': [149.483879, 162.7848774, 166.4685636, 180.7072889, 189.6932084, 197.8418842, 206.1201182, 220.0, 250.0, 300.0]})
    f2 = interp1d(energy_outlook['year'], energy_outlook['energy'])
    energy_supply = f2(np.arange(self.year_start, (self.year_end + 1)))
    energy_supply_values = ((energy_supply * brut_net) * share_indus)
    energy_supply_df = pd.DataFrame({'years': self.years, 'Total production': energy_supply_values})
    energy_supply_df.index = self.years
    self.energy_supply_df = energy_supply_df
    init_value = 25
    invest_serie = []
    invest_serie.append(init_value)
    for year in np.arange(1, self.nb_per):
        invest_serie.append((invest_serie[(year - 1)] * 1.02))
    self.total_invest = pd.DataFrame({'years': self.years, 'investment': invest_serie})
    self.damage_df = pd.DataFrame({'years': self.years, 'damages': np.zeros(self.nb_per), 'damage_frac_output': np.zeros(self.nb_per), 'base_carbon_price': np.zeros(self.nb_per)})
    self.damage_df.index = self.years
    self.damage_df['damage_frac_output'] = 0.01
def setUp(self):
    self.name = 'Test'
    self.ee = ExecutionEngine(self.name)
    self.year_start = 2020
    self.year_end = 2050
    self.time_step = 1
    self.years = np.arange(self.year_start, (self.year_end + 1), self.time_step)
    self.nb_per = round((((self.year_end - self.year_start) / self.time_step) + 1))
    data_dir = join(dirname(__file__), 'data')
    global_data_dir = join(dirname(dirname(__file__)), 'data')
    total_workforce_df = read_csv(join(data_dir, 'workingage_population_df.csv'))
    total_workforce_df = total_workforce_df[(total_workforce_df['years'] <= self.year_end)]
    workforce = ((total_workforce_df['population_1570'] * 0.659) * 0.509)
    self.workforce_df = pd.DataFrame({'years': self.years, 'workforce': workforce})
    brut_net = (1 / 1.45)
    share_indus = 0.37
    energy_outlook = pd.DataFrame({'year': [2010, 2017, 2018, 2025, 2030, 2035, 2040, 2050, 2060, 2100], 'energy': [149.483879, 162.7848774, 166.4685636, 180.7072889, 189.6932084, 197.8418842, 206.1201182, 220.0, 250.0, 300.0]})
    f2 = interp1d(energy_outlook['year'], energy_outlook['energy'])
    energy_supply = f2(np.arange(self.year_start, (self.year_end + 1)))
    energy_supply_values = ((energy_supply * brut_net) * share_indus)
    energy_supply_df = pd.DataFrame({'years': self.years, 'Total production': energy_supply_values})
    energy_supply_df.index = self.years
    self.energy_supply_df = energy_supply_df
    init_value = 25
    invest_serie = []
    invest_serie.append(init_value)
    for year in np.arange(1, self.nb_per):
        invest_serie.append((invest_serie[(year - 1)] * 1.02))
    self.total_invest = pd.DataFrame({'years': self.years, 'investment': invest_serie})
    self.damage_df = pd.DataFrame({'years': self.years, 'damages': np.zeros(self.nb_per), 'damage_frac_output': np.zeros(self.nb_per), 'base_carbon_price': np.zeros(self.nb_per)})
    self.damage_df.index = self.years
    self.damage_df['damage_frac_output'] = 0.01