Skip to content

Commit

Permalink
build based on 87ffa2f
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Feb 9, 2024
1 parent c38bab6 commit ed44a9e
Show file tree
Hide file tree
Showing 17 changed files with 801 additions and 757 deletions.
12 changes: 6 additions & 6 deletions dev/DCsOPF/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
Nl, N = size(A, 1), size(A, 2)
Bbr = diagm(0 => -(2 .+ 10 * rand(Nl))) # line parameters
Ψ = [zeros(Nl) -Bbr * A[:, 2:end] * inv(A[:, 2:end]&#39; * Bbr * A[:, 2:end])] # PTDF matrix</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">5×4 Matrix{Float64}:
0.0 -0.750423 -0.306423 -0.203115
0.0 -0.141415 -0.392994 -0.260499
0.0 -0.108162 -0.300583 -0.536386
0.0 -0.249577 0.306423 0.203115
0.0 0.108162 0.300583 -0.463614</code></pre><p>Now we can continue the remaining ingredients that specify our systems:</p><pre><code class="language-julia hljs">Cp, Cd = [1 0; 0 0; 0 0; 0 1], [0 0; 1 0; 0 1; 0 0] # book-keeping
0.0 -0.759299 -0.329231 -0.0754127
0.0 -0.184115 -0.51308 -0.117525
0.0 -0.0565856 -0.157689 -0.807062
0.0 -0.240701 0.329231 0.0754127
0.0 0.0565856 0.157689 -0.192938</code></pre><p>Now we can continue the remaining ingredients that specify our systems:</p><pre><code class="language-julia hljs">Cp, Cd = [1 0; 0 0; 0 0; 0 1], [0 0; 1 0; 0 1; 0 0] # book-keeping
Ng, Nd = size(Cp, 2), size(Cd, 2)
c = 4 .+ 10 * rand(Ng) # cost function parameters
λp, λl = 1.6 * ones(Ng), 1.6 * ones(Nl) # lambdas for chance constraint reformulations
Expand Down Expand Up @@ -43,4 +43,4 @@
[1 / λl[i] * (mean(pl[1, :], mop) - plmin[i]); buildSOC(pl[i, :], mop)] in SecondOrderCone())
@objective(model, Min, sum(mean(p[i, :], mop) * c[i] for i in 1:Ng))
optimize!(model) # here we go</code></pre><p>Let&#39;s extract the numerical values of the optimal solution.</p><pre><code class="language- hljs">@assert termination_status(model)==MOI.OPTIMAL &quot;Model not solved to optimality.&quot;
psol, plsol, obj = value.(p), value.(pl), objective_value(model)</code></pre><p>Great, we&#39;ve solved the problem. How do we now make sense of the solution? For instance, we can look at the moments of the generated power:</p><pre><code class="language- hljs">p_moments = [[mean(psol[i, :], mop) var(psol[i, :], mop)] for i in 1:Ng]</code></pre><p>Similarly, we can study the moments for the branch flows:</p><pre><code class="language- hljs">pbr_moments = [[mean(plsol[i, :], mop) var(plsol[i, :], mop)] for i in 1:Nl]</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../random_ode/">« Random ODE</a><a class="docs-footer-nextpage" href="../math/">Mathematical Background »</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="Monday 5 February 2024 03:37">Monday 5 February 2024</span>. Using Julia version 1.10.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
psol, plsol, obj = value.(p), value.(pl), objective_value(model)</code></pre><p>Great, we&#39;ve solved the problem. How do we now make sense of the solution? For instance, we can look at the moments of the generated power:</p><pre><code class="language- hljs">p_moments = [[mean(psol[i, :], mop) var(psol[i, :], mop)] for i in 1:Ng]</code></pre><p>Similarly, we can study the moments for the branch flows:</p><pre><code class="language- hljs">pbr_moments = [[mean(plsol[i, :], mop) var(plsol[i, :], mop)] for i in 1:Nl]</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../random_ode/">« Random ODE</a><a class="docs-footer-nextpage" href="../math/">Mathematical Background »</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="Friday 9 February 2024 19:22">Friday 9 February 2024</span>. Using Julia version 1.10.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
56 changes: 30 additions & 26 deletions dev/assets/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"

[[deps.BandedMatrices]]
deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "PrecompileTools"]
git-tree-sha1 = "3ac52471386dfcc0f6a3c8aeb37ed37c37701128"
git-tree-sha1 = "931f3f49902e9b6b527fd7cd02d1cd7b4a84264c"
uuid = "aae01518-5342-5314-be14-df237901396f"
version = "1.4.1"
version = "1.5.0"
weakdeps = ["SparseArrays"]

