Update app.py
Browse files
app.py
CHANGED
|
@@ -1837,10 +1837,12 @@ class AdvancedEnergyForecastingSystem:
|
|
| 1837 |
return (energy_cost + ramp_cost + storage_cost + renewable_penalty + constraint_penalty)
|
| 1838 |
|
| 1839 |
# Constraints and bounds
|
| 1840 |
-
|
| 1841 |
-
|
| 1842 |
-
|
| 1843 |
-
|
|
|
|
|
|
|
| 1844 |
|
| 1845 |
# Initial guess
|
| 1846 |
x0 = np.concatenate([
|
|
|
|
| 1837 |
return (energy_cost + ramp_cost + storage_cost + renewable_penalty + constraint_penalty)
|
| 1838 |
|
| 1839 |
# Constraints and bounds
|
| 1840 |
+
# FIXED: Added proper line continuation
|
| 1841 |
+
bounds = []
|
| 1842 |
+
bounds.extend([(0, 50000)] * forecast_horizon) # Generation bounds
|
| 1843 |
+
bounds.extend([(0, 200)] * forecast_horizon) # Storage in bounds
|
| 1844 |
+
bounds.extend([(0, 200)] * forecast_horizon) # Storage out bounds
|
| 1845 |
+
bounds.extend([(0, cost_parameters['max_storage'])] * forecast_horizon) # Storage level
|
| 1846 |
|
| 1847 |
# Initial guess
|
| 1848 |
x0 = np.concatenate([
|