Procurement Optimiser¶
1. Product Description¶
1.1. Solution Overview¶
The AIDEAS Procurement Optimiser (AI-PO) is a software package developed as a decision-support system that aims to modernize the way industry produces, acquires, and recycles products. In this context, AI-PO allows a fast plan adaptation to most changes that may occur in the providers’ environment, raw or semi elaborated materials procurement and production. AI-PO provides optimisation algorithms to quickly calculate and maintain updated MRP (Material Requirements Planning), also considering the possibility of reusing recycled or refurbished components in production while ensuring maximum compliance with constraints such as supplier capacity, contractual obligations, or delivery requirements. The Procurement Optimiser generates a list of dated material requirements (necessities) of materials based on an initial production plan and the minimum stock level of each material. Given these dated material requirements, the application uses the suppliers and the possible offers together to obtain a solution, which consists of a list of dated purchases of materials, including selected prices, offers or discounts and providers. Procurement Optimiser obtains optimised solutions for the problem based on the KPIs or the pilot priorities. As part of the results, the procurement optimiser delivers a list of alerts about materials that cannot be received on time, pointing out changes needed in the production plan. Also, materials that cannot be purchased due to lack of capacity or other constraints are reported as well.
• Key Features¶
Data import from different sources : The solution includes the capability of obtaining information from different sources manually or automatically.
Data validation and formatting: Data imported from different sources is formatted using a standardized model that is shared among all solutions. This facilitates the connection between solutions and the connection with external tools.
Calculating MRP related to production plan: The main goal here is to calculate the procurement plan to fulfil the current production plan.
Multi-Objective Optimization Engine: Uses metaheuristic based AI techniques to solve complex procurement problems with multiple objectives. Balances factors like price, supplier reliability, delivery time, capacity and performance.
User Interface: Provides an intuitive dashboard for procurement analysts and managers to review recommendations. Through input modification, we can make what-if simulations to assess other scenarios.
Include recycled or refurbished materials: The MRP considers recycled or refurbished materials as a material source as a way of extending their life cycle.
Selection of supplier: As part of the procurement plan calculation, the best supplier for each material is selected, while considering not only the delivery times but also special offers and bulk prices.
Fast Response to changes: To have an adaptative procurement plan, it is necessary to have the capacity to carry out necessary calculations in a short time. This allows the plan to be adapted and changed when unforeseen events occur.
• Benefits¶
The AI-PO helps reduce costs by identifying lower-cost sourcing strategies without compromising service levels. It improves compliance while ensuring that procurement plans adhere to all restrictions. Efficiency is enhanced through the automation of procurement planning tasks that are typically manual, time-consuming and prone to human error. Additionally, it supports more strategic decision-making by enabling better supplier selection and contract utilization through data-driven insights. Finally, it increases agility by enabling rapid responses to changing conditions.
• Business Value¶
The AI-PO contributes to increased resilience against market volatility and supply chain disruptions, supports procurement decisions with faster and clearer information, and frees up human resources to focus on higher-value activities. Additionally, it generates information that can be evaluated retrospectively to help identify discrepancies between system recommendations and the decisions ultimately made by operators.
1.2. Prerequisites¶
• Technical Specifications¶
The solution is composed of different specialized services, with each service providing functionality specific to a function or feature. The import service connects to different data sources and obtains raw data in different formats. The service also validates input data and formats it to the standardized common format. Another service (Calculation service) calculates the procurement plan. Finally, the export service oversees formatting and storage of the generated information in different data containers and communicates the information to other solutions (like AI-FO). AI-PO has a service to interact with users, which provides the user interface and connects with other services as needed. The user interface service, usually called frontend service, is developed using REACT, while the different backend services are developed mostly using the .NET Framework. AI-PO solution is tested in two pilots, using the standardized data model. The only difference between these pilots is the mail service that is developed to contact suppliers and request prices in one of them. The mail service also includes a separate user interface service that allows a user to interact with suppliers, read and receive emails from them. The backend service is developed mostly in .Net Framework and the front end in REACT. Docker containers are used to package and execute each service.
• Technical Development¶
This AIDEAS Solution has the following development requirements:
Development Language: Calculation backend C#, import service (Bridge)in Python, the User Interfaces are developed in REACT.
Libraries:
Calculation backend .Net Framework 8.0 (FACOP, Unity Dependency Injection, log4net, NLog, Newtonsoft.json, AutoMapper).
Import service backend: Python Libraries (sqlalchemy, os, pandas, json) and (SQLAlchemy, Flask Jsonify, Flask Mail, PyMuPDF).
User Interface: REACT (@aws-sdk/client-s3, axios, buffer, chart.js, classnames, date-fns, file-saver, keycloak-js, next, papaparse, primeflex, primeicons, primereact, react, react-dom, react-router-dom, sass, eslint, eslint-config-next). REACT (Axios,PrimeReact, NextUI, React Bootstrap, React PDF, React Image Crop).
Container and Orchestration: Docker and Kubernetes.
Database engine: Microsoft SQL Server, PostgreSQL or other.
• Hardware Requirements¶
AI-PO can run on any platform that supports Docker containers.
• Software Requirements¶
Docker client (Docker Desktop, Podman, Rancher Desktop, etc.)
npm (for frontend deployment)
The rest of software requirements are installed inside the dockers.
• External Dependencies¶
PostgreSQL
Microsoft SQL Server
2. Installation¶
2.1. Environment Preparation¶
Ensure that all dependencies, including Docker, Python, and npm, are installed. Clone the repository from the official GitLab project and configure the backend and frontend environments as needed.
2.2. Step-by-Step Installation Process¶
Local Installation: Requires configuring backend and frontend, installing dependencies, and launching services manually.
Docker Installation: Uses a
docker-compose.ymlfile to deploy the application.Kubernetes Installation: Pending implementation.
3. Initial Configuration¶
3.1. First Steps¶
• Login¶
Users must log in using GitLab authentication before accessing secured application features. For now use Cigip’s GitLab, as shown in the image, to sign in.

HOME¶
Dashboard → Tab in which an introduction of AIPO is displayed and from which the other tabs can be accessed too.

Help → Tab with guidelines.

Settings → Tab with settings, some might change.

AI-PO¶
Import Data & Current Plan → Tab in which AI-PO input data is updated.

List Plans → Tab to list the plans and see one.

Procurement Plan View → Tab where new plan is generated and results can be viewed.

3.2. Workflows¶
Generate a new procurement plan.¶
Go to the Import Data & Current Plan tab.

Upload a procurement problem file to solve (mandatory step).

Upload a description file (optional).

Go to New Procurement Plan tab and click on “Get New Plan” Button.

After a short time for the calculations to take place, a new plan will be displayed on the screen.

Review an already generated procurement plan.¶
Go to the List Plans tab.

Click on the button “Get Plans”.

On the dropdown, select the plan you want to review.

If you have the descriptions for this plan upload it using the button “Upload Description” (Optional).

Now you can see the results of the selected plan.

4. General Queries¶
4.1. Installation and Configuration Contact (If Service Provided)¶
For installation, configuration or any kind of support, users should refer to the official GitLab project or the associated organization (ITI).
4.2. Support¶
Company |
Website |
Logo |
|---|---|---|
ITI |
|
4.3. Licensing¶
The solution is licensed under AGPLv3 or PRIVATE licensing models.
Pricing and licensing details are available upon request.
Subject |
Value |
|---|---|
Payment Model |
Quotation under request |
Price |
Quotation under request |
5. Appendices¶
5.1. Glossary of Terms¶
AI-PO or PO: Is the acronym for AIDEAS Procurement Optimiser.
Metaheuristics: High-level procedures designed to solve complex optimization problems.
Multi-objective Optimization: Optimization that involves simultaneously balancing multiple objectives.
KPI (Key Performance Indicator): Measurable value that demonstrates how effectively key business objectives are achieved.
Frontend: Part of a software application that interacts directly with users, typically involving graphical user interfaces.
Backend: Part of software responsible for data processing, calculations, and logic, operating independently from the user interface.
REACT: JavaScript library for building interactive user interfaces and web applications.
Docker: Platform for containerizing applications, ensuring consistency and portability across various environments.
Kubernetes: Open-source system used to automate deployment, scaling, and management of containerized applications.
.NET Framework: Software development framework created by Microsoft primarily for building Windows applications and services.
API (Application Programming Interface): Set of rules and protocols enabling interaction between different software components or services.
JSON (JavaScript Object Notation): Lightweight, text-based format for exchanging data, commonly used for web APIs.
FACOP: Framework to improve algorithm developments, acronym for Framework for Applied Combinatorial Optimization Problems.
5.2. Calculation API Documentation¶
By default, the backend server is served on port 5001 and allows the following API methods. These methods are accessible through the application frontend, or by sending the proper request using tools like Postman, or directly with code.
Resource |
GET |
POST |
PUT |
DELETE |
|---|---|---|---|---|
|
Supported |
|||
|
Supported |
|||
|
Supported |
|||
|
Supported |
|||
|
Supported |
|||
|
Supported |
|||
|
Supported |
|||
|
Supported |
|||
|
Supported |
5.3 Procurement Calculator¶
/api/ProcurementCalculator/CalculateFromMaterialNecessity/{configurationName}¶
POST → Starts the calculation of a new procurement plan from a necessity list of material passed by parameter in JSON format. This method is prepared to work with a filtered necessity list rather than a complete production plan. The parameter “configurationName” would be the name of the configuration in text, for instance: ConfigNoBoM.
POST request type:
{
"materialList": {
"Part": [],
"AvailableParts": [],
"ProductionPlan": [],
"PartsToBuy": [],
"Supplier": [],
"SupplierPart": [],
"OfferPartSupplier": [],
"Periods": []
}
}
POST response type:
{
"ODProcurementPlanID": "string",
"Date": "2023-10-01T00:00:00Z",
"Message": "string",
"ProposedPurchaseOnTime": [],
"ProposedPurchaseLate": [],
"UnavailableItems": []
}
Regarding POST REQUEST JSON to calculate the Procurement Plan:¶
This JSON incorporates all the procurement plan information required in the expected format. All values should be sent as Integers. Below is a detailed explanation of each field:
Part: Each array represents a part with the following values:
PartId: Unique identifier for the part.
AvailabilityMinimumAmount: Minimum available stock of the part.
AvailabilityMaximumAmount: Maximum available stock of the part.
PartType: Type/category of the part.
AvailableParts: Represents available parts, where each entry has:
PartId: Identifier of the part.
Quantity: Current stock of the part or quantity that will arrive.
DeliveryDate: When the part will be delivered (here, all are 0, possibly indicating immediate availability).
ProductionPlan: Represents production plans, where each entry has:
PlanId: Unique identifier of the production plan.
PlanGenerationDate: Date the plan was generated.
PlanStartingDate: Date the plan will start.
PartsToBuy: Represents parts that need to be purchased, where each entry has:
PartId: Identifier of the part.
RequiredAmount: Quantity required, what we need.
NotUsed: Not used value
Period: The period during which the parts are required.
Supplier: Represents supplier details, where each entry has:
SupplierId: Unique identifier of the supplier.
SupplyOnTime: Indicator of whether the supplier delivers on time, how reliable he is (a percentage).
Priority: Priority level of the supplier (0 = not priority, 1 = priority).
SupplierPart: Describes parts supplied by specific suppliers, where each entry has:
SupplierId: Identifier of the supplier.
PartId: Identifier of the part.
SupplyMinimumAmount: Minimum quantity the supplier provides, will usually be 0.
MaxQuantityAvailable: Maximum quantity the supplier can deliver (their total stock).
LeadTime: Time required for delivery.
OfferPartSupplier: Represents offers from suppliers for parts, where each entry has:
OfferId: Identifier of the offer.
SupplierId: Identifier of the supplier making the offer.
PartId: Identifier of the part this offer sells.
LeadTime: Time for delivery in the offer.
OfferCapacityAmount: Maximum quantity the supplier can offer.
OfferMinimumAmount: Minimum quantity the supplier can offer.
StartingPeriod: When the offer starts.
EndingPeriod: When the offer ends.
PricePerUnit: Price per unit of the part offered.
Periods: Are the time periods included in the procurement plan. Each entry in this field is an array with the following values:
PeriodID: Unique identifier for the period.
PeriodID: The date it represents.
IsActive: A flag indicating whether the period is active (1 = active, 0 = inactive).
/api/ProcurementCalculator/GetCurrentPlan¶
GET → Obtains the newest plan from data storage. Returns a not found error if the plan does not exist, otherwise returns the required plan.
GET response type:
[
{
"ODProcurementPlanID": "string",
"Date": "2023-10-01T00:00:00Z",
"Message": "string",
"ProposedPurchaseOnTime": [],
"ProposedPurchaseLate": [],
"UnavailableItems": []
}
]
/api/ProcurementCalculator/GetPlan/{planId}¶
GET → Obtains a plan from data storage. Returns a not found error if the plan does not exist, otherwise returns the required plan.
GET response type:
[
{
"ODProcurementPlanID": "string",
"Date": "2023-10-01T00:00:00Z",
"Message": "string",
"ProposedPurchaseOnTime": [],
"ProposedPurchaseLate": [],
"UnavailableItems": []
}
]
/api/ProcurementCalculator/AllPlans¶
GET → Obtains all plans from data storage. Returns a not found error if no plans exist, otherwise returns the list of plans.
GET response type:
[
{
"ODProcurementPlanID": "string",
"Date": "2023-10-01T00:00:00Z",
"Message": "string"
}
]
/api/ProcurementCalculator/CalculateNewPlan¶
POST → Starts the calculation of a new plan using the last imported data. Returns the calculation task identifier.
POST response type:
{
"ODProcurementPlanID": "string",
"Date": "2023-10-01T00:00:00Z",
"Message": "string",
"ProposedPurchaseOnTime": [],
"ProposedPurchaseLate": [],
"UnavailableItems": []
}
/api/ProcurementCalculator/CancelCalculation/{taskId}¶
PUT → Cancels a calculation task. Returns Ok if the task was canceled, otherwise returns not found.
PUT response type:
{
"success": true
}
/api/ProcurementCalculator/CheckTaskStatus/{taskId}¶
PUT → Obtains the status of a calculation task. Returns 0 if the task is in progress (calculating), 1 if the task is completed, 2 if the task is canceled, 3 if the task is in fault status, and -1 if the task is not found.
PUT response type:
{
"status": 0
}
/api/ProcurementCalculator/{planId}¶
DELETE → Removes a procurement plan from memory. Returns the calculation task identifier.
DELETE response type:
{
"success": true
}
/api/ProcurementCalculator/endpoints¶
GET → Lists all endpoints.
GET response type:
[
{
"Method": "GET",
"Route": "/api/ProcurementCalculator/GetCurrentPlan",
"Action": "ProcurementCalculator.GetCurrentPlan",
"ControllerMethod": "AIPO_MRP_Application.Controllers.ProcurementCalculator:GetCurrentPlan"
}
]
5.3. Console Commands List¶
npm installfor frontend dependencies.pip install -r dev.txtfor backend dependencies.docker-compose up --buildfor Docker-based deployment.python server.pyto launch the backend server.npm run devto start the frontend server.
