MoDeNa-EUProject / MoDeNa

Software Framework for MOdelling of morphology DEvelopment of micro- and NAnostructures (MoDeNa)
17 stars 19 forks source link

Automation of surrogate model, when it is out of range #18

Closed karimimp closed 8 years ago

karimimp commented 9 years ago

Assuming the connection between the CFD code and MD tool; The independent variables of the detailed model and their maximum and minimum values are passed to the data base (or known). The framework should identify the values of the independent variables for which the detailed model is run. In other words: The information provided by the macro-scale model:

sigveka commented 8 years ago

@henrus can we make this a "feature request"

@karimimp

You want to be able to do something like this:

f = CFunction(                                                      
    Ccode= '''Omitted, working example contains a C-function in this string''', 
    inputs={  # Global/physical bounds of the model                                        
        'input_1': { 'min': 0, 'max': 9e99, 'argPos': 0 },
        'input_2': { 'min': -9e99, 'max': 9e99, 'argPos': 1 },
        'input_3': { 'min': 1, 'max': 10, 'argPos': 2 },
    },
    outputs={              
        'output_1': { 'min': -9e99, 'max': 9e99, 'argPos': 0 },
    },
    parameters={        
        'param0': { 'min': -10.0, 'max': 10.0, 'argPos': 0 },
        'param1': { 'min': 0.0, 'max': 1.0, 'argPos': 1 },
    },
)
m = BackwardMappingModel(
    _id= 'md',
    surrogateFunction= f,
    exactTask= MolecularDynamics(),
    substituteModels= [ ],
    initialisationStrategy= Strategy.InitialRange(
    { # Local bounds
        'input_1': { 'min': 5, 'max': 9 },
        'input_2': { 'min': -9, 'max': 10 },
        'input_3': { 'min': 0, 'max': 0 },
    }
    ),
    ... ... ... ... etc.
)

The initialisation strategy should perform DoE/parameter fitting of the surrogate model only inside the range provided in initialRange.

Is this somewhat close to what you want?

karimimp commented 8 years ago

@sigveka
Thanks. This is, I believe, what we even have an example of it in the private repo under /applications/PUfoam/units_density_reaction_mixture . The exact task runs the detailed model for the MD code and the parameters should be re-fitted.