def __init__(self, model_file, gold_standard_file, arguments): self.model_file = model_file self.gold_standard_file = gold_standard_file self.gold_standard = get_gold_standard_timeseries(gold_standard_file) self.solver_config = arguments self.solver = solve_model.get_solver(model_file, arguments) self.cost_function = None
def test_check_biopepa_cvodes(self): """Simply check the solving of a biopepa model, using the cvodes solver, by first converting the biopepa to xml""" filename = "test_data/mm/mm.biopepa" arguments = self.arg_parser.parse_args(["--solver", "cvodes"]) arguments.stop_time = 1.0 solver = solve_model.get_solver(filename, arguments) solver.initialise_solver() timecourse = solver.solve_model(arguments) # And now we actually need something to assert expected_final_time = 1.0 final_time = timecourse.get_final_time() self.assertEqual(expected_final_time, final_time) expected_column_names = ["E", "ES", "P", "S" ] column_names = timecourse.get_column_names() self.assertEqual(expected_column_names, column_names)