-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Documenter.jl
committed
Mar 27, 2024
1 parent
ce49a54
commit c8141be
Showing
30 changed files
with
1,070 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1 +1 @@ | ||
v0.5.4 | ||
v0.5.5 |
This file contains 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 |
---|---|---|
@@ -1 +1 @@ | ||
v0.5.4 | ||
v0.5.5 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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,80 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Advanced usage · KiteModels.jl</title><script data-outdated-warner src="../assets/warner.js"></script><link rel="canonical" href="https://ufechner7.github.io/KiteModels.jl/advanced/"/><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.png" alt="KiteModels.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../">KiteModels.jl</a></span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><a class="tocitem" href="../types/">Types</a></li><li><a class="tocitem" href="../functions/">Functions</a></li><li><a class="tocitem" href="../parameters/">Parameters</a></li><li><a class="tocitem" href="../examples/">Examples_1p</a></li><li><a class="tocitem" href="../examples_4p/">Examples_4p</a></li><li><a class="tocitem" href="../quickstart/">Quickstart</a></li><li class="is-active"><a class="tocitem" href>Advanced usage</a><ul class="internal"><li><a class="tocitem" href="#Creating-a-custom-system-image"><span>Creating a custom system image</span></a></li><li><a class="tocitem" href="#Outlook"><span>Outlook</span></a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Advanced usage</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Advanced usage</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/ufechner7/KiteModels.jl/blob/main/docs/src/advanced.md#" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Advanced-usage"><a class="docs-heading-anchor" href="#Advanced-usage">Advanced usage</a><a id="Advanced-usage-1"></a><a class="docs-heading-anchor-permalink" href="#Advanced-usage" title="Permalink"></a></h1><p>For advanced users it is suggested to install git, bash and vscode or vscodium in addition to Julia. vscode and vscodium both have a very good plugin for Julia support, see <a href="https://www.julia-vscode.org/">https://www.julia-vscode.org</a>. For Windows users, you can find some installation instructions here: <a href="https://github.com/ufechner7/KiteViewer/blob/main/doc/Windows.md">Julia on Windows</a> .</p><p>Whe using vscode, I do NOT use the Julia terminal provided by vscode, but the normal bash terminal which is also available in vscode by selecting <strong>Terminal->New Terminal</strong> From this terminal I start Julia with <code>julia --project</code> or a different command as explained below. This makes it easier to understand what happens and is also faster when you need to restart.</p><p>For Ubuntu Linux I use the following ppa to install vscode and to keep it up-to-date: <a href="https://www.ubuntuupdates.org/ppa/vscode">https://www.ubuntuupdates.org/ppa/vscode</a> .</p><h2 id="Creating-a-custom-system-image"><a class="docs-heading-anchor" href="#Creating-a-custom-system-image">Creating a custom system image</a><a id="Creating-a-custom-system-image-1"></a><a class="docs-heading-anchor-permalink" href="#Creating-a-custom-system-image" title="Permalink"></a></h2><p>To reduce the startup time it is suggested to use a custom system image that contains all the packages you use on a daily base in compiled form.</p><p>For end users, follow the instructions on <a href="https://github.com/aenarete/KiteSimulators.jl">KiteSimulators</a> . Package developers can follow these instructions:</p><ol><li>Go to the website https://github.com/ufechner7/KiteModels.jl and click on the <strong>Fork</strong> button at the top right.</li><li>clone the new repository which is owned by you with a command similar to this one: <code>git clone https://github.com/aenarete/KiteModels.jl</code> Your own git user name must appear in the URL, otherwise you will not be able to push your changes.</li></ol><p>From a bash prompt you can create one using the following commands, assuming you created a folder "test" as explained on the Quickstart page:</p><pre><code class="language-bash hljs">cd KiteModels.jl | ||
julia --project</code></pre><pre><code class="language-julia hljs">using Pkg | ||
Pkg.instantiate() | ||
Pkg.precompile()</code></pre><p>If you enter shell mode by pressing ";" and type the command <code>tree</code>you should see the following files:</p><pre><code class="nohighlight hljs">shell> tree | ||
. | ||
├── bin | ||
│ ├── create_sys_image | ||
│ ├── create_sys_image2 | ||
│ ├── run_julia | ||
│ └── run_julia2 | ||
├── data | ||
│ ├── settings.yaml | ||
│ └── system.yaml | ||
├── docs | ||
│ ├── data | ||
│ ├── make.jl | ||
│ ├── Project.toml | ||
│ └── src | ||
│ ├── 4-point-kite.png | ||
│ ├── advanced.md | ||
│ ├── assets | ||
│ │ └── logo.png | ||
│ ├── examples_4p.md | ||
│ ├── examples.md | ||
│ ├── functions.md | ||
│ ├── index.md | ||
│ ├── initial_state_4p.png | ||
│ ├── initial_state.png | ||
│ ├── kite.png | ||
│ ├── kite_power_tools.png | ||
│ ├── kps4_hires.png | ||
│ ├── kps4.png | ||
│ ├── parameters.md | ||
│ ├── quickstart.md | ||
│ └── types.md | ||
├── examples | ||
│ ├── compare_kps3_kps4.jl | ||
│ ├── plot2d.jl | ||
│ ├── reel_out.jl | ||
│ ├── simulate_ii.jl | ||
│ └── simulate.jl | ||
├── LICENSE | ||
├── Manifest-1.7.toml.default | ||
├── Manifest-1.8.toml.default | ||
├── Manifest.toml | ||
├── Project.toml | ||
├── README.md | ||
├── src | ||
│ ├── init.jl | ||
│ ├── KiteModels.jl | ||
│ ├── KPS3.jl | ||
│ └── KPS4.jl | ||
└── test | ||
├── bench3.jl | ||
├── bench4.jl | ||
├── create_sys_image2.jl | ||
├── create_sys_image.jl | ||
├── plot2d.jl | ||
├── plot_initial_state.jl | ||
├── plot_kps3.jl | ||
├── plot_kps4.jl | ||
├── runtests.jl | ||
├── test_for_precompile.jl | ||
├── test_kps3.jl | ||
├── test_kps4.jl | ||
├── test_staticarrays.jl | ||
├── test_steady_state.jl | ||
├── test_sundials.jl | ||
└── update_packages.jl | ||
|
||
9 directories, 55 files</code></pre><p>Now leave Julia with the command <code>exit()</code> and then type:</p><pre><code class="language-bash hljs">cd bin | ||
./create_sys_image --update</code></pre><p>This will take about 6 min on a i7-10510U CPU. You should now see a new file in the bin folder:</p><pre><code class="nohighlight hljs">~/repos/test/bin$ ls -lah kps* | ||
-rwxrwxr-x 1 ufechner ufechner 344M apr 18 18:23 kps-image-1.7.so</code></pre><p>You can launch julia such that it makes use of this system image with the commands:</p><pre><code class="language-bash hljs">cd .. | ||
./bin/run_julia</code></pre><p>If you now run any of the examples the time-to-first-plot (TTFP) should be less than 25s:</p><pre><code class="language-julia hljs">julia> @time include("examples/simulate.jl") | ||
lift, drag [N]: 597.61, 129.33 | ||
Average number of callbacks per time step: 481.845 | ||
23.901076 seconds (63.42 M allocations: 12.686 GiB, 5.67% gc time, 70.62% compilation time) | ||
|
||
julia> </code></pre><p>A second run of this command needs about 5.5 s which means the startup time (load and compilation time of the package and the libraries) has been reduced to about 18.4s.</p><p>Without a system image the first time execution of the script "simulate.jl" on the same computer is about 71 seconds while the time for the second execution is the same (5.5s). So now about 47s of time are saved after each restart.</p><h2 id="Outlook"><a class="docs-heading-anchor" href="#Outlook">Outlook</a><a id="Outlook-1"></a><a class="docs-heading-anchor-permalink" href="#Outlook" title="Permalink"></a></h2><p>The next steps:</p><ul><li>reduce memory allocations</li><li>add export as FMI for co-simulation component</li></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../quickstart/">« Quickstart</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Wednesday 27 March 2024 15:34">Wednesday 27 March 2024</span>. Using Julia version 1.10.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> |
Oops, something went wrong.