Title: iOpt Intelligent Optimisation Toolkit
1iOptIntelligent Optimisation Toolkit
C. Voudouris, R. Dorne, A. Liret, C. Ladde, P.
Mills Intelligent Enterprise Technologies, Intelli
gent Systems Lab., BT Exact
2Outline
- iOpt
- iSchedule
- Conclusion
3iOpt Toolkit for Heuristic Search Methods
Application-Specific Frameworks
iOpt
Toolkit
Heuristic Search Framework
Algorithm Visualisation
Problem Modelling Framework
Problem Visualisation
Invariant Library
Invariant Visualisation
- iOpt Main Features
- Java-based system
- Uses one-way constraints for problem modelling
- Incorporates general specialised frameworks
for building problem models - Allows the user to build a HS method using a
library of algorithmic parts - Independence between problem modelling and
problem solving - Visualisation components available for problem
models/algorithms
4Invariant Library (IL)
- Declarative programming paradigm with the Java
OO language - Invariants are one-way functional constraints
- u F(p0,p1,,pn)
- F, a function (Type(pi))n1 ? Type(u)
- A predicate is a Boolean function.
- x ? y z, a ? min(b, c)
- Specialised mark/sweep algorithm
- Very useful to quickly test and undo variable
assignments - The Invariant Manager efficiently evaluates the
consequences of value changes in a network. - Design patterns compliance (Memento, Observer,
Composite, Builder, Listener)
input1
input0
inputn
...
Invariant F
output
u
5Constraint Satisfaction Algorithm
Mark Stage
- Two phase constraint satisfaction algorithm
- mark
- evaluate
- During the mark phase all influenced invariants
are marked for evaluation - During the evaluation phase all/some marked
invariants are evaluated - Lazy/eager evaluation modes
- Smart rules for deciding if an invariant requires
re-evaluation - Incremental updates for aggregate invariants
(e.g. sum, prod) - User-defined invariant priorities
- Ability to interrupt the evaluate phase based on
user-defined conditions (e.g. constraint
violations).
Influenced (i.e. out of date)
Modified
Evaluate Stage
Influenced
Modified
Evaluated
Unnecessarily Evaluated
Affected
6Problem Modelling Framework (PMF)
- Foundation framework for modelling Combinatorial
Optimisation Problems - User specifies a COP (X,D,C,F)
- X Decision variables with/without domains
- D value domains
- C Constraints over X
- F Objectives
- PMF concepts
- Variable source invariant with backup facility
- Domain support structure for modifying a set of
values - Constraint Boolean invariant
- Objective Real invariant expression of X and C
- Problem handler for the model
Problem Model
Solutions
D. Variables
Constraints
Objective
User
Invariant Network
- Basis for domain frameworks (e.g. Scheduling)
or specific problem models
7Code example Problem model for Frequency
Assignment
- IntegerDomainVar X new IntegerDomainVarnbAnte
nnas - BooleanExp C new BooleanExpnbConstraints
nbEdges - beginModelChanges()
- // create decision variables with value domain
0..f - for(int i0iltnbAntennasi)
- addDecisionVar(Xi new IntegerDomainVar("0-gt''
f"")) - // create constraints
- for(int i0ilt nbEdgesi)
- addConstraint(Ci Inv.neq(Xedges0i,Xedge
s1i)) - // add objective
- addObjective(Inv.toReal(Inv.minus(nbConstraints,In
v.sum(C)))) - endModelChanges()
8Heuristic Search Framework
- Functionality of common HS algorithms is broken
down into Parts (i.e. Search Components) - Part Categories are represented by Java
Interfaces while specific Parts are defined as
Java Classes implementing these interfaces - A HS algorithm is assembled from parts which form
a tree. Valid trees can be executed on a problem
model - The framework can model single solution/population
methods as well as hybrids of the two. - Challenge find a good characterisation of
concepts found within Meta-Heuristic Search
methods
9Heuristic Solution
- Two types of solution representations
- Vector of objects (decision variables)
- Set of sequences of objects
- Default moves and neighbourhoods based on
- Value assignment to an object (decision variable)
- random, all values, all pairs (X,V)
- swap values
- Change of position of an object
- Move an object randomly, all positions, all
pairs (P1,P2) - Swap two objects randomly, all positions, all
pairs (P1,P2)
10Search Component for Local Search Methods
SearchComponent
SingleSolutionMethod
Neighborhood
NeighborhoodSearch
Selector
CompositeNeighborhoodSearch
CompositeSingleSolutionMethod
CompositeNeighborhood
DecisionVariableSelector
SingleNeighborhoodSearch
GenerationSingleSolutionMethod
ValueSelector
SwapMoveNeighborhood
BestImprovement
LocalSearch
PositionSelector
AssignMoveNeighborhood
BestMove
SearchRestart
InsertMoveNeighborhood
DecisionVariableValueSelector
CircularFirstImprovement
PerturbationSolutionMethod
DecisionVariablePositionSelector
FirstImprovement
Options Random_order Index_order Sorted_Order
FirstLegalMove
RestartFirstImprovement
ThresholdNeighborhoodSearch
InvariantSimulatedAnnealing
11Algorithm Hill climbing
12Algorithm Simulated Annealing
13Algorithm Tabu Search
14Generic Hybrid GATS for Frequency Assignment
PopulationHeuristicSearch
CompositePopulationMethod
CompositePopulationMethod
GenerationPopulationMethod
MutationPopulationMethod
CrossoverPopulation Method
FAPConstructiveGeneration
SelectionPopulationMethod
SingleSolutionMethodMutation
FAPCrossover
SUSSelection
LocalSearch
Tabu Search Subtree
BestMoveNeighbourhoodSearch
FAPNeighbourhood
DomainAssignmentTabu
15Code example hill climbing 1/2
- // right branch initial generation
- GenerationSingleSolutionMethod myRSSG new
VectorSolutionRandomGeneration() - // left branch local search
- // neighborhood
- AssignMoveNeighborhood myNeighborhood new
AssignMoveNeighborhood() - DecisionVariableIndexSelector decisionVariableSele
ctor new DecisionVariableIndexSelector() - decisionVariableSelector.setMovesVersion(Selector.
RANDOM_ORDER) - ValueIndexSelector valueIndexSelector new
ValueIndexSelector() - valueIndexSelector.setMovesVersion(Selector.RANDOM
_ORDER) - myNeighborhood.add(decisionVariableSelector)
- myNeighborhood.add(valueIndexSelector)
- // neighborhood search
- BestMoveNeighborhoodSearch myRMNS new
BestMoveNeighborhoodSearch() - myRMNS.setNeighborhood(myNeighborhood)
16Code example hill climbing 2/2
- // local search
- LocalSearch myLS new LocalSearch()
- myLS.setNeighborhoodSearch(myRMNS)
- myLS.setThreshold(0.0)
- // connect the two branches
- CompositeSingleSolutionMethod myCSSM1 new
CompositeSingleSolutionMethod() - myCSSM1.setMaxIterations(1)
- myCSSM1.addMethod(myRSSG)
- myCSSM1.addMethod(myLS)
- // root of the algorithm
- SingleSolutionHeuristicSearch mySSHS new
SingleSolutionHeuristicSearch() - mySSHS.setSingleSolutionMethod(myCSSM1)
- mySSHS.setSearchTitle("Hill Climber")
- mySSHS.setMinimisation(true)
- mySSHS.setInfeasibilityAllowed(true)
- mySSHS.setPrintLevel(Global.HS_LEVEL3Global.HS_LE
VEL4)
17Other features of HSF
- Objective Function
- Support dynamic modification of the objective
function (GLS) - Several objective functions in a same algorithm
(MinimiseConflictsLocalSearch) - Personal objective function
- Support Evaluator evaluation by simulation
- Delta matrix facility
- Flexibility
- Several algorithms linked together
- Minimisation/Maximisation
- Feasible/Infeasible search space
- Stopping conditions at search component level
- Integration of specific treatments within an
algorithm
18iOpts Visual ToolsA. Problem VisualisationB.
Algorithm Visualisation/Monitoring C. Heuristic
Search Builder
19Problem Model Visualisation
20Algorithm Visualisation
- Set-up
- Set Search Component parameters
- Run several Heuristic Searches in a row
21Algorithm Monitoring
- Control
- Behaviour of the algorithm
- gt Heuristic Search debugger/configurator
22The Case for Heuristic Search Builder
- NFL theorem (Walpert Mac ready 95)
- Reuse metaheuristics and HSF framework
- Easily adapt existing/quickly create new
algorithms - Avoid the need to understand HSF architecture
- Objective No need to type a single line of code
23Defining Heuristic Search Builder
- Visual tool to fully build an algorithm
- Database of algorithmic parts
- Drag-and-drop components to build algorithm
- XML facility to load/save (partial) algorithm
- Not a compiler but follow an MVC approach
24Heuristic Search Builder - Configuration
Parameters table
Search components table
Menu bar
Current heuristic search
Validity check
Variables table
25Heuristic Search Builder - Composition
26HSB/HSF Communities
- Inter- or intra-organization Lab./Company
Algorithmic Parts Database (Java code)
HSB
Developers
Users
- search algorithms/parts databases
- exchange of java code/XML files via email, web
server,
Algorithms Database (XML files)
27Experiments Graph Coloring instances
1 Dorne Hao 98, Galinier Hao 98, Morgenstern
96. 2 Michel Van Hentenryck 98.
28iSchedule Intelligent Scheduling Framework
29Introduction to iSchedule
- Framework dedicated to Scheduling
- Synthesis of expertise in Scheduling problems
- Vehicle Routing
- Job Shop Scheduling
- Workforce Scheduling
- NG-Dynamic Scheduler (Work manager)
- Fully based on iOpt technology
- Problem Model based on PMF
- Algorithms based on HSF/CSF
- High level Framework
- Resource, task, time window, timeline,
- gt Schedules tasks allocation to resources
30iSchedule Architecture for VRP
Modelling
Solving
VRP solution
Extensions for VRP Modelling
Specific parts for VRP Algorithms
iSchedule
Schedule Modelling Framework
Scheduling Algorithms
Heuristic Search Framework
Problem Modelling Framework
iOpt
Invariant Library
31Scheduling Framework (iSchedule)
- Incorporates classes for modelling scheduling
problems with unary resources - Extension/Specialisation of the Problem Modelling
Framework - Classes included are
- Task,
- Resource,
- Break,
- Start/End Activities and others
- Support for dynamic scheduling problems
- Addition/deletion of tasks/resources/time windows
etc. - Event notifications of changes allow to define
dynamic scheduling meta-strategies - Models developed using SF
- VRP, JSSP, WSP
32Timelines
- Activity interactions with the timelines
- adds/removes/requires capabilities
- requires/produces state
- requires capacity (pos. or neg.)
- Resource constraints on the timelines
- essential/possible capabilities
- minimum/maximum capacity
- possible states
State Timeline
Warm Oven
Hot Oven
Heat Oven
Bake Pastries A
Bake Pastries B
Capacity Timeline
max
Capability Timeline
min
Task A
Task B
Skill A
Essential Skills
Possible Skills
Skill B
Skill C
Skill D
Pick up Tool
Return tool
Task which requires tool
33Task Constraints
cost
- Task Time Windows
- ends/starts at
- ends/starts between
- ends/starts between with a target time
- Task Precedence Relations
- Task A ends/starts after end/start Task B
- Task A ends/starts after end/start Task B with
delay - Parallel Tasks
- Task A and B start together/within a time limit
- Task Resource Relations
- same/different resource
lst
est
tst
Task
Task A
Task B
t
Task A
Task B
Task A
Task B
34Other Modelling Facilities 1/2
- Predefined Objectives
- unallocated tasks (QoS)
- task delays (QoS)
- overtime (Cost)
- fixed cost for using resource (Cost)
- fixed cost for using specific resource for
- specific activity (QoS/Cost)
- specific travel (QoS/Cost)
- travel/setup time based costs (Cost)
- service time based costs (Cost)
35Other Modelling Facilities 2/2
- User-Defined Service Model
- Resource - Task compatibility,
- Fixed/Variable service costs,
- Service Duration
- User-Defined Setup (i.e. Travel) Model
- Resource - Route compatibility,
- Fixed/Variable travel costs,
- Travel Duration
36Algorithms Facilities
Heuristic Search Framework
Heuristic Search
Heuristic Solution SchedulingSolution
Heuristic Problem HP_Schedule
iSchedule Framework
External Company Framework...
- fitness value, feasibility, incremental updates,
- flexibility, schedule change (insert task, swap
tasks, )
37Algorithm Facilities 1/2
- Solution representation
- Set of sequences
- Neighbourhood
- Generic from iOpt insert, swap tasks
- Specific to iSchedule (cf. next slide)
- Meta-heuristics and other components from iOpt
- Simulated Annealing, GAs, tabu search,
- Best move, First/Best improvement
38Algorithm facilities 2/2
39Algorithm Hill climbing
HP_Schedule (HP)
Optimised Heuristic Solution
Single Solution Heuristic Search
Composite Single Solution Method
Schedule Constructive Generation
Local Search
(HP HS)
(Initial) ScheduleSequencesSolution (HS)
Best Move Neighbourhood Search
move
Insert Move Move Neighbourhood
Swap Move Neighbourhood
Segment Move Neighbourhood
40Algorithm Hill climbing
HP_Schedule (HP)
Optimised Heuristic Solution
Single Solution Heuristic Search
Composite Single Solution Method
Schedule Constructive Generation
Local Search
(HP HS)
(Initial) ScheduleSequencesSolution (HS)
Perform All Composite Neighbourhood Search
First Improvement Neighbourhood Search
Best Move Neighbourhood Search
move
move
Swap Move Neighbourhood
Insert Move Neighbourhood
41Schedule Visualisation
42Experiments Vehicle Routing Problem
1 Metaheuristic Approaches for the Vehicle
Routing Problem with Time windows A survey, M.
Gendreau and O. Bräysy, Mic2003, Kyoto, Japan 2
Fast Local SearchGuided Local Search (max. time
10800 sec. (3 hours)), Survey performed by
Patrick Mills (12th out of 21 papers)
43Conclusion
- iOpt/iSchedule is a complete framework of tools
to quickly and easily develop solution for
optimisation/satisfaction scheduling problems. - Acquiring iOpt/iSchedule (evaluation license,
academic license, commercial license).
44