Comments (5)
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.
(Yassi is working with this json as his input)
from batch5_phenix_happymeal.
To add the final balance_adjuster, we should
-
output from
optimize_baskets
a dataframe with all necessary info forbalance_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.
@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.
Our code should return a stringified json, instead of writing the json to disk
from batch5_phenix_happymeal.
Related Issues (7)
- [OFF database] Make a docker container to access OFF
- [Grouping] Fix meal grouping algo HOT 1
- Synchronise output of optimize_baskets/input of balance_adjuster HOT 1
- Find long-term working solution for meal balancing algo
- Working example with input and output for Yassi HOT 1
- [get_foodGroupFromToDF] Add possibility to select group aggregation level
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from batch5_phenix_happymeal.