Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ julia:
- 1.4
notifications:
email: false

branches:
only:
- master
after_success:
# push coverage results to Coveralls
- julia -e 'using Pkg; cd(Pkg.dir("StochDynamicProgramming")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
Expand Down
12 changes: 6 additions & 6 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
name = "StochDynamicProgramming"
uuid = "f6024387-75e5-5fdf-b095-327b05c0905f"
authors = ["mrchaos <mrchaos@naver.com>"]
version = "0.5.0"
version = "0.6.0"

[deps]
Cbc = "9961bab8-2fa3-5c5a-9d89-47fab24efd76"
Clp = "e2554f3b-3117-50c0-817c-e040a3ddf72d"
CutPruners = "65d46eb8-70e9-5a30-bf48-2afa3a021b8f"
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
Expand All @@ -23,10 +20,13 @@ SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
julia = "^1.3.0"
julia = "^1.3"
JuMP = "0.21"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Cbc = "9961bab8-2fa3-5c5a-9d89-47fab24efd76"
Clp = "e2554f3b-3117-50c0-817c-e040a3ddf72d"

[targets]
test = ["Test"]
test = ["Test", "Cbc", "Clp"]
68 changes: 37 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,72 +1,78 @@
# StochDynamicProgramming


**WARNING:** *This package is currently in development. Any help or feedback is appreciated.*


**Latest release:** v0.5.0

| **Documentation** | **Build Status** | **Social** |
|:-----------------:|:----------------:|:----------:|
| | [![Build Status][build-img]][build-url] | [![Gitter][gitter-img]][gitter-url] |
| [![][docs-stable-img]][docs-stable-url] | [![Codecov branch][codecov-img]][codecov-url] | [<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/af/Discourse_logo.png/799px-Discourse_logo.png" width="64">][discourse-url] |



This is a Julia package for optimizing controlled stochastic dynamic system (in discrete time). It offers three methods of resolution :
This is a Julia package for optimizing controlled stochastic dynamic system,
in discrete time. It offers three methods of resolution :

- *Stochastic Dual Dynamic Programming* (SDDP) algorithm.
- *Extensive formulation*.
- *Stochastic Dynamic Programming*.

It is built on top of [JuMP](https://github.com/JuliaOpt/JuMP.jl).

StochDynamicProgramming asks the user to provide explicit the cost `c(t, x, u, w)` and
dynamics `f(t, x, u, w)` functions. Also, the package was developed back
in 2016, and some parts of its API are not idiomatic, in a Julia sense.
For other implementations of the SDDP algorithm in Julia, we advise to
have a look at these two packages:

* [SDDP.jl](https://github.com/odow/SDDP.jl)
* [StructDualDynProg.jl](https://github.com/JuliaStochOpt/StructDualDynProg.jl)



It is built upon [JuMP]
## What problems solves this package ?

## What problem can we solve with this package ?
StochDynamicProgramming targets problems with

- Stage-wise independent discrete noise
- Linear dynamics
- Linear or convex piecewise linear cost
- Linear or convex piecewise linear costs

Extension to non-linear formulation are under development.
Extension to more complex alea dependance are under developpment.

## Why Extensive formulation ?

### Why SDDP?

SDDP is a dynamic programming algorithm relying on cutting planes. The algorithm requires convexity
of the value function but does not discretize the state space. The complexity is linear in the
number of stage, and can accomodate higher dimension state spaces than standard dynamic programming.
The algorithm returns exact lower bound and estimated upper bound as well as approximate optimal
control strategies.

### Why Extensive formulation ?

An extensive formulation approach consists in representing the stochastic problem as a deterministic
one with more variable and call a standard deterministic solver. Mainly usable in a linear
one and then calling a standard deterministic solver. It is mainly usable in a linear
setting. Computational complexity is exponential in the number of stages.

## Why Stochastic Dynamic Programming ?
### Why Stochastic Dynamic Programming ?

Dynamic Programming is a standard tool to solve stochastic optimal control problem with
independent noise. The method require discretisation of the state space, and is exponential
in the dimension of the state space.
independent noise. The method requires discretizing the state space, and its
complexity is exponential in the dimension of the state space.

## Why SDDP?

SDDP is a dynamic programming algorithm relying on cutting planes. The algorithm require convexity
of the value function but does not discretize the state space. The complexity is linear in the
number of stage, and can accomodate higher dimension state than standard dynamic programming.
The algorithm return exact lower bound and estimated upper bound as well as approximate optimal
control strategies.

## Installation
Installing StochDynamicProgramming is an easy process.
Currently, the package depends upon `StochasticDualDynamicProgramming.jl`, which is not
yet registered in Julia's METADATA. To install the package,
open Julia and enter

StochDynamicProgramming is a registered Julia package.
To install the package, open Julia and enter

```julia
julia> Pkg.update()
julia> Pkg.add("StochDynamicProgramming")
julia> ]
pkg> add StochDynamicProgramming

```


## Usage

IJulia Notebooks will be provided to explain how this package work.
IJulia Notebooks are provided to explain how this package works.
A first example on a two dams valley [here](http://nbviewer.jupyter.org/github/leclere/StochDP-notebooks/blob/master/notebooks/damsvalley.ipynb).


Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


using StochDynamicProgramming
using Clp, JuMP, Nullables #,Gurobi
using Clp, JuMP, Nullables
using Printf
using Statistics
using Test
Expand Down