GithubHelp home page GithubHelp logo

Comments (7)

bwigianto avatar bwigianto commented on August 11, 2024

Good thoughts! One complication I can think of is that different companies have different cutoffs for their usage tiers. Some use 1000kWh, 1250kWh, others 1500kWh. And they keep changing it. We could parameterize that, but then I could imagine the retailer adding an additional tier.
The main reason I made the logic of the existing functions really simple is to learn and classify different kinds of plans before coming up with a generic model. The retailers' goal is to make coming up with this generic model very difficult if not impossible

from powertochoose.

monkeywithacupcake avatar monkeywithacupcake commented on August 11, 2024

I agree that it is complicated, that is why I thought the tier's would be set for each one, so maybe the class could have any number of tiers/rates? This is already defined to allow for different cutoffs for each one, so even with the TDU class defined as above, we could have something like:

infuse3 = TDU('infuse_3', 'abc123-10abcd-ef', '10',
            rate(500, '(.05)*(x-500)'), 
            rate(1500, '(.05)*(x-1500)'), 
            rate(2500, '(.10)*(x-2500)'))
infuse6 = TDU('infuse_6', 'abc123-10abcxxd-ef', '100',
            rate(500, '(.05)*(x-500)'), 
            rate(1500, '(.07)*(x-1000)'), 
            rate(2500, '(.03)*(x-1900)'))
other_co_other_rate = TDU('other_co_other_rate', 'sss123-10abcd-ef', '200',
            rate(999, '(.05)*(x)'), 
            rate(1400, '(.07)*(x-999)'), 
            rate(2000, '(.07)*(500) + (.03)*(x-1400)'))

from powertochoose.

monkeywithacupcake avatar monkeywithacupcake commented on August 11, 2024

I guess the class should include a url (to the fact sheet) and perhaps the company name separate. That way, it would be easier to pull out all the ones that belong in groups and produce usable data?

from powertochoose.

bwigianto avatar bwigianto commented on August 11, 2024

Sorry, you're right, I wasn't looking at that closely. What's the proper way for a plan with only two tiers?
image

from powertochoose.

monkeywithacupcake avatar monkeywithacupcake commented on August 11, 2024

I just made a PR with a setup classes. It would look like this:

example = Offer('example_name', 'utility', 'some tariff ref','url.com', '100',
            [Tier(0, 'base'), # or 0, I'm not sure without rest of context, doubt "free"
            Tier(1000, '100 + (.13)*(x-1000)')])

from powertochoose.

monkeywithacupcake avatar monkeywithacupcake commented on August 11, 2024

Same link from the PR for setup class, but I think it may help this discussion: This is a playground showing how the Offer class works. https://code.sololearn.com/cAo2FlACcLpq/#py

from powertochoose.

monkeywithacupcake avatar monkeywithacupcake commented on August 11, 2024

I'm closing this because there is a separate PR and discussion. That way, we can keep the discussion in one place.

from powertochoose.

Related Issues (8)

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.