Linear problem for chemical composition of a formulation

83 Views Asked by At

Dears,

I´m writing a Linear Program for optimization.

One of my goals is to recommend to my supplier which raw material mix to use in its product formulation in order to optimally fulfill my nutrient needs in several locations. Example:

Sets:

SET_RAW_MATERIALS = ['Ureia', 'Ammonium Sulphate'] 
SET_NUTRIENTS = ['Nitrogen', 'Sulfur'] # Two nutrients that are supplied through the available raw materials 
SET_LOCATIONS = ['Location A', 'Location B'] # Two locations for having nutrient demands fulfilled 
SET_FORMULATIONS = ['Formulation 1'] # I have only 1 formulation to propose to my supplier 

Parameters:

PARAM_NUTRIENT_DEMAND = [ 
('Location A', 'Nitrogen'): 10, 
('Location A', 'Sulfur'): 2, 
('Location B', 'Nitrogen'): 10 
] 

PARAM_RAW_MATERIAL_NUTRIENT_CONTENT = [
('Ammonium Sulphate', 'Nitrogen'): 10,
('Ammonium Sulphate', 'Sulfur'): 5,
('Urea', 'Nitrogen'): 2 
]

Variables:

VAR_CHEMICAL_COMPOSITION('Formulation', 'Raw_material') # For each formulation I should find the optimal content of each raw_material (ranging from 0 to 1) VAR_VOLUME_FORMULATION('Formulation', 'Location') # The volume that i should use on each location for the proposed formulation

Constraints: (1) Nutrient demand (for each location and nutrient):

PARAM_NUTRIENT_DEMAND['Location', 'Nutrient'] <= sum(
VAR_VOLUME_FORMULATION['Formulation', 'Location'] * VAR_CHEMICAL_COMPOSITION['Formulation', 'Raw Material'] * PARAM_RAW_MATERIAL_NUTRIENT_CONTENT['raw_material', 'nutrient'] for all Raw Materials)
This is the only formulation I was able to come up with, but it is obviously non-linear. Is there any way to rewrite this constraint to have a LINEAR PROBLEM?

Thank you for the help.,

p.S.: I know the problem is not complete, I´ve brought only the information necessary to show the problem

1

There are 1 best solutions below

0
On

you have a blending example with docplex at https://github.com/sumeetparashar/IBM-Decision-Optimization-Introductory-notebook/blob/master/Oil-blend-student-copy.ipynb

I also recommend diet example in

CPLEX_Studio1210\python\examples\mp\modeling