# Path: ndlib/models/compartments/enums/SAType.py
# class SAType(Enum):
#     MEAN = 0
#     VARIANCE = 1
#     MIN = 2
#     MAX = 3


from SALib.sample import saltelli
from SALib.analyze import sobol
from ndlib.models.compartments.enums.SAType import SAType
import numpy as np

        # Set the constants and run the model
        for i in range(len(param_values)):
            print('Running simulation ' + str(i + 1) + '/' + str(len(param_values)))
            # Set the constants
            for j, name in enumerate(problem['names']):
                self.model.constants[name] = param_values[i,j]
            # Set intial values
            self.model.set_initial_status(initial_status, self.config)
            outputs.append(self.model.iteration_bunch(iterations, node_status=self.node_status, progress_bar=False))

        # Parse the outputs for every simulation (TODO: Optimize)
        print('Parsing outputs...')
        states = list(self.model.available_statuses.keys())
        states.remove('Infected')
        val_dict = {
            var: np.array([]) for var in states
        }
        values = self.parse_outputs(sa_type, outputs, val_dict)

        print('Running sensitivity analysis...')
        # Perform the sobol analysis seperately for every status
        analysis = {
            var: sobol.analyze(problem, values[var]) for var in states
        }

        return analysis

    def parse_outputs(self, sa_type, outputs, val_dict):
        mapping = {

# Path: ndlib/models/compartments/enums/SAType.py
# class SAType(Enum):
#     MEAN = 0
#     VARIANCE = 1
#     MIN = 2
#     MAX = 3


# Path: ndlib/models/ContinuousModelRunner.py
from SALib.sample import saltelli
from SALib.analyze import sobol
from ndlib.models.compartments.enums.SAType import SAType
import numpy as np


        # Set the constants and run the model
        for i in range(len(param_values)):
            print('Running simulation ' + str(i + 1) + '/' + str(len(param_values)))
            # Set the constants
            for j, name in enumerate(problem['names']):
                self.model.constants[name] = param_values[i,j]
            # Set intial values
            self.model.set_initial_status(initial_status, self.config)
            outputs.append(self.model.iteration_bunch(iterations, node_status=self.node_status, progress_bar=False))

        # Parse the outputs for every simulation (TODO: Optimize)
        print('Parsing outputs...')
        states = list(self.model.available_statuses.keys())
        states.remove('Infected')
        val_dict = {
            var: np.array([]) for var in states
        }
        values = self.parse_outputs(sa_type, outputs, val_dict)

        print('Running sensitivity analysis...')
        # Perform the sobol analysis seperately for every status
        analysis = {
            var: sobol.analyze(problem, values[var]) for var in states
        }

        return analysis

    def parse_outputs(self, sa_type, outputs, val_dict):
        mapping = {

            SAType.MEAN: self.mean_outputs