Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
136 lines (122 sloc) 6.49 KB
---
title: Constraint satisfaction solver (Java™, Open Source)
layout: base
priority: 1.0
change_frequency: weekly
---
.row
.col-md-7
%div(style="margin-bottom: 10px")
:asciidoc
# What is OptaPlanner?
OptaPlanner is *a constraint solver.*
It optimizes business resource planning use cases,
such as link:learn/useCases/vehicleRoutingProblem.html[Vehicle Routing],
link:learn/useCases/employeeRostering.html[Employee Rostering],
link:learn/useCases/cloudOptimization.html[Cloud Optimization],
link:learn/useCases/taskAssignmentOptimization.html[Task Assignment],
Job Scheduling, Bin Packing and link:learn/useCases/[many more].
Every organization faces such scheduling puzzles:
assign a limited set of _constrained_ resources (employees, assets, time and money)
to provide products or services.
OptaPlanner delivers more efficient plans to improve service quality and reduce costs.
OptaPlanner is *a lightweight, embeddable planning engine*.
It enables normal Java™ programmers to solve optimization problems efficiently.
It is also compatible with other JVM languages (such as Kotlin and Scala).
Constraints apply on plain domain objects and can reuse existing code.
There's no need to input them as mathematical equations.
Under the hood, OptaPlanner combines sophisticated optimization heuristics and metaheuristics
(such as Tabu Search, Simulated Annealing and Late Acceptance) with very efficient score calculation.
OptaPlanner is *open source software*, released under link:code/license.html[the Apache Software License].
It is written in 100% pure Java™, runs on any JVM and is available in link:download/download.html[the Maven Central repository] too.
= partial('flags.html.haml', :outputPage => page)
.col-md-5
%div(style="margin-top: 10px;")
= partial('downloadJumbotron.html.haml', :outputPage => page)
= partial('documentationJumbotron.html.haml', :outputPage => page)
.jumbotron.pagination-centered(style="padding: 10px; margin-bottom: 20px;")
%ul.nav.nav-justified.frontPageCarouselButtons#whatIsCarouselButtons
%li.active(data-target="#whatIsCarousel" data-slide-to="0")
%a(href="#" data-toggle="tab") Video
%li(data-target="#whatIsCarousel" data-slide-to="1")
%a(href="#" data-toggle="tab") Use cases
%li(data-target="#whatIsCarousel" data-slide-to="2")
%a(href="#" data-toggle="tab") Usage
%li(data-target="#whatIsCarousel" data-slide-to="3")
%a(href="#" data-toggle="tab") Integration
%li(data-target="#whatIsCarousel" data-slide-to="4")
%a(href="#" data-toggle="tab") Compatibility
%li(data-target="#whatIsCarousel" data-slide-to="5")
%a(href="#" data-toggle="tab") Scalability
.carousel.slide.frontPageCarousel#whatIsCarousel(data-ride="carousel" data-interval="false" style="background-color: white;")
-#.carousel-inner(style="align: center;")
.carousel-inner
.item.active
%div(style="min-width: 800px; min-height: 600px; text-align: center; padding-top: 75px;")
%iframe(width="800" height="450" src="https://www.youtube.com/embed/f4jIWbQpjdE?rel=0" frameborder="0" allowfullscreen)
.item
%img(src="landingPage/useCaseOverview.png" alt="Use case overview" width="800" height="600")
.item
%img(src="landingPage/inputOutputOverview.png" alt="Usage" width="800" height="600")
.item
%img(src="landingPage/integrationOverview.png" alt="Integration" width="800" height="600")
.item
%img(src="landingPage/compatibility.png" alt="Compatibility" width="800" height="600")
.item
%img(src="landingPage/scalabilityOfOptimizationAlgorithms.png" alt="Scalability" width="800" height="600")
%a.left.carousel-control(href="#whatIsCarousel" data-slide="prev")
%span.glyphicon.glyphicon-chevron-left
%a.right.carousel-control(href="#whatIsCarousel" data-slide="next")
%span.glyphicon.glyphicon-chevron-right
.jumbotron.pagination-centered(style="padding: 10px; margin-bottom: 20px;")
%ul.nav.nav-justified.frontPageCarouselButtons#projectsCarouselButtons
%li.active(data-target="#projectsCarousel" data-slide-to="0")
%a(href="#" data-toggle="tab") OptaPlanner Engine
%li(data-target="#projectsCarousel" data-slide-to="1")
%a(href="#" data-toggle="tab") Workbench
%li(data-target="#projectsCarousel" data-slide-to="2")
%a(href="#" data-toggle="tab") Execution Server
.carousel.slide.frontPageCarousel#projectsCarousel(data-ride="carousel" data-interval="false" style="background-color: white;")
.carousel-inner
.item.active
%div(class="horizontal-center" style="height: 450px;")
%div(class="vertical-center")
:asciidoc
To optimize a problem from Java™ code,
add the `optaplanner-core` jar and call `Solver.solve()`:
[source,java]
----
// My domain specific class as input
MyRoster problem = ...;
SolverFactory<MyRoster> factory = SolverFactory
.createFromXmlResource(".../mySolverConfig.xml");
Solver<MyRoster> solver = factory.buildSolver();
// My domain specific class as output
MyRoster solution = solver.solve(problem);
for (MyShift shift : solution.getShifts()) {
// Each shift is now assigned to an employee
assertNotNull(shift.getEmployee());
}
----
.item
%div(class="horizontal-center" style="height: 450px")
%div(class="vertical-center")
:asciidoc
Define constraints and configure the Solver in a user-friendly way
using the Workbench.
%img(src="landingPage/workbenchSolverConfig.png")
.item
%div(class="horizontal-center" style="height: 450px")
%div(class="vertical-center" )
%img(src="blog/2015/10/01/optaplannerWorkbenchAndExecutionServer.png")
%a.left.carousel-control(href="#projectsCarousel" data-slide="prev")
%span.glyphicon.glyphicon-chevron-left
%a.right.carousel-control(href="#projectsCarousel" data-slide="next")
%span.glyphicon.glyphicon-chevron-right
.row
.col-md-5
= partial('latestBlogPosts.html.haml', :outputPage => page)
.col-md-2
= partial('latestReleases.html.haml', :outputPage => page)
.col-md-5
= partial('events.html.haml', :outputPage => page)