becooless's People
becooless's Issues
[core] Add category-wise one-hot constraints for optimal price
Observe the unexpected behavior reported by @saksham36:
For
“location”: “Rewe”
,“shopping_list”: {“bananas”: 4, “beef”: 2, “carrot”:3}
, the optimal price is{"price": 13.95, "carbon": 108.24}
, but optimal CO2 is{"bio banana": {"amount": 4, "price": 3.0, "carbon": 36.0}, "beef": {"amount": 2, "price": 5.98, "carbon": 58.0}, "carrot": {"amount": 3, "price": 4.47, "carbon": 0.24}, "price": 13.45, "carbon": 94.24}
.
In this particular setting, the CO2-optimized price is actually lower than the price-optimized price; clearly not what we want.
This is likely cause by the convergence criteria in the optimizer and can be improved by integrating one-hot constraints for the amount
vectors for each category (for cheapest price, just buy the cheapest product in each category).
An outer-loop hotfix could be to run price and CO2 optimization, but if the price of CO2 is lower, then also use this solution as cheapest.
[core] Initialize CO2 optimization with optimal price solution
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.