GithubHelp home page GithubHelp logo

Comments (4)

dmaldona avatar dmaldona commented on September 15, 2024

@michel2323 , @frapac : feel free to add/modify.

from exapf.jl.

frapac avatar frapac commented on September 15, 2024

Thanks for opening this issue! I think more about it today. Yesterday, we discussed about implementing the solve function as:

function solve(pf::PF, u::AbstractVector, x0::AbstractVector)
     ...
end

with PF a power flow object storing the data of the problem, u the current decision variables, and x0 an (optional) initial guess.

The more I think about it, the more I believe that the function solve should compute a feasible state variable x (depending on the current u), but also the adjoint w.t.r. u (which is equivalent to the reduced gradient we discussed about).

A nice way to implement this would be to add a dependence to ChainRulesCore.jl, and add a function frule returning a solution x and the corresponding sensitivity ∂X:

function frule((Δself, Δargs...), ::typeof(foo), args...; kwargs...)
    ...
    return x, ∂X
end

from exapf.jl.

dmaldona avatar dmaldona commented on September 15, 2024

@frapac I like your idea, although I am not familiar with ChainRulesCore.jl.

I do have once concern. The solution of g(x, u), which is our solve, could be replaced by a method that does not require the computation of the Jacobian matrices. In particular, I wanted to explore in the future the use of Padé approximants. In this case I was wondering if we should require solve to compute the adjoints.

from exapf.jl.

dmaldona avatar dmaldona commented on September 15, 2024

Refactoring is complete.

from exapf.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.