예제 #1
0
def two_reservoir_constrained_wrapper():
    """Two reservoir test optimisation problem in PygmoWrapper."""
    filename = os.path.join(TEST_FOLDER, "models",
                            "two_reservoir_constrained.json")
    yield PygmoWrapper(filename)
    # Clean up the
    clear_global_model_cache()
예제 #2
0
def two_reservoir_problem():
    filename = os.path.join(TEST_FOLDER, 'models', 'two_reservoir.json')
    yield TwoReservoirWrapper(filename)
    # Clean up the
    clear_global_model_cache()
    # We force deallocation the cache here to prevent problems using process pools
    # with pytest.
    import gc
    gc.collect()
예제 #3
0
def simple_bisection_problem():
    filename = os.path.join(TEST_FOLDER, 'models', 'simple1_bisect.json')
    yield PlatypusWrapper(filename, model_klass=BisectionSearchModel)
    # Clean up the
    clear_global_model_cache()
    # We force deallocation the cache here to prevent problems using process pools
    # with pytest.
    import gc
    gc.collect()
예제 #4
0
def two_reservoir_wrapper():
    """ Two reservoir test optimisation problem in PygmoWrapper. """
    filename = os.path.join(TEST_FOLDER, 'models', 'two_reservoir.json')
    yield PygmoWrapper(filename)
    # Clean up the
    clear_global_model_cache()