From 9fe90366dcfaa63b9b556898341c61d9c0246b99 Mon Sep 17 00:00:00 2001
From: dcradu <dcradu@uliege.be>
Date: Thu, 11 Nov 2021 09:39:17 +0100
Subject: [PATCH] updated readme and requirements

---
 README.md        |  2 +-
 config_model.yml | 10 +++++-----
 requirements.yml |  7 +++++--
 src/main.py      |  2 +-
 4 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/README.md b/README.md
index be99519..d6f5620 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 65294b6..5bcbe4f 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 c4dd1f3..96a6ed2 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 aa41993..daea7f1 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.")
-- 
GitLab