def interaction_model_generator(model_config):
    """ uses the system configuration to compute the interaction_matrix """
    interaction_index = model_config.fetch_index_of_interaction()
    alpha = model_config.create_empty_interaction_matrix()
    for kk, (ii, jj) in enumerate(interaction_index):
        interaction = list(model_config.interactions)[kk]
        for item in model_config.interactions[interaction]:
            parameters = item['parameters'].copy()
            for nn, entry in enumerate(parameters):
                if (type(entry) == str) & (entry in list(model_config.
                    compartment)):
                    parameters[nn] = model_config.compartment[entry]['value']
            alpha[ii, jj] += int(item['sign']) * globals()[item['fkt']](*
                parameters)
            alpha[jj, jj] -= int(item['sign']) * globals()[item['fkt']](*
                parameters)
    return alpha
