diff --git a/README.md b/README.md index 1bb88fe..a7cff8d 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,8 @@ Required variables (no default values provided): Recommended variables (default values provided but might be inaccurate/unsuitable): - `BOAT_DRAUGHT`: in m +- `BOAT_ROUGHNESS_DISTRIBUTION_LEVEL`: numeric value (default: 1) +- `BOAT_ROUGHNESS_LEVEL`: numeric value (default: 1) - `BOAT_SPEED`: in m/s - `DATA_MODE`: options: 'automatic', 'from_file', 'odc' diff --git a/WeatherRoutingTool/config.py b/WeatherRoutingTool/config.py index d14d47f..43486ff 100644 --- a/WeatherRoutingTool/config.py +++ b/WeatherRoutingTool/config.py @@ -10,6 +10,8 @@ RECOMMENDED_CONFIG_VARIABLES = { 'BOAT_DRAUGHT': 10, + 'BOAT_ROUGHNESS_DISTRIBUTION_LEVEL': 1, + 'BOAT_ROUGHNESS_LEVEL': 1, 'BOAT_SPEED': 6, 'DATA_MODE': 'automatic' } @@ -51,6 +53,8 @@ def __init__(self, init_mode='from_json', file_name=None, config_dict=None): # Details in README self.ALGORITHM_TYPE = None # options: 'isofuel', 'genetic', 'speedy_isobased' self.BOAT_DRAUGHT = None # in m + self.BOAT_ROUGHNESS_DISTRIBUTION_LEVEL = None # numeric value + self.BOAT_ROUGHNESS_LEVEL = None # level of hull roughness, numeric value self.BOAT_SPEED = None # in m/s self.CONSTRAINTS_LIST = None # options: 'land_crossing_global_land_mask', 'land_crossing_polygons', 'seamarks', # 'water_depth', 'on_map', 'via_waypoints' diff --git a/WeatherRoutingTool/ship/ship.py b/WeatherRoutingTool/ship/ship.py index fb404ba..caef31c 100644 --- a/WeatherRoutingTool/ship/ship.py +++ b/WeatherRoutingTool/ship/ship.py @@ -126,6 +126,8 @@ def __init__(self, config): self.hydro_model = mariPower.ship.CBT() self.hydro_model.Draught = np.array([config.BOAT_DRAUGHT]) + self.hydro_model.Roughness_Level = np.array([config.BOAT_ROUGHNESS_LEVEL]) + self.hydro_model.Roughness_Distribution_Level = np.array([config.BOAT_ROUGHNESS_DISTRIBUTION_LEVEL]) self.use_depth_data = False def set_ship_property(self, variable, value):