-
Notifications
You must be signed in to change notification settings - Fork 5
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
Scaling #15
Scaling #15
Conversation
YoungFaithful
commented
May 24, 2019
- Scaling included for better numerical properties
- Lines adjusted as there were lines defined twice with opposite start and end node
This should fix it to 0.3 explicitly, right?
Update
Explicit dependency on ClustForOpt version
The fails are OK, because:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- What is the computational savings based on the scaling?
- You mention that testing fails due to some lines and scaling. Would it be possible to calculate a new jld2 testset with this PR, so that that is fixed?
@@ -39,7 +40,8 @@ function OptVariable(cep::OptModelCEP, | |||
end | |||
end | |||
end | |||
OptVariable(round.(jumparray.data;digits=round_sigdigits),jumparray.axes...; axes_names=axes_names, type=type) | |||
unscaled_data=jumparray.data*scale[variable] #Unscale the jumparray data based on the scaling parameters in Dictionary scale |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not entirely sure if I follow fully. You unscale the optimal variables here and store them. Where do you scale them previously?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And does that mean that if I just take the optimization results as is form the JuMP model, the variable units would not be correct, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JuMP variables and equations are scaled within the problem formulation (one can not scale them separately like in GAMS - idea being to give you more control of what is actually given to optimizer)
The JuMP variables themselves are scaled and unscaling happens afterwards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I see. Let's walk through this in person together, I think this is a great change in terms of computational time reduction, but needs to be documented well, because the units do not hold anymore. Make sure to document this in the function header and also where scale is applied: What is the reason for using scale, where is it unscaled
.
|
That's a significant improvement, awesome! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enhanced documentation looks great.
The tests still fail.
… tech_l in consistence with thesis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passes the test, nice.