|
Mansi Malik Oodles

Mansi Malik (Backend-Senior Associate Consultant L1 - Development)

Experience:2+ yrs

Mansi Malik is working as a backend developer with a specialization in Java. She is proficient in various cutting-edge technologies including Java, MySQL, and MongoDB, as well as frameworks like Spring Boot, Hibernate, and Spring Security, and tools such as Optaplanner. With her extensive experience, she has successfully delivered numerous internal and client projects such as Communication-Scaffold, Oodles-Dashboard, AutoRouterJava, and Delm8 route planner. In addition to her technical expertise, she has also developed her knowledge in software development methodologies and has demonstrated her capabilities by establishing POC projects like Micro Services and Optaplanner to address complex issues related to employee scheduling and vehicle routing.

Mansi Malik Oodles
Mansi Malik
(Senior Associate Consultant L1 - Development)

Mansi Malik is working as a backend developer with a specialization in Java. She is proficient in various cutting-edge technologies including Java, MySQL, and MongoDB, as well as frameworks like Spring Boot, Hibernate, and Spring Security, and tools such as Optaplanner. With her extensive experience, she has successfully delivered numerous internal and client projects such as Communication-Scaffold, Oodles-Dashboard, AutoRouterJava, and Delm8 route planner. In addition to her technical expertise, she has also developed her knowledge in software development methodologies and has demonstrated her capabilities by establishing POC projects like Micro Services and Optaplanner to address complex issues related to employee scheduling and vehicle routing.

LanguageLanguages

DotHINDI

Fluent

DotENGLISH

Conversational

Skills
Skills

DotOSM

60%

DotDatabase Management

60%

DotEDI

60%

DotTimefold

60%

DotMySQL

80%

DotRoute Optimization

60%

DotPostgres

80%

DotJava

80%

DotOptaplanner

80%

DotSpring Boot

80%

DotNo SQL/Mongo DB

80%

DotCloud Platforms

60%

DotJavascript

80%

DotGraphHopper

60%

DotLogistics API

60%

DotHTML, CSS

40%
ExpWork Experience / Trainings / Internship

Apr 2022-Present

Associate Consultant - Development

Gurugram


Oodles Technologies

Gurugram

Apr 2022-Present

EducationEducation

2019-2022

Dot

Mahatma Jyotiba Phule Rohilkhand University, Bareilly

Master of Computer Application-Computer Science

Top Blog Posts
Adding The Solver.config File Configuration To The Java Class

Introduction 

In this blog article, we will discuss how to configure the solver.config file in the Java class. We'll also look at how to dynamically pass some necessary data, such as the termination limit. In Optaplanner's latest version, Solution Manager and Solver Factory don't provide any method for dynamically setting the termination-related data, so for this, we will use another class, TerminationConfig. TerminationConfig provides many methods, such as setBestScoreLimit, setDaysSpentLimit, setHoursSpentLimit, setMinutesSpentLimit, setMillisecondsSpentLimit, etc.

 

Please see the link provided below for further details about the Termination Config class.

https://docs.optaplanner.org/latestFinal/optaplanner-javadoc/org/optaplanner/core/config/solver/termination/TerminationConfig.html

 

 

Also, Read Graphhopper Map Setup In Vehicle Routing Problem Using OptaPlanner

 

 

Let's see the solver.config file configuration in the Java class.

To do this, we first need to create an object of the SolverConfig class, then the data is added in this object. We used to provide constructionHeuristic, scoreDirectorFactory, and localSearch-related information in the Solver.config file. Therefore, an object will be created for all of these fields. For constructionHeuristic configuration, we will create the ConstructionHeuristicPhaseConfig class object; for scoreDirectorFactory configuration, we will create the ScoreDirectorFactoryConfig class object; and for localSearch configuration, we will create the LocalSearchPhaseConfig class object, then set the data in all of these objects.

 

 

I only set the construction heuristic type during the construction phase, and I am using FIRST_FIT as that type. Numerous more algorithms, including WEAKEST_FIT, WEAKEST_FIT_DECREASING, STRONGEST_FIT, STRONGEST_FIT_DECREASING, and others, were supported by the construction heuristic. 

 

 

 

 

 

