ALL >> Business >> View Article
Using Two Constraint Files In A Single Service Of Optaplanner

In this blog post, we shall see how we can use two constraint files in OptaPlanner 8 or OptaPlanner 9 beta version.
In OptaPlanner 8 version, we do not need to configure the XML file when we use the single constraint file. We can use the following steps to use auto config :-
1:- first you need to inject the following code in your service section to find the solution of your code.
@Autowired private SolverManager solverManager;
2: then you need to inject the following code in your service section to find the score of your solution.
@Autowired private ScoreManager scoreManager;
2:- After these, two injections, you need to add the following code to solve the problem and find the score.
UUID problemId = UUID.randomUUID();
// Submit the problem to start solving
SolverJob solverJob = solverManager.solve( problemId, SolutionClassName ); SolutionClassName solutionClassName; try { // Wait until the solving ends solution = solverJob.getFinalBestSolution(); } catch (InterruptedException | ExecutionException e) { throw new IllegalStateException("Solving failed.", e); }
For more, visit this link
https://erpsolutions.oodles.io/developer-blogs/Using-Two-Constraint-Files-In-a-Single-Service-of-OptaPlanner
#erp #optaplanner #erpsystem
Oodles ERP https://erpsolutions.oodles.io/
Add Comment
Business Articles
1. The Evolution Of The Fanny Pack Over The YearsAuthor: iven gayash
2. Powering Sustainable Agriculture With Efficient Pumps
Author: Sundar
3. Step Inside Tomorrow: How Cogito's 3d Walkthroughs Redefine Coimbatore Spaces
Author: cogito
4. How To Pick The Best Civil Contractor In Valasaravakkam For Your Home Project
Author: bharathi
5. Enhancing Your Property With Quality Driveways, Patios, And Pathways: A Comprehensive Guide
Author: Vikram kumar
6. The Importance Of Surface Finishing In Aluminum Products
Author: bqmp
7. Simplifying Global Trade With Workseer’s Advanced Hs Code & Eccn Classification Tools
Author: sumit
8. How To Start A Crab-themed Home Garden For Beginners
Author: bharathi
9. How To Choose The Best Six Sigma Training Institute In Chennai
Author: bharathi
10. Rv Essentials For Long-term Living: What You Really Need
Author: Devon Curran
11. Dubai's Best Laptop Screen Replacement Services: Fast, Dependable Fixes
Author: laptop screen replacement services in dubai
12. Black Magic Specialist In Udupi
Author: astrobest09
13. Steps For Plastic Injection Molding Process
Author: Ryan
14. Understanding Injection Mold Life: Spi Classes And Key Longevity Factors
Author: Ryan
15. How To Identify High-quality Stainless Steel Flanges
Author: Neelam Forge India