Closed dongqi-wu closed 3 years ago
@danielolsen @lanesmith Sorry I somehow accidentally closed the last PR (it seems git was asking me to pull the head before I push my interactive rebase, then I might have pushed a version that is exactly the same as the head which caused the last PR to close..) I have addressed the comments from #147, please check this version.
I've read through the code which makes sense to me. Just curious how do we resolve the issue @lanesmith mentioned during last meeting: set_objective_coefficient
works on a toy JuMP model but throws following error when calling it in loop.jl
?
JULIA: MathOptInterface.ModifyObjectiveNotAllowed{MathOptInterface.ScalarCoefficientChange{Int64}}: Modifying the objective function with MathOptInterface.ScalarCoefficientChange{Int64}(MathOptInterface.VariableIndex(195001), 5) cannot be performed. You may want to use a `CachingOptimizer` in `AUTOMATIC` mode or you may need to call `reset_optimizer` before doing this operation if the `CachingOptimizer` is in `MANUAL` mode.
I've read through the code which makes sense to me. Just curious how do we resolve the issue @lanesmith mentioned during last meeting:
set_objective_coefficient
works on a toy JuMP model but throws following error when calling it inloop.jl
?JULIA: MathOptInterface.ModifyObjectiveNotAllowed{MathOptInterface.ScalarCoefficientChange{Int64}}: Modifying the objective function with MathOptInterface.ScalarCoefficientChange{Int64}(MathOptInterface.VariableIndex(195001), 5) cannot be performed. You may want to use a `CachingOptimizer` in `AUTOMATIC` mode or you may need to call `reset_optimizer` before doing this operation if the `CachingOptimizer` is in `MANUAL` mode.
When I tested on the new laptop with a new environment, the implementation that we had for loop.jl
seemed to work. I'm not sure what might have caused the problem for me in the past, but perhaps it was an older JuMP
version? I'm not confident that was the problem though as the Project.toml
file should have been up-to-date on my end
When I tested on the new laptop with a new environment, the implementation that we had for loop.jl seemed to work. I'm not sure what might have caused the problem for me in the past, but perhaps it was an older JuMP version? I'm not confident that was the problem though as the Project.toml file should have been up-to-date on my end
By default, bug-fix versions are not pinned, so if we specified an older version of JuMP, that should not prevent a newer, compatible bug-fix version from being installed instead.
I've read through the code which makes sense to me. Just curious how do we resolve the issue @lanesmith mentioned during last meeting:
set_objective_coefficient
works on a toy JuMP model but throws following error when calling it inloop.jl
?JULIA: MathOptInterface.ModifyObjectiveNotAllowed{MathOptInterface.ScalarCoefficientChange{Int64}}: Modifying the objective function with MathOptInterface.ScalarCoefficientChange{Int64}(MathOptInterface.VariableIndex(195001), 5) cannot be performed. You may want to use a `CachingOptimizer` in `AUTOMATIC` mode or you may need to call `reset_optimizer` before doing this operation if the `CachingOptimizer` is in `MANUAL` mode.
When I tested on the new laptop with a new environment, the implementation that we had for
loop.jl
seemed to work. I'm not sure what might have caused the problem for me in the past, but perhaps it was an olderJuMP
version? I'm not confident that was the problem though as theProject.toml
file should have been up-to-date on my end
Aha, glad to hear it is resolved magically.
Pull Request doc
Purpose
Update demand flexibility cost code in #135 to accommodate the changes in #142. Consolidate comments from @lanesmith Respond to comments in PR #147 (closed accidentally)
What the code is doing
demand_flexibility_cost_up.csv
anddemand_flexibility_cost_up.csv
and create corresponding fields in the DemandFlexibility classload_shift_up
andload_shift_dn
Testing
The code is setup on a local computer and uses a ERCOT sub-system to reduce computation time The code is tested using dummy input files (shared in slack channel) and when inputs files are missing The results with/without the cost input files are checked and compared Various testing are performed using interval length and interval number ranging from 1 to 3
Where to look
It's helpful to clarify where your new code lives if you moved files around or there could be confusion/
two fields in types.jl
csv reading code in read.jl
add corresponding objective function expression in model.jl
re-assign coefficients in loop.jl
Usage Example/Visuals
N/A
Time estimate
~15 min for people that are familiar with the previous version in #147