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. Iso 22301 Consultants And Bcm Consultants In Oman, A Practical Guide To Business Continuity And Organizational ResilienceAuthor: kohan
2. Dtf Sticker Printing For Driving Schools And Driver Training Teams
Author: ZENITH
3. Indian Passport Renewal In Usa: Step-by-step Guide
Author: Anvit Gupta
4. The Complete Guide To Planning Your Social Media Content In 2026
Author: neetu
5. Why Ride-on Sweepers Are Useful For Parking Lot Cleaning
Author: Steve Smith
6. Planning Your Christmas Lights Installation: What To Do Before The Installer Arrives
Author: billy butcher
7. Embroidery Machine Buying Guide: Key Questions To Ask Before You Purchase
Author: HSW
8. High End Pocket Doors: A Modern Solution For Elegant Interiors
Author: mike
9. Custom Stone Countertops: A Practical Guide For Stylish And Durable Spaces
Author: mike
10. Sap Sd Offline Training In Hyderabad – Build A Successful Career With Avina Technologies
Author: Avina Technologies – Best SAP Training Institute
11. Foundation Bolting San Diego: Improving Home Foundation Connections
Author: Premier choice
12. Concealed Doors – A Seamless Solution For Modern Interiors
Author: mike
13. Foundation Crack Repair San Diego: Understanding Common Causes And Repair Options
Author: Premier choice
14. How To Make Your Two-wheeler Move To Delhi Simpler
Author: Moving Solutions
15. What To Consider Before Buying An Industrial Vacuum Cleaner?
Author: Steve Smith