Also, Read Upgrade Procedure For an OptaPlanner Project

 

 

 

 

 

After setting all the data in the solverConfig object, we pass it to the solverFactary create function. We use the createFromXmlResource function whenever we are using the solverConfig.xml file.

 

You can configure the solver.config file using these screenshots; you can add additional configuration or remove it based on your requirements. 

Graphhopper Map Setup In Vehicle Routing Problem Using OptaPlanner

What Is The Vehicle Routing Problem?

Many organizations deal with a vehicle routing problem on a daily basis: identifying the best sequence to deliver a number of items to a number of places with a fleet of vehicles. This kind of optimization problem is known as the vehicle routing problem (VRP), and it has several variations.

OptaPlanner can solve many of these vehicle routing variations and gives solution examples.

 

Graphhopper Map Setup In Vehicle Routing Problem

We have added the graphhopper dependency to the configuration of the graphhopper map. I included the dependency of the most recent version of Graphhopper. I'm using the most recent versions of OptaPlanner 8.35.0.Final and Graphhopper 7.0.

Add the following dependency to graphhopper-core in your pom.xml

 

<!-- https://mvnrepository.com/artifact/com.graphhopper/graphhopper-core -->
<dependency>
<groupId>com.graphhopper</groupId>
<artifactId>graphhopper-core</artifactId>
<version>7.0</version>
</dependency>

 

In Main Class, create a hashmap to store graphhopper data based on the vehicle's value. I've created the Vehicles enum, in which I define the vehicle and the vehicle's value.

 

 

 

The map file name and path URL are defined in the application.properties file.

 

 

I have created a class, ApplicationPropertyValue, in which I define the objects and the object value I get from application.properties files.

 

 

I have now added the startUp method for downloading and importing the map file to a new class called AppEvents. I'm using the EventListener on this method, so it will be called automatically when I run the application. It will check whether our map file is already downloaded or not; if not, the downloadOsmFile method will be called and the map will be downloaded, or if yes, it will call the loadGraphhopperFile method and simply import and load the graphhopper map.

 

 

downloadOsmFile Method code

 

 

loadGraphhopperFile Method

 

 

When you are calculating the distance, you have to set the profile. Otherwise, it will throw an exception that the profile is not set.

 

 

Closing Thoughts

I hope this blog helps you set up the map in VRP so that you can quickly set up the map in our project. I provide all the necessary setup information for setting up a map file. If you're using an older version of Graphhoper, you'll have to change some configurations.

 

Learn more about our OptaPlanner development services. Contact us at [email protected] for project-related queries. 

Category: ERP Solutions
Updating an OptaPlanner Project To The Most Recent OptaPlanner Version

Today we are discussing a few major changes that will require updating and how we can do those changes. 

Let's first understand the need for upgradation to a higher version, the older version had some methods that were deprecated one of them including "DRL File" which was arguably the most important file of all the rules were written to it, in the newer version there are changes with the library in place of DRS File. The newer version is faster and better for developers to develop new software using this technology.

 

Let's start :

1.)  pom.xml file changes 

In the properties section of the pom.xml file, we define the version of OptaPlannar that we need to implement. I'm using OptaPlanner 8.35.0.Final, the most recent version. The updated versions now require Java 11 or above.

 

 

Creating a brenchmarkConfig.xml file and adding optaplanner-benchmark dependencies to pom.xml is no longer required.

 

2.) DRL File Changes 

We have replaced the drl file with a Java class that implements a ConstraintProvider and has a defineConstraints method where we can define our rules.

 

Thus, this is how we can define our rules. Many methods provided by ConstraintFactory can be used to write rules.

 

3.) SolverConfig.xml File Changes 

In the solverConfig.xml file, almost everything is the same; however, we define the constraintProvideClass location rather than the DRLFile location.

 

 

4.) Domain Changes 

@CustomShadowVariable : The @CustomShadowVariable has been deprecated. So in place of @CustomShadowVariable we can use @ShadowVariable annotation and @PiggybackShadowVariable. 

 

Before 

 

After 

 

