Code Monkey home page Code Monkey logo

microgrid's Introduction

Micro grid

This git is related to a study on reward function for reinforcement learning for a micro-grid.

Files

env

final_env

The last environment used. it inherits from the gym Env class. Our environment contains information stored in a dictionary. It contains everything that is in _init_dict:

  • "flow_H2"
  • "flow_lithium"
  • "lack_energy"
  • "waste_energy"
  • "soc"
  • "buy_energy"
  • "sell_energy"

As you can see, all parameter names used must be in lower case and with a unique name if you want to modify the environment. You will also have to normalize your values in _normalize_value method.

To add reward functions to your environment, you can use

add_reward(key, fn, coeff=1.)

The data is stored and retrievable from

get_data()

genetic

This folder contains the useful files for the genetic algorithm and the Map-Elites.

ga

Contains the functions for the genetic algorithm.

mapelites

Contains the funtions for Map-Elites.

test_me

This is the place where you can run reward function tests. The places you have to modify are :

  • function in creat_lfn (Not _set_fn and _get_mean but below)

    • exemple (lfn and lcut is created before)
    isNeg = True
    min_val= -1
    max_val = 0
    
    # function name must start with a capital letter and be unique
    lname.append("Name_exemple")  
    fn, cut = _set_fn(lambda x: -x["buy_energy"], lres_reset, isNeg, min_val, max_val, nb_cut)  
    #or 
    fn, cut = _set_fn(lambda x, f=my_fn: f(x), lres_reset, isNeg, min_val, max_val, nb_cut)
    lfn.append(fn)  
    lcut.append(cut)
    
  • "values has initialized" part in main loop

microgrid's People

Contributors

axelfoltyn avatar

Stargazers

Shubham Pachori avatar

Watchers

 avatar

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.