Skip to content

Commit

Permalink
Cantera 3.0 Update (#10)
Browse files Browse the repository at this point in the history
* Heat Release Rate

Added heat release rate as both an observable and in the sim explorer

* Example Directory Changed and FirstTimeUse.docx made.

* removing opt mech files

* Made CheKiPEUQ_from_Frhodo  helper module and also put code into fit_fcn

Right now, these codes are not working. It is just the beginning.

* get_varying_rate_vals_and_bnds

* get_varying_rate_vals_and_bnds

* pars_uncertainty_distribution code

* minor changes

* Update CheKiPEUQ_from_Frhodo.py

* Update CheKiPEUQ_from_Frhodo.py

* Adjusting observed_data and responses shapes for CheKiPEUQ

* got the weightings multiplication to work after transposing and transposing back

* typo correction

* working on get_log_posterior_density and getting varying_rate_vals

* forcing 'final' after minimization to be 'residual'

* Separating Bayesian into 5 steps to simplify things for Travis

* Update CheKiPEUQ_integration_notes.txt

* Update CheKiPEUQ_integration_notes.txt

* Update CiteSoft call for CheKiPEUQ

* Disabling CiteSoft exportations for now

* Update CheKiPEUQ_integration_notes.txt

* Update CheKiPEUQ_from_Frhodo from the CheKiPEUQ_Integration branch

* CheKiPEUQ_integration

Merging from Ashi's branch
Modified GUI to include variables needed for Bayesian optimization

* Merge CheKiPEUQ local (#5)

changing variable names in fit_fcn and separating the bayesian case into an if statement.
Making single return for verbose versus normal case.
Made CheKiPEUQ_from_Frhodo  helper module and also put code into fit_fcn
 - Right now, these codes are not working. It is just the beginning.
Create ExampleConfig.ini
add comments to fit_fcn.py about what is fed in by "args_list"
renaming obs to obs_sim in fit_fcn

* Update fit_fcn.py

* get_varying_rate_vals_and_bnds

* get_varying_rate_vals_and_bnds

* pars_uncertainty_distribution code

* newOptimization field for creating PE_object.

* Added "Force Bayesian"

* minor changes

* Update CheKiPEUQ_from_Frhodo.py

* Update CheKiPEUQ_from_Frhodo.py

* Adjusting observed_data and responses shapes for CheKiPEUQ

* got the weightings multiplication to work after transposing and transposing back

* typo correction

* update get_last_obs_sim_interp

* moved CheKiPEUQ_PE_object creation into time_adjust_func

* Update fit_fcn.py

* working on get_log_posterior_density and getting varying_rate_vals

* Update fit_fcn.py

* forcing 'final' after minimization to be 'residual'

* switch to negative log P for objective_function_value

* Trying to allow Bayesian way to get past the "QQ" error by feeding residual metrics.

* trying 10**neg_logP in lieu of loss_scalar.

* adding Bayesian_dict to make code easier to follow

* Separating Bayesian into 5 steps to simplify things for Travis

* Update fit_fcn.py

* Update CheKiPEUQ_integration_notes.txt

* Update fit_fcn.py

* Update CheKiPEUQ_integration_notes.txt

* Create CiteSoftLocal.py

* Update CiteSoft call for CheKiPEUQ

* Disabling CiteSoft exportations for now

* Update CheKiPEUQ_integration_notes.txt

* adding CheKiPEUQ local

* CheKiPEUQ_local

* removing things not needed from CheKiPEUQ

* try moving CheKiPEUQ_local

* parmaeter_estimation class still not being found for CheKiPEUQ_local

Specifically from inside CheKiPEUQ_from_Frhodo.py

* Update CheKiPEUQ_from_Frhodo.py

* Trying to use only CheKiPEUQ_local

* Merge Fix

Co-authored-by: Aditya Savara <[email protected]>

* Bayesian Changes

Changes to Optimization tab GUI
Reverting some changes in fit_fcn now that CheKiPEUQ will be called after simulations.
Prior naming was more correct

* Minor Changes

* making get_consolidated_parameters_arrays

* Bayesian_dict parsing of initial guesses and bounds added

* for params, deepcopy was needed, and added print lines.

* Adding new opt settings

Also spent a long time fixing the scientific spinbox

* Fixing the ligical error for lower bound.

I fixed the logical error, but line 212 is now printing this:
line 212 [True, True, True] [0, 2.4424906541753446e-16, -1.7976931348623155e+288] -1.7976931348623155e+288

That means that the comparison is not working correctly for min_neg_system value. In the next commit, I'm going to use the 1E99 way of doing things.

* cleanup & working towards inclusion of pars_bnds_exist

* rate_constants_parameters_bnds seem to be parsed and passed correctly to CheKiPEUQ

* Adding in unbounded_indices and return_unbounded_indices code

* minor syntax fixes

* Added remove_unbounded_values calls to code to truncate arrays etc.

* Moved more of the Bayesian_Dict fields population to init

* Cleaning up print statements

* Fixing rate_constants_parameters_bnds_exist for multiple rate constants

* Update CheKiPEUQ_integration_notes.txt

* Cleaning up

Boxes in uncertainty function now functional

Also have further modified scientificspinbox

* ChekiPEUQ: First attempt to implement variance per response for too long

* Linear scaling working now, but some 'iterations' of Frhodo are freezing during CheKiPEUQ's PE_object init.

I am trying to track down the reason. It is somewhere in the responses_observed_uncertainties manipulation during CheKiPEUQ's init.

* Reduced the slowdown to the extent of not freezing

I found that the slowdown was (surprisingly) caused in the loop that tried to convert non-zero weightings into tiny finite weightings.  Changing the code to use machine epsilon in one of the steps rather than minValue/1E6 made that loop faster (completely sure why).

The shape of the weightings looks odd. In the next commit I will try to print out some array shapes.

* Fixed shape of weighting arrray passed to CheKiPEUQ

Now need to do cleanup of print statements in next commit.

* Removing excess print statements and cleaning up.

* Improving heuristic slightly

* Updating version number and fixing minor error from the recent edits.

* Che ki peuq integration v3 (#8)

* making get_consolidated_parameters_arrays

* Bayesian_dict parsing of initial guesses and bounds added

* for params, deepcopy was needed, and added print lines.

* Fixing the ligical error for lower bound.

I fixed the logical error, but line 212 is now printing this:
line 212 [True, True, True] [0, 2.4424906541753446e-16, -1.7976931348623155e+288] -1.7976931348623155e+288

That means that the comparison is not working correctly for min_neg_system value. In the next commit, I'm going to use the 1E99 way of doing things.

* Changed to -1E99 and +1E99 check

SOMEWHAT SURPRISINGLY, THE COMPARISON IS STILL FAILING. -1E288 > -1E99 is returning True.

* fixing comparisons: There was actually an "abs" I had not noticed.

* extra space deleted

* cleanup & working towards inclusion of pars_bnds_exist

* rate_constants_parameters_bnds seem to be parsed and passed correctly to CheKiPEUQ

* Adding in unbounded_indices and return_unbounded_indices code

* minor syntax fixes

* Added remove_unbounded_values calls to code to truncate arrays etc.

* Moved more of the Bayesian_Dict fields population to init

* Cleaning up print statements

* Fixing rate_constants_parameters_bnds_exist for multiple rate constants

* Update CheKiPEUQ_integration_notes.txt

Co-authored-by: Travis Sikes <[email protected]>

* Remoing print statement from CheKiPUEQ_local

* Style Changes

* CheKiPEUQ changes

CheKiPEUQ was checking bounds after they had already been enforced. Differing ways of checking bounds was causing CheKiPEUQ to throw -inf. CheKiPEUQ no longer checks bounds

CheKiPEUQ obj_obj function no longer shows raw -1*log_posterior_density, but is instead the relative change from the initial guess. This should not alter convergence or how it runs, but it does make it easier to see how the value is changing.

* Refactoring

Refactoring to clean up fit_fcn
Also changing imports slightly

* Implemented Uncertainty in Observable Data

Implemented GUI elements and linked to CheKiPEUQ.
Uncertainty is %.
Need to handle uncertainties better in opt. Log bayesian is broken

* Added Shaded Unc

Shading has a gradient, will likely remove for speed

* Modifications to absolute uncertainty

Added uncertainty type choice to saved variables
Refactored OoM to convert_units

* Implementing rate coef/bnds on Plogs and falloff eqns

* Troe Optimization

Backend mech structures created

Arrhenius optimization functioning again

Bug fix and mech.reset work

Fixed mechanism double loading from setting use_thermo_file_box programmatically
mech.reset now includes Plog and Falloff properly.

More back end work on falloff/plogs

Backend mech work

Changing arrhenius coeffs/coef_bnds to be an item in a list to better match plog and falloff rates

Arrhenius Optimization working again

Arrhenius working
Work to be done with Falloff

Troe kind of working

Troe kinda works

Troe kinda works but it's very slow to fit the coefficients.
I'm going to switch to SRI and hope for a faster convergence time to fitting the coefficients

Working on SRI Fit

Working on falloff

Need to change mech to SRI
Need to save mech as yaml for reverting back to later

Working on Falloff Fits

SRI fitting progress

SRI fitting

More SRI Fitting

Working on nlopt SRI

Working on SRI

More SRI fun

SRI - not much progress

New SRI fit

Fitting a,b then all

Not going well

Update base_plot.py

Update base_plot.py

SRI progress

Troe Optimization and Full Update

Updated Environment and bugs popped up

Quick fixes to address those

Squashed commit of the following:

commit 7c78008561899297477be22b2d6789d8d9be2619
Author: Travis Sikes <[email protected]>
Date:   Mon Jan 17 14:51:38 2022 -0600

    Update main.py

commit 9aee5641e96c5c94c7cf3398e1c8f6c6c113c738
Author: Travis Sikes <[email protected]>
Date:   Mon Nov 8 13:02:15 2021 -0600

    Version check bug fix

commit 703d2253328b5f1e59a85e04cb57552a1d0a8c53
Merge: 0634337 7b12b8e
Author: Travis Sikes <[email protected]>
Date:   Mon Nov 8 12:55:21 2021 -0600

    Merge branch 'Troe_opt' of https://github.com/tsikes/Frhodo into Troe_opt

commit 063433798bdf084fd79bb37c79b8783ace8375d3
Author: Travis Sikes <[email protected]>
Date:   Mon Nov 8 12:55:18 2021 -0600

    Moving Loss Partition Function TCK

commit 7b12b8eceaa5f742e3453bd75d8caa3e69b8c703
Author: TSikes <[email protected]>
Date:   Mon Nov 8 11:47:03 2021 -0600

    Working on Bug Fix

    New bug with RBFopt when using as executable. Working on fixing. (command window is flashing each iteration)

commit 681051d2afc94aeba90101e686bab51d199d5d32
Author: Travis Sikes <[email protected]>
Date:   Thu Nov 4 16:20:59 2021 -0500

    Bug Fix

    Fixed CheKiPEUQ interface issues

commit 56645923f1229a17d3f6ac50b4cdce3ebbb91580
Author: TSikes <[email protected]>
Date:   Thu Nov 4 11:01:42 2021 -0500

    Bug Fix

    Fixed bugs with secondary y axis in sim explorer.

commit 78215871dec25a997e24ab2f4055356f78d6a3f7
Author: Travis Sikes <[email protected]>
Date:   Wed Nov 3 19:46:04 2021 -0500

    Update fit_fcn.py

commit f9d11e87d980b7a428c61a5863ae02d5e84d98d9
Author: Travis Sikes <[email protected]>
Date:   Wed Nov 3 18:09:27 2021 -0500

    Optimization Bug Fixing

    Fixed setting rate parametrization constant uncertainties to zero for residual based method.

commit 7bd4d647cb0e54afa40e3703bd490162f866e189
Author: TSikes <[email protected]>
Date:   Tue Nov 2 15:52:28 2021 -0500

    Minor changes

    Consolidated bisymlog scaling factor
    Added new % abs density gradient to options

commit cf6328b0e9038f68a3a34f51a2d628d95dcd2912
Author: TSikes <[email protected]>
Date:   Mon Nov 1 16:22:59 2021 -0500

    Bug Fixing

    Fixing bugs in explorer widget/base plot with limit setting and widget type not defined

commit 15b2acb593cdd15b91c80744ee109665499b5c7f
Author: Travis Sikes <[email protected]>
Date:   Mon Oct 4 21:56:17 2021 -0500

    Minor Update

    Fixed Torr
    added bisymlog to opt type
    Fixed plot error where left limit == right limit

commit 943ad8e2950b9c0267a5af2176ce846a243b8aca
Author: TSikes <[email protected]>
Date:   Thu Sep 23 16:36:40 2021 -0500

    Update for New Tranter Exp Format

    New format does not have tOpt/PT spacing but instead gives velocity

commit 0eb48ce2e16c69cf8387aadeb94f5a0af17bcc68
Author: Travis Sikes <[email protected]>
Date:   Sun Sep 19 22:55:06 2021 -0500

    Opt Update

    Moved bisymlog out of multiple locations into convert_units
    Changed calculate residuals log to bisymlog

commit 5268062afa75b854fe0eb5e3e25cebd0e46b6b58
Author: TSikes <[email protected]>
Date:   Thu Sep 16 15:35:24 2021 -0500

    Changed Fit Function

    Changed fit function to mean instead of median
    Changed so that Bayesian doesn't include penalty function at end. Need to check

commit 3df584d3ea1d0896d96aa4bcda3dc8072f4fd1c0
Author: tsikes <[email protected]>
Date:   Tue Aug 31 22:15:05 2021 -0500

    Update fit_fcn.py

commit a507f938afdf23a5210739eab9eccd3a33b02dee
Author: tsikes <[email protected]>
Date:   Tue Aug 31 19:30:38 2021 -0500

    Changed adaptive loss function

    Adaptive loss function now optimizes inside of rate optimization loop. It's much more efficient. It also means each individual experiment has it's own loss alpha

commit bc66027fd2576fbfc3c403be1b6b3cd404d3d842
Author: TSikes <[email protected]>
Date:   Tue Aug 31 16:58:18 2021 -0500

    Fixed usage of C in loss function/GUI

commit 42d82ff555bb864bb430a756691a41597473fe9a
Author: tsikes <[email protected]>
Date:   Sun Aug 29 18:26:13 2021 -0500

    Modified loss function

    Removed prior scaling from loss function to bring it back to publication formula

commit d0d43dc453e170d8f7e6b6d57ff63877f17aa27f
Author: TSikes <[email protected]>
Date:   Sun Aug 29 16:57:00 2021 -0500

    Tinkering with generalized loss func

commit 4702ef3d70e4aacedae1ce39b738bc88c9756acb
Author: tsikes <[email protected]>
Date:   Sun Aug 29 15:51:28 2021 -0500

    Changed to adaptive loss function

    The shape value is now broken into an optimized parameter for inside experiments and between experiments

commit 60e782f43ddc6f473a3b7773167bdb46aaa950e2
Author: tsikes <[email protected]>
Date:   Mon Aug 23 23:54:22 2021 -0500

    Update loss_integral.py

commit d093dda5fe90a34d197a9842dcf2a63c8e8b7433
Author: tsikes <[email protected]>
Date:   Mon Aug 23 22:45:04 2021 -0500

    loss integral fitting

commit 774f70d4ae07539a1153fda94e827beb2e8b1199
Author: tsikes <[email protected]>
Date:   Mon Aug 23 17:41:35 2021 -0500

    loss function changes

commit cba7b9e5638efa58970aa93506218514e170c410
Author: TSikes <[email protected]>
Date:   Mon Aug 23 13:30:17 2021 -0500

    Experiment import update

    Updated experimental conditions import to work for old Tranter style experiment files

commit 016ea7ca63c4af2155d1964c1d01d982dfc308bb
Author: tsikes <[email protected]>
Date:   Fri Aug 20 16:31:40 2021 -0500

    Create fit_coeffs_pygmo.py

commit b95d5a69e6c8784f2182f9d041dd55dd7aa24786
Author: tsikes <[email protected]>
Date:   Fri Aug 20 16:29:08 2021 -0500

    Rollback

    Rolling back to working CRS2 Troe opt

commit 3c577e96ed87fb79a47555acf06d3ebdb65ab541
Author: TSikes <[email protected]>
Date:   Thu Aug 19 14:59:26 2021 -0500

    Testing Troe Opt

commit 553887b648b4f9e6ff910abdbeea81ddfe44cfbb
Author: tsikes <[email protected]>
Date:   Thu Aug 19 01:36:54 2021 -0500

    Update fit_coeffs.py

commit cbfaa20b587b940dc3620f599a3facb7dd1990f7
Author: tsikes <[email protected]>
Date:   Wed Aug 18 16:28:28 2021 -0500

    Working on implementing Augmented Lagrangian

commit 520f822e5f61808140d047a8b9f5049ae9e667cc
Author: TSikes <[email protected]>
Date:   Wed Aug 18 12:44:48 2021 -0500

    Small changes

    bonmin path wasn't working with network path as string
    reduced min_T_range
    changing Troe eqn to be continuous for all Fcent values and other cases

commit ab97a6def6af9a57731dcf88c5fefc88d175d1ce
Author: tsikes <[email protected]>
Date:   Mon Aug 16 22:52:25 2021 -0500

    Moving ipopt and bonmin

commit 3accc3b72cc0e69b5944dda58695470e87013277
Author: tsikes <[email protected]>
Date:   Mon Aug 16 22:41:46 2021 -0500

    Including bonmin and ipopt for rbfopt

commit 3289e0ddd4a18f60d3c5dc7be21879e0cd206fc5
Author: TSikes <[email protected]>
Date:   Mon Aug 16 21:12:21 2021 -0500

    Working on Pygmo and RBFOpt

commit dc91f303cffb52aacf36acf123bfcaee4e0ddd15
Author: tsikes <[email protected]>
Date:   Sun Aug 15 21:55:11 2021 -0500

    Troe updates

    Implemented genetic algorithms into GUI
    Sped GA's up through Numba
    Sped GA's up by only using DIRECT_L instead of CRS2. This is less accurate but much faster

commit 91cbd0f243c0d31751ce37c868cc2d93d7ce9e8a
Author: tsikes <[email protected]>
Date:   Sun Aug 15 01:08:16 2021 -0500

    Implementing genetic algorithms

commit 30ad17b43445e0b0d2f4dd6d616eb7a53487370b
Author: TSikes <[email protected]>
Date:   Thu Aug 12 08:56:46 2021 -0500

    Minimally working Troe

commit 82ee3a198fd4d153f7877887aa710af4b7617714
Author: tsikes <[email protected]>
Date:   Sun Aug 8 23:57:46 2021 -0500

    Update fit_coeffs.py

    Minor bug catch

commit 0d89b688dad5c8289de4e803c9664dc358f6eccb
Author: tsikes <[email protected]>
Date:   Sun Aug 8 23:26:30 2021 -0500

    Maybe working?

commit 5e69b6974732ce2ed7262436da72ee026dfb8c7f
Author: tsikes <[email protected]>
Date:   Sun Aug 8 21:44:16 2021 -0500

    Update fit_coeffs.py

    Almost ready to test, but switching to optimizing arrhenius parameters instead of lpl, hpl rates

commit c3a5098c2c405c8a62a291302014116ceb595e83
Author: TSikes <[email protected]>
Date:   Fri Aug 6 09:54:08 2021 -0500

    Tinkering with ranges and bounds

commit 44d7ddb38b1706c54f68cd829866e9f83df8173c
Author: TSikes <[email protected]>
Date:   Tue Aug 3 14:55:30 2021 -0500

    Troe opt changes

    Troe opt changes.
    fixed bug from updating dependencies

commit 3735e38c33333e09b81d9950e5ccb452dfec82db
Author: tsikes <[email protected]>
Date:   Sun Aug 1 20:44:04 2021 -0500

    Redoing Troe Fit

    Redoing fit.

    Need to do more work on constraints of fitting LPL, HPL, Fcent

commit 64070580655a1df81ee7c6cd7f1d38aa7d0a49ff
Author: TSikes <[email protected]>
Date:   Thu Jul 29 10:20:16 2021 -0500

    Troe Fitting - Nonfunctional

    Redoing Troe Fitting to be similar to PLOG -> Troe.

commit d5731fc23e48ad7f74b468ae9637c68abb71b725
Author: TSikes <[email protected]>
Date:   Tue Jul 6 15:28:43 2021 -0500

    Resample Nonuniform Data

    Resamples nonuniform data for uncertainty shading smoothing

commit 4e113be44a96730586f92ee1b5b3f17ad3cae9f0
Author: tsikes <[email protected]>
Date:   Mon Jul 5 18:52:25 2021 -0500

    Update options_panel_widgets.py

    Enable/Disable wavelet levels input box accordingly

commit cf67025f6228c6b8e5945401028aac9db2d6ee39
Author: tsikes <[email protected]>
Date:   Mon Jul 5 18:42:40 2021 -0500

    Implemented unc shading over data

commit 2fa08582d44fbc97fd01e2657664cd0eeddcdc1a
Author: tsikes <[email protected]>
Date:   Fri Jul 2 13:59:59 2021 -0500

    Minor update

    Added error checking for 0D reactors to prevent crashing

commit 5abded10b0b27beac16f61728fa375fe792e0ce8
Author: tsikes <[email protected]>
Date:   Wed Jun 30 20:25:17 2021 -0500

    Bug Fix

    Fixed some convergence issues related to outlier determination

commit 9e268a8ac9594a7d8dae86a089365f8ee5453618
Author: tsikes <[email protected]>
Date:   Tue Jun 29 21:29:42 2021 -0500

    Working Troe Optimization

    Refactored Troe fitting into more legible classes.
    Enabled multiprocessing
    Beginning Testing

commit 951efd3b251ea1d40abc1dc3aecc542620b977e8
Author: tsikes <[email protected]>
Date:   Sat Jun 26 23:03:43 2021 -0500

    Working

    Basic optimization is working

commit e672ca027fd5303045f8efeda6858d81207803a7
Author: tsikes <[email protected]>
Date:   Sat Jun 26 00:12:41 2021 -0500

    Sort of working

    Have nlopt working for fcent

commit 2dbb375cb1a3ac4c5ec989635400fbf2fc8afa96
Author: TSikes <[email protected]>
Date:   Thu Jun 24 17:19:18 2021 -0500

    Update fit_coeffs.py

    Added constraints, but not fitting well with nlopt

commit d9302247552b820f03303a0632ad7bbb1f2ae5a4
Author: TSikes <[email protected]>
Date:   Thu Jun 24 10:33:31 2021 -0500

    Semi working

    Troe is working, but need to implement constraints on Fcent fitting.

    Should be working for Plog -> Troe after implementing those constraints

commit afdcdbc5955798bf68f900ffe432fe2825c8e131
Author: TSikes <[email protected]>
Date:   Tue Jun 22 15:26:13 2021 -0500

    Reproducing Troe Ok

commit 9d080529713b8ac53c519379b79804c0e8bb3ba6
Author: tsikes <[email protected]>
Date:   Mon Jun 21 22:49:49 2021 -0500

    Update fit_coeffs.py

commit 50265c672547ef8d611abca3654020efc08b048d
Author: TSikes <[email protected]>
Date:   Mon Jun 21 14:27:55 2021 -0500

    Tinkering

commit ee6501edf5675db221420e98b15f0aa3242e1dd2
Author: tsikes <[email protected]>
Date:   Sun Jun 20 21:05:57 2021 -0500

    New Plog Fit Method

commit 3f5619e669e0485c5b06861fb82797bb754aaf82
Author: TSikes <[email protected]>
Date:   Thu Jun 17 13:39:16 2021 -0500

    Nothing works

commit 568ea11ecd5be87afa3c573305fecae487c4b3af
Author: TSikes <[email protected]>
Date:   Tue Jun 8 17:27:22 2021 -0500

    PLOG working?

commit e9d957f823be4b4129c56ccbc11db135a0b20a85
Author: tsikes <[email protected]>
Date:   Mon May 3 22:26:22 2021 -0500

    Works for PLOG but badly fitting

commit 9fb5d64a3e22beec5b54e5f8b42a2bacad288b1f
Author: tsikes <[email protected]>
Date:   Mon May 3 22:06:08 2021 -0500

    PLOG Residual Working

commit 292d68fb38e29211b22716a567025f7e7a9657c0
Author: tsikes <[email protected]>
Date:   Sun Apr 11 22:13:03 2021 -0500

    Troe Progress

commit 6867bf67882ed4a45ce652debc49910536d4122d
Author: tsikes <[email protected]>
Date:   Wed Apr 7 18:22:37 2021 -0500

    Update fit_coeffs.py

commit 36b155d038fddf8bb32da3fefc35e8840134810a
Author: TSikes <[email protected]>
Date:   Wed Apr 7 15:07:54 2021 -0500

    More Progress

commit e5dec8fae959c28662a911902f301c206f8e6366
Author: tsikes <[email protected]>
Date:   Tue Apr 6 22:12:52 2021 -0500

    Making Progress

commit 0c5052034219462ab6b8bb83a5217dc3332bacdb
Author: TSikes <[email protected]>
Date:   Tue Apr 6 15:01:09 2021 -0500

    Tinkering

commit 47bc21dcbc99288242ca3b2ffdddd541e668024a
Author: tsikes <[email protected]>
Date:   Mon Apr 5 18:34:20 2021 -0500

    Working

commit add6d9dd5681a0c390958a2b85e2b49b11d39570
Author: tsikes <[email protected]>
Date:   Mon Apr 5 13:48:45 2021 -0500

    Big Changes

    Refactored calculation-type functions
    Set mechanism now generates mechanism programmatically rather than from yaml text in memory. This is necessary to be able to switch reaction types

commit 70cab313f211c86434cb79b710f90003b63b51a2
Author: TSikes <[email protected]>
Date:   Wed Mar 31 16:56:05 2021 -0500

    set_mechanism changes

    Working on changing reaction types. Side benefit will be faster initialization during optimization

commit f6822d93a11368ced34ea47543ccf43f74fb6422
Author: TSikes <[email protected]>
Date:   Wed Mar 31 13:34:46 2021 -0500

    Update misc_fcns.py

commit cef069ba46c9575a21dd39506aa9540a40bc3892
Author: TSikes <[email protected]>
Date:   Mon Mar 29 14:49:16 2021 -0500

    Update shock_fcns.py

commit b3e91ea58b024aa40807cc08d024f33415f10f2f
Author: tsikes <[email protected]>
Date:   Mon Mar 29 00:00:18 2021 -0500

    Update shock_fcns.py

commit b8744a1ad214bb90bb619a08a289e9f4cc833e10
Author: tsikes <[email protected]>
Date:   Sun Mar 28 23:43:34 2021 -0500

    Update shock_fcns.py

    Updated shock solver to match paper

commit 198eabf72084b04569be942e3d4d88521eba6c21
Author: tsikes <[email protected]>
Date:   Mon Mar 22 00:03:21 2021 -0500

    Troe Falloff functional

    Fitting the falloff parameters is working. Need to think more about initial parameters and see if I can fit LPL and HPL at the same time(this makes PLOGS work)

commit 31fb75facfc140adbeaa2fe8ddcbdfaa2dc4e48e
Author: TSikes <[email protected]>
Date:   Thu Mar 11 16:29:19 2021 -0600

    Bug Fixes

commit 9bbdb0689855d38af559d625258782d2a1cff4e1
Author: tsikes <[email protected]>
Date:   Wed Mar 10 23:24:09 2021 -0600

    Update mech_fcns.py

    Accidentally removed sleep for mech changing. This must remain until incident shock reactor is rewritten

commit 4a6efa520b4048d2fc22ca6733d6da97ee279de1
Author: tsikes <[email protected]>
Date:   Wed Mar 10 23:16:01 2021 -0600

    Update mech_optimize.py

    Automatically set minimum time between plots when optimizing

commit c177ed6e58ff468a0bc2e75cd532ce8e8d245601
Author: tsikes <[email protected]>
Date:   Wed Mar 10 22:46:13 2021 -0600

    Plotting Improved

    Set plots to only draw if they are being shown
    Set minimum time since last draw for optimization
    End result: Much faster plotting and program does not appear to hang like before

commit 397457dbf477f76da4c967f2fa5b9f23a2cc7a61
Author: tsikes <[email protected]>
Date:   Tue Mar 9 00:16:23 2021 -0600

    Calculated Troe Derivatives

commit 43a47e944335b0b9316afa63f6f208dd044a4611
Author: tsikes <[email protected]>
Date:   Sat Mar 6 13:47:07 2021 -0600

    Bug Fixes

commit f0899df6ca3b020e073b843a3eff498f700a6a4e
Author: tsikes <[email protected]>
Date:   Sun Feb 28 20:27:18 2021 -0600

    Fixed Branch Errors

commit 687737fe016dd65faacf9d96bbc26df80bfc5121
Author: tsikes <[email protected]>
Date:   Sun Feb 28 18:28:40 2021 -0600

    Troe Tinkering

* Bug Fixing

Fixing issues with optimization

* Squashed commit of the following:

commit 7c78008561899297477be22b2d6789d8d9be2619
Author: Travis Sikes <[email protected]>
Date:   Mon Jan 17 14:51:38 2022 -0600

    Update main.py

commit 9aee5641e96c5c94c7cf3398e1c8f6c6c113c738
Author: Travis Sikes <[email protected]>
Date:   Mon Nov 8 13:02:15 2021 -0600

    Version check bug fix

commit 703d2253328b5f1e59a85e04cb57552a1d0a8c53
Merge: 0634337 7b12b8e
Author: Travis Sikes <[email protected]>
Date:   Mon Nov 8 12:55:21 2021 -0600

    Merge branch 'Troe_opt' of https://github.com/tsikes/Frhodo into Troe_opt

commit 063433798bdf084fd79bb37c79b8783ace8375d3
Author: Travis Sikes <[email protected]>
Date:   Mon Nov 8 12:55:18 2021 -0600

    Moving Loss Partition Function TCK

commit 7b12b8eceaa5f742e3453bd75d8caa3e69b8c703
Author: TSikes <[email protected]>
Date:   Mon Nov 8 11:47:03 2021 -0600

    Working on Bug Fix

    New bug with RBFopt when using as executable. Working on fixing. (command window is flashing each iteration)

commit 681051d2afc94aeba90101e686bab51d199d5d32
Author: Travis Sikes <[email protected]>
Date:   Thu Nov 4 16:20:59 2021 -0500

    Bug Fix

    Fixed CheKiPEUQ interface issues

commit 56645923f1229a17d3f6ac50b4cdce3ebbb91580
Author: TSikes <[email protected]>
Date:   Thu Nov 4 11:01:42 2021 -0500

    Bug Fix

    Fixed bugs with secondary y axis in sim explorer.

commit 78215871dec25a997e24ab2f4055356f78d6a3f7
Author: Travis Sikes <[email protected]>
Date:   Wed Nov 3 19:46:04 2021 -0500

    Update fit_fcn.py

commit f9d11e87d980b7a428c61a5863ae02d5e84d98d9
Author: Travis Sikes <[email protected]>
Date:   Wed Nov 3 18:09:27 2021 -0500

    Optimization Bug Fixing

    Fixed setting rate parametrization constant uncertainties to zero for residual based method.

commit 7bd4d647cb0e54afa40e3703bd490162f866e189
Author: TSikes <[email protected]>
Date:   Tue Nov 2 15:52:28 2021 -0500

    Minor changes

    Consolidated bisymlog scaling factor
    Added new % abs density gradient to options

commit cf6328b0e9038f68a3a34f51a2d628d95dcd2912
Author: TSikes <[email protected]>
Date:   Mon Nov 1 16:22:59 2021 -0500

    Bug Fixing

    Fixing bugs in explorer widget/base plot with limit setting and widget type not defined

commit 15b2acb593cdd15b91c80744ee109665499b5c7f
Author: Travis Sikes <[email protected]>
Date:   Mon Oct 4 21:56:17 2021 -0500

    Minor Update

    Fixed Torr
    added bisymlog to opt type
    Fixed plot error where left limit == right limit

commit 943ad8e2950b9c0267a5af2176ce846a243b8aca
Author: TSikes <[email protected]>
Date:   Thu Sep 23 16:36:40 2021 -0500

    Update for New Tranter Exp Format

    New format does not have tOpt/PT spacing but instead gives velocity

commit 0eb48ce2e16c69cf8387aadeb94f5a0af17bcc68
Author: Travis Sikes <[email protected]>
Date:   Sun Sep 19 22:55:06 2021 -0500

    Opt Update

    Moved bisymlog out of multiple locations into convert_units
    Changed calculate residuals log to bisymlog

commit 5268062afa75b854fe0eb5e3e25cebd0e46b6b58
Author: TSikes <[email protected]>
Date:   Thu Sep 16 15:35:24 2021 -0500

    Changed Fit Function

    Changed fit function to mean instead of median
    Changed so that Bayesian doesn't include penalty function at end. Need to check

commit 3df584d3ea1d0896d96aa4bcda3dc8072f4fd1c0
Author: tsikes <[email protected]>
Date:   Tue Aug 31 22:15:05 2021 -0500

    Update fit_fcn.py

commit a507f938afdf23a5210739eab9eccd3a33b02dee
Author: tsikes <[email protected]>
Date:   Tue Aug 31 19:30:38 2021 -0500

    Changed adaptive loss function

    Adaptive loss function now optimizes inside of rate optimization loop. It's much more efficient. It also means each individual experiment has it's own loss alpha

commit bc66027fd2576fbfc3c403be1b6b3cd404d3d842
Author: TSikes <[email protected]>
Date:   Tue Aug 31 16:58:18 2021 -0500

    Fixed usage of C in loss function/GUI

commit 42d82ff555bb864bb430a756691a41597473fe9a
Author: tsikes <[email protected]>
Date:   Sun Aug 29 18:26:13 2021 -0500

    Modified loss function

    Removed prior scaling from loss function to bring it back to publication formula

commit d0d43dc453e170d8f7e6b6d57ff63877f17aa27f
Author: TSikes <[email protected]>
Date:   Sun Aug 29 16:57:00 2021 -0500

    Tinkering with generalized loss func

commit 4702ef3d70e4aacedae1ce39b738bc88c9756acb
Author: tsikes <[email protected]>
Date:   Sun Aug 29 15:51:28 2021 -0500

    Changed to adaptive loss function

    The shape value is now broken into an optimized parameter for inside experiments and between experiments

commit 60e782f43ddc6f473a3b7773167bdb46aaa950e2
Author: tsikes <[email protected]>
Date:   Mon Aug 23 23:54:22 2021 -0500

    Update loss_integral.py

commit d093dda5fe90a34d197a9842dcf2a63c8e8b7433
Author: tsikes <[email protected]>
Date:   Mon Aug 23 22:45:04 2021 -0500

    loss integral fitting

commit 774f70d4ae07539a1153fda94e827beb2e8b1199
Author: tsikes <[email protected]>
Date:   Mon Aug 23 17:41:35 2021 -0500

    loss function changes

commit cba7b9e5638efa58970aa93506218514e170c410
Author: TSikes <[email protected]>
Date:   Mon Aug 23 13:30:17 2021 -0500

    Experiment import update

    Updated experimental conditions import to work for old Tranter style experiment files

commit 016ea7ca63c4af2155d1964c1d01d982dfc308bb
Author: tsikes <[email protected]>
Date:   Fri Aug 20 16:31:40 2021 -0500

    Create fit_coeffs_pygmo.py

commit b95d5a69e6c8784f2182f9d041dd55dd7aa24786
Author: tsikes <[email protected]>
Date:   Fri Aug 20 16:29:08 2021 -0500

    Rollback

    Rolling back to working CRS2 Troe opt

commit 3c577e96ed87fb79a47555acf06d3ebdb65ab541
Author: TSikes <[email protected]>
Date:   Thu Aug 19 14:59:26 2021 -0500

    Testing Troe Opt

commit 553887b648b4f9e6ff910abdbeea81ddfe44cfbb
Author: tsikes <[email protected]>
Date:   Thu Aug 19 01:36:54 2021 -0500

    Update fit_coeffs.py

commit cbfaa20b587b940dc3620f599a3facb7dd1990f7
Author: tsikes <[email protected]>
Date:   Wed Aug 18 16:28:28 2021 -0500

    Working on implementing Augmented Lagrangian

commit 520f822e5f61808140d047a8b9f5049ae9e667cc
Author: TSikes <[email protected]>
Date:   Wed Aug 18 12:44:48 2021 -0500

    Small changes

    bonmin path wasn't working with network path as string
    reduced min_T_range
    changing Troe eqn to be continuous for all Fcent values and other cases

commit ab97a6def6af9a57731dcf88c5fefc88d175d1ce
Author: tsikes <[email protected]>
Date:   Mon Aug 16 22:52:25 2021 -0500

    Moving ipopt and bonmin

commit 3accc3b72cc0e69b5944dda58695470e87013277
Author: tsikes <[email protected]>
Date:   Mon Aug 16 22:41:46 2021 -0500

    Including bonmin and ipopt for rbfopt

commit 3289e0ddd4a18f60d3c5dc7be21879e0cd206fc5
Author: TSikes <[email protected]>
Date:   Mon Aug 16 21:12:21 2021 -0500

    Working on Pygmo and RBFOpt

commit dc91f303cffb52aacf36acf123bfcaee4e0ddd15
Author: tsikes <[email protected]>
Date:   Sun Aug 15 21:55:11 2021 -0500

    Troe updates

    Implemented genetic algorithms into GUI
    Sped GA's up through Numba
    Sped GA's up by only using DIRECT_L instead of CRS2. This is less accurate but much faster

commit 91cbd0f243c0d31751ce37c868cc2d93d7ce9e8a
Author: tsikes <[email protected]>
Date:   Sun Aug 15 01:08:16 2021 -0500

    Implementing genetic algorithms

commit 30ad17b43445e0b0d2f4dd6d616eb7a53487370b
Author: TSikes <[email protected]>
Date:   Thu Aug 12 08:56:46 2021 -0500

    Minimally working Troe

commit 82ee3a198fd4d153f7877887aa710af4b7617714
Author: tsikes <[email protected]>
Date:   Sun Aug 8 23:57:46 2021 -0500

    Update fit_coeffs.py

    Minor bug catch

commit 0d89b688dad5c8289de4e803c9664dc358f6eccb
Author: tsikes <[email protected]>
Date:   Sun Aug 8 23:26:30 2021 -0500

    Maybe working?

commit 5e69b6974732ce2ed7262436da72ee026dfb8c7f
Author: tsikes <[email protected]>
Date:   Sun Aug 8 21:44:16 2021 -0500

    Update fit_coeffs.py

    Almost ready to test, but switching to optimizing arrhenius parameters instead of lpl, hpl rates

commit c3a5098c2c405c8a62a291302014116ceb595e83
Author: TSikes <[email protected]>
Date:   Fri Aug 6 09:54:08 2021 -0500

    Tinkering with ranges and bounds

commit 44d7ddb38b1706c54f68cd829866e9f83df8173c
Author: TSikes <[email protected]>
Date:   Tue Aug 3 14:55:30 2021 -0500

    Troe opt changes

    Troe opt changes.
    fixed bug from updating dependencies

commit 3735e38c33333e09b81d9950e5ccb452dfec82db
Author: tsikes <[email protected]>
Date:   Sun Aug 1 20:44:04 2021 -0500

    Redoing Troe Fit

    Redoing fit.

    Need to do more work on constraints of fitting LPL, HPL, Fcent

commit 64070580655a1df81ee7c6cd7f1d38aa7d0a49ff
Author: TSikes <[email protected]>
Date:   Thu Jul 29 10:20:16 2021 -0500

    Troe Fitting - Nonfunctional

    Redoing Troe Fitting to be similar to PLOG -> Troe.

commit d5731fc23e48ad7f74b468ae9637c68abb71b725
Author: TSikes <[email protected]>
Date:   Tue Jul 6 15:28:43 2021 -0500

    Resample Nonuniform Data

    Resamples nonuniform data for uncertainty shading smoothing

commit 4e113be44a96730586f92ee1b5b3f17ad3cae9f0
Author: tsikes <[email protected]>
Date:   Mon Jul 5 18:52:25 2021 -0500

    Update options_panel_widgets.py

    Enable/Disable wavelet levels input box accordingly

commit cf67025f6228c6b8e5945401028aac9db2d6ee39
Author: tsikes <[email protected]>
Date:   Mon Jul 5 18:42:40 2021 -0500

    Implemented unc shading over data

commit 2fa08582d44fbc97fd01e2657664cd0eeddcdc1a
Author: tsikes <[email protected]>
Date:   Fri Jul 2 13:59:59 2021 -0500

    Minor update

    Added error checking for 0D reactors to prevent crashing

commit 5abded10b0b27beac16f61728fa375fe792e0ce8
Author: tsikes <[email protected]>
Date:   Wed Jun 30 20:25:17 2021 -0500

    Bug Fix

    Fixed some convergence issues related to outlier determination

commit 9e268a8ac9594a7d8dae86a089365f8ee5453618
Author: tsikes <[email protected]>
Date:   Tue Jun 29 21:29:42 2021 -0500

    Working Troe Optimization

    Refactored Troe fitting into more legible classes.
    Enabled multiprocessing
    Beginning Testing

commit 951efd3b251ea1d40abc1dc3aecc542620b977e8
Author: tsikes <[email protected]>
Date:   Sat Jun 26 23:03:43 2021 -0500

    Working

    Basic optimization is working

commit e672ca027fd5303045f8efeda6858d81207803a7
Author: tsikes <[email protected]>
Date:   Sat Jun 26 00:12:41 2021 -0500

    Sort of working

    Have nlopt working for fcent

commit 2dbb375cb1a3ac4c5ec989635400fbf2fc8afa96
Author: TSikes <[email protected]>
Date:   Thu Jun 24 17:19:18 2021 -0500

    Update fit_coeffs.py

    Added constraints, but not fitting well with nlopt

commit d9302247552b820f03303a0632ad7bbb1f2ae5a4
Author: TSikes <[email protected]>
Date:   Thu Jun 24 10:33:31 2021 -0500

    Semi working

    Troe is working, but need to implement constraints on Fcent fitting.

    Should be working for Plog -> Troe after implementing those constraints

commit afdcdbc5955798bf68f900ffe432fe2825c8e131
Author: TSikes <[email protected]>
Date:   Tue Jun 22 15:26:13 2021 -0500

    Reproducing Troe Ok

commit 9d080529713b8ac53c519379b79804c0e8bb3ba6
Author: tsikes <[email protected]>
Date:   Mon Jun 21 22:49:49 2021 -0500

    Update fit_coeffs.py

commit 50265c672547ef8d611abca3654020efc08b048d
Author: TSikes <[email protected]>
Date:   Mon Jun 21 14:27:55 2021 -0500

    Tinkering

commit ee6501edf5675db221420e98b15f0aa3242e1dd2
Author: tsikes <[email protected]>
Date:   Sun Jun 20 21:05:57 2021 -0500

    New Plog Fit Method

commit 3f5619e669e0485c5b06861fb82797bb754aaf82
Author: TSikes <[email protected]>
Date:   Thu Jun 17 13:39:16 2021 -0500

    Nothing works

commit 568ea11ecd5be87afa3c573305fecae487c4b3af
Author: TSikes <[email protected]>
Date:   Tue Jun 8 17:27:22 2021 -0500

    PLOG working?

commit e9d957f823be4b4129c56ccbc11db135a0b20a85
Author: tsikes <[email protected]>
Date:   Mon May 3 22:26:22 2021 -0500

    Works for PLOG but badly fitting

commit 9fb5d64a3e22beec5b54e5f8b42a2bacad288b1f
Author: tsikes <[email protected]>
Date:   Mon May 3 22:06:08 2021 -0500

    PLOG Residual Working

commit 292d68fb38e29211b22716a567025f7e7a9657c0
Author: tsikes <[email protected]>
Date:   Sun Apr 11 22:13:03 2021 -0500

    Troe Progress

commit 6867bf67882ed4a45ce652debc49910536d4122d
Author: tsikes <[email protected]>
Date:   Wed Apr 7 18:22:37 2021 -0500

    Update fit_coeffs.py

commit 36b155d038fddf8bb32da3fefc35e8840134810a
Author: TSikes <[email protected]>
Date:   Wed Apr 7 15:07:54 2021 -0500

    More Progress

commit e5dec8fae959c28662a911902f301c206f8e6366
Author: tsikes <[email protected]>
Date:   Tue Apr 6 22:12:52 2021 -0500

    Making Progress

commit 0c5052034219462ab6b8bb83a5217dc3332bacdb
Author: TSikes <[email protected]>
Date:   Tue Apr 6 15:01:09 2021 -0500

    Tinkering

commit 47bc21dcbc99288242ca3b2ffdddd541e668024a
Author: tsikes <[email protected]>
Date:   Mon Apr 5 18:34:20 2021 -0500

    Working

commit add6d9dd5681a0c390958a2b85e2b49b11d39570
Author: tsikes <[email protected]>
Date:   Mon Apr 5 13:48:45 2021 -0500

    Big Changes

    Refactored calculation-type functions
    Set mechanism now generates mechanism programmatically rather than from yaml text in memory. This is necessary to be able to switch reaction types

commit 70cab313f211c86434cb79b710f90003b63b51a2
Author: TSikes <[email protected]>
Date:   Wed Mar 31 16:56:05 2021 -0500

    set_mechanism changes

    Working on changing reaction types. Side benefit will be faster initialization during optimization

commit f6822d93a11368ced34ea47543ccf43f74fb6422
Author: TSikes <[email protected]>
Date:   Wed Mar 31 13:34:46 2021 -0500

    Update misc_fcns.py

commit cef069ba46c9575a21dd39506aa9540a40bc3892
Author: TSikes <[email protected]>
Date:   Mon Mar 29 14:49:16 2021 -0500

    Update shock_fcns.py

commit b3e91ea58b024aa40807cc08d024f33415f10f2f
Author: tsikes <[email protected]>
Date:   Mon Mar 29 00:00:18 2021 -0500

    Update shock_fcns.py

commit b8744a1ad214bb90bb619a08a289e9f4cc833e10
Author: tsikes <[email protected]>
Date:   Sun Mar 28 23:43:34 2021 -0500

    Update shock_fcns.py

    Updated shock solver to match paper

commit 198eabf72084b04569be942e3d4d88521eba6c21
Author: tsikes <[email protected]>
Date:   Mon Mar 22 00:03:21 2021 -0500

    Troe Falloff functional

    Fitting the falloff parameters is working. Need to think more about initial parameters and see if I can fit LPL and HPL at the same time(this makes PLOGS work)

commit 31fb75facfc140adbeaa2fe8ddcbdfaa2dc4e48e
Author: TSikes <[email protected]>
Date:   Thu Mar 11 16:29:19 2021 -0600

    Bug Fixes

commit 9bbdb0689855d38af559d625258782d2a1cff4e1
Author: tsikes <[email protected]>
Date:   Wed Mar 10 23:24:09 2021 -0600

    Update mech_fcns.py

    Accidentally removed sleep for mech changing. This must remain until incident shock reactor is rewritten

commit 4a6efa520b4048d2fc22ca6733d6da97ee279de1
Author: tsikes <[email protected]>
Date:   Wed Mar 10 23:16:01 2021 -0600

    Update mech_optimize.py

    Automatically set minimum time between plots when optimizing

commit c177ed6e58ff468a0bc2e75cd532ce8e8d245601
Author: tsikes <[email protected]>
Date:   Wed Mar 10 22:46:13 2021 -0600

    Plotting Improved

    Set plots to only draw if they are being shown
    Set minimum time since last draw for optimization
    End result: Much faster plotting and program does not appear to hang like before

commit 397457dbf477f76da4c967f2fa5b9f23a2cc7a61
Author: tsikes <[email protected]>
Date:   Tue Mar 9 00:16:23 2021 -0600

    Calculated Troe Derivatives

commit 43a47e944335b0b9316afa63f6f208dd044a4611
Author: tsikes <[email protected]>
Date:   Sat Mar 6 13:47:07 2021 -0600

    Bug Fixes

commit f0899df6ca3b020e073b843a3eff498f700a6a4e
Author: tsikes <[email protected]>
Date:   Sun Feb 28 20:27:18 2021 -0600

    Fixed Branch Errors

commit 687737fe016dd65faacf9d96bbc26df80bfc5121
Author: tsikes <[email protected]>
Date:   Sun Feb 28 18:28:40 2021 -0600

    Troe Tinkering

commit de2f6d6c72afa2825a718dde98794ee93c3c61c8
Author: tsikes <[email protected]>
Date:   Wed Feb 24 21:06:09 2021 -0600

    SRI progress

commit 55c92eaabb86acc4efad28c89e7f8872e6946413
Author: TSikes <[email protected]>
Date:   Wed Feb 24 17:07:25 2021 -0600

    Update base_plot.py

commit a99ae6949523491a828c091c95b7a6d43381a4c0
Author: TSikes <[email protected]>
Date:   Wed Feb 24 12:11:30 2021 -0600

    Update base_plot.py

commit edbc062de10439f61bb82980e5a21e6963811feb
Author: TSikes <[email protected]>
Date:   Tue Feb 23 17:24:00 2021 -0600

    Not going well

commit 738a410f596821b8539a911c963ff33bc3312750
Author: tsikes <[email protected]>
Date:   Mon Feb 22 22:08:43 2021 -0600

    New SRI fit

    Fitting a,b then all

commit e45563872533d08db378c581b2d5bf58b87bd285
Author: tsikes <[email protected]>
Date:   Sun Feb 21 21:02:36 2021 -0600

    SRI - not much progress

commit 5889aec780ca4e1cbce370d6943874f6277d9e69
Author: tsikes <[email protected]>
Date:   Sun Feb 21 01:05:46 2021 -0600

    More SRI fun

commit fb0380db74bcc20d98712b15386c9675a55848ee
Author: tsikes <[email protected]>
Date:   Sun Feb 21 00:27:41 2021 -0600

    Working on SRI

commit 665ac25ef0fd65db042893e82585c8086014fbb3
Author: TSikes <[email protected]>
Date:   Thu Feb 18 18:07:54 2021 -0600

    Working on nlopt SRI

commit a2593ea4e7e2fe31f0c56c24e223c72182d59cef
Author: TSikes <[email protected]>
Date:   Wed Feb 17 17:49:32 2021 -0600

    More SRI Fitting

commit f901332049c809c0b2415ca9023d6e31d88c9789
Author: tsikes <[email protected]>
Date:   Tue Feb 16 22:36:23 2021 -0600

    SRI fitting

commit f3d33a6f4cde8c68c1b3292fdf79363b35e4bc79
Author: TSikes <[email protected]>
Date:   Tue Feb 16 17:45:57 2021 -0600

    SRI fitting progress

commit 3b46b21395a556b2965233961ac080aab8189ae8
Author: tsikes <[email protected]>
Date:   Tue Feb 16 10:00:37 2021 -0600

    Working on Falloff Fits

commit 5dab2bff3623e5bedd115384ee0e9c7ec61ff76c
Author: tsikes <[email protected]>
Date:   Mon Feb 15 22:38:09 2021 -0600

    Working on falloff

    Need to change mech to SRI
    Need to save mech as yaml for reverting back to later

commit b67d2b1dd4cfe59943680522e005d8c1579060ab
Author: tsikes <[email protected]>
Date:   Sun Feb 14 22:11:16 2021 -0600

    Working on SRI Fit

commit 0aac366aada55b2f552192605e285802bcc6b805
Author: tsikes <[email protected]>
Date:   Sun Feb 14 15:47:26 2021 -0600

    Troe kinda works

    Troe kinda works but it's very slow to fit the coefficients.
    I'm going to switch to SRI and hope for a faster convergence time to fitting the coefficients

commit e40d5860ca5495f677aeb4c64117b52a49355508
Author: tsikes <[email protected]>
Date:   Sat Feb 13 00:33:33 2021 -0600

    Troe kind of working

commit bbbed46a06bf6770a7cf73e8abe2880a8f731647
Author: tsikes <[email protected]>
Date:   Thu Feb 11 16:12:14 2021 -0600

    Arrhenius Optimization working again

    Arrhenius working
    Work to be done with Falloff

commit 308b5b37bbe290275fe6334411131090d1f8a96d
Author: TSikes <[email protected]>
Date:   Wed Feb 10 17:03:38 2021 -0600

    Backend mech work

    Changing arrhenius coeffs/coef_bnds to be an item in a list to better match plog and falloff rates

commit f1b2a0c0b3d70546bd361982e0af7bd41bf1274f
Author: tsikes <[email protected]>
Date:   Tue Feb 9 22:05:26 2021 -0600

    More back end work on falloff/plogs

commit c1c41c3b8698f6bbc1e0237765e3db84e341f465
Author: TSikes <[email protected]>
Date:   Tue Feb 9 17:20:14 2021 -0600

    Bug fix and mech.reset work

    Fixed mechanism double loading from setting use_thermo_file_box programmatically
    mech.reset now includes Plog and Falloff properly.

commit 3b89e99654216a6dcb5eaac8a62d284c7fbe406f
Author: TSikes <[email protected]>
Date:   Tue Feb 9 16:29:06 2021 -0600

    Backend mech structures created

    Arrhenius optimization functioning again

commit a9c0af4e5e5a064af03a9a08461b090c88ec7db5
Author: tsikes <[email protected]>
Date:   Mon Feb 8 21:18:39 2021 -0600

    Nothing Changing

* Updating Frhodo to be compatible with Cantera 3.0.
Adding updated adaptive_weights
Changing to Cantera chemkin output

* Arrhenius mostly fixed

* pressure dependent opt fix

* minor bugfix: selecting experimental dir

* Environment update

* widget fix and drhodz_per_rxn fix

* Mech reading update

* Chebyshev bug fix

* Squashed commit of the following:

commit 5e39ec2191bfbed08ce7d2877f2fb7f1d7da24bd
Author: Travis Sikes <[email protected]>
Date:   Sun Oct 16 16:28:13 2022 -0500

    Update package dependencies

commit b4854765ecc4afdd3486599b8c57565f6cd23ada
Author: Travis Sikes <[email protected]>
Date:   Sun Oct 16 16:20:02 2022 -0500

    Update options_panel_widgets.py

    Minor bug fix. Newer Qt expects int here

commit 2cfe699b7c8defff89ba872dc2d9c87fa4f647ff
Author: Travis Sikes <[email protected]>
Date:   Mon Mar 21 01:05:26 2022 -0500

    Version Bump

commit 97d59d0d67aeba280763fea7d282e306a2fa6751
Author: Travis Sikes <[email protected]>
Date:   Mon Mar 21 01:04:05 2022 -0500

    Bug Fix

    * Soln2ck Fix

    Fixed bug in writing thermo if no note exists (like writing from a 'gri30.cti')

    * Heat Release Rate

    Added heat release rate as both an observable and in the sim explorer

    * Example Directory Changed and FirstTimeUse.docx made.

    * Update FirstTimeUse.docx

    * removing opt mech files

    * Update fit_fcn.py

    Replace all for following:
    change calculate_residuals  to calculate_objective_function
    change calc_resid_output to calc_objective_function_output

    * Update fit_fcn.py

    * Update fit_fcn.py

    changing variable names in fit_fcn and separating the bayesian case into an if statement.

    * Update fit_fcn.py

    * Update fit_fcn.py

    * Update fit_fcn.py

    Making single return for verbose versus normal case.

    * Made CheKiPEUQ_from_Frhodo  helper module and also put code into fit_fcn

    Right now, these codes are not working. It is just the beginning.

    * Update fit_fcn.py

    * Create ExampleConfig.ini

    * add comments to fit_fcn.py about what is fed in by "args_list"

    * Update fit_fcn.py

    * renaming obs to obs_sim in fit_fcn

    * Update fit_fcn.py

    * get_varying_rate_vals_and_bnds

    * get_varying_rate_vals_and_bnds

    * pars_uncertainty_distribution code

    * newOptimization field for creating PE_object.

    * Added "Force Bayesian"

    * minor changes

    * Update CheKiPEUQ_from_Frhodo.py

    * Update CheKiPEUQ_from_Frhodo.py

    * Adjusting observed_data and responses shapes for CheKiPEUQ

    * got the weightings multiplication to work after transposing and transposing back

    * typo correction

    * update get_last_obs_sim_interp

    * moved CheKiPEUQ_PE_object creation into time_adjust_func

    * Update fit_fcn.py

    * working on get_log_posterior_density and getting varying_rate_vals

    * Update fit_fcn.py

    * forcing 'final' after minimization to be 'residual'

    * switch to negative log P for objective_function_value

    * Trying to allow Bayesian way to get past the "QQ" error by feeding residual metrics.

    * trying 10**neg_logP in lieu of loss_scalar.

    * Setting forceBayesian

    * adding Bayesian_dict to make code easier to follow

    * Separating Bayesian into 5 steps to simplify things for Travis

    * Update fit_fcn.py

    * Update CheKiPEUQ_integration_notes.txt

    * Update fit_fcn.py

    * Update CheKiPEUQ_integration_notes.txt

    * Create CiteSoftLocal.py

    * Update CiteSoft call for CheKiPEUQ

    * Disabling CiteSoft exportations for now

    * Update CheKiPEUQ_integration_notes.txt

    * Variable name changes (#2)

    * Variable name changes

    Moved image assets and added a GUI screenshot
    Replace all for following:
    change calculate_residuals  to calculate_objective_function
    change calc_resid_output to calc_objective_function_output
    changing variable names in fit_fcn and separating the bayesian case into an if statement.
    Making single return for verbose versus normal case.

    Co-authored-by: Aditya Savara <[email protected]>

    * CheKiPEUQ_integration

    Merging from Ashi's branch
    Modified GUI to include variables needed for Bayesian optimization

    * Merge CheKiPEUQ local (#5)

    changing variable names in fit_fcn and separating the bayesian case into an if statement.
    Making single return for verbose versus normal case.
    Made CheKiPEUQ_from_Frhodo  helper module and also put code into fit_fcn
     - Right now, these codes are not working. It is just the beginning.
    Create ExampleConfig.ini
    add comments to fit_fcn.py about what is fed in by "args_list"
    renaming obs to obs_sim in fit_fcn

    * Update fit_fcn.py

    * get_varying_rate_vals_and_bnds

    * get_varying_rate_vals_and_bnds

    * pars_uncertainty_distribution code

    * newOptimization field for creating PE_object.

    * Added "Force Bayesian"

    * minor changes

    * Update CheKiPEUQ_from_Frhodo.py

    * Update CheKiPEUQ_from_Frhodo.py

    * Adjusting observed_data and responses shapes for CheKiPEUQ

    * got the weightings multiplication to work after transposing and transposing back

    * typo correction

    * update get_last_obs_sim_interp

    * moved CheKiPEUQ_PE_object creation into time_adjust_func

    * Update fit_fcn.py

    * working on get_log_posterior_density and getting varying_rate_vals

    * Update fit_fcn.py

    * forcing 'final' after minimization to be 'residual'

    * switch to negative log P for objective_function_value

    * Trying to allow Bayesian way to get past the "QQ" error by feeding residual metrics.

    * trying 10**neg_logP in lieu of loss_scalar.

    * adding Bayesian_dict to make code easier to follow

    * Separating Bayesian into 5 steps to simplify things for Travis

    * Update fit_fcn.py

    * Update CheKiPEUQ_integration_notes.txt

    * Update fit_fcn.py

    * Update CheKiPEUQ_integration_notes.txt

    * Create CiteSoftLocal.py

    * Update CiteSoft call for CheKiPEUQ

    * Disabling CiteSoft exportations for now

    * Update CheKiPEUQ_integration_notes.txt

    * adding CheKiPEUQ local

    * CheKiPEUQ_local

    * removing things not needed from CheKiPEUQ

    * try moving CheKiPEUQ_local

    * parmaeter_estimation class still not being found for CheKiPEUQ_local

    Specifically from inside CheKiPEUQ_from_Frhodo.py

    * Update CheKiPEUQ_from_Frhodo.py

    * Trying to use only CheKiPEUQ_local

    * Merge Fix

    Co-authored-by: Aditya Savara <[email protected]>

    * Another Merge Fix

    * Forced Bayesian Removed

    Distribution type and how many sigma the unc represents is now reachable in var

    * update comment in fit_fcn.py

    * manually updating fit_fcn.py from Travis's CheKiPEUQ_integration branch

    Github was not allowing the merge properly, so doing this change manually before merging.

    * Update CheKiPEUQ_from_Frhodo from the CheKiPEUQ_Integration branch

    * GUI Update

    Bayesian tab now hidden when residuals are checked.
    Uncertainty/Weights table shows depending upon selection of Residual/Bayesian

    * Bayesian Changes

    Changes to Optimization tab GUI
    Reverting some changes in fit_fcn now that CheKiPEUQ will be called after simulations.
    Prior naming was more correct

    * Created CheKiPEUQ Dictionary

    * Minor Changes

    * Update fit_fcn.py

    * Update fit_fcn.py

    * creating get_last_obs_sim_interp and also working on Bayesian_dict

    * Update fit_fcn.py

    * Update fit_fcn.py

    * Adding in more Bayesian_dict arguments. (#6)

    * Update README.rst

    Moved image assets and added a GUI screenshot

    * Update README.rst

    * Moved to Assets Branch

    * Update fit_fcn.py

    Replace all for following:
    change calculate_residuals  to calculate_objective_function
    change calc_resid_output to calc_objective_function_output

    * Update fit_fcn.py

    * Update fit_fcn.py

    changing variable names in fit_fcn and separating the bayesian case into an if statement.

    * Update fit_fcn.py

    * Update fit_fcn.py

    * Update fit_fcn.py

    Making single return for verbose versus normal case.

    * Made CheKiPEUQ_from_Frhodo  helper module and also put code into fit_fcn

    Right now, these codes are not working. It is just the beginning.

    * Update fit_fcn.py

    * Create ExampleConfig.ini

    * add comments to fit_fcn.py about what is fed in by "args_list"

    * Update fit_fcn.py

    * renaming obs to obs_sim in fit_fcn

    * Update fit_fcn.py

    * get_varying_rate_vals_and_bnds

    * get_varying_rate_vals_and_bnds

    * pars_uncertainty_distribution code

    * newOptimization field for creating PE_object.

    * Added "Force Bayesian"

    * minor changes

    * Update CheKiPEUQ_from_Frhodo.py

    * Update CheKiPEUQ_from_Frhodo.py

    * Adjusting observed_data and responses shapes for CheKiPEUQ

    * got the weightings multiplication to work after transposing and transposing back

    * typo correction

    * update get_last_obs_sim_interp

    * moved CheKiPEUQ_PE_object creation into time_adjust_func

    * Update fit_fcn.py

    * working on get_log_posterior_density and getting varying_rate_vals

    * Update fit_fcn.py

    * forcing 'final' after minimization to be 'residual'

    * switch to negative log P for objective_function_value

    * Trying to allow Bayesian way to get past the "QQ" error by feeding residual metrics.

    * trying 10**neg_logP in lieu of loss_scalar.

    * adding Bayesian_dict to make code easier to follow

    * Separating Bayesian into 5 steps to simplify things for Travis

    * Update fit_fcn.py

    * Update CheKiPEUQ_integration_notes.txt

    * Update fit_fcn.py

    * Update CheKiPEUQ_integration_notes.txt

    * Create CiteSoftLocal.py

    * Update CiteSoft call for CheKiPEUQ

    * Disabling CiteSoft exportations for now

    * Update CheKiPEUQ_integration_notes.txt

    * update comment in fit_fcn.py

    * manually updating fit_fcn.py from Travis's CheKiPEUQ_integration branch

    Github was not allowing the merge properly, so doing this change manually before merging.

    * Update CheKiPEUQ_from_Frhodo from the CheKiPEUQ_Integration branch

    * Update fit_fcn.py

    * Update fit_fcn.py

    * creating get_last_obs_sim_interp and also working on Bayesian_dict

    * Update fit_fcn.py

    * Update fit_fcn.py

    Co-authored-by: Travis Sikes <[email protected]>

    * Update fit_fcn.py

    * Save coefficient x0 and bnds in optimization

    Also added Automatic as an option for uncertainty distribution

    * Added a couple of missed values

    * Update fit_fcn.py

    Manually making them match

    * making get_consolidated_parameters_arrays

    * Bayesian_dict parsing of initial guesses and bounds added

    * for params, deepcopy was needed, and added print lines.

    * Adding new opt settings

    Also spent a long time fixing the scientific spinbox

    * Hall of Fame Added

    * Che ki peuq integration v3 (#7)

    * making get_consolidated_parameters_arrays

    * Bayesian_dict parsing of initial guesses and bounds added

    * for params, deepcopy was needed, and added print lines.

    Co-authored-by: Travis Sikes <[email protected]>

    * Fixed bounds provided to CheKiPEUQ

    * CheKiPEUQ Fixes

    * Fixing the ligical error for lower bound.

    I fixed the logical error, but line 212 is now printing this:
    line 212 [True, True, True] [0, 2.4424906541753446e-16, -1.7976931348623155e+288] -1.7976931348623155e+288

    That means that the comparison is not working correctly for min_neg_system value. In the next commit, I'm going to use the 1E99 way of doing things.

    * Changed to -1E99 and +1E99 check

    SOMEWHAT SURPRISINGLY, THE COMPARISON IS STILL FAILING. -1E288 > -1E99 is returning True.

    * fixing comparisons: There was actually an "abs" I had not noticed.

    * extra space deleted

    * Cleaning up

    Boxes in uncertainty function now functional

    Also have further modified scientificspinbox

    * cleanup & working towards inclusion of pars_bnds_exist

    * rate_constants_parameters_bnds seem to be parsed and passed correctly to CheKiPEUQ

    * Adding in unbounded_indices and return_unbounded_indices code

    * minor syntax fixes

    * Added remove_unbounded_values calls to code to truncate arrays etc.

    * Moved more of the Bayesian_Dict fields population to init

    * Cleaning up print statements

    * Fixing rate_constants_parameters_bnds_exist for multiple rate constants

    * Update CheKiPEUQ_integration_notes.txt

    * Che ki peuq integration v3 (#8)

    * making get_consolidated_parameters_arrays

    * Bayesian_dict parsing of initial guesses and bounds added

    * for params, deepcopy was needed, and added print lines.

    * Fixing the ligical error for lower bound.

    I fixed the logical error, but line 212 is now printing this:
    line 212 [True, True, True] [0, 2.4424906541753446e-16, -1.7976931348623155e+288] -1.7976931348623155e+288

    That means that the comparison is not working correctly for min_neg…
  • Loading branch information
tsikes and AdityaSavara authored Nov 13, 2023
1 parent 5e39ec2 commit d8c7d4a
Show file tree
Hide file tree
Showing 27 changed files with 3,309 additions and 4,605 deletions.
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"jupyter.jupyterServerType": "local",
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"python.formatting.provider": "none"
}
24 changes: 0 additions & 24 deletions frhodo_environment.yml

This file was deleted.

23 changes: 23 additions & 0 deletions frhodo_environment_pinned.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: frhodo
channels:
- numba
- cantera
- conda-forge
- defaults
dependencies:
- cantera=3.0.0
- ipopt=3.14.12
- matplotlib=3.7.2
- nlopt=2.7.1
- numba=0.57.1
- numpy=1.24.4
- pygmo=2.19.5
- pyqt=5.15.9
- qt=5.15.8
- qtpy=2.4.0
- requests=2.31.0
- scipy=1.11.2
- tabulate=0.9.0
- pip:
- dtcwt==0.12.0
- rbfopt==4.2.6
177 changes: 177 additions & 0 deletions frhodo_environment_pinned_all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
name: frhodo
channels:
- numba
- cantera
- conda-forge
- defaults
dependencies:
- asttokens=2.4.0=pyhd8ed1ab_0
- backcall=0.2.0=pyh9f0ad1d_0
- backports=1.0=pyhd8ed1ab_3
- backports.functools_lru_cache=1.6.5=pyhd8ed1ab_0
- boost-cpp=1.78.0=h9f4b32c_4
- brotli=1.1.0=hcfcfb64_0
- brotli-bin=1.1.0=hcfcfb64_0
- brotli-python=1.1.0=py311h12c1d0e_0
- bzip2=1.0.8=h8ffe710_4
- ca-certificates=2023.7.22=h56e8100_0
- cantera=3.0.0=py311h859585b_1
- certifi=2023.7.22=pyhd8ed1ab_0
- charset-normalizer=3.2.0=pyhd8ed1ab_0
- cloudpickle=2.2.1=pyhd8ed1ab_0
- colorama=0.4.6=pyhd8ed1ab_0
- comm=0.1.4=pyhd8ed1ab_0
- contourpy=1.1.1=py311h005e61a_0
- cycler=0.11.0=pyhd8ed1ab_0
- debugpy=1.8.0=py311h12c1d0e_0
- decorator=5.1.1=pyhd8ed1ab_0
- entrypoints=0.4=pyhd8ed1ab_0
- exceptiongroup=1.1.3=pyhd8ed1ab_0
- executing=1.2.0=pyhd8ed1ab_0
- fonttools=4.42.1=py311ha68e1ae_0
- freetype=2.12.1=hdaf720e_2
- gettext=0.21.1=h5728263_0
- glib=2.78.0=h12be248_0
- glib-tools=2.78.0=h12be248_0
- gst-plugins-base=1.22.5=h001b923_1
- gstreamer=1.22.5=hb4038d2_1
- hdf5=1.12.1=nompi_h57737ce_104
- icu=72.1=h63175ca_0
- idna=3.4=pyhd8ed1ab_0
- importlib-metadata=6.8.0=pyha770c72_0
- importlib_metadata=6.8.0=hd8ed1ab_0
- intel-openmp=2023.2.0=h57928b3_49496
- ipopt=3.14.12=ha9547d1_1
- ipykernel=6.25.2=pyh60829e3_0
- ipyparallel=8.6.1=pyhd8ed1ab_0
- ipython=8.15.0=pyh5737063_0
- jedi=0.19.0=pyhd8ed1ab_0
- jupyter_client=8.3.1=pyhd8ed1ab_0
- jupyter_core=5.3.1=py311h1ea47a8_0
- kiwisolver=1.4.5=py311h005e61a_0
- krb5=1.20.1=heb0366b_0
- lcms2=2.15=he9d350c_2
- lerc=4.0.0=h63175ca_0
- libblas=3.9.0=18_win64_mkl
- libbrotlicommon=1.1.0=hcfcfb64_0
- libbrotlidec=1.1.0=hcfcfb64_0
- libbrotlienc=1.1.0=hcfcfb64_0
- libcantera=3.0.0=h82bb817_1
- libcblas=3.9.0=18_win64_mkl
- libclang=16.0.3=default_h8b4101f_1
- libclang13=16.0.3=default_h45d3cf4_1
- libcurl=8.1.2=h68f0423_0
- libdeflate=1.19=hcfcfb64_0
- libexpat=2.5.0=h63175ca_1
- libffi=3.4.2=h8ffe710_5
- libflang=5.0.0=h6538335_20180525
- libglib=2.78.0=he8f3873_0
- libhwloc=2.9.1=h51c2c0f_0
- libiconv=1.17=h8ffe710_0
- libjpeg-turbo=2.1.5.1=hcfcfb64_1
- liblapack=3.9.0=18_win64_mkl
- libogg=1.3.4=h8ffe710_1
- libpng=1.6.39=h19919ed_0
- libsodium=1.0.18=h8d14728_1
- libsqlite=3.43.0=hcfcfb64_0
- libssh2=1.11.0=h7dfc565_0
- libtiff=4.6.0=h4554b19_1
- libvorbis=1.3.7=h0e60522_0
- libwebp=1.3.2=hcfcfb64_0
- libwebp-base=1.3.2=hcfcfb64_0
- libxcb=1.15=hcd874cb_0
- libxml2=2.10.4=hc3477c8_0
- libzlib=1.2.13=hcfcfb64_5
- llvm-meta=5.0.0=0
- llvmlite=0.40.1=py311_0
- m2w64-gcc-libgfortran=5.3.0=6
- m2w64-gcc-libs=5.3.0=7
- m2w64-gcc-libs-core=5.3.0=7
- m2w64-gmp=6.1.0=2
- m2w64-libwinpthread-git=5.0.0.4634.697f757=2
- matplotlib=3.7.2=py311h1ea47a8_0
- matplotlib-base=3.7.2=py311h6e989c2_0
- matplotlib-inline=0.1.6=pyhd8ed1ab_0
- metis=5.1.0=h63175ca_1007
- mkl=2022.1.0=h6a75c08_874
- msys2-conda-epoch=20160418=1
- mumps-seq=5.2.1=hb3f9cae_11
- munkres=1.1.4=pyh9f0ad1d_0
- nest-asyncio=1.5.6=pyhd8ed1ab_0
- networkx=3.1=pyhd8ed1ab_0
- nlopt=2.7.1=py311h6e294a0_3
- numba=0.57.1=np1.22py3.11h81563b4_g04e81073b_0
- numpy=1.24.4=py311h0b4df5a_0
- openjpeg=2.5.0=h3d672ee_3
- openmp=5.0.0=vc14_1
- openssl=3.1.2=hcfcfb64_0
- packaging=23.1=pyhd8ed1ab_0
- pagmo=2.19.0=h17fe9aa_2
- parso=0.8.3=pyhd8ed1ab_0
- pcre2=10.40=h17e33f8_0
- pickleshare=0.7.5=py_1003
- pillow=10.0.1=py311hd926f49_0
- pip=23.2.1=pyhd8ed1ab_0
- platformdirs=3.10.0=pyhd8ed1ab_0
- ply=3.11=py_1
- prompt-toolkit=3.0.39=pyha770c72_0
- prompt_toolkit=3.0.39=hd8ed1ab_0
- psutil=5.9.5=py311ha68e1ae_0
- pthread-stubs=0.4=hcd874cb_1001
- pthreads-win32=2.9.1=hfa6e2cd_3
- pure_eval=0.2.2=pyhd8ed1ab_0
- pybind11-abi=4=hd8ed1ab_3
- pygments=2.16.1=pyhd8ed1ab_0
- pygmo=2.19.5=py311h153afbf_1
- pyparsing=3.0.9=pyhd8ed1ab_0
- pyqt=5.15.9=py311h125bc19_4
- pyqt5-sip=12.12.2=py311h12c1d0e_4
- pysocks=1.7.1=pyh0701188_6
- python=3.11.5=h2628c8c_0_cpython
- python-dateutil=2.8.2=pyhd8ed1ab_0
- python_abi=3.11=3_cp311
- pywin32=304=py311h12c1d0e_2
- pyzmq=25.1.1=py311h7b3f143_0
- qt=5.15.8=h91493d7_0
- qt-main=5.15.8=h2c8576c_11
- qt-webengine=5.15.8=h5b1ea0b_0
- qtpy=2.4.0=pyhd8ed1ab_0
- requests=2.31.0=pyhd8ed1ab_0
- ruamel.yaml=0.17.32=py311ha68e1ae_0
- ruamel.yaml.clib=0.2.7=py311ha68e1ae_1
- scipy=1.11.2=py311h37ff6ca_1
- setuptools=68.2.2=pyhd8ed1ab_0
- sip=6.7.11=py311h12c1d0e_0
- six=1.16.0=pyh6c4a22f_0
- stack_data=0.6.2=pyhd8ed1ab_0
- tabulate=0.9.0=pyhd8ed1ab_1
- tbb=2021.9.0=h91493d7_0
- tk=8.6.12=h8ffe710_0
- toml=0.10.2=pyhd8ed1ab_0
- tomli=2.0.1=pyhd8ed1ab_0
- tornado=6.3.3=py311ha68e1ae_0
- tqdm=4.66.1=pyhd8ed1ab_0
- traitlets=5.10.0=pyhd8ed1ab_0
- typing-extensions=4.7.1=hd8ed1ab_0
- typing_extensions=4.7.1=pyha770c72_0
- tzdata=2023c=h71feb2d_0
- ucrt=10.0.22621.0=h57928b3_0
- urllib3=2.0.4=pyhd8ed1ab_0
- vc=14.3=h64f974e_17
- vc14_runtime=14.36.32532=hdcecf7f_17
- vs2015_runtime=14.36.32532=h05e6639_17
- wcwidth=0.2.6=pyhd8ed1ab_0
- wheel=0.41.2=pyhd8ed1ab_0
- win_inet_pton=1.1.0=pyhd8ed1ab_6
- xorg-libxau=1.0.11=hcd874cb_0
- xorg-libxdmcp=1.1.3=hcd874cb_0
- xz=5.2.6=h8d14728_0
- zeromq=4.3.4=h0e60522_1
- zipp=3.16.2=pyhd8ed1ab_0
- zlib=1.2.13=hcfcfb64_5
- zstd=1.5.5=h12be248_0
- pip:
- dtcwt==0.12.0
- pyomo==6.6.2
- rbfopt==4.2.6
prefix: C:\Users\Travis\miniconda3\envs\frhodo
24 changes: 24 additions & 0 deletions frhodo_environment_unpinned.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: frhodo
channels:
- cantera
- numba
- conda-forge
- defaults
dependencies:
- cantera
- ipopt
- matplotlib
- nlopt
- numba=0.57
- numpy
- pip
- pygmo
- pyqt
- qt
- qtpy
- requests
- scipy
- tabulate
- pip:
- dtcwt
- rbfopt
55 changes: 53 additions & 2 deletions src/calculate/convert_units.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,71 @@
# and licensed under BSD-3-Clause. See License.txt in the top-level
# directory for license and copyright information.

import sys
import numpy as np
import cantera as ct
import sys
import numba


conv2ct = {'torr': 101325/760, 'kPa': 1E3, 'atm': 101325, 'bar': 100000,
'psi': 4.4482216152605/0.00064516, 'cm/s': 1E-2, 'mm/μs': 1000,
'ft/s': 1/3.28084, 'in/s': 1/39.37007874, 'mph': 1609.344/60**2,
'kcal': 1/4184, 'cal': 1/4.184}


@numba.jit(nopython=True, cache=True)
def OoM_numba(x, method="round"):
"""
This function calculates the order of magnitude (OoM) of each element in the input array 'x' using the specified method.
Parameters:
x (numpy array): The input array for which the OoM is to be calculated.
method (str): The method to be used for calculating the OoM. It can be one of the following:
"round" - round to the nearest integer (default)
"floor" - round down to the nearest integer
"ceil" - round up to the nearest integer
"exact" - return the exact OoM without rounding
Returns:
x_OoM (numpy array): The array of the same shape as 'x' containing the OoM of each element in 'x'.
"""

x_OoM = np.empty_like(x)
for i, xi in enumerate(x):
if xi == 0.0:
x_OoM[i] = 1.0

elif method.lower() == "floor":
x_OoM[i] = np.floor(np.log10(np.abs(xi)))

elif method.lower() == "ceil":
x_OoM[i] = np.ceil(np.log10(np.abs(xi)))

elif method.lower() == "round":
x_OoM[i] = np.round(np.log10(np.abs(xi)))

else: # "exact"
x_OoM[i] = np.log10(np.abs(xi))

return x_OoM


def OoM(x):
is_array = True
if any([isinstance(x, _type) for _type in [int, float]]):
is_array = False
x = np.array([x])

if not isinstance(x, np.ndarray):
x = np.array(x)

x[x==0] = 1 # if zero, make OoM 0
return np.floor(np.log10(np.abs(x)))

if is_array:
return OoM_numba(x, method="floor")
else:
return OoM_numba(x, method="floor")[0]


def RoundToSigFigs(x, p):
x = np.asarray(x)
Expand Down
Loading

0 comments on commit d8c7d4a

Please sign in to comment.