You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/modules/ROOT/pages/optimization-algorithms/construction-heuristics.adoc
+70Lines changed: 70 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -702,6 +702,76 @@ is supported too.
702
702
For scaling out, see <<scalingConstructionHeuristics,scaling construction heuristics>>.
703
703
704
704
705
+
[#mixedModelConstructionHeuristics]
706
+
== Mixed modeling and construction heuristics
707
+
708
+
If the model includes both xref:using-timefold-solver/modeling-planning-problems.adoc#planningVariable[basic] and xref:using-timefold-solver/modeling-planning-problems#planningListVariable[list] variables,
709
+
the default behavior of the construction heuristic is
710
+
to use strategies based on the allocation of xref:optimization-algorithms/construction-heuristics.adoc#allocateEntityFromQueue[entities] and xref:optimization-algorithms/construction-heuristics.adoc#allocateToValueFromQueue[values]
711
+
for solving all related variables.
712
+
713
+
=== Algorithm description
714
+
715
+
The allocations work like this:
716
+
717
+
. Put all entities in a queue.
718
+
. Assign the first entity (from that queue) to the best value.
719
+
. Repeat until all entities are assigned.
720
+
. Put all values in a round-robin queue.
721
+
. Assign the best entity to the first value (from that queue).
722
+
. Repeat until all entities are assigned.
723
+
724
+
[#mixedModelConfiguration]
725
+
=== Configuration
726
+
727
+
Simple configuration:
728
+
729
+
[source,xml,options="nowrap"]
730
+
----
731
+
<constructionHeuristic>
732
+
<queuedEntityPlacer/>
733
+
</constructionHeuristic>
734
+
<constructionHeuristic>
735
+
<queuedValuePlacer>
736
+
<valueSelector variableName="variableName"/>
737
+
</queuedValuePlacer>
738
+
</constructionHeuristic>
739
+
----
740
+
741
+
Advanced configuration for a single entity class with a list variable and a single basic variable:
0 commit comments