You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the _build_model function is ~260 lines, about half of which is the building of constraints. We should be able to reduce the complexity of this function by creating smaller functions to add each constraint, or each family of constraints, to keep _build_model to a more reasonable size.
Another take on refactoring has gotten started in the daniel/constraint_functions branch. We make use of the JuMP syntax model[:foo] to access the variable or contraint (or array of variables/contraints) named foo that was defined in the model object. This way, we can simplify passing the model object back and forth, and don't have to manually plumb the foo references that get created in the _build_model namespace.
Currently, the
_build_model
function is ~260 lines, about half of which is the building of constraints. We should be able to reduce the complexity of this function by creating smaller functions to add each constraint, or each family of constraints, to keep_build_model
to a more reasonable size.An attempt was made in an old branch (see the last 6 commits of https://github.com/Breakthrough-Energy/REISE.jl/commits/constraint_functions) but it's pretty out of date, so we should probably start fresh and make better use of our Sets struct.
The text was updated successfully, but these errors were encountered: