diff --git a/.travis.yml b/.travis.yml index 9941cac..5ad581b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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())' diff --git a/Project.toml b/Project.toml index 898b8f5..443a0c7 100644 --- a/Project.toml +++ b/Project.toml @@ -1,11 +1,8 @@ name = "StochDynamicProgramming" uuid = "f6024387-75e5-5fdf-b095-327b05c0905f" -authors = ["mrchaos "] -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" @@ -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"] diff --git a/README.md b/README.md index 6f02bf7..57a7c24 100644 --- a/README.md +++ b/README.md @@ -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] | [][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). diff --git a/test/runtests.jl b/test/runtests.jl index 7d89601..8658c34 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -8,7 +8,7 @@ using StochDynamicProgramming -using Clp, JuMP, Nullables #,Gurobi +using Clp, JuMP, Nullables using Printf using Statistics using Test