[deps.BandedMatrices.extensions]
Expand Down Expand Up @@ -251,9 +251,9 @@ version = "0.2.3"

[[deps.ConcurrentUtilities]]
deps = ["Serialization", "Sockets"]
git-tree-sha1 = "8cfa272e8bdedfa88b6aefbbca7c19f1befac519"
git-tree-sha1 = "9c4708e3ed2b799e6124b5673a712dda0b596a9b"
uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb"
version = "2.3.0"
version = "2.3.1"

[[deps.ConstructionBase]]
deps = ["LinearAlgebra"]
Expand Down Expand Up @@ -314,9 +314,9 @@ version = "1.9.1"

[[deps.DiffEqBase]]
deps = ["ArrayInterface", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Static", "StaticArraysCore", "Statistics", "Tricks", "TruncatedStacktraces"]
git-tree-sha1 = "6af33c2eb7478db06bcf5c810e6f3dda53aac2ac"
git-tree-sha1 = "fefc2eeabecb745f1b1e1f91634381f7c81bd75d"
uuid = "2b5f629d-d688-5b77-993f-72d75c75574e"
version = "6.146.0"
version = "6.146.1"

[deps.DiffEqBase.extensions]
DiffEqBaseChainRulesCoreExt = "ChainRulesCore"
Expand Down Expand Up @@ -351,9 +351,9 @@ weakdeps = ["OrdinaryDiffEq", "Sundials"]

[[deps.DiffEqNoiseProcess]]
deps = ["DiffEqBase", "Distributions", "GPUArraysCore", "LinearAlgebra", "Markdown", "Optim", "PoissonRandom", "QuadGK", "Random", "Random123", "RandomNumbers", "RecipesBase", "RecursiveArrayTools", "Requires", "ResettableStacks", "SciMLBase", "StaticArraysCore", "Statistics"]
git-tree-sha1 = "319377c927a4aa1f491228b2ac23f3554a3497c6"
git-tree-sha1 = "3d440ee25f48e5c7b08af71f2997daca45bf6856"
uuid = "77a26b50-5914-5dd7-bc55-306e6241c503"
version = "5.20.0"
version = "5.20.1"

[deps.DiffEqNoiseProcess.extensions]
DiffEqNoiseProcessReverseDiffExt = "ReverseDiff"
Expand Down Expand Up @@ -610,9 +610,9 @@ version = "0.1.3"

[[deps.Functors]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "9a68d75d466ccc1218d0552a8e1631151c569545"
git-tree-sha1 = "166c544477f97bbadc7179ede1c1868e0e9b426b"
uuid = "d9f16b24-f501-4c13-a1f2-28368ffc5196"
version = "0.4.5"
version = "0.4.7"

[[deps.Future]]
deps = ["Random"]
Expand Down Expand Up @@ -1102,9 +1102,9 @@ uuid = "a63ad114-7e13-5084-954f-fe012c677804"

[[deps.Mosek]]
deps = ["Libdl", "Pkg", "Printf", "SparseArrays"]
git-tree-sha1 = "a85deb4957c1f2ad5cd7785e5db8d61a722d8604"
git-tree-sha1 = "d745a2a4a0f71c4bcc8a3f5be3aff9feade3f644"
uuid = "6405355b-0ac2-5fba-af84-adbd65488c0e"
version = "10.1.3"
version = "10.1.4"

[[deps.MosekTools]]
deps = ["MathOptInterface", "Mosek", "Printf"]
Expand Down Expand Up @@ -1151,9 +1151,9 @@ version = "1.2.0"

[[deps.NonlinearSolve]]
deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "DiffEqBase", "FastBroadcast", "FastClosures", "FiniteDiff", "ForwardDiff", "LazyArrays", "LineSearches", "LinearAlgebra", "LinearSolve", "MaybeInplace", "PrecompileTools", "Preferences", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "SparseArrays", "SparseDiffTools", "StaticArraysCore", "TimerOutputs"]
git-tree-sha1 = "323d2a61f4adc4dfe404bf332b59690253b4f4f2"
git-tree-sha1 = "2d0fff5b88cb528c7c908eb2421f77658fc70344"
uuid = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
version = "3.5.3"
version = "3.5.4"

[deps.NonlinearSolve.extensions]
NonlinearSolveBandedMatricesExt = "BandedMatrices"
Expand Down Expand Up @@ -1224,9 +1224,9 @@ version = "0.5.5+0"

[[deps.Optim]]
deps = ["Compat", "FillArrays", "ForwardDiff", "LineSearches", "LinearAlgebra", "MathOptInterface", "NLSolversBase", "NaNMath", "Parameters", "PositiveFactorizations", "Printf", "SparseArrays", "StatsBase"]
git-tree-sha1 = "47fea72de134f75b105a5d4a1abe5c6aec89d390"
git-tree-sha1 = "d024bfb56144d947d4fafcd9cb5cafbe3410b133"
uuid = "429524aa-4258-5aef-a3af-852621145aeb"
version = "1.9.1"
version = "1.9.2"

[[deps.Opus_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
Expand Down Expand Up @@ -1304,9 +1304,9 @@ version = "1.4.0"

[[deps.Plots]]
deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "JLFzf", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "PrecompileTools", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "RelocatableFolders", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "UUIDs", "UnicodeFun", "UnitfulLatexify", "Unzip"]
git-tree-sha1 = "38a748946dca52a622e79eea6ed35c6737499109"
git-tree-sha1 = "c4fa93d7d66acad8f6f4ff439576da9d2e890ee0"
uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
version = "1.40.0"
version = "1.40.1"

[deps.Plots.extensions]
FileIOExt = "FileIO"
Expand Down Expand Up @@ -1354,9 +1354,9 @@ version = "0.2.4"

[[deps.PreallocationTools]]
deps = ["Adapt", "ArrayInterface", "ForwardDiff"]
git-tree-sha1 = "64bb68f76f789f5fe5930a80af310f19cdafeaed"
git-tree-sha1 = "9d6e62d1ea6ab709142b42d3be4bd1db495bc4e0"
uuid = "d236fae5-4411-538c-8e31-a6e3d9e00b46"
version = "0.4.17"
version = "0.4.18"

[deps.PreallocationTools.extensions]
PreallocationToolsReverseDiffExt = "ReverseDiff"
Expand Down Expand Up @@ -1516,12 +1516,13 @@ version = "0.6.42"

[[deps.SciMLBase]]
deps = ["ADTypes", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FillArrays", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables", "TruncatedStacktraces"]
git-tree-sha1 = "75bae786dc8b07ec3c2159d578886691823bcb42"
git-tree-sha1 = "fe886daed83db8f4881ff7b6ef10853055fa8b4b"
uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
version = "2.23.1"
version = "2.23.2"

[deps.SciMLBase.extensions]
SciMLBaseChainRulesCoreExt = "ChainRulesCore"
SciMLBaseMakieExt = "Makie"
SciMLBasePartialFunctionsExt = "PartialFunctions"
SciMLBasePyCallExt = "PyCall"
SciMLBasePythonCallExt = "PythonCall"
Expand All @@ -1531,6 +1532,7 @@ version = "2.23.1"
[deps.SciMLBase.weakdeps]
ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2"
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
PartialFunctions = "570af359-4316-4cb7-8c74-252c00c2016b"
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d"
Expand Down Expand Up @@ -1575,15 +1577,17 @@ version = "1.1.0"

[[deps.SimpleNonlinearSolve]]
deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "DiffEqBase", "FastClosures", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "MaybeInplace", "PrecompileTools", "Reexport", "SciMLBase", "StaticArraysCore"]
git-tree-sha1 = "470c5f97af31fa35926b45eb01e53a46c8d7d35f"
git-tree-sha1 = "df8266e0d4960d61325db8c54fad3fa95712b57e"
uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7"
version = "1.3.1"
version = "1.4.0"

[deps.SimpleNonlinearSolve.extensions]
SimpleNonlinearSolveChainRulesCoreExt = "ChainRulesCore"
SimpleNonlinearSolvePolyesterForwardDiffExt = "PolyesterForwardDiff"
SimpleNonlinearSolveStaticArraysExt = "StaticArrays"

[deps.SimpleNonlinearSolve.weakdeps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
PolyesterForwardDiff = "98d1487c-24ca-40b6-b7ab-df2af84e126b"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"

Expand Down Expand Up @@ -1650,9 +1654,9 @@ version = "2.3.1"

[[deps.Static]]
deps = ["IfElse"]
git-tree-sha1 = "f295e0a1da4ca425659c57441bcb59abb035a4bc"
git-tree-sha1 = "d2fdac9ff3906e27f7a618d47b676941baa6c80c"
uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3"
version = "0.8.8"
version = "0.8.10"

[[deps.StaticArrayInterface]]
deps = ["ArrayInterface", "Compat", "IfElse", "LinearAlgebra", "PrecompileTools", "Requires", "SparseArrays", "Static", "SuiteSparse"]
Expand Down
Loading

0 comments on commit ed44a9e

Please sign in to comment.