Wrapping A Model¶

HistoryMatching requires that the model be wrapped in a special function which standardizes HistoryMatching’s interaction with models, like so:

def wrapped_model(**kwargs):
    model_instance = MODEL(**kwargs)
    sim_observations = model_instance.sim()
    return sim_observations

The function wrapped_model() is passed by reference to History Matching. At appropriate times History Matching calls this function. When it does so kwargs is a dictionary of keyword arguments specifying the parameter values which should be used to initialize the model. The function should:

  1. Create an instance of the model using the parameter values in kwargs

  2. Run the model

  3. Possibly post-process the results of the model

  4. Return a valid SimFrame.