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

Proposal: change noise syntax #107

Closed
odow opened this issue Mar 6, 2018 · 2 comments
Closed

Proposal: change noise syntax #107

odow opened this issue Mar 6, 2018 · 2 comments

Comments

@odow
Copy link
Owner

odow commented Mar 6, 2018

@rhsnoise(sp, w=[1,2,3], 2x+y<=w)
# becomes
@rhsnoise(sp, [1,2,3], w->2x+y<=w)

This sorts out the using different noise fiasco since we can just throw new observations into the function (ref #10). It plays nicer with namespacing issues

w = 0
@rhsnoise(sp, w=[1,2,3], 2x+y<=w)
# what is w? 3!

w = 0
@rhsnoise(sp, [1,2,3], w->2x+y<=w)
# what is w? 0!

And is probably a good start towards noises in the constraint coefficients. It also slightly unifies our price interpolation stuff since we would have

@stageobjective(sp, [1,2,3], w->w*x)
# and
@stageobjective(sp, p->p*x)

But we should really have

@stageobjective(sp, [1,2,3], (p, w) -> p*x + w)

to allow for stagewise independent noise on-top-of the price states.

Nothing actionable yet, leaving this as a reminder.

@odow odow added this to the v2.0.0 milestone Mar 6, 2018
@odow odow added the sampling label Mar 11, 2018
@odow
Copy link
Owner Author

odow commented Apr 19, 2018

Ref. jump-dev/JuMP.jl#1241

@odow odow added the proposal label Apr 26, 2018
@odow
Copy link
Owner Author

odow commented May 24, 2018

I thought of this today. It is a whole lot simpler and allows us to more easily modify subproblems.

SDDPModel() do sp, t
    @state(sp, x, x0==0)
    c = @constraint(m, x == 1)
    @stageobjective(m, x)
    parameterize!(sp, [0.5, 0.2, 0.3]) do noise
        rhs = [1.1, 1.2, 1.3]
        JuMP.setRHS(c, rhs[noise])
        @stageobjective(m, noise * x)  # not sure about this
    end
end

This would get rid of @rhsnoise and the @stageobjective that has a noise. Other pro, this plays nice with out-of-sample noise terms (ref #80).

Con: can you have to calls to parameterize!?

To follow up, can we just use @objective and check before a solve if we have added the cost-to-go variable?

@odow odow mentioned this issue Mar 13, 2019
@odow odow removed this from the v2.0.0 milestone Mar 13, 2019
@odow odow closed this as completed in #180 Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant