def import_solution(path):
    """Imports and parses a solution file."""
    variables = {}
    with open(path, "r") as sol_file:
        # Discard first line (header)
        _ = sol_file.readline()
        for line in sol_file:
            variable, value = line.split("=")
            try:
                variables[variable.strip()] = int(value)
            except ValueError:
                # special case for the overall_risk variable
                variables[variable.strip()] = float(value)
    return variables