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

Approximated approximations #122

Open
artofscience opened this issue Jan 3, 2022 · 2 comments
Open

Approximated approximations #122

artofscience opened this issue Jan 3, 2022 · 2 comments
Assignees
Labels

Comments

@artofscience
Copy link
Owner

We can currently do:

intvar = MixedIntervening(problem.n, problem.m + 1, default=Linear())
intvar.set_intervening(MMA(), var=1)
approx = Taylor1(intvar)
subproblem = Subproblem(approx)

To make the approximated approximations we "only" need to do:

intvar = MixedIntervening(problem.n, problem.m + 1, default=Linear())
intvar.set_intervening(MMA(), var=1)
approx = Taylor1(intvar)
approx_of_approx = Taylor2(approx)
subproblem = Subproblem(approx_of_approx))

This means we need to make Approximation accept Approximation.

How can we do this?

@artofscience
Copy link
Owner Author

Note the intervening object holds the y and dy methods, and the Approximation holds the g and dg methods. Basically both are functions and their derivatives, maybe give them the same name? Then Approximation only needs to accept "an object" that has these methods.

@artofscience
Copy link
Owner Author

Short discussion with Arnoud gave some conclusions; what we could do is something like:

subprob1 = Subproblem(Taylor1(Reciprocal()))
subprob2 = Subproblem(Taylor2())

while not converged:

  f = problem.g(x)
  df = problem.dg(x)
  subproblem1.build(x,f,df)
  
  ddf = subproblem1.ddg(x)
  subproblem2.build(x,f,df,ddf)
  
  x = solver(subproblem2)

@artofscience artofscience self-assigned this Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants