Hide optimization parameters from default userinterface

Issue #31 new
Martin Sandve Alnæs created an issue

The argument "controls" in several of the NSProblem functions can be hidden if we follow this pattern:

class NSProblem:
    def foo(self, a, b):
        raise NotImplementedError(...)

class NSOptProblem(NSProblem):
    def foo(self, a, b):
        return self.foo_opt(a, b, controls=None)

    def foo_opt(self, a, b):
        raise NotImplementedError(...)

Schemes that support optimization problems must then use the foo_opt functions, while optimization problems can still be passed to non-optimization schemes for regular forward simulations.

Comments (0)

  1. Log in to comment