Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #5

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open

Develop #5

wants to merge 30 commits into from

Conversation

JorickLania
Copy link
Contributor

  • Fixed issues in test_initialoptimisationfunction. Test now runs properly and passes for 6 decimal precision.
  • Fixed issues in comparing the mean cost of objectivefunction against Young's output. Defined several unit tests for the comparison using npt.assert_allclose with a relative tolerance of 1e-4.
  • Implemented the dual_annealing function. It runs smoothly with similar behaviour as the one in Young. For same seed / number of iterations, the two models return the same quality for the solution, though our model does get there a few seconds quicker. Will continue to test this going forward.
  • Implemented the first function for the MCMC solver; a model function that sets up the y_model array. It is a small function that mostly relies on the previously implemented objectivefunctions to obtain its values.
  • Made minor alterations to some functions for clarity.

It's important to note that while the two codes now agree on the mean / standard deviation of the objective function, this only applies when the models are given the same random seed and number of iterations. The two models behave similarly, but even 10,000 iterations is not sufficient for the mean estimate of the objective function to converge to a solution that both models agree on when given random input. The estimation of the objective function's mean and standard deviation seems sketchy to me, so while the models do now share the same behaviour, I would want to revisit this part of the code later and see if what is happening actually makes sense.

…command line for input file, defaults to initial_atm_vMCMC_2024.txt. Began to work on a grid script.
…dified model to accept command line input, but will still run on default atmosphere input file if no arguments are given.
…all output files into relevant subdirectories under results/run1. Changed line 2482 in all model versions to new expression
…nting GRT computations in GRTs.py, 17 out of 19 reactions implemented.
…plemented new module, computing moles of each species and implementation of boundary conditions.
…y (currently still fails on 4 / 29 equations)
… model.py now computes initial values for f1 - f29.
…gmoidal_penalty function to allow array input
… Runs, but a test run gives a small deviation from the result in Young's model.
…lemented small code in testscript.py for sampling the objective function to estimate cost using smoothTriangle function.
…naries as input for cases where both global parameters (ie. params not varied in a model run) are needed alongside variable input. Made function arguments more descriptive.
…function initial. Worked on troubleshooting mean cost estimation against Young model; ongoing.
…ons. Implemented unit tests for activities and mean cost estimation.
…odel function. Removed check for metal stoichiometry in utilities/moles_in_system as they are definitionally mono-atomic
Copy link

@robsidian robsidian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done, I don't really have any points of improvement. Keep up the good work!

Re: objective function - The cost function stuff is just used to get a general standard deviation estimator that the dual annealing function uses for its statistics. You should try testing how much the results of dual annealing depend on the value of T_estimate (within the range you get from samples of the cost function). If it's not significant, ignore it. If it is, test increasing n_iters until you get a large enough sample size to converge to the actual distribution.

In the objective function etc, why is the pressure variable called P_penalty? This is the value before the penalty is applied, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants