Troubles using MGA algorithm #1225
Replies: 1 comment 1 reply
-
|
@mihlema knows the most about this stuff but she is not really into the development of SpineOpt anymore. I see that the documentation is indeed a bit lacking. It would be nice if we can get your system working such that we can make a tutorial from your example. Regarding the BigM, in general BigM makes LP solutions unstable. That is why you would want this number to be as low as possible while still being regarded as the biggest number in the system. For a few orders of magnitude, the results will indeed be the same. You may notice the issues more once you start using huge values. Regarding the weights, I would expect that the sum of the weights of the units, connections and storages need to be 1 (or -1 in this case). As far as I can see, they are being used to calculate the upper and lower bound of the difference in the iterations. I can see that becoming a bit funky if you don't have the correct sign or weight size. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe your problem
Hello.
I am currently attempting to build a system using the MGA algorithm. However, I would like to make sure that I have understood the documentation correctly since I've run into some issues.
Firstly I would like to make sure that I have understood correctly that the MGA algorithm is very limited in terms of its scope. It only takes into account (in terms of the mga_slack) the direct investment costs that you "point to" by setting the [unit/connection/storages]_invested_mga to True. Does this mean that there is no way to to include running cost differences between different investment possibilities when generating different scenarios? Or is it supposed to take into account the impact of for example units_on_cost if the unit it pertains to has unit_invested_mga set to true? Because as far as I can tell it will exceed the provided slack in a seemingly random manner if such unit parameters are non zero, indicating that only the investment cost is taken into account.
Secondly, I have been attempting to use the method of assigning an array to units_invested_mga_weight to prioritize different investment choices instead of simply assigning a number of max iterations and letting SpineOpt decide on its own which to prioritize. However, when I try to follow the process described at https://spine-tools.github.io/SpineOpt.jl/latest/advanced_concepts/mga/#How-to-set-up-an-MGA-problem-2 it simply doesn't work.
To be clear the only changes I make to the very simple system is that I remove the max_mga_iterations parameter from the model and add a units_invested_mga_weight to each unit. Each an array of the same length with different value between -1 and 1. The system files are linked below. Something else could be amiss in this simple test system since the total system costs vary much more than the assigned slack even in the model that gives an output. For some reason it over invests in some iterations investing in power plants that are not needed and thus exceeding the maximum mga_slack. I don't experience this on a larger system I work on yet I still can't use the array method so I doubt this is really connected. Have I missed some important step to using units_invested_mga_weight?
A final question is regarding correct setting of the big M variable. Depending on where in the documentation you read it is recommended to set it either equal to or double the number of candidate units. Based on some testing I don't think this makes a massive difference and there is a decent amount of freedom in setting this yet. Yet still I wonder if there is any definitive "correct" way to decide this value.
Many thanks in advance!
Attach your model as a JSON file (encouraged)
non_working_test_mga_weight_array.json
working_test_mga_max_iterations_explicit.json
What versions are you using?
SpineOpt: 0.10.1
SpineInterface: 0.15.2
SpineToolbox: 0.9.5
Julia: 1.10.0
Beta Was this translation helpful? Give feedback.
All reactions