示例#1
0
def validPerturbationExample():
    e_perturbed_param_info, e_run_results, g_perturbed_param_info, g_run_results, model_name, std_run_results = validPerturbatorInternalresults(
    )
    e_iter_results = indiv_sens.OneParameterPerturbedResults(
        e_run_results, e_perturbed_param_info)
    g_iter_results = indiv_sens.OneParameterPerturbedResults(
        g_run_results, g_perturbed_param_info)
    runs_per_parameter = {
        "e": e_iter_results,
        "g": g_iter_results,
    }
    # Prepare perturbator results using above instances
    isolated_perturbations_results = indiv_sens.IsolatedPerturbationsResults(
        model_name, std_run_results, runs_per_parameter)
    return isolated_perturbations_results
示例#2
0
def stdRunHasOneMoreRowPerturbationExample():
    # Get valid results
    e_perturbed_param_info, e_run_results, g_perturbed_param_info, g_run_results, model_name, std_run_results = validPerturbatorInternalresults(
    )
    # Replace the std run results with invalid results
    std_run_results = simu_run_info.SimulationResults(
        StringIO(bb_std_run_2_str), "BouncingBall", "/path/to/exe", "output")
    # Prepare perturbator results using above instances
    e_iter_results = indiv_sens.OneParameterPerturbedResults(
        e_run_results, e_perturbed_param_info)
    g_iter_results = indiv_sens.OneParameterPerturbedResults(
        g_run_results, g_perturbed_param_info)
    runs_per_parameter = {
        "e": e_iter_results,
        "g": g_iter_results,
    }
    isolated_perturbations_results = indiv_sens.IsolatedPerturbationsResults(
        model_name, std_run_results, runs_per_parameter)
    return isolated_perturbations_results