Giter Club home page Giter Club logo

Comments (5)

acfogarty avatar acfogarty commented on July 4, 2024

The function optimize_baskets in https://github.com/dataforgoodfr/batch5_phenix_happymeal/blob/master/meal_balancer/algos_optimisation/milp_cvxpy_glpk.py already returns a json with the two camamberts (distribution of items allocated to balanced baskets and distribution of remaining items) and the keys "nb_balanced_meals", "nb_remaining_items", "pct_weight_allocated_items", "pct_weight_remaining_items" (see example https://data-for-good.slack.com/archives/CDJF42F28/p1548275012014100)

from batch5_phenix_happymeal.

acfogarty avatar acfogarty commented on July 4, 2024

(Yassi is working with this json as his input)

from batch5_phenix_happymeal.

acfogarty avatar acfogarty commented on July 4, 2024

To add the final balance_adjuster, we should

  • output from optimize_baskets a dataframe with all necessary info for balance_adjuster and the results dictionary for the two camemberts (as in https://data-for-good.slack.com/archives/CDJF42F28/p1548275012014100)

  • Then balance_adjuster can take the info in the dataframe and update the results dictionary with the data for the additional plot.

Note: we should remove from meal_balancer.algos_optimisation.postprocess_optimised_solution_for_ui the lines

with open(results_filename, 'w') as f:
    json.dump(results, f)

and output the json after balance_adjuster instead

from batch5_phenix_happymeal.

acfogarty avatar acfogarty commented on July 4, 2024

@frgfm je vais ouvrir une issue à part pour la partie 'se coordonner sur la sortie de optimize_baskets/entrée de balance_adjuster'

from batch5_phenix_happymeal.

acfogarty avatar acfogarty commented on July 4, 2024

Our code should return a stringified json, instead of writing the json to disk

from batch5_phenix_happymeal.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.