-
Notifications
You must be signed in to change notification settings - Fork 207
Rework #2235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Rework #2235
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
docs/src/modules/ROOT/pages/commercial-editions/.only-enterprise.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| NOTE: This feature is exclusive to Timefold Solver Enterprise Edition. |
1 change: 1 addition & 0 deletions
1
docs/src/modules/ROOT/pages/commercial-editions/.only-plus-and-enterprise.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| NOTE: This feature is exclusive to Timefold Solver Plus and Enterprise Editions. |
53 changes: 53 additions & 0 deletions
53
docs/src/modules/ROOT/pages/commercial-editions/commercial-editions.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| = Plus/Enterprise Editions | ||
| :page-aliases: partitioned-search/partitioned-search.adoc, \ | ||
| enterprise-edition/enterprise-edition.adoc | ||
| :doctype: book | ||
| :icons: font | ||
|
|
||
| _Timefold Solver Plus_ and _Timefold Solver Enterprise_ are commercial products which offer additional features, | ||
| such as xref:constraints-and-score/understanding-the-score.adoc[score analysis], xref:optimization-algorithms/move-selector-reference.adoc#nearbySelection[nearby selection] and xref:using-timefold-solver/running-the-solver.adoc#multithreadedIncrementalSolving[multithreaded solving] | ||
| . | ||
| These features are essential to scale out to large datasets and build trust with your users. | ||
|
|
||
| Unlike _Timefold Solver Community Edition_, these commercial editions are not open-source. | ||
| We offer free trials as well as free licenses to non-profit organizations, start-ups and for academic research. | ||
| Please check out LINK TODO to get your commercial licenses. | ||
|
|
||
| TIP: Looking for quicker time-to-value? | ||
| Timefold offers https://docs.timefold.ai/[pre-built, fully tuned optimization models], no constraint building required. | ||
| Just plug into our API and start optimizing immediately. | ||
|
|
||
| == Feature Comparison | ||
|
|
||
| [cols="4,^1,^1,^1", options="header"] | ||
| |=== | ||
| | Feature | Community | Plus | Enterprise | ||
|
|
||
| | xref:constraints-and-score/understanding-the-score.adoc[Score Analysis] | ||
| | | ✓ | ✓ | ||
|
|
||
| | xref:responding-to-change/responding-to-change.adoc#assignmentRecommendationAPI[Recommendation API] | ||
| | | ✓ | ✓ | ||
|
|
||
| | xref:commercial-editions/performance-improvements.adoc[Performance improvements] | ||
| | | | ✓ | ||
|
|
||
| | xref:optimization-algorithms/move-selector-reference.adoc#nearbySelection[Nearby selection] | ||
| | | | ✓ | ||
|
|
||
| | xref:using-timefold-solver/running-the-solver.adoc#multithreadedIncrementalSolving[Multithreaded solving] | ||
| | | | ✓ | ||
|
|
||
| | xref:using-timefold-solver/running-the-solver.adoc#partitionedSearch[Partitioned search] | ||
| | | | ✓ | ||
|
|
||
| | xref:constraints-and-score/performance.adoc#constraintProfiling[Constraint profiling] | ||
| | | | ✓ | ||
|
|
||
| | xref:commercial-editions/multistage-moves.adoc[Multistage moves] | ||
| | | | ✓ | ||
|
|
||
| | xref:using-timefold-solver/running-the-solver.adoc#throttlingBestSolutionEvents[Throttling best solution events] | ||
| | | | ✓ | ||
|
|
||
| |=== | ||
78 changes: 78 additions & 0 deletions
78
docs/src/modules/ROOT/pages/commercial-editions/installation.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| = Installing Timefold Solver Plus & Enterprise | ||
|
|
||
| In order to work with the commercial editions of Timefold Solver, 2 actions need to be taken: | ||
|
|
||
| - <<solverLicenseKey,Configure a license key>>; | ||
| - <<enterpriseArtifacts,Use the Enterprise artifacts>>; | ||
|
|
||
| [#solverLicenseKey] | ||
| == License Key | ||
|
|
||
| A correctly configured and active license key is required in order for our commercial versions to function. | ||
|
|
||
| [#solverObtainLicenseKey] | ||
| === Obtaining a license key | ||
|
|
||
| <TODO> | ||
|
|
||
|
TomCools marked this conversation as resolved.
|
||
| [NOTE] | ||
| ==== | ||
| Take care not to leak the license file, for example by committing it to a public repository, | ||
| logging the license file content in logs, or sharing it with unauthorized parties. | ||
| ==== | ||
|
|
||
| [#solverSetupLicenseKey] | ||
| === Set up your license key | ||
|
|
||
| After obtaining your license file (.pem) you can introduce it to your project by one of the following methods: | ||
|
|
||
| * Store the license's PEM string in the `TIMEFOLD_ENTERPRISE_LICENSE` environment variable. | ||
| * Store the absolute path to the file in `TIMEFOLD_ENTERPRISE_LICENSE_PATH` environment variable. | ||
| * Place the file in the user's home directory. | ||
| * Place the file in the root of your application classpath. | ||
|
|
||
| [#enterpriseArtifacts] | ||
| == Use the enterprise artifacts | ||
|
|
||
| The commercial edition uses different artifacts than our open-source version. | ||
| These artifacts are available from Maven Central, so no additional repositories need to be configured. | ||
|
|
||
| [NOTE] | ||
| ==== | ||
| To avoid operational complexity, all _commercial_ versions of Timefold Solver use the `enterprise` artifacts. | ||
| Features for your licensed version are enabled based on the provided license key. | ||
| ==== | ||
|
|
||
| Replace references to open-source artifacts by their `enterprise` counterparts | ||
| as shown in the following table: | ||
|
|
||
| |=== | ||
| |Open source|Enterprise | ||
|
|
||
| |`ai.timefold.solver:timefold-solver-bom` | ||
| |`ai.timefold.solver.enterprise:timefold-solver-enterprise-bom` | ||
|
|
||
| |`ai.timefold.solver:timefold-solver-core` | ||
| |`ai.timefold.solver.enterprise:timefold-solver-enterprise-core` | ||
|
|
||
| |`ai.timefold.solver:timefold-solver-jackson` | ||
| |`ai.timefold.solver.enterprise:timefold-solver-enterprise-jackson` | ||
|
|
||
| |`ai.timefold.solver:timefold-solver-quarkus` | ||
| |`ai.timefold.solver.enterprise:timefold-solver-enterprise-quarkus` | ||
|
|
||
| |`ai.timefold.solver:timefold-solver-quarkus-jackson` | ||
| |`ai.timefold.solver.enterprise:timefold-solver-enterprise-quarkus-jackson` | ||
|
|
||
| |`ai.timefold.solver:timefold-solver-spring-boot-starter` | ||
| |`ai.timefold.solver.enterprise:timefold-solver-enterprise-spring-boot-starter` | ||
| |=== | ||
|
|
||
| If you were not using some of these open source artifacts until now, | ||
| you do not need to add the enterprise counterparts to your project either. | ||
|
|
||
| [#enterpriseLimitations] | ||
| == Limitations | ||
|
|
||
| Blabla, Automatic Node Sharing puts some limitations. (Disable for now) | ||
|
|
||
15 changes: 15 additions & 0 deletions
15
docs/src/modules/ROOT/pages/commercial-editions/multistage-moves.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| [#multistageMoves] | ||
| = Multistage Moves | ||
|
|
||
| include::.only-enterprise.adoc[] | ||
|
|
||
| Multistage moves are moves composed of one or more stages, where each stage selects a single `Move` to execute. | ||
|
|
||
| Each stage has access to either a `BasicVariableMoveEvaluator` or a `ListVariableMoveEvaluator`, which allows the stage to evaluate moves without executing them. | ||
|
|
||
| Stages are selected from either a `BasicVariableStageProvider` or a `ListVariableStageProvider`, which is initialized from the working solution at phase start. | ||
|
|
||
| Multistage moves are configured from either a xref:optimization-algorithms/move-selector-reference.adoc#multistageMoveSelector[MultistageMoveSelectorConfig] | ||
| or a xref:optimization-algorithms/move-selector-reference.adoc#listMultistageMoveSelector[ListMultistageMoveSelectorConfig]. | ||
|
|
||
| Multistage moves are useful for creating specialized ruin-and-recreate moves where the valid values that won't violate hard constraints can be determined in advance. |
93 changes: 93 additions & 0 deletions
93
docs/src/modules/ROOT/pages/commercial-editions/performance-improvements.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| = Performance Improvements | ||
|
|
||
| Timefold Solver Enterprise brings many performance improvements. These are shortly described here. | ||
|
|
||
| [#fasterCustomShadowVariables] | ||
| == Faster shadow variables | ||
|
|
||
| include::.only-enterprise.adoc[] | ||
|
|
||
| Updates to shadow variables happen incrementally with Timefold Solver Enterprise. | ||
| For models making intensive use of xref:using-timefold-solver/modeling-planning-problems.adoc#customShadowVariable[shadow variables], this should be visible as a serious performance improvement out-of-the-box. | ||
|
|
||
| This is enabled by default and doesn't require any special considerations. | ||
|
|
||
| [#automaticNodeSharing] | ||
| == Node sharing | ||
|
|
||
| include::.only-enterprise.adoc[] | ||
|
|
||
| When a `ConstraintProvider` does an operation for multiple constraints (such as finding all shifts corresponding to an employee), that work can be shared. | ||
| This can significantly improve move evaluation speed if the repeated operation is computationally expensive: | ||
|
|
||
| image::enterprise-edition/nodeSharingValueProposition.png[align="center"] | ||
|
|
||
| [IMPORTANT] | ||
| ==== | ||
| Debugging breakpoints put inside your constraints will not be respected, because the `ConstraintProvider` class will be transformed when this feature is enabled. | ||
| ==== | ||
|
|
||
| [IMPORTANT] | ||
| ==== | ||
| To use automatic node sharing outside Quarkus, your `ConstraintProvider` class must oblige by several restrictions so a valid subclass can be generated: | ||
|
|
||
| - The `ConstraintProvider` class cannot be final. | ||
| - The `ConstraintProvider` class cannot have any final methods. | ||
| - The `ConstraintProvider` class cannot access any protected classes, methods or fields. | ||
| ==== | ||
|
|
||
| === Configuration | ||
|
|
||
| Node sharing is automatically enabled when running Timefold Enterprise Edition. | ||
| You can disable the feature by changing the following settings. | ||
|
|
||
| [tabs] | ||
| ==== | ||
| XML:: | ||
|
|
||
| * Add `<constraintStreamAutomaticNodeSharing>false</constraintStreamAutomaticNodeSharing>` in your `solverConfig.xml`: | ||
| + | ||
| [source,xml,options="nowrap"] | ||
| ---- | ||
| <!-- ... --> | ||
| <scoreDirectorFactory> | ||
| <constraintProviderClass>org.acme.MyConstraintProvider</constraintProviderClass> | ||
| <constraintStreamAutomaticNodeSharing>false</constraintStreamAutomaticNodeSharing> | ||
| </scoreDirectorFactory> | ||
| <!-- ... --> | ||
| ---- | ||
|
|
||
| Spring Boot:: | ||
|
|
||
| Set the property `timefold.solver.constraint-stream-automatic-node-sharing` to `false` in `application.properties`: | ||
| + | ||
| [source,properties,options="nowrap"] | ||
| ---- | ||
| timefold.solver.constraint-stream-automatic-node-sharing=false | ||
| ---- | ||
|
|
||
| Quarkus:: | ||
|
|
||
| Set the property `quarkus.timefold.solver.constraint-stream-automatic-node-sharing` to `false` in `application.properties`: | ||
| + | ||
| [source,properties,options="nowrap"] | ||
| ---- | ||
| quarkus.timefold.solver.constraint-stream-automatic-node-sharing=false | ||
| ---- | ||
| ==== | ||
|
|
||
| [#nodeSharing] | ||
| === What is node sharing? | ||
|
|
||
| When using xref:constraints-and-score/score-calculation.adoc#constraintStreams[constraint streams], each xref:constraints-and-score/score-calculation.adoc#constraintStreamsBuildingBlocks[building block] forms a node in the score calculation network. | ||
| When two building blocks are functionally equivalent, they can share the same node in the network. | ||
| Sharing nodes allows the operation to be performed only once instead of multiple times, improving the performance of the solver. | ||
| To be functionally equivalent, the following must be true: | ||
|
|
||
| * The building blocks must represent the same operation. | ||
|
|
||
| * The building blocks must have functionally equivalent parent building blocks. | ||
|
|
||
| * The building blocks must have functionally equivalent inputs. | ||
|
|
||
| When all of the above is the case, Timefold Solver can rewrite the `ConstraintProvider` code at runtime to benefit from the performance improvements node sharing brings. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.