Open simetenn opened 6 years ago
Additionally, couple this to the options of giving the user the parameters where to evaluate the model, and then give a list of model evaluations back. This to enable easy use of HPC by enabling the user to manually run the model.
Hello Simetenn: I am trying to use your tool to quantify model uncertainty associated with model inputs. Because my model is not implemented in python and needs some time to finish the model run and get the results, my question is that my model run is always stopped by the main processes ( e.g., model = un.Model()). Could you give me some suggestions on how can I get my external model run first and get the result first? Thank you very much!
Hi fangqx,
If I understand your problem correctly you do not necessarily need to be able to resume UQ and SA after running the model. The model itself does not need to be implemented in Python. Any external model can be used, as long as you can control the model parameters and retrieve the simulation output via Python. One way of doing could be to write you parameters to file, call the external model with os.system()
, subprocess.run()
or something similar and use your parameter file in those runs, write the results to file, and then read the result back into python
def external_model(parameter_1, parameter_2):
# Write parameters to file, or possibly pass them along with the external model command
# Call external model using os.system(), subprocess.run() or something similar
# Read the results back into Python
return time, values, info
Enable continuing UQ and SA after loading model results from file. This require the following additional information to be saved:
model.ignore
)