Giter Site home page Giter Site logo

somenergia-generationkwh's Introduction

somenergia-generationkwh

OpenERP module and library to manage Som Energia's Generation kWh

CI som_generationkwh Coverage Status

Generation kWh is a campaign to design a feasible alternative to electricity self-production in the Spanish market. Spanish market legislation has been designed in a way quite hostile towards distributed renewable energies and user self-production and we propose collective self-production as a formula that still fits in the market.

The goal of the campaign is to collect investment from cooperative members for new renewable production projects. Investors don't get an interest rate in exchange for their investment but the right to use kWh produced in such plants at cost price, instead of the price derived from the official auction. Official auction use a marginalist method so that the inclusion in the mix of expensive fossil sources, raises final prices to be paid for every source, even cheaper renewable sources.

This package holds the business logic to handle the use rights coming from the production plants related to this campaing and transfer them to user invoices.

Dependencies

In Debian/Ubuntu

$ sudo apt-get build-dep python-numpy

Testing

nosetests generationkwh # for unittests
nosetests som_generationkwh/test # for functional/erp, requires running local erp
dodestral -m som_generationkwh # for destral tests, without production database either running local erp

CHANGES

2.5.7 2020-01-29

  • PR #8 Added logic to model 193 lines wizard

2.5.6 2020-01-15

  • CreateFromForm: Can create Aportacions

2.5.5 2019-12-16

  • genkwh_mtc curve new option --by, to aggregate the matrix in different ways.
    • dayhour: values for every hour for each day (the old one)
    • day: just the dayly accomulated
    • monthhour: values summated each month for each hour
    • month: just the monthly accomulated
  • Rights granter: logs now include input and output remainder
  • scriptlaucher: more scripts and options
  • genkwh_plants: safe unicode for pipes
  • Regression: Python 3 compatibility for the generationkwh module
  • New model generationkwh.emission to create new investment campaigns

2.5.4 2019-07-19

Production rewrite release

  • Simplifications due to plantmeter functionality externalized to gisce
    • ProductionLoader renamed as RightsGranter
    • Tests fill production directly instead using csv's plugins
    • Removed som_generation.RightsGranter.retrieveMeasuresFromPlants
    • Removed som_generation.RightsGranter.endPoint
    • Removed som_generation.ProductionAggregatorProvider.getNShares
  • genkwh_reminders new subcommands pop and update
  • genkwh_productionloader recompute subcommand to be able to recompute rights respecting existing ones if something weird happens (ex. you have been reading from the wrong plant for a while)
  • A new mongo collection rightscorrection used to track the divergences from the rights curve that should be expected given the production when you apply recompute.
  • Added scriptlauncher file to remotely launch commands of interest
  • added parameter lastDateToCompute to RightsGranter.computeAvailableRights

2.5.3 2019-06-17

  • MOD: Add IRPF retention to amortization and divestment invoices
  • MOD: Change profint formula to avoid 3rd decimal

2.5.2 2019-05-13

  • MOD: Add profit amount in Generationwkh invoice line

2.5.1 2019-04-29

  • FIX: Change date type in Investment.create_from_transfer
  • genkwh_reminders has a new active subcommand to list just active
  • genkwh_reminders subcommand listactive renamed to listall which is what it does
  • Install scripts: genkwh_reminders, genkwh_productionloader, genkwh_curve, genkwh_rights, genkwh_usage

2.5.0 2019-04-02

  • Multiple plants supported
  • LayeredShareCurve: Generalized additive constant curve from MemberShareCurve for PlantShareCurve

2.4.1

  • Fix: Error calling notification function on default assignments
  • calculate_irpf_generation.py: New script to compute the IRPF tax retention

2.4.0

  • API for the OV to list investments and assignments for a member
    • ResPartner.www_generationkwh_assignments(partner_id)
    • ResPartner.www_generationkwh_investments(partner_id)
  • New verbose list command genkwh_investment ls
  • Python3 compatibility on the python module (not yet the erp one)
  • Travis coverage
  • Overall test desfragilization
  • Investment.create_from_transfer returns just the new id, not also the old one

somenergia-generationkwh's People

Contributors

vokimon avatar oriolpiera avatar susu105 avatar franciscocubero avatar cesarlr avatar proig avatar marjene avatar tinogis avatar albertorasillo avatar anxodio avatar pedropote avatar pauboixsom avatar maritesomenergia avatar abbse avatar polmonso avatar xavierteres avatar egarciadiaz avatar losimo avatar somenergia-it avatar somenergia-et avatar eberloso avatar juan-pe avatar abadiabosch avatar

Stargazers

 avatar Oriol Piera avatar

Watchers

 avatar James Cloos avatar javikalsan avatar  avatar Roger avatar Dani Estanyol avatar Med Said BARA avatar Daniel Quilez avatar  avatar  avatar Diego Quintana avatar Kostas Georgiou avatar  avatar David Muñoz Novoa avatar  avatar  avatar

somenergia-generationkwh's Issues

Plant time refers to metering times not period start, causes 1h offset

We have been wrongly interpreting that the time of the production coming from the plants (say 15h), was the time of the start of the provided production (ie 3kWh) so, "3kWh were produced from 15h to 16h". But it refers to the time of the metering where the production was derived from, so indeed that time it is the end of the interval: "At 15h we metered 45kWh that taken from the 42kWh at 14h gives a production of 3kWh from 14h to 15h"

The overall effect is that production is saved one hour later than it should be.

Time curves padding in libfacturacioatr is always at the end, not moving to the beggining in winter after DLS

We thought that 25 hours libfacturacioatr time curves were padded to keep the bins at the same sun related time along the year and programmed all the time curves stuff according to that principle. But now we realized we were wrong and libfacturacioatr always pads at the end.

This bug has no effect in summer time but must be solved before winter time comes or we will have an additional hour shift.

Canvis IRPF

S'han de realitzar els següents canvis al mòdul de Generationkwh per poder regularitzar l'IRPF. Ha de fer el següent:

  • Moment A (varis cops l'any): En el moment de crear la factura, ens hem de guardar cada "estalvi generation" o la "retenció" de cada "inversió" en algun lloc. (poden venir de N inversions)
  • Moment B (cada 20/01 amb info del 31/12): En el moment de pagar a Hisenda, hem de sumar totes les retencions "d'estalvi generation" de l'any natural de cada persona inversora (pot tenir N inversions)
  • Moment C (un cop any segons data inversió): En el moment de fer la factura d'amortització, hem d'agafar les "retencions" aplicables a cada inversió (no podem fer per Partner perquè cada partner pot tenir més d'una inversió).

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.