from cosimlibrary.runner import CosimRunner
from cosimlibrary.scenario import CosimScenario


class JacobiRunner(CosimRunner):
    """
    This class implements the jacobi co-simulation algorithm.
    """
    def run_cosim_step(self, time, scenario: CosimScenario):
        for f in scenario.fmus:
            f.doStep(time, scenario.step_size)
        self.propagate_outputs(scenario)
