Skip to content

Commit

Permalink
Simplify hourly values computation
Browse files Browse the repository at this point in the history
Signed-off-by: Sylvain Leclerc <[email protected]>
  • Loading branch information
sylvlecl committed Jul 29, 2024
1 parent 0c3c3d4 commit 8ee9b87
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/antares/tsgen/ts_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,10 @@ def generate_time_series(

now = (now + 1) % log_size

hourly_available_units = np.repeat(output.available_units, 24, axis=1)
hourly_modulation = np.tile(cluster.modulation, self.days)
output.available_power = (
np.repeat(output.available_units, 24, axis=1)
* cluster.nominal_power
* np.tile(cluster.modulation, self.days)
hourly_available_units * cluster.nominal_power * hourly_modulation
)

return output

0 comments on commit 8ee9b87

Please sign in to comment.