Skip to content

Commit

Permalink
chore: constraint streams slides
Browse files Browse the repository at this point in the history
  • Loading branch information
ge0ffrey committed Nov 5, 2024
1 parent e5d9f25 commit 5e70eea
Showing 1 changed file with 46 additions and 28 deletions.
74 changes: 46 additions & 28 deletions events/2024-11-05-BYOM_score_calculation.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ <h3>Constraint streams required skill (good way)</h3>
<h2>Constraint Streams</h2>
</section>
<section>
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamConcat_0.png" class="fullImage">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamConcat_1.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamConcat_2.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamConcat_3.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamIntroduction_0.png" class="fullImage">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamIntroduction_1.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamIntroduction_2.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamIntroduction_3.png" class="fullImage fragment">
</section>
<section>
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamFilter_0.png" class="fullImage">
Expand All @@ -201,18 +201,6 @@ <h2>Constraint Streams</h2>
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamFilter_4.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamFilter_5.png" class="fullImage fragment">
</section>
<section>
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamGroupBy_0.png" class="fullImage">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamGroupBy_1.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamGroupBy_2.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamGroupBy_3.png" class="fullImage fragment">
</section>
<section>
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamIfExists_0.png" class="fullImage">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamIfExists_1.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamIfExists_2.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamIfExists_3.png" class="fullImage fragment">
</section>
<section>
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamIncrementalCalculation_0.png" class="fullImage">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamIncrementalCalculation_1.png" class="fullImage fragment">
Expand All @@ -222,10 +210,15 @@ <h2>Constraint Streams</h2>
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamIncrementalCalculation_5.png" class="fullImage fragment">
</section>
<section>
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamIntroduction_0.png" class="fullImage">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamIntroduction_1.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamIntroduction_2.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamIntroduction_3.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamJustification_0.png" class="fullImage">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamJustification_1.png" class="fullImage fragment">
</section>
<section>
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamJoinWithoutJoiners_0.png" class="fullImage">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamJoinWithoutJoiners_1.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamJoinWithoutJoiners_2.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamJoinWithoutJoiners_3.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamJoinWithoutJoiners_4.png" class="fullImage fragment">
</section>
<section>
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamJoinWithJoiners_0.png" class="fullImage">
Expand All @@ -234,19 +227,25 @@ <h2>Constraint Streams</h2>
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamJoinWithJoiners_3.png" class="fullImage fragment">
</section>
<section>
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamJoinWithoutJoiners_0.png" class="fullImage">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamJoinWithoutJoiners_1.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamJoinWithoutJoiners_2.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamJoinWithoutJoiners_3.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamJoinWithoutJoiners_4.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamGroupBy_0.png" class="fullImage">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamGroupBy_1.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamGroupBy_2.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamGroupBy_3.png" class="fullImage fragment">
</section>
<section>
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamJustification_0.png" class="fullImage">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamJustification_1.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamIfExists_0.png" class="fullImage">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamIfExists_1.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamIfExists_2.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamIfExists_3.png" class="fullImage fragment">
</section>
<section>
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamConcat_0.png" class="fullImage">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamConcat_1.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamConcat_2.png" class="fullImage fragment">
<img src="../src/content/timefold-solver-docs/constraints-and-score/score-calculation/constraintStreamConcat_3.png" class="fullImage fragment">
</section>
</section>


<section>
<section data-background-color="#3e00ff">
<h2>Unit testing</h2>
Expand All @@ -257,6 +256,24 @@ <h3>If it isn't tested, it doesn't work.<br/>
</section>


<section>
<h3>Unit test</h3>
<pre xml:space="preserve"><code class="java">@Test
void requiredSkill() {
Employee employee = new Employee(
"Amy", Set.of(), null, null, null);
constraintVerifier.verifyThat(EmployeeSchedulingConstraintProvider::requiredSkill)
.given(employee,
new Shift("1", DAY_START_TIME, DAY_END_TIME, "Location", "Plumber", employee))
.penalizes(1);
employee = new Employee(
"Beth", Set.of("Skill"), null, null, null);
constraintVerifier.verifyThat(EmployeeSchedulingConstraintProvider::requiredSkill)
.given(employee,
new Shift("2", DAY_START_TIME, DAY_END_TIME, "Location", "Skill", employee))
.penalizes(0);
}</code></pre>
</section>


</section>
Expand All @@ -265,6 +282,7 @@ <h3>If it isn't tested, it doesn't work.<br/>
<h2>Score corruption</h2>
</section>


</section>
<section>
<section data-background-color="#3e00ff">
Expand Down

0 comments on commit 5e70eea

Please sign in to comment.