Skip to main content

How to add fair-share distribution

Answered

Comments

5 comments

  • Michel Soares
    Thought Leader

    Hi Beatriz,

    I am not sure if I understood the problem correctly, but here is an idea:

    Add constraint: (S_i is variable for the supply of region i, D_i is the constant for the demand of region i)
    S_i/D_i - S_j/D_j - slack_ij = 0 for all i, j in regions

    Include in objective function the minimization of the sum of the slacks with an appropriate coefficient.

    I expect to work as you described: " I expect that all regions to be supplied in proportionality to their demand".

    0
  • Beatriz Torres Silva
    First Comment
    First Question

    Hi Michel,

    Thanks for your reply! Sorry if I didn't make myself clear

    From what I understood, what you're referring to as "slack" is what I mean by unfulfilled quantity and I'm adding it to the cost minimization formula. Actually, I'm multiplying this "slack" by a cost of no fulfillment. However, as this cost is the same for all 3 regions, it doesn't matter if it serves only 2 regions completely, or all 3 regions partially. For example:

    Supply: 300 units
    Unfulfillment cost: 10 $/unit

    Scenario 1 Demand Fulfilment Slack Cost
    Region 1 100 100 0 0
    Region 2 200 200 0 0
    Region 3 300 0 300 3000
    Sum 600 300 300 3000

     

    Fair Share Scenario  Demand Fair-Share ratio Fulfilment Slack Cost
    Region 1 100 17% 50 50 500
    Region 2 200 33% 100 100 1000
    Region 3 300 50% 150 150 1500
    Sum 600 100% 300 300 3000
    0
  • Gurobot (AI-generated response)
    Gurobi Staff Gurobi Staff

    Implementing a fair-share allocation in your optimization problem, especially when dealing with cost minimization and equal weights, can indeed be challenging. The method you've described attempts to ensure fair distribution by splitting demand into slices and prioritizing them differently, but as you've observed, it comes with drawbacks. Let's explore an alternative approach that might help achieve your goals more effectively.

    Alternative Approach: Proportional Allocation

    Instead of slicing the demand and applying decreasing weights, consider directly incorporating a fair-share or proportional allocation constraint into your model. This method aims to enforce that each region receives a share of the supply proportional to its demand, subject to the total available supply.

    The key idea here is to calculate the total available supply and the total demand across all regions. Then, for each region, you enforce that the ratio of the supply received to the total supply available is as close as possible to the ratio of the region's demand to the total demand.

    Step 1: Define Total Supply and Demand

    Let's calculate the total supply Stotal and total demand Dtotal:

    • Stotal=∑i∈DCsupplyi
    • Dtotal=∑j∈regiondemandj

    Step 2: Proportional Allocation Constraints

    For each region j, you want the proportion of the total supply it receives (Xj/Stotal) to be as close as possible to its proportion of the total demand (demandj/Dtotal). This can be expressed as a constraint for each region. However, achieving exact proportions might not always be feasible, especially if the total supply is less than the total demand. In such cases, you can relax the constraints to aim for proportionality within the limits of available supply.

    Implementation

    To integrate this into your model, you could add constraints that minimize the deviation from these proportional targets. This would involve introducing new decision variables to represent the proportion of supply allocated to each region and setting the objective to minimize the sum of absolute deviations from the target proportions.

    Here is a conceptual overview of how this could be formulated:

    1. Define Proportion Variables: For each region j, define a variable that represents the proportion of the total supply allocated to that region.

    2. Add Proportional Allocation Constraints: For each region , add constraints to ensure is as close as possible to demandj/Dtotal, within the limits of the available supply.

    3. Objective Function: Adjust the objective function to minimize the sum of the absolute deviations from the target proportions, alongside your existing cost minimization goals. This may involve a trade-off parameter to balance cost minimization with fair distribution.

    This approach requires careful formulation to ensure the model remains linear (if that's a requirement) and might involve additional decision variables and constraints to capture the proportional allocation effectively. It's also essential to consider how this method aligns with your overall objectives and constraints.

    0
  • Michel Soares
    Thought Leader

    Hi Beatriz,

    The slack variable here is a new variable that means the difference between the supply/demand proportion of region I and J.

    Add constraint: (S_i is variable for the supply of region i, D_i is the constant for the demand of region i)
    S_i/D_i - S_j/D_j + slack_ij <= 0 for all i, j in regions

    In your examples:

    Scenario 1 Demand Fulfilment Slack Cost
    Region 1 100 100 0 0
    Region 2 200 200 0 0
    Region 3 300 0 300 3000
    Sum 600 300 300 3000
    0/300 - (100/100) + Slack_3,1 <= 0   -> Slack_3,1 = 1

    0/300 - (200/200) + Slack_3,1 <= 0   -> Slack_3,2 = 1

    All other slacks = 0. The sum of all slacks will be 2, which you will penalize in the objective function.

     

    Fair Share Scenario  Demand Fair-Share ratio Fulfilment Slack Cost
    Region 1 100 17% 50 50 500
    Region 2 200 33% 100 100 1000
    Region 3 300 50% 150 150 1500
    Sum 600 100% 300 300 3000
    Here, all slacks are zero. Example:
    (150/300) - (100/200) + Slack_3,2 <= 0   -> Slack_3,2 = 0

     

     

    0
  • Beatriz Torres Silva
    First Comment
    First Question

    Hi Michel,

    Thanks for your reply... I see what you mean, by applying the rationale it worked.

    The only thing is that in my current model I have discrete variables which are the lot sizes for transfer. From what I understood and applied from your suggestion, the slack is forced to be zero, but when I have lot sizes the Fulfilment (discrete) will not necessarily be equal to the Supply*Fair-Share ratio (continuous) and the slack may even be greater than zero.

    To solve this, I created two variables ('Slack 1' and 'Slack 2') that cannot be negative. As a constraint, the difference between these variables (Slack 1 - Slack 2) must be equal to the Fulfilment - Supply*Fair-Share ratio. In addition, the sum of the variables is part of the objective function, so that the Slack should be as small as possible. 

    Thanks for your support, it was very helpful!

    0

Please sign in to leave a comment.