<filename>boids/create_results.py
import random
import itertools
import numpy as np
import yaml
import boids

def plot_and_animate(config):
    Number_of_boids = config['Number_of_boids']

    # Define limits for random starting positions and velocities
    Pos_limits = {'x':{'lo': config['Pos_x_lo_lim'], 'up': config['Pos_x_up_lim']}, 'y':{'lo': config['Pos_y_lo_lim'], 'up': config['Pos_y_up_lim']}}
    Vel_limits = {'x':{'lo': config['Vel_x_lo_lim'], 'up': config['Vel_x_up_lim']}, 'y':{'lo': config['Vel_y_lo_lim'], 'up': config['Vel_y_up_lim']}}

    Move_to_middle_strength = config['Move_to_middle_strength']
    Alert_distance = config['Alert_distance']

    # Randomly create a set of boids described by starting values within the specified limits
    Flock = boids.create_starting_values(Pos_limits, Vel_limits, Number_of_boids)

    # run the animation of boids
    boids.run_animation(Flock, Number_of_boids, Move_to_middle_strength, Alert_distance)

<filename>boids/create_results.py
import random
import itertools
import numpy as np
import yaml
import boids

def plot_and_animate(config):
    Number_of_boids = config['Number_of_boids']

    # Define limits for random starting positions and velocities
    Pos_limits = {'x':{'lo': config['Pos_x_lo_lim'], 'up': config['Pos_x_up_lim']}, 'y':{'lo': config['Pos_y_lo_lim'], 'up': config['Pos_y_up_lim']}}
    Vel_limits = {'x':{'lo': config['Vel_x_lo_lim'], 'up': config['Vel_x_up_lim']}, 'y':{'lo': config['Vel_y_lo_lim'], 'up': config['Vel_y_up_lim']}}

    Move_to_middle_strength = config['Move_to_middle_strength']
    Alert_distance = config['Alert_distance']

    # Randomly create a set of boids described by starting values within the specified limits
    Flock = boids.create_starting_values(Pos_limits, Vel_limits, Number_of_boids)

    # run the animation of boids
    boids.run_animation(Flock, Number_of_boids, Move_to_middle_strength, Alert_distance)

# Define limits for random starting positions and velocities # Randomly create a set of boids described by starting values within the specified limits # run the animation of boids