123ArticleOnline Logo
Welcome to 123ArticleOnline.com!
ALL >> Business >> View Article

Using Two Constraint Files In A Single Service Of Optaplanner

Profile Picture
By Author: erpsolutions
Total Articles: 80
Comment this article
Facebook ShareTwitter ShareGoogle+ ShareTwitter Share

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

More About the Author

Oodles ERP https://erpsolutions.oodles.io/

Total Views: 70Word Count: 166See All articles From Author

Add Comment

Business Articles

1. Building Confidence: The Crucial Role Of Pre-sale And Pre-purchase Inspections In Real Estate Transactions
Author: adlercon way

2. Lucintel Forecasts Asic Chip Market To Reach $49 Billion By 2030
Author: Lucintel LLC

3. Best Petrol Pump Management Software In India
Author: Rupasri

4. Stainless Steel 316 Stud Bolt | Astm A193 Ss 316 Studj Bolt- Fas10
Author: Stainless Steel 316 Stud Bolt | ASTM A193 SS 316 S

5. Collar Bolts Fastener
Author: Collar Bolts Fastener

6. The Perks Of Buying A Used Car
Author: Cameron Clark

7. Transform Your Space: Interior Designer In Trivandrum Can Elevate Your Home
Author: VC interiors

8. Your Complete Guide For Purchasing A Vehicle
Author: Cameron Clark

9. Lucintel Forecasts Antimony Trioxide Market To Reach $3 Billion By 2030
Author: Lucintel LLC

10. Abrex 400 Plates Stockists In India
Author: Mukesh Mehta

11. Jindal Steel Sheet Price: Factors And Considerations
Author: Archana

12. Chaveiro IndianĂ³polis
Author: Chaveiro IndianĂ³polis

13. Lucintel Forecasts Agrochemical Market To Reach $489 Billion By 2030
Author: Lucintel LLC

14. Is Swing Barrier Is Streamlined Solution?
Author: Vignesh

15. What Is Esg Report And Its Strategy?
Author: Agile Advisors

Login To Account
Login Email:
Password:
Forgot Password?
New User?
Sign Up Newsletter
Email Address: