Coder Social home page Coder Social logo

jmejia8 / bilevelheuristics.jl Goto Github PK

View Code? Open in Web Editor NEW
11.0 4.0 1.0 287 KB

Metaheuristics for solving bilevel optimization problems.

Home Page: https://jmejia8.github.io/BilevelHeuristics.jl/dev/

License: MIT License

Julia 100.00%
bilevel-optimization evolutionary-algorithms metaheuristics

bilevelheuristics.jl's Introduction

BilevelHeuristics.jl

This package implements different heuristic and metaheuristic algorithms for Bilevel Optimization (BO).

Build Status

BilevelHeuristics.jl is still in early development so please send feedback or open issues.

Installation

Open the Julia REPL (Julia 1.6 or later) and press ] to open the Pkg prompt. To add this package, use the add command:

Type ]

pkg> add BilevelHeuristics

Or, equivalently, via the Pkg API:

julia> import Pkg; Pkg.add("BilevelHeuristics")

Algorithms

Current implemented Bilevel Metaheuristics include:

  • BCA: Bilevel Centers Algorithm
  • QBCA: BCA with a lower-level Quasi-Newton optimization method.
  • QBCA2: Improved QBCA (implements conditions to avoid pseudo-feasible solutions)
  • SABO: Surrogate-assisted Bilevel Optimization.
  • SMS-MOBO: S-metic-selection-based Multi-objective Bilevel Optimization.
  • BLEMO: Bilevel Evolutionary Multi-objective Optimization

Example

The following example illustrates the usage of BilevelHeuristics.jl. Here, BCA is used, but this example works for the other optimizers.

Defining objective functions corresponding to the BO problem.

Upper level (leader problem):

using BilevelHeuristics

F(x, y) = sum(x.^2) + sum(y.^2)
bounds_ul = [-ones(5) ones(5)] 

Lower level (follower problem):

f(x, y) = sum((x - y).^2) + y[1]^2
bounds_ll = [-ones(5) ones(5)];

Approximate solution:

res = optimize(F, f, bounds_ul, bounds_ll, BCA())

Output:

+=========== RESULT ==========+
  iteration: 108
    minimum: 
          F: 4.03387e-10
          f: 2.94824e-10
  minimizer: 
          x: [-1.1460768817533927e-5, 7.231706879604178e-6, 3.818596951258517e-6, 2.294324313691869e-6, 1.8770952450067828e-6]
          y: [1.998748659975197e-6, 9.479307908087866e-6, 6.180041276047425e-6, -7.642051857319683e-6, 2.434166021682429e-6]
    F calls: 2503
    f calls: 5062617
    Message: Stopped due UL function evaluations limitations. 
 total time: 26.8142 s
+============================+
x, y = minimizer(res) # upper (x) and lower (y) level decision vectors
Fmin, fmin = minimum(res) # upper and lower objective values.

TO DO

  • Parallelize the lower-level optimization procedures.

bilevelheuristics.jl's People

Contributors

jmejia8 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

jeffreysarnoff

bilevelheuristics.jl's Issues

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

BLEMO

If there is an example for bilevel multi-objective problem with constrained conditon using BLEMO algorithm.

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.