def instantiate_orbit():
    ProjectManager.compile_input_dict(phases)
    path = os.path.join(os.getcwd(), "..\general_library")
    ORBIT_project = ProjectManager(config, weather=None, library_path=path)
    ORBIT_project.run_project()
    print('OSS',
          ORBIT_project._phases["OffshoreSubstationDesign"].design_result)
    return ORBIT_project
def instantiate_orbit(config_start_date, config_year):
    """ Instantiate instance of ORBIT project for a given year within the time series"""
    ProjectManager.compile_input_dict(phases)
    path = os.path.join(os.getcwd(), "library")
    filepath = os.path.join('library', 'weather', 'ERA5_1979_2019.csv')
    weather = pd.read_csv(filepath, parse_dates=["datetime"]).set_index(keys='datetime')

    # Update config for specified start date
    config_date = config_start_date + '/' + config_year
    config['install_phases'] = {k: config_date for (k, v) in config['install_phases'].items()}

    # Run project
    ORBIT_project = ProjectManager(config, weather=weather, library_path=path)
    ORBIT_project.run_project()

    return ORBIT_project
Exemple #3
0
def test_orbit_version_ProjectManager():

    config = ProjectManager.compile_input_dict(
        ["MonopileDesign", "MonopileInstallation"])
    assert "orbit_version" in config.keys()