How to specify only certain inital conditions as parameters

Hi there

My questions resolves around the code below

function circ_local(x)
    _prob = remake(prob,u0=x[1:3],p=x[4:end])
    sol = solve(_prob,Tsit5(), reltol=1e-6, abstol=1e-6,saveat=savetime)
    [mean(sol[1,:]),maximum(sol[1,:]),maximum(sol[1,:])/mean(sol[1,:])]
end

Say u0=[10,1,1] I would only like to specify u0[1] as a parameter of the remake problem for which I will just this function to perform local sensitivity analysis.

My attempt looks like

function circ_local(x)
    _prob = remake(prob,u0[1,:]=x[1],p=x[2:end])
    sol = solve(_prob,Tsit5(), reltol=1e-6, abstol=1e-6,saveat=savetime)
    [mean(sol[1,:]),maximum(sol[1,:]),maximum(sol[1,:])/mean(sol[1,:])]
end

However this throws a syntax keyword argument.

Any help appreciated :slight_smile:

Cheers,
H

I do not believe there is a built-in way to get the default value and pass an argument computed based on it. It seems to me that the of author remake should have provided distinct parameters if makes sense to set them individually.