Skip to content

Commit

Permalink
fix type anotation
Browse files Browse the repository at this point in the history
  • Loading branch information
k-rieck committed Dec 18, 2024
1 parent 007bf7c commit de82eb7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions hisim/components/controller_mpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,10 +709,8 @@ def optimize( # noqa: C901
cop_sampled = cop_timestep[0::sampling_rate]
eer_sampled = eer_timestep[0::sampling_rate]

cop_sampled_array = np.reshape(np.array(cop_sampled), (1, len(cop_sampled)))
eer_sampled_array = np.reshape(np.array(eer_sampled), (1, len(eer_sampled)))
cop_sampled_array = np.reshape(np.array(cop_sampled), (1, len(cop_sampled)))
eer_sampled_array = np.reshape(np.array(eer_sampled), (1, len(eer_sampled)))
cop_sampled_array: np.ndarray = np.reshape(np.array(cop_sampled), (1, len(cop_sampled)))
eer_sampled_array: np.ndarray = np.reshape(np.array(eer_sampled), (1, len(eer_sampled)))

# Numerical values of pv forecast (casadi fromat)
pv_forecast_24h = np.reshape(np.array(pv_forecast_24h), (1, len(pv_forecast_24h)))
Expand Down
2 changes: 1 addition & 1 deletion hisim/components/generic_car.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ def resample_meters_driven(self, meters_driven: List, seconds_per_timestep: int)
trimmed_meters_driven = meters_driven[: num_timesteps * minutes_per_timestep]

# Reshape and sum the data
reshaped_meters = np.reshape(trimmed_meters_driven, (num_timesteps, minutes_per_timestep))
reshaped_meters: np.ndarray = np.reshape(trimmed_meters_driven, (num_timesteps, minutes_per_timestep))
resampled_meters = np.sum(reshaped_meters, axis=1)
return resampled_meters

Expand Down

0 comments on commit de82eb7

Please sign in to comment.