Skip to content

Fix the supply function in quantities.py to impose minimum constraint #335

@tsmbland

Description

@tsmbland

I've just found why the discrepancy.

  1. The sector output, taking the values right out of the market, gives the right values as market information is calculated based on the constrains (so figure on the right is correct).
  2. The MCA information, surprisingly and I don't know why, is obtained by recalculating everything. In this line, it limits the supply so it is not higher than the maximum production, but it does not impose any minimum constrain but to fulfil the demand, and therefore the minimum service constrained is not honoured.

In summary, the calculation for the MCAMetric_Supply.csv is wrong - and I would presume that any other calculation that uses this supply function will also be wrong, as no minimum constrains are imposed but to fulfill the demand.

Originally posted by @dalonsoa in #321 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions