Navya-Sree commited on
Commit
0c5b914
·
verified ·
1 Parent(s): 6a95d5c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
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
- bounds = [(0, 50000)] * forecast_horizon + # Generation bounds
1841
- [(0, 200)] * forecast_horizon + # Storage in bounds
1842
- [(0, 200)] * forecast_horizon + # Storage out bounds
1843
- [(0, cost_parameters['max_storage'])] * forecast_horizon # Storage level
 
 
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([