The document discusses an event held by Ch'ti JUG where Geoffrey De Smet from Drools Planner gave a presentation on automated planning. The presentation covered use cases for automated planning like bin packing and exam scheduling. It discussed how finding optimal solutions through brute force is intractable for real-world problems. Drools Planner was presented as an open source tool for automated planning that can find good solutions in a reasonable time frame.
Summary of Toyota Kata by Mike Rother with excerpts from Puppet Lab 2016 State of DevOps report and questions about SaaS vs. Manufacturing and using kata for DevOps.
WEBINAR: How to Set Up and Run Hypothesis Tests (ENCORE!)GoLeanSixSigma.com
The first live presentation of this webinar was so popular that we’re doing an encore presentation!
Join us for this 1-hour advanced webinar where we answer the question, “Why do we need hypothesis tests in process improvement?” and then stay with us as we walk you through a real, live hypothesis test direct from the Bahama Bistro!
Chti Jug Octo 16032010 Réduisons le ticket d’entrée de nos projetsCh'ti JUG
omment apporter un maximum de valeur à nos utilisateurs en moins de 3 mois... puis recommencer !
Présentation donnée par OCTO Technology le 16 mars 2010 au Ch'ti JUG. L'évènement a été sponsorisé par MC3SI.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Summary of Toyota Kata by Mike Rother with excerpts from Puppet Lab 2016 State of DevOps report and questions about SaaS vs. Manufacturing and using kata for DevOps.
WEBINAR: How to Set Up and Run Hypothesis Tests (ENCORE!)GoLeanSixSigma.com
The first live presentation of this webinar was so popular that we’re doing an encore presentation!
Join us for this 1-hour advanced webinar where we answer the question, “Why do we need hypothesis tests in process improvement?” and then stay with us as we walk you through a real, live hypothesis test direct from the Bahama Bistro!
Chti Jug Octo 16032010 Réduisons le ticket d’entrée de nos projetsCh'ti JUG
omment apporter un maximum de valeur à nos utilisateurs en moins de 3 mois... puis recommencer !
Présentation donnée par OCTO Technology le 16 mars 2010 au Ch'ti JUG. L'évènement a été sponsorisé par MC3SI.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
3. Ch’ti JUG ● Editeur de logiciels exclusivement dédiés aux enseignes du
Retail
● Création en 1986
● 35 M€ de CA en 2008 (+20 %/an en moyenne depuis 5 ans)
● 34 % à l’International
● 5 sites en France dont le siège à Roubaix. (Paris, Belfort,
Antibes, Vannes)
● 5 filiales hors hexagone : Shanghai, Portugal, Espagne,
Tunisie, Pologne en cours
● Une expérience éprouvée dans 60 pays
4. Ch’ti JUG Effectifs : 430 collaborateurs dans le monde, 360 en France, 300 ressources
basées à Roubaix
10
0 Experts Metiers
90 Directeur de Projet
80 C de Projet Métier
hef
70
C de Projet
hef
60 Techniques
Formateur et @learning
50
Directeursde Produits
40
30 Développeurs
20 Recette et Qualification
10 H L
ot ine
0 Préparateurset
Effectifs déploiem ents
4
5. Ch’ti JUG
Storeland pilote l’ensemble de votre supply chain étendue
6. Ch’ti JUG CYLANDE partenaire de la FFJ
Le judo véhicule des valeurs
Cylande a accompagné l’équipe de France
de Judo à Pékin
7. Ch’ti JUG
Une croissance résolument tournée vers l’international
Lauréat du Prix PME France CHINE ACFCI / CCIFC
8. Ch’ti JUG
Automated planning
with Drools Planner
Geoffrey De Smet
Drools Planner lead
"Do more with less."
9. Ch’ti JUG Agenda
Use cases of automated planning
• N queens
• Bin packaging
• Employee shift rostering
• Examination timetabling
Find the best solution
• With Drools Planner
Calculate the score of a solution
• With Drools
10. Ch’ti JUG Agenda
Use cases of automated planning
• N queens
• Bin packaging
• Employee shift rostering
• Examination timetabling
Find the best solution
• With Drools Planner
Calculate the score of a solution
• With Drools
11. Ch’ti JUG N Queens: use case
Place n queens on a n-sized chess board
No 2 queens can attack each other
12. Ch’ti JUG N queens: partially solved
Score -1 for every 2 queens that can attack
each other
Score = -2
13. Ch’ti JUG N queens: an optimal solution
Score = 0
14. Ch’ti JUG N queens: demo
Not optimized!
• Hello world example
Not a real
planning problem
• I can make an
optimal solution
for any n queens
without a computer
• See Wikipedia
16. Ch’ti JUG NP complete
Yellow item goes in first (or last)
• Why?
• Not the largest size
• Not the largest side
• So why?
NP complete
• A given solution can be verified fast
• No efficient way to find a solution
• Is there even a solution?
17. Ch’ti JUG Real world bin packaging
Not just 5 items
• 1000+ items
Not just 1 container
• 100+ containers
• Different container types
More constraints...
• Distribute weight evenly
• Not all fireworks in the same container
• ...
19. Ch’ti JUG Hard constraints
Hard constraints must be fulfilled
For example:
• Ensure continuous service
• At least 1 emergency nurse at any given time
• Labor laws
• Every 24 hours: at least 11 hours rest
• Every 7 days: at least 35 hours rest
• No shifts during approved vacation
20. Ch’ti JUG Soft constraints
Soft constraints should be fulfilled as much
as possible
• Only after the hard constraints are fulfilled
Each soft constraint is weighted
For example:
• Fair night work assignment: weight 5
• Forward rotation: weight 10
• Nurse preferences: weight 1
• Ann dislikes Saturday night shifts
• Beth dislikes Wednesday afternoon shifts
21. Ch’ti JUG Hard and soft score
Solution A B C
Hard constraints
• 11 hours rest 1 0 0
Soft constraints
• Fair night work
assignment 0 1000 1
• Weight 5
• Nurse preferences 0 0 4000
• Weight 1
Total score -1H/0S 0H/-5000S 0H/-4005S
• A<B<C
• C is the best solution
23. Ch’ti JUG Hard constraints
Exam conflict: 2 exams that share students should not occur in the
same period.
Room capacity: A room's seating capacity should suffice at all times.
Period duration: A period's duration should suffice for all of its
exams.
Period related hard constraints should be fulfilled:
• Coincidence: 2 exams should use the same period (but possibly
another room).
• Exclusion: 2 exams should not use the same period.
• After: 1 exam should occur in a period after another exam's
period.
Room related hard constraints should be fulfilled:
• Exclusive: 1 exam should not have to share its room with any
other exam.
24. Ch’ti JUG Soft constraints
2 exams in a row.
2 exams in a day.
Period spread: 2 exams that share students
should be a number of periods apart.
Mixed durations: 2 exams that share a room
should not have different durations.
Front load: Large exams should be scheduled
earlier in the schedule.
Period penalty: Some periods have a penalty when used.
Room penalty: Some rooms have a penalty when used.
25. Ch’ti JUG Examination demo
International timetabling
competition 2007
• Finished 4th (back then)
7 minutes
• CPU depended
Real word test data
14 constraints
• 7 hard constraints
• 7 soft constraints
26. Ch’ti JUG Other use cases
Vehicle routing
• Freight routing
Scheduling
• Course, meeting, conference scheduling
• Appointment and resource scheduling
• Sport scheduling
Storage organizing
Machine queue planning
...
27. Ch’ti JUG Why use Drools Planner?
Open source
• ASL (business-friendly)
Maven-ready (JBoss repository)
Documentation
• Reference manual
• Examples
JBoss Drools community support
• User mailing list, issue tracking, …
• Blog & twitter (#droolsplanner)
28. Ch’ti JUG Agenda
Use cases of automated planning
• N queens
• Bin packaging
• Employee shift rostering
• Examination timetabling
Find the best solution
• With Drools Planner
Calculate the score of a solution
• With Drools
29. Ch’ti JUG
Brute force
for (periodOfExam1 : periodList) {
exam1.setPeriod(periodOfExam1);
for (roomOfExam1 : roomList) {
exam1.setRoom(roomOfExam1);
for (periodOfExam2 : periodList) {
exam2.setPeriod(periodOfExam2);
for (roomOfExam2 : roomList) {
exam2.setRoom(roomOfExam2);
...
for (periodOfExamN : periodList) {
examN.setPeriod(periodOfExamN);
for (roomOfExamN : roomList) {
examN.setRoom(roomOfExamN);
Score score = calculateScore(solution);
cloneIfScoreIsBetter(solution, score);
} } } }…} }
30. Ch’ti JUG Needle in a haystack
How many possible
solutions?
• 1096 exams
• 80 periods
• 28 rooms
> habitants in Lille per km²?
• 6 483 hab./km²
Source: wikipedia
31. Ch’ti JUG Needle in a haystack
How many possible
solutions?
• 1096 exams
• 80 periods
• 28 rooms
> humans?
• 7.000.000.000 humans
Source: NASA (wikipedia)
32. Ch’ti JUG Needle in a haystack
How many possible
solutions?
• 1096 exams
• 80 periods
• 28 rooms
> minimum atoms in the
observable universe?
• 10^80 atoms
Source: NASA and ESA (wikipedia)
33. Ch’ti JUG Needle in a haystack
How many possible
solutions?
• 1096 exams
• 80 periods
• 28 rooms
> atoms in the universe
if every atom is a universe of
atoms?
• (10^80)^80 = 10^6400
Source: NASA and ESA (wikipedia)
34. Ch’ti JUG Do the math
1 exam
• 80 periods and 28 rooms
• 80 * 28 = 2240 ways to schedule 1 exam
2 exams
• 2240 * 2240 = 5.017.600
3 exams
• 2240 * 2240 * 2240 = 11.239.424.000
1096 exams
• 2240 * 2240 * … * 2240
• 2240^1096 = a little over 10^3671
35. Ch’ti JUG
A little over
10^3671
744437246744648820113833159531546214974276974551140513162882691
3469284310834499031050210214743407656244813085240442809855321
17872268184924364558999914849676314196976841658179857396613906
3492625485909685725897730184010924994541828672670138943325039
683048943713412274829614721695599636159777727101713768378004615
48701272177587402234891701308937790853816473943603349353332893
68078384002213161233225755719910067066354676237665251240673552
3153767499024677368278799816044299431500884240408977216982760
67946148250230917492054728443158872165054373936157659332956136
774730870081258025518405492389480888615900164269035398348299
0003805674675524102808572658937105740571173904119233244862828
53392817922617168734507604739703552080299261320457186755798353
7967203299588154666629888459837384660489020381221523812268702
28697167564520947170314014038670253281783219898668392349799158
35407169443312860837423115961300328664844607892218572759207572
4811
36. Ch’ti JUG
A little over
10^3671
604813577241247185462510563049535812195201797417621522126155060
76944992828720005800729579185467968191720128852327413111071565
0043989565813921764252807306941995041630327604298194478260407
65201495454290825675151996355311686689270103635691882586316830
6139401723974701085877081645821563181943787272983111911411368916
8267734458648249288525981253268712682909721892541332433788104
618254995718184937280503163787574781545179918774455713682720486
0856763230803748948170736540773077834904096264467405007381183
921101733071148798313412153048340998159011667296994070172526454
17836852601401021510814954906747082633216854492531462935276329
8262882437094345239245616252628477471654331980909505146422698
5500820819509960070516675580035694278266373295312687962113803
354280700964987221060506159614496708252300794687287842958627
4134471258439206305573503782097081716925686154420223798946020
9728873590430061008523877953514829733076235819258465550027938
41
37. Ch’ti JUG
A little over
10^3671
41281947539904670755491533163612447621027075998378388100740372
5028189106738399600287059413396296063538199837169373556801830
5836646411561304836723541726522661983307438198684385880446218
050094809565635384648937983793088308243838089365451116083129
64868056598674131595193654957707706822143338172833633019666638
035983430262037019665125647894212392790462389810030266845803
0790315153020620193795388869486770234724354626457650058047468
161664023993402310021870051091820162111647624929917192405039351
1639247398607555167937946055347704746052684593317642558493208
66378895400041597447191732266335485557327003619802076964131266
186551891831601623573904848347851683860381473416171492241589945
908191501085456952341588756767389366458777600000000000000000
0000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000
00000
38. Ch’ti JUG
A little over
10^3671
0000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000
00000000
39. Ch’ti JUG
A little over
10^3671
0000000000000000000000000000000000000000000000000
000000000000000000000000000
The search space is big!
• Compare with WWW size
• 22 020 000 000 pages
Each possible solution
• 1096+ exams scheduled into
• 80 periods
• 28 rooms
• Still need to calculate the score
40. Ch’ti JUG Throw hardware at it?
If 10^9 scores calculated per ms
• Not possible today!
• 31.579.200.000 ms in 1 year
• < 10^11 ms in 1 year
• 10^9 * 10^11 scores per year
• = 10^20 scores per year
How many years? 10^3671 / 10^20
• = 10^3651 years
CPU 1000 times faster
• It becomes 10^3648 years
41. Ch’ti JUG A dose of reality
Find the optimal solution?
• Of a real world planning problem?
Not in our lifetimes!
Who cares?
• Beat the human planner(s) (=easy)
• Spend less resources
• Save more money
• Save the environment
• Make more people happy
• Never ending competition
42. Ch’ti JUG Smarter brute force?
Eliminate subtrees
• Branch and bound
• Still too many for loops
• Still takes forever
for (periodOfExam2 : periodList) {
exam2.setPeriod(periodOfExam2);
if (exam1.shareStudentWith(exam2)
&& periodOfExam1.equals(periodOfExam2)) {
continue; // bug: best solution might break a hard constraint
}
...
43. Ch’ti JUG
Imperfect algorithms
(mimic a human)
Deterministic
• First in, first assigned, never changed
• Easy to implement
• Drools Planner score support
• Fixed time (for example 18 seconds)
Metaheuristic
• Move things around
• Start from result of deterministic algorithm
• Drools Planner implementations
• More time = better score
44. Ch’ti JUG Deterministic: N queens
Demo
Not feasible
• Not optimal
Good initialization
• Jump 10 meter into the pool
45. Ch’ti JUG Deterministic: examination
List<Exam> sortedExamList = sortExamsOnDifficulty(examList);
for (exam : sortedExamList) {
// Determine best remaining spot
Score bestScoreOfExam = - INFINITY;
for (period : periodList) {
exam.setPeriod(period);
for (room : roomList) {
exam.setRoom(room);
Score score = calculateScore(solution);
if (score > bestScoreOfExam) {
bestScoreOfExam = score;
... store bestPeriod, bestRoom
}
}
}
… assign exam to bestPeriod, bestRoom
}
46. Ch’ti JUG Metaheuristic algorithms
Local search: 1st, 2nd, 3rd and 4th in ITC 2007
• Simple local search (Hill climbing)
• Tabu search
• Local search ++
• Simulated annealing
• Great deluge
• ...
Genetic algorithms: 5th in ITC 2007
Ant colony optimization
...
47. Ch’ti JUG Move things around
Move = from solution A to solution B
• Change the row of 1 queen
• Give 2 queens each others rows
• ...
48. Ch’ti JUG All moves from one solution
Number of moves < number of solutions
• N queens
• n*n < n^n
• 4 queens
• 16 < 256
• 8 queens
• 64 < 16777216
• 64 queens
• 4096 < 10^116
51. Ch’ti JUG Local optima
1) Deterministic StartingSolutionInitializer
2) Simple local search
3) Stuck in local optimum!
Source: Wikipedia
52. Ch’ti JUG Tabu search = local search++
Solution tabu (high tabu size)
• Been there, no need to go there again
Move tabu (low tabu size)
• Done that recently, no need to do that again
Property tabu (low tabu size)
• Changed that recently,
no need to change that again
54. Ch’ti JUG Termination
Synchronous (configured)
• Max timeMillis/seconds/minutes/hours spend
• Score attained
• Max step count
• Max unimproved step count
Asynchronous (from another thread)
• planner.terminateEarly();
55. Ch’ti JUG Double time !=> double score
Examination test data 7
Soft
score
Time (hours:minutes)
56. Ch’ti JUG Benchmarker utility
Battle of different planner configurations
• Different algorithms (tabu search, ...)
• Different moves
• Different settings
On multiple datasets
Results are ranked:
• Best one wins
Coming soon:
• Graph: best score over time
57. Ch’ti JUG Agenda
Use cases of automated planning
• N queens
• Bin packaging
• Employee shift rostering
• Examination timetabling
Find the best solution
• With Drools Planner
Calculate the score of a solution
• With Drools
58. Ch’ti JUG JAVA vs SQL vs DRL
for (q1 : queenList) {
for (q2 : queenList) {
if (q1.getId() < q2.getId() && q1.getY() == q2.getY()) {
...
}
}
}
select *
from Queen q1, Queen q2
where q1.id < q2.id and q1.y = q2.y;
rule "multipleQueensHorizontal"
when
$q1 : Queen($id : id, $y : y);
$q2 : Queen(id > $id, y == $y);
59. Ch’ti JUG N queens: score rule
rule "multipleQueensHorizontal"
when
$q1 : Queen($id : id, $y : y);
$q2 : Queen(id > $id, y == $y);
then
insertLogical(new IntConstraintOccurrence(
"multipleQueensHorizontal",
ConstraintType.NEGATIVE_HARD, 1,
$q1, $q2));
end
60. Ch’ti JUG Score rule isolation
rule "multipleQueensHorizontal"
when
$q1 : Queen($id : id, $y : y);
$q2 : Queen(id > $id, y == $y);
then ...
end
rule "multipleQueensAscendingDiagonal"
when
$q1 : Queen($id : id, $ascendingD : ascendingD);
$q2 : Queen(id > $id, ascendingD == $ascendingD);
then ...
end
rule "multipleQueensDescendingDiagonal"
when
$q1 : Queen($id : id, $descendingD : descendingD);
$q2 : Queen(id > $id, descendingD == $descendingD);
then ...
end
62. Ch’ti JUG Examination: period spread
2 exams that share students should be a
number of periods apart
rule "periodSpread"
when
$iw : InstitutionalWeighting(periodSpreadPenality != 0);
// For any 2 conflicting exams in the same period ...
$topicConflict : TopicConflict($leftT : leftTopic, $rightT : rightTopic);
$leftExam : Exam(topic == $leftT, $leftPeriod : period);
$rightExam : Exam(topic == $rightT, $rightPeriod : period);
// … which are in within the periodSpread
eval(Math.abs($leftPeriod.getPeriodIndex()
- $rightPeriod.getPeriodIndex())
< ($iw.getPeriodSpreadLength() + 1));
then
insertLogical(new IntConstraintOccurrence(... NEGATIVE_SOFT,
$topicConflict.getStudentSize() * $iw.getPeriodSpreadPenality(),
$leftExam, $rightExam));
end
63. Ch’ti JUG Summary
Drools Planner solves planning problems
Adding constraints is easy and scalable
Switching/combining algorithms is easy
64. Ch’ti JUG
Q&A
Home page
• http://www.jboss.org/drools/drools-planner.html
Reference manual
• http://www.jboss.org/drools/documentation.html
Blog
• http://blog.athico.com/search/label/planner
Twitter
• #droolsplanner
64
65. Ch’ti JUG
Thanks for your attention!
Home page
• http://www.jboss.org/drools/drools-planner.html
Reference manual
• http://www.jboss.org/drools/documentation.html
Blog
• http://blog.athico.com/search/label/planner
Twitter
• #droolsplanner
65
66. Ch’ti JUG Licence
Les photos et logos appartiennent à leurs
auteurs respectifs
Le contenu de la présentation est sous
licence Creative Commons 2.0 France
• Contrat Paternité
• Pas d'Utilisation Commerciale
• Partage des Conditions Initiales à l'Identique
http://creativecommons.org/licenses/by-nc-sa/2.0/fr/
67. Ch’ti JUG Cocktail
Merci pour votre attention
Merci à Cylande pour son sponsoring