sertalpbilal / FPL-Optimization-Tools

A collection of tutorials and recipes to use optimization for winning Fantasy Premier League :)
Apache License 2.0
129 stars 45 forks source link

Add booked transfer constraints #5

Closed goktugerce closed 2 years ago

goktugerce commented 2 years ago

This PR adds booked transfer constraints in case a person wants to buy or sell a specific player in a given game week.

As an example, you can have this in the regular_settings.json file:

"booked_transfers": [
    {
      "gw": 33,
      "transfer_in": 579
    },
    {
      "gw": 32,
      "transfer_in": 591
    },
    {
      "gw": 34,
      "transfer_out": 233
    }
]

Which means you are forcing the optimizer to buy Rondon in GW32 and Ronaldo in GW33 and sell Salah in GW34.