-
-
Notifications
You must be signed in to change notification settings - Fork 4
Benchmark simplify operation #250
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
Merged
Changes from 5 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
c2199d6
Add bench_simplify.jl
ufechner7 a274ed8
bench_simplify works
ufechner7 000395d
Add comment
ufechner7 8691bdb
Update comments
ufechner7 de77efb
Update benchmark
ufechner7 afd22f2
Minor changes
ufechner7 d61b067
Make sure sam.sys is defined
ufechner7 303a96d
Calc rel performance
ufechner7 5ca6527
Add file to .gitignore
ufechner7 1ecda68
Run in separate process
ufechner7 66e92e5
Update comment
ufechner7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # Copyright (c) 2024, 2025 Bart van de Lint, Uwe Fechner | ||
| # SPDX-License-Identifier: MIT | ||
|
|
||
| SIMPLE = false | ||
|
|
||
| using Pkg | ||
| if ! ("LaTeXStrings" ∈ keys(Pkg.project().dependencies)) | ||
| using TestEnv; TestEnv.activate() | ||
| end | ||
| using KiteModels, LinearAlgebra, Statistics | ||
|
|
||
| # Simulation parameters | ||
| dt = 0.05 | ||
| total_time = 10.0 # Longer simulation to see oscillations | ||
| vsm_interval = 3 | ||
| steps = Int(round(total_time / dt)) | ||
|
|
||
| # Steering parameters | ||
| steering_freq = 1/2 # Hz - full left-right cycle frequency | ||
| steering_magnitude = 10.0 # Magnitude of steering input [Nm] | ||
|
|
||
| # Initialize model | ||
| set = load_settings("system_ram.yaml") | ||
| set.segments = 3 | ||
| set_values = [-50, 0.0, 0.0] # Set values of the torques of the three winches. [Nm] | ||
| set.quasi_static = false | ||
| set.physical_model = SIMPLE ? "simple_ram" : "ram" | ||
|
|
||
| sam = SymbolicAWEModel(set) | ||
| sam.set.abs_tol = 1e-2 | ||
| sam.set.rel_tol = 1e-2 | ||
| rm("data/model_1.11_ram_dynamic_3_seg.bin"; force=true) | ||
ufechner7 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| # Initialize at elevation | ||
| set.l_tethers[2] += 0.2 | ||
| set.l_tethers[3] += 0.2 | ||
| time = init!(sam; remake=false, reload=true, bench=true) | ||
| @info "Simplify took $time seconds" | ||
| sys = sam.sys | ||
| nothing | ||
|
|
||
| # Desktop, AMD Ryzen 9 7950X, Julia 1.11: | ||
| # - first run 34.5 seconds | ||
| # - second run 21.1 seconds | ||
|
|
||
| # Laptop, AMD Ryzen 7 7840U, Julia 1.11: | ||
| # - first run 36.5 seconds | ||
| # - second run 24.3 seconds | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.