Skip to content
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

Run allocation at t = 0 #1496

Merged
merged 5 commits into from
May 23, 2024
Merged

Run allocation at t = 0 #1496

merged 5 commits into from
May 23, 2024

Conversation

SouthEndMusic
Copy link
Collaborator

Fixes #1389.

@SouthEndMusic SouthEndMusic changed the title Run allocation at t = 0, fix tests Run allocation at t = 0 May 22, 2024
@SouthEndMusic SouthEndMusic marked this pull request as draft May 22, 2024 08:55
@SouthEndMusic
Copy link
Collaborator Author

SouthEndMusic commented May 22, 2024

I am struggling a bit to understand the behavior of the allocation_example model at the start of the simulation. Here is the plot of the allocation data:

26ecc337-2432-4e74-8391-fd7c31b42333

And here is the data for the first allocation solve:

 Row │ time     subnetwork_id  node_type   node_id  priority  demand   allocated  realized 
     │ Float64  Int32          String      Int32    Int32     Float64  Float64    Float64  
─────┼─────────────────────────────────────────────────────────────────────────────────────
   1 │     0.0              2  UserDemand        6         1      0.0        0.0       1.0
   2 │     0.0              2  UserDemand        3         1      1.5        1.5       1.5
   3 │     0.0              2  UserDemand       13         1      0.0       -0.0       1.2
   4 │     0.0              2  UserDemand        6         2      0.0        0.0       1.0
   5 │     0.0              2  UserDemand        3         2      0.0       -0.0       1.5
   6 │     0.0              2  UserDemand       13         2      1.2        0.2       1.2
   7 │     0.0              2  UserDemand        6         3      1.0       -0.0       1.0
   8 │     0.0              2  UserDemand        3         3      0.0       -0.0       1.5
   9 │     0.0              2  UserDemand       13         3      0.0       -0.0       1.2

The abstracted a.k.a. realized values at $t = 0$ can be ignored, as there is no realized flow at $t = 0$ yet. These are the things I find weird:

  • UserDemand node 13 having a positive demand of 1.2 at priority 2. In the schematization this node is only assigned a demand at priority 3. Things are getting mixed up somewhere. This also causes nothing to be allocated to UserDemand node 3 at priority 2;
  • UserDemand node 3 having 0 abstraction after the first day, even though flow was allocated to this node.

Edit: I am more confused still. I noticed that some flow goes to the buffer for the fractional flow even though it is not needed there. There might also be a difference between the allocation_example model from the docs and the one in the test models.

@SouthEndMusic SouthEndMusic marked this pull request as ready for review May 22, 2024 11:14
@SouthEndMusic SouthEndMusic requested a review from visr May 22, 2024 11:14
Copy link
Member

@visr visr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Left a few comments.

core/src/model.jl Outdated Show resolved Hide resolved
core/src/parameter.jl Outdated Show resolved Hide resolved
core/src/allocation_init.jl Show resolved Hide resolved
core/src/util.jl Show resolved Hide resolved
core/src/util.jl Show resolved Hide resolved
@SouthEndMusic SouthEndMusic requested a review from visr May 23, 2024 11:47
@visr visr merged commit cfbe510 into main May 23, 2024
24 checks passed
@visr visr deleted the run_allocation_at_start branch May 23, 2024 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run allocation at t = 0
2 participants