diff --git a/README.md b/README.md index be99519a3de3730366c219ab6e10dcbef0d161f4..d6f5620bf3d265a681f937dbeb4ee959af02e8d8 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ for the max k-multicover problem introduced in the following publication: "Sitin ## Setup -This module runs in any 3.x version of Python. The Python packages required to run this module are listed +This module runs in `Python 3.6`. The Python packages required to run this module are listed in the `requirements.yml` file included in the repository. Their installation can be easily achieved via the the following command that builds a separate environment for this module from the `yml` file: diff --git a/config_model.yml b/config_model.yml index 65294b6b084e57c39882e286c21457f719872a6a..5bcbe4f1615363ab278b621ec1a7b10993b42639 100644 --- a/config_model.yml +++ b/config_model.yml @@ -1,20 +1,20 @@ # Path to data folder (where input/output data is stored - not necessarily the src folder) -data_path: 'D:/ULg_PhD_work/datasets/resite_ip/' +data_path: 'path/to/data' # Path to the maxk_multicover algorithms.jl file (might need an updated PYTHONPATH for this one -julia_models_path: '../../maxk_multicover/src/algorithms.jl' +julia_models_path: '/path/to/maxk_multicover/src/algorithms.jl' # Spatial resolution (in degrees) of the ERA5 data (depends on what data was downloaded via era5data.py script) spatial_resolution: 0.25 # Start time and end time of the analysis (again, depends on what coverage is available based on download) -time_slice: ['2018-01-01T00:00', '2018-01-31T23:00'] +time_slice: ['2018-01-01T00:00', '2018-01-07T23:00'] # Region (ISO2) to cover within the ERA5 dataset. This key is basically retrieving the shape of the underlying region # (e.g., if "DE" is given, the shapefile of the German territory is used to identify which ERA5 points fall within -regions: ['EU'] +regions: ['DE'] # Technology to consider (for now limited to one technology only, available choices: 'wind_onshore', 'wind_offshore', # 'pv_utility', 'pv_residential'). technologies: ['wind_onshore'] # Number of deployments to consider (integer value) -deployments: [[560]] +deployments: [[20]] siting_params: # Time-window length (any integer value smaller than the length of the time horizon) diff --git a/requirements.yml b/requirements.yml index c4dd1f391fb1642a0d7f741196bc976ccfc0da97..96a6ed264c9b35dded27fcde9ae5c74039d54b06 100644 --- a/requirements.yml +++ b/requirements.yml @@ -3,9 +3,9 @@ channels: - conda-forge - defaults dependencies: + - python=3.6 - pip - bottleneck - - cdsapi - dask - scipy - toolz @@ -15,6 +15,9 @@ dependencies: - xlrd - geopy - shapely + - pycountry + - pyyaml - pip: - - julia \ No newline at end of file + - julia + - windpowerlib \ No newline at end of file diff --git a/src/main.py b/src/main.py index aa419933ccad7a7739b9f1d4da9dd7f9267feaaf..daea7f11df7b669f812ec3db64c278e5d871fcd7 100644 --- a/src/main.py +++ b/src/main.py @@ -5,7 +5,6 @@ from os import makedirs from numpy import float64 from time import strftime import julia -from julia import Main from helpers import read_inputs, custom_log, xarray_to_ndarray, \ generate_jl_input, get_deployment_vector @@ -50,6 +49,7 @@ if __name__ == '__main__': jl_dict = generate_jl_input(deployment_dict, site_coordinates) j = julia.Julia(compiled_modules=False) + from julia import Main Main.include(julia_path) custom_log(f" {siting_parameters['algorithm']} chosen to solve the instance.")