*********************** API documentation *********************** .. toctree:: :maxdepth: 3 MPC =========== This part contains implementation of model predictive control. Main code ------------ `The main code `_ for MPC uses cvxpy and Gurobi solver to solve the problem as a convex optimization problem, several versions of the MPC code are used for solve problem in different scenarios like hourly price and Net metering. .. automodule:: MPC.MPC2 :members: :undoc-members: :show-inheritance: Create hourly price ----------------------- `Create hourly price `_ changes unix time to UTC time and generate a hourly price table .. automodule:: MPC.create_hourly_price_table :members: :undoc-members: :show-inheritance: Create TOU price --------------------- `Create TOU price table `_ creates a TOU price table for a year, so it can be used loaded as matrix in the solver. RL =========== Implementation of Reinforcement Learning method A2C ------ `A2C `_ Implementation of Actor Critic method which will genetrate the stratgy given states and reward. .. automodule:: RL.solar_a2c_nonlinear :members: :undoc-members: :show-inheritance: Environment --------------- `Environment `_ Formulate the problem into MDP environment, contains features of reset initialize states, calulate reward of a given states, and simulate next states. .. automodule:: RL.environment :members: :undoc-members: :show-inheritance: Baseline ============== Contains different rule based baselines for different scenarios. No solar panel -------------------- `Get no solar `_ Get baseline strategy for no solar and no batery installed. .. automodule:: Baseline.get_nosolar :members: :undoc-members: :show-inheritance: No battery ------------- `Get no battery `_ Get baseline strategy for no battery installed and with solar installed. .. automodule:: Baseline.get_nostorage :members: :undoc-members: :show-inheritance: Rule based policy -------------------- `Get RBC `_ Get a baseline strategy based on rule based TOU price. .. automodule:: Baseline.get_rbc :members: :undoc-members: :show-inheritance: These three implementations will call assocaited environments developed for these different scenarios. DLC ========== Contains implementation of direct mapping method. Mapping -------------- `Mapping `_ Mapping from avaiable features of each time slots to optimal actions solved by the solver and oracle data. Training neural network --------------------------- .. automodule:: DLC.tune :members: :undoc-members: :show-inheritance: