def setUp(self):
        self.input_dict = dict()
        self.output_dict = dict()
        self.cable_input_dict = dict()
        self.addl_specs = dict()

        rsmeans_csv = os.path.join(landbosse_test_input_dir(),
                                   'rsmeans_proprietary.csv')
        self.input_dict['rsmeans'] = pd.read_csv(rsmeans_csv)
        crew_cost_csv = os.path.join(landbosse_test_input_dir(),
                                     'crew_price_proprietary.csv')
        self.input_dict['crew_cost'] = pd.read_csv(crew_cost_csv)
        crews_csv = os.path.join(landbosse_test_input_dir(), 'crews.csv')
        self.input_dict['crew'] = pd.read_csv(crews_csv)
        self.input_dict['construct_duration'] = 9  # months
        self.input_dict['time_construct'] = 'normal'
        self.input_dict['hour_day'] = {'long': 24, 'normal': 10}

        #============================================================
        #All below inputs are inputs for ArraySystem class:
        self.input_dict['cable_specs'] = dict()

        cable_specs_path = os.path.join(landbosse_test_input_dir(),
                                        'cable_specs.csv')

        self.input_dict['cable_specs_pd'] = pd.read_csv(
            cable_specs_path)  #Read in cable specs into a dataframe.
        # self.input_dict['cable_specs'] = self.input_dict['cable_specs_pd'].T.to_dict()

        self.input_dict[
            'user_defined_distance_to_grid_connection'] = 0  # 0 = No ; 1 = Yes
        self.input_dict['distance_to_grid_connection_km'] = 2
        self.project_name = 'project_1'

        #Inputs for ArraySystem:

        self.input_dict['num_turbines'] = 1
        self.input_dict['plant_capacity_MW'] = 15
        self.input_dict['row_spacing_rotor_diameters'] = 5
        self.input_dict['turbine_rating_MW'] = 0.02
        self.input_dict['upstream_turb'] = 0
        self.input_dict['turb_sequence'] = 1
        self.input_dict['depth'] = 45
        self.input_dict['rsmeans_per_diem'] = 144

        self.input_dict['turbine_spacing_rotor_diameters'] = 5
        self.input_dict['rotor_diameter_m'] = 154
        self.input_dict['line_frequency_hz'] = 60
        self.input_dict[
            'overtime_multiplier'] = 1.4  # multiplier for labor overtime rates due to working 60 hr/wk rather than 40 hr/wk

        # Weather window:
        self.input_dict['num_delays'] = 7
        self.input_dict['avg_hours_per_delay'] = 20
        self.input_dict['std_dev_hours_per_delay'] = 5
        self.input_dict['delay_speed_m_per_s'] = 9
        self.input_dict['seed'] = 101
        self.input_dict['weather_window'] = generate_a_year(
            num_delays=self.input_dict['num_delays'],
            avg_hours_per_delay=self.input_dict['avg_hours_per_delay'],
            std_dev_hours_per_delay=self.input_dict['std_dev_hours_per_delay'],
            delay_speed_m_per_s=self.input_dict['delay_speed_m_per_s'],
            seed=self.input_dict['seed'])

        self.input_dict['start_delay_hours'] = 100
        self.input_dict['mission_time_hours'] = 50
        self.input_dict['critical_wind_speed_m_per_s'] = 8.0
        self.input_dict['wind_height_of_interest_m'] = 100
        self.input_dict['wind_shear_exponent'] = 0.25
        self.input_dict['season_construct'] = ['spring', 'summer']
        self.input_dict['time_construct'] = 'normal'
        self.input_dict['operational_hrs_per_day'] = 10
        self.input_dict['duration_construction'] = 9  # months
        self.input_dict['operational_hrs_per_day'] = 10
        self.input_dict['critical_speed_non_erection_wind_delays_m_per_s'] = 15
        self.input_dict['critical_height_non_erection_wind_delays_m'] = 10
        self.input_dict['rsmeans_per_diem'] = 99

        #============================================================

        # Test inputs for Cable class: (Taken from cable specs dict)
        self.cable_input_dict[
            'Current Capacity (A)'] = 610  # Amps (at 1 m burial depth)
        self.cable_input_dict['Rated Voltage (V)'] = 33  # kV, line-to-line
        self.cable_input_dict[
            'AC Resistance (Ohms/km)'] = 0.062  # Ohms/km (at 90 deg C at 60 Hz)
        self.cable_input_dict['Inductance (mH/km)'] = 0.381  # mH/km
        self.cable_input_dict['Capacitance (nF/km)'] = 224  # nF/km
        self.cable_input_dict['Cost (USD/LF)'] = 250000  # $US/km

        # Additional inputs for Array(Cable) class

        self.addl_specs['turbine_rating_MW'] = 7
        self.addl_specs['upstream_turb'] = 0
        self.addl_specs['turb_sequence'] = 0
        self.addl_specs['turbine_spacing_rotor_diameters'] = 5
        self.addl_specs['rotor_diameter_m'] = 154
        self.addl_specs['line_frequency_hz'] = 60
    def setUp(self):
        self.input_dict = dict()
        self.project_name = 'Project_1'
        self.input_dict[
            'road_distributed_wind'] = True  #TODO add this to input file.

        #Inputs for calculate_road_properties():
        # self.input_dict['road_length'] = 108000   #TODO: Also add option to make road_length a user specified input.
        self.input_dict['road_width_ft'] = 10  # feet 10
        self.input_dict['road_thickness'] = 2  # inches
        self.input_dict[
            'crane_width'] = 4.548  # metres 10.7 + shoulder width 1.5 m
        self.input_dict['num_access_roads'] = 5
        self.input_dict['num_turbines'] = 1
        self.input_dict['rsmeans'] = pd.read_csv(
            os.path.join(landbosse_test_input_dir(),
                         'rsmeans_proprietary.csv'))
        crew_data = os.path.join(landbosse_test_input_dir(), 'crews.csv')
        self.input_dict['crew'] = pd.read_csv(crew_data)
        crew_cost_data = os.path.join(landbosse_test_input_dir(),
                                      'crew_price_proprietary.csv')
        self.input_dict['crew_cost'] = pd.read_csv(crew_cost_data)
        self.input_dict['duration_construction'] = 0.1  # months
        self.input_dict['construct_duration'] = 0.1  # months
        self.input_dict['fraction_new_roads'] = 1
        self.input_dict['road_quality'] = 0.6
        self.input_dict['rsmeans_per_diem'] = 144

        self.input_dict['road_length_adder_m'] = 5000  # 5km
        self.input_dict['fraction_new_roads'] = 0.33
        self.input_dict['road_quality'] = 0.3
        self.input_dict['rsmeans_per_diem'] = 0

        # Weather window:
        self.input_dict['num_delays'] = 7
        self.input_dict['avg_hours_per_delay'] = 20
        self.input_dict['std_dev_hours_per_delay'] = 5
        self.input_dict['delay_speed_m_per_s'] = 9
        self.input_dict['seed'] = 101
        self.input_dict['weather_window'] = generate_a_year(
            num_delays=self.input_dict['num_delays'],
            avg_hours_per_delay=self.input_dict['avg_hours_per_delay'],
            std_dev_hours_per_delay=self.input_dict['std_dev_hours_per_delay'],
            delay_speed_m_per_s=self.input_dict['delay_speed_m_per_s'],
            seed=self.input_dict['seed'])

        self.input_dict['start_delay_hours'] = 100
        self.input_dict['mission_time_hours'] = 50
        self.input_dict['critical_wind_speed_m_per_s'] = 8.0
        self.input_dict['wind_height_of_interest_m'] = 10
        self.input_dict['wind_shear_exponent'] = 0.25
        self.input_dict['season_construct'] = ['spring', 'summer']
        self.input_dict['time_construct'] = 'normal'
        self.input_dict['hour_day'] = {'long': 24, 'normal': 10}
        self.input_dict['operational_hrs_per_day'] = 10
        self.input_dict['critical_speed_non_erection_wind_delays_m_per_s'] = 15
        self.input_dict['critical_height_non_erection_wind_delays_m'] = 10

        #Inputs for calculate_costs():
        material_price_csv = os.path.join(landbosse_test_input_dir(),
                                          'material_price_proprietary.csv')
        self.input_dict['material_price'] = pd.read_csv(material_price_csv)
        self.input_dict['turbine_rating_MW'] = 0.02  # 20 kW Turbine
        self.input_dict[
            'overtime_multiplier'] = 1.4  # multiplier for labor overtime rates due to working 60 hr/wk rather than 40 hr/wk
        self.input_dict['rotor_diameter_m'] = 7
        self.input_dict['turbine_spacing_rotor_diameters'] = 5
        self.input_dict['critical_height_non_erection_wind_delays_m'] = 10
        self.input_dict['site_prep_area_m2'] = 0

        self.output_dict = dict()
    def setUp(self):
        """
         This setUp() method executes before each test. It creates an
         instance attribute, self.instance, that refers to a FoundationCost
         instance under test. input_dict is the dictionary of inputs values
         that configures that instance.
         This is just a default dictionary. Methods that test behavior of
         specific variables customize the relevant key/value pairs.
         The key site_facility_building_area_df is set to None here. The
         dataframe is read from the csv in the site_facility tests below.
        """

        self.input_dict = dict()
        self.input_dict['depth'] = 3.05  # in m
        self.project_name = 'project_1'

        self.input_dict['rated_thrust_N'] = 742e3
        self.input_dict['bearing_pressure_n_m2'] = 244200
        self.input_dict['critical_velocity_m_per_s'] = 52.5
        self.input_dict['gust_velocity_m_per_s'] = 60

        #Below are the inputs for calculate_foundation_load():
        component_data = os.path.join(landbosse_test_input_dir(),
                                      'components.csv')
        self.input_dict['component_data'] = pd.read_csv(component_data)
        crew_data = os.path.join(landbosse_test_input_dir(), 'crews.csv')
        self.input_dict['crew'] = pd.read_csv(crew_data)
        crew_cost_data = os.path.join(landbosse_test_input_dir(),
                                      'crew_price_proprietary.csv')
        self.input_dict['crew_cost'] = pd.read_csv(crew_cost_data)
        for component in self.input_dict['component_data'].keys():
            self.input_dict[component] = np.array(
                self.input_dict['component_data'][component])

        # Below are the inputs for determine_foundation_size():
        #'Radius_m' -> Calculated in 'calculate_foundation_load()'
        #'depth'

        #Below are the inputs for 'estimate_material_needs()':
        self.input_dict['num_turbines'] = 100
        #foundation_volume_m3_per_turbine -> calculated in 'determine_foundation_size()':

        #Below are the inputs for 'estimate_construction_time()':
        self.input_dict['duration_construction'] = 9  #months
        self.input_dict['construct_duration'] = 9  #months
        self.input_dict['hour_day'] = {'long': 24, 'normal': 10}

        #Weather window:
        self.input_dict['num_delays'] = 7
        self.input_dict['avg_hours_per_delay'] = 20
        self.input_dict['std_dev_hours_per_delay'] = 5
        self.input_dict['delay_speed_m_per_s'] = 9
        self.input_dict['seed'] = 101
        self.input_dict['weather_window'] = generate_a_year(
            num_delays=self.input_dict['num_delays'],
            avg_hours_per_delay=self.input_dict['avg_hours_per_delay'],
            std_dev_hours_per_delay=self.input_dict['std_dev_hours_per_delay'],
            delay_speed_m_per_s=self.input_dict['delay_speed_m_per_s'],
            seed=self.input_dict['seed'])

        self.input_dict['start_delay_hours'] = 100
        self.input_dict['mission_time_hours'] = 50
        self.input_dict['critical_wind_speed_m_per_s'] = 8.0
        self.input_dict['wind_height_of_interest_m'] = 100
        self.input_dict['wind_shear_exponent'] = 0.25
        self.input_dict['season_construct'] = ['spring', 'summer']
        self.input_dict['time_construct'] = 'normal'
        self.input_dict['operational_hrs_per_day'] = 10
        self.input_dict['critical_speed_non_erection_wind_delays_m_per_s'] = 10
        self.input_dict['critical_height_non_erection_wind_delays_m'] = 10

        #Calculate Costs:
        material_price = os.path.join(landbosse_test_input_dir(),
                                      'material_price_proprietary.csv')
        self.input_dict['material_price'] = pd.read_csv(material_price)

        rsmeans_csv = os.path.join(landbosse_test_input_dir(),
                                   'rsmeans_proprietary.csv')
        self.input_dict['rsmeans'] = pd.read_csv(rsmeans_csv)
        self.input_dict['rsmeans_per_diem'] = 144

        self.input_dict['overtime_multiplier'] = 1.4

        self.output_dict = dict()
        self.foundation_cost = FoundationCost(input_dict=self.input_dict,
                                              output_dict=self.output_dict,
                                              project_name=self.project_name)