TroglodyteDerivations commited on
Commit
5676e8a
1 Parent(s): 3c2f31a

Updated lines 488, 499, 502, 505 with: # Initialize the GWO algorithm with the provided parameters gwo = GWO(obj=obj, npart=npart, ndim=ndim, max_iter=max_iter, init=init, bounds=bounds)

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -492,17 +492,17 @@ def optimize(npart, ndim, max_iter):
492
  best_positions_npy = np.array(best_positions)
493
 
494
  # Calculate dispersion
495
- dispersion = self.Dispersion()
496
  dispersion_text = f"Dispersion: {dispersion}"
497
 
498
  # Get the contour plot as a PIL Image
499
- contour_plot = self.plot_contour_and_wolves(best_positions)
500
 
501
  # Plot the dispersion over time
502
- dispersion_plot = self.plot_dispersion()
503
 
504
  # Plot the dispersion heatmap
505
- dispersion_heatmap_plot = self.plot_dispersion_heatmap(x_range=(-6,6), y_range=(-6,6))
506
 
507
  # Load the best fitness and positions from .npy files
508
  best_fitness_npy = np.load('best_fitness.npy')
 
492
  best_positions_npy = np.array(best_positions)
493
 
494
  # Calculate dispersion
495
+ dispersion = gwo.Dispersion()
496
  dispersion_text = f"Dispersion: {dispersion}"
497
 
498
  # Get the contour plot as a PIL Image
499
+ contour_plot = gwo.plot_contour_and_wolves(best_positions)
500
 
501
  # Plot the dispersion over time
502
+ dispersion_plot = gwo.plot_dispersion()
503
 
504
  # Plot the dispersion heatmap
505
+ dispersion_heatmap_plot = gwo.plot_dispersion_heatmap(x_range=(-6,6), y_range=(-6,6))
506
 
507
  # Load the best fitness and positions from .npy files
508
  best_fitness_npy = np.load('best_fitness.npy')