@ValueRangeProviderRefs :  In most cases, links between planning variables and value ranges can now be automatically detected. Therefore, @ValueRangeProvider no longer needs to provide an ID property. Likewise, planning variables no longer need to reference value range providers via the valueRangeProviderRefs property.

 

 

Some new annotations are also provided by OptaPlanner's latest version like @PlanningListVariable, @PreviousElementShadowVariable, @NextElementShadowVariable. 

 

5.) Solver Changes

SolutionManager is used in place of ScoreManager, and the updateScore() method of ScoreManager has been replaced with the update() method of SolutionManager. When we are using ScoreManager, we can get the summary from ScoreManager using ScoreManager.getSummary() method, we now get the summary using solutionManager.explain(solution).getSummary() method.

 

This ends the blog with the mention of all the features of the newer version of OptaPlanner and all the facts about the previously used files and their replacements with details and hands-on experience.

 

We are a seasoned ERP application development company that specializes in building custom planning solutions using OptaPlanner, an open-source AI constraint solver. To learn more about our OptaPlanner development and integration services, write to us at [email protected]

Category: ERP Solutions
Upgrade Procedure For an OptaPlanner Project

How Can We Migrate An OptaPlanner Project From Old To New Versions? 

Several features of OptaPlanner are currently deprecated, hence an upgrade to the project is required. In order to update our project, I'm identifying what modifications are necessary and how we may implement them.

Let's start with the pom.xml file. What dependencies are necessary for Spring Boot's OptaPlanner?

<dependency>
   <groupId>org.optaplanner</groupId>
   <artifactId>optaplanner-bom</artifactId>
   <version>${version.org.optaplanner}</version>
   <type>pom</type>
   <scope>import</scope>
</dependency>

Include this dependency inside of <dependencyManagement>.

<dependency>
   <groupId>org.optaplanner</groupId>
   <artifactId>optaplanner-spring-boot-starter</artifactId>
</dependency>

Add this one inside <dependencies>. Only these two dependencies are required for OptaPlanner.

 

Solver configuration :

Most likely, Spring users won't need to worry about solver configuration. Simply remove the score DRL and implement a constraint provider. Moreover, you can define a constraint-provider class path in SolverConfig.xml rather than a drl path.

If you want to remove the SolverConfig.xml file, you can do that, and the updated OptaPlanner project will automatically read the entityClass, solutionClass, and constraint provider classes, so there is no need to do any configuration for this; if you added more than one constraint provider, you will need to add the SolverConfig.xml file.

Define the localSearch configuration in a Java class if solverConfig.xml is not being used.

LocalSearchPhaseConfig localSearchPhaseConfig = new LocalSearchPhaseConfig()
        .withAcceptorConfig(new LocalSearchAcceptorConfig().withEntityTabuSize(5));
localSearchPhaseConfig.setLocalSearchType(LocalSearchType.TABU_SEARCH);

There are numerous search options available in LocalSearchType, like  HILL_CLIMBING, GREAT_DELUGE, LATE_ACCEPTANCE etc.

You can refer to the following documentation for further details on the LocalSearchPhaseConfig method: https://docs.optaplanner.org/latest/optaplanner-javadoc/org/optaplanner/core/config/localsearch/LocalSearchPhaseConfig.html

 

Use SolverManager to solve the problem; it offers the solve or solve and listen methods. Autowire the SolverManager and initialize it inside the constructor.

@Autowired
private SolverManager<SolutionClass, Long> solverManager;

 

 

 

 

Score Configuration :

For updating the score, you can use SolutionManager and initialize it inside constructor.

@Autowired
SolutionManager<SolutionClass, HardMediumSoftLongScore> solutionManager;

Set the initial score using the update or explain methods. Inside both methods, call the "callScoreDirector" method.

solutionManager.update(solutionClassObject);

or 

solutionManager.explain(solutionClassObject).getSummary();

 

Conclusion :

You can update your OptaPlanner project by implementing these modifications. Additional improvements are detailed in the OptaPlanner documentation, which is available via the URL provided below.

https://www.optaplanner.org/download/upgradeRecipe/upgradeRecipe8.html

 

We are a seasoned ERP development company that provides end-to-end OptaPlanner development services to cater to the diverse industry-specific needs of our clients. To learn more about OptaPlanner development and implementation in your business project, write to us at [email protected].  

Category: ERP Solutions
Employee Scheduling In OptaPlanner With Constraint Stream

An Introduction To Employee Scheduling 

Every company has to deal with planning issues, such as providing products or services with a certain number of resource constraints (employees, assets, time, and money). Employee scheduling is one such planning issue: assigning shifts to employees. Employer shifts rostering issues are resolved using the OptaPlanner engine by OptaWeb, a web application and REST service.

 

Architecture

Requirements
OptaPlanner requires Java 11 or later and is 100% pure Java. It easily integrates with other JavaTM technologies. OptaPlanner runs on any Java Virtual Machine, is compatible with all major JVM languages, and is available on all major platforms.

Use OptaPlanner with Maven

Add the following dependency to optaplanner-core in your pom.xml if you use Maven:

    <dependency>
      <groupId>org.optaplanner</groupId>
      <artifactId>optaplanner-core</artifactId>
      <version>...</version>
    </dependency>

Note:  The solverConfig.xml file is no longer required in the updated version of OptaPlanner, and the drl file has been replaced with a Java class in which we implement ConstraintProvider that provides a defined constraint method in which we can define our rules.

Benefits of Constraint Streams
Constraint Streams is a modern full-featured API for writing OptaPlanner constraints, which has a number of advantages over score DRL.

There is no new language that developers need to learn. Java is used in Constraint Streams.

Full IDE support, including syntax coloring and refactoring, is offered by Constraint Streams.

Constraint Streams offers comprehensive unit testing support.

Constraint Streams work considerably better than score DRL in the majority of use cases

As shown in the picture, you can write your constraint like this:

 

We define constraints in these examples as required skills and no overlapping shifts. If an employee's skill set doesn't include the required skills, we will penalize a hard score. If an employee has overlapping shifts, the hard constraint is dynamically equated to the overlapping minutes in the no-overlapping-shifts constraint.
 

Closing Thoughts

From a developer's perspective, the updated versions of OptaPlanner are extremely useful and easy to use. The employee scheduling issue is currently fully implemented in Java and is compatible with any JVM system. This is yet another reason for using updated versions.

 

We are a 360-degree ERP application development company that excels in building custom enterprise planning solutions using OptaPlanner. Our OptaPlanner application development services cater to the diverse industry-specific needs of clients, helping them boost their productivity and efficiency levels. Contact us at [email protected] for more details. 

Category: ERP Solutions
Chat Application Using Web Socket In Spring boot

WEB SOCKET IN SPRING BOOT:-
 

WebSocket is a computer communication protocol that provides a full-duplex communication channel over a single TCP connection.

WebSocket works by first establishing a normal HTTP connection to the server and then sending an upgrade header to upgrade his WebSocket connection in both directions.

Allows establishment of a two-way communication channel between server and client.

 

CREATING CHAT APPLICATION USING WEB SOCKET IN SPRINGBOOT :

Using WebSocket we can easily create two-way communication in real-time.  For communicating in real time we are creating this chat application.  Using this chat application we can send messages in real-time. 

PROJECT STRUCTURE :

Firstly, for creating chat applications, we create relevant project structures. When we are creating a spring-boot project add WebSocket dependency in our project.

 

This is the project folder and class structure of the chat application.

 

THE DATA MODEL CLASS :

We will be creating a chat server, let’s first model messages with a POJO Class :

CONFIGURING WEBSOCKET :

The use of "/app" as a destination is due to the WebSocket configuration file indicating that all messages are routed to these processing methods annotated with @MessageMapping.

 

CREATING OUR CHAT CONTROLLER :

 

The controller will be responsible for handling all message methods present in our chat application which will basically receive messages from one client and then broadcast them to others. 

MAIN CLASS :

FRONTEND DESIGN OF CHAT APPLICATION :

 

AFTER COMMUNICATION DESIGN AND MESSAGES :

 

 

Banner

Don't just hire talent,
But build your dream team

Our experience in providing the best talents in accordance with diverse industry demands sets us apart from the rest. Hire a dedicated team of experts to build & scale your project, achieve delivery excellence, and maximize your returns. Rest assured, we will help you start and launch your project, your way – with full trust and transparency!