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

Update tutorial #561

Merged
merged 3 commits into from
Jun 21, 2023
Merged

Update tutorial #561

merged 3 commits into from
Jun 21, 2023

Conversation

teubert
Copy link
Collaborator

@teubert teubert commented Jun 21, 2023

Updated tutorial to include additional detail

@github-actions
Copy link

Thank you for opening this PR. Since this is a release branch, the PR must complete the release checklist, below:

  • Check that each new feature has corresponding tests

  • Confirm all dependencies are in the following: requirements.txt, setup.py, the bottom of dev_guide.rst

  • Confirm that all issues associated with the release have been closed (i.e., requirements have been met) or assigned to another release

  • Run unit tests python -m tests, on

    • Windows

    • Linux

    • Apple Silicon Mac

    • Intel Mac

  • If present, run manual tests python -m tests.test_manual

  • Review the template(s)

  • Review static-analysis/linter results

  • Review the tutorial

  • Run and review the examples

  • Check that all examples are tested

  • Check new files in PR for any accidentally added

  • Check documents

    • Check that all desired examples are in docs

    • General review: see if any updates are required

  • Rebuild sphinx documents: sphinx-build sphinx_config/ docs/

  • Write release notes

  • Update version number in src/*/init.py and setup.py

  • For releases adding new features- ensure that NASA release process has been followed.

  • Confirm that on GitHub Releases page, the next release has been started and that a schedule is present including at least Release Date, Release Review Date, and Release Branch Opening Date.`

@github-actions
Copy link

Benchmarking Results
From:

Test Time (s)
import main 0.17156890000000002
import thrown object 0.6117459000000001
model initialization 0.18187120000000023
set noise 0.8150787999999998
simulate 0.5600733999999998
simulate with saving 1.5984413000000002
simulate with saving, dt 2.0486250999999998
simulate with printing results, dt 2.5828469
Plot results 17.194283399999996
Metrics 0.04375780000000162
Surrogate Model Generation 2.5062524999999987
surrogate sim 1.6624014000000038
surrogate sim, dt 4.316143500000003
To:
Test Time (s)
--- ---
import main 0.1672511000000001
import thrown object 0.6218089
model initialization 0.1798343
set noise 0.8253720000000002
simulate 0.5628143000000003
simulate with saving 1.6183243000000003
simulate with saving, dt 2.073231
simulate with printing results, dt 2.5945941
Plot results 17.1926326
Metrics 0.04443780000000075
Surrogate Model Generation 2.487051600000001
surrogate sim 1.6602583000000024
surrogate sim, dt 4.283528199999999

@github-actions
Copy link

Benchmarking Results [Update]
From:

Test Time (s)
import main 0.1829727000000001
import thrown object 0.6535170000000001
model initialization 0.19044470000000002
set noise 0.8313253999999999
simulate 0.5910138000000003
simulate with saving 1.6831187
simulate with saving, dt 2.1638254000000003
simulate with printing results, dt 2.6917343999999996
Plot results 17.8026903
Metrics 0.04621960000000058
Surrogate Model Generation 2.587121400000001
surrogate sim 1.7116874000000024
surrogate sim, dt 4.482857899999999

To:

Test Time (s)
import main 0.17610130000000002
import thrown object 0.6416639
model initialization 0.19065029999999972
set noise 0.8363648000000001
simulate 0.5941984000000002
simulate with saving 1.6762681000000006
simulate with saving, dt 2.1526722000000005
simulate with printing results, dt 2.6774018
Plot results 17.780684100000002
Metrics 0.04554839999999771
Surrogate Model Generation 2.5851802
surrogate sim 1.7543975999999972
surrogate sim, dt 4.427645599999998

Copy link
Contributor

@kjjarvis kjjarvis left a comment

Choose a reason for hiding this comment

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

Nice additions to the tutorial

tutorial.ipynb Outdated
@@ -288,6 +280,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Also, note the the lack of smoothness in the voltage curve. This is limited by the save_freq from sim_cfg. There is a point on the graph every 20 seconds, because that is the frequency at which we save the results. Decreasing the save frequency will result in a cleaner curve.\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"Also, note the the lack of smoothness in the voltage curve. This is limited by the save_freq from sim_cfg. There is a point on the graph every 20 seconds, because that is the frequency at which we save the results. Decreasing the save frequency will result in a cleaner curve.\n",
"Also, note the the lack of smoothness in the voltage curve. This is limited by the save_freq from sim_cfg. There is a point on the graph every 20 seconds, because that is the frequency at which we save the results. Decreasing the save frequency will result in a smoother curve.\n",

Just a suggestion

tutorial.ipynb Outdated
"cell_type": "markdown",
"metadata": {},
"source": [
"Now the curve is much better defined as the simulation progresses. This is frequently of interest since users are mostly interested in behavior close to the event occurance."
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"Now the curve is much better defined as the simulation progresses. This is frequently of interest since users are mostly interested in behavior close to the event occurance."
"Now the curve is much better defined as the simulation progresses. This is frequently of interest since users are mostly interested in behavior close to the event occurence."

tutorial.ipynb Outdated
"cell_type": "markdown",
"metadata": {},
"source": [
"Keep in mind that using a fixed dt, like above, will only save the data at the closest dt increment at or after the save point. So if save_freq is less than dt, save points will be missed. or if save_pts are not a multiple of dt, the resulting point at which data is saved will not be exactly at the save point. Auto step sizes (see next section) can help with this."
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"Keep in mind that using a fixed dt, like above, will only save the data at the closest dt increment at or after the save point. So if save_freq is less than dt, save points will be missed. or if save_pts are not a multiple of dt, the resulting point at which data is saved will not be exactly at the save point. Auto step sizes (see next section) can help with this."
"Keep in mind that using a fixed dt, like above, will only save the data at the closest dt increment at or after the save point. So if save_freq is less than dt, save points will be missed. Or if save_pts are not a multiple of dt, the resulting point at which data is saved will not be exactly at the save point. Auto step sizes (see next section) can help with this."

tutorial.ipynb Outdated
"cell_type": "markdown",
"metadata": {},
"source": [
"Simulation is essentially the process of integrating the model forward with time. By default, simple euler integration is used to propogate the model forward. Advanced users can change the numerical integration method to affect the simulation quality and runtime. This is done using the `integration_method` argument in `simulate_to()`, `simulate_to_threshold()`, or the model parameters. For example:\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"Simulation is essentially the process of integrating the model forward with time. By default, simple euler integration is used to propogate the model forward. Advanced users can change the numerical integration method to affect the simulation quality and runtime. This is done using the `integration_method` argument in `simulate_to()`, `simulate_to_threshold()`, or the model parameters. For example:\n",
"Simulation is essentially the process of integrating the model forward with time. By default, simple Euler integration is used to propagate the model forward. Advanced users can change the numerical integration method to affect the simulation quality and runtime. This is done using the `integration_method` argument in `simulate_to()`, `simulate_to_threshold()`, or the model parameters. For example:\n",

tutorial.ipynb Outdated
@@ -215,7 +219,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Now let's work towards simulating. The following section uses the model created in the \"using the included models\" section\n",
"Now let's simulate. The following section uses the model created in the \"using the included models\" section\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"Now let's simulate. The following section uses the model created in the \"using the included models\" section\n",
"Now let's simulate. The following section uses the model created in the \"using the included models\" section.\n",

@teubert teubert merged commit 85ad02c into release/v1.5 Jun 21, 2023
25 checks passed
@teubert teubert deleted the update_tutorial branch June 21, 2023 21:55
@github-actions
Copy link

Benchmarking Results [Update]
From:

Test Time (s)
import main 0.1084229000000001
import thrown object 0.4985465
model initialization 0.1557176
set noise 0.6909516000000002
simulate 0.49738250000000006
simulate with saving 1.3953817000000002
simulate with saving, dt 1.8167074000000003
simulate with printing results, dt 2.2759883
Plot results 14.1050767
Metrics 0.04283459999999906
Surrogate Model Generation 2.164301899999998
surrogate sim 1.3617227000000014
surrogate sim, dt 3.6870477999999984

To:

Test Time (s)
import main 0.1103326
import thrown object 0.4987254000000001
model initialization 0.1576362
set noise 0.6888554
simulate 0.5078099000000003
simulate with saving 1.4162122
simulate with saving, dt 1.8293906
simulate with printing results, dt 2.2878213
Plot results 14.038961400000002
Metrics 0.04318699999999964
Surrogate Model Generation 2.1948168000000017
surrogate sim 1.3728230000000003
surrogate sim, dt 3.7269701000000026

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.

None yet

2 participants