Skip to content

Commit 0642cfe

Browse files
committed
doc: adding seed! call when needed (hidden)
It will help for reproducibility of the doc deployment.
1 parent a88f803 commit 0642cfe

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

‎docs/src/manual/nonlinmpc1.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ estimator tuning is tested on a plant with a 25 % larger friction coefficient ``
104104
p_plant = copy(p_model)
105105
p_plant[3] = 1.25*p_model[3]
106106
plant = setname!(NonLinModel(f, h, Ts, nu, nx, ny; p=p_plant); u=vu, x=vx, y=vy)
107+
using Random; Random.seed!(2944) # hide
107108
res = sim!(estim, N, [0.5], plant=plant, y_noise=[0.5])
108109
p = plot(res, plotu=false, plotxwithx̂=true)
109110
savefig(p, "plot2_NonLinMPC.svg") # hide

‎docs/src/manual/nonlinmpc2.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ performs under pH and flow rate measurement noise:
315315

316316
```@example 1
317317
using Random
318+
Random.seed!(1123) # hide
318319
function simMHE(mhe, plant, N; x_0, x̂_0)
319320
ny, ny, nd, nx, nx̂ = plant.ny, plant.ny, plant.nd, plant.nx, mhe.nx̂
320321
Y_data, U_data, D_data = zeros(ny, N), zeros(nu, N), zeros(nd, N)
@@ -442,6 +443,7 @@ law responds quickly and returns the effluent pH to the specified range:
442443

443444
```@example 1
444445
res = with_logger(ConsoleLogger(stderr, Error)) do # hide
446+
Random.seed!(5367) # hide
445447
res = simNMPC(nmpc, plant, N2, ry; x_0=[0.07, 0.04], x̂_0, noise=true)
446448
end # hide
447449
p = plot(res, plotd=false, plotxwithx̂=true, plotx̂min=false, plotŷ=true)

0 commit comments

Comments
 (0)