-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add the temporal parameters in the constraints #110
Comments
To add the temporal parameters, we need to use the matrices (#109), being implemented in #144, and we also need to know how to generate the input for the functions in #109. How is the temporal resolution being included in the model? The available data (the tiny test) only has hourly information for each profile. |
I'm not quite sure which is the best place yet, sorry. We can discuss it tomorrow with the whole team (including German). For the time being, if you are working on this today, please make it the simplest/easiest possible, so if we agree on something tomorrow, you can change it more straightforward. |
This depends on: |
This issue is a bit hard, and I am not sure how to break it down, so we might have to bite the bullet. Naming (until #208 is resolved): RPs have a number of time steps. Each assets and flow is defined over time intervals. Each balance constraint is split into time periods. Assets and flows time intervals are read from file and transformed into ranges (a:b). The balance constraints happen at assets, and we know which flows go through those assets. Therefore, we can compute the periods of the constraints and index by assets and rp. This means that we have a set where @constraint(model, balance[a in A, rp in RP, k in K[rp],
sum(flow[f, rp, k] for f in F ...) we have @constraint(model, balance[a in A, rp in RP, T in P[(a, rp)],
sum(ratio(T, I) * flow[f, rp, I] for f in F, I in K_F[(f, rp)] ...) In other words, we are adding an extra loop, but we avoid computing and storing a matrix. The asset profiles that appear in these equations can just be summed over the time period. |
@abelsiqueira The |
@abelsiqueira, we don't mind adding extra loops, as long as they don't create extra and unnecessary constraints/variables. The readability is another concern, but so far, it is still okay. We need to be clear in the documentation. |
That conditional should happen at the data input level, maybe as part of a UI. But for the model, I have to assume that all data is available.
The original constraint had |
The |
Feels like the RP periods should be involved? |
Correct, it is the |
Did not understand |
What I am getting at is:
Then it is like having two matrices, one for |
Sorry, I didn't explain myself correctly, and it was me the one that didn't understand it at the beginning. Now, I see what bothers you and after reviewing the equation again:
In any case, we should discuss it in more detail with @g-moralesespana in tomorrow's session. Hopefully, in person, we can make it more clear for all of us. Sorry 😞 |
Follow the formulation and add these constraints in the optimization model.
The text was updated successfully, but these errors were encountered: