Skip to content
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

ODELocalSensitivityProblem requires use of macro #134

Closed
rlecover007 opened this issue Jan 27, 2017 · 3 comments
Closed

ODELocalSensitivityProblem requires use of macro #134

rlecover007 opened this issue Jan 27, 2017 · 3 comments

Comments

@rlecover007
Copy link

rlecover007 commented Jan 27, 2017

Although in the documentation it appears that ODELocalSensitivityProblem just requires a ParamterizedFunction, its use in fact requires the use of the @ode_def macro. This is inconvenient in some cases (lots of parameters).

Same code demonstrating the issue.

pf_func = function (t,u,p,du)
  du[1] = p[1] * u[1] - p[2] * u[1]*u[2]
  du[2] = -3 * u[2] + u[1]*u[2]
end

function SampleProblem()

	pf = ParameterizedFunction(pf_func,[1.5,1.0])
	@show typeof(pf)
	prob = ODELocalSensitivityProblem(pf, [1.0; 1.0], (0.0, 10.0))

	sol = solve(prob,Rosenbrock23())

	plot(sol)
end
@ChrisRackauckas
Copy link
Member

This is related: SciML/ParameterizedFunctions.jl#15

@ChrisRackauckas
Copy link
Member

Fixed. Local and adjoint sensitivities now work with general parameterized functions.

@rlecover007
Copy link
Author

Most awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants