Multi-Objective Optimization Model Solved using R — Part2

Author(s): Supriya Ghosh Optimization Multi-Objective Optimization Model Solved using R — Part2 Source — https://musfirsays.wordpress.com/2012/02/22/mathematical-optimization/ Isn’t it great to solve the Multi-Objective optimization problem of Goal Programming using “R”? Here’s something you can swear to: This article will explore how to solve the Multi-Objective Optimization Problem using the existing model. To find optimal solutions, I’ll use the R language. This will be done given my model’s objectives, constraints and deviational variables. To make it clear, I’ll go into detail about the solution. I already covered the entire process of modeling from scratch in Part 1. I will start by referring back to the Manufacturing Case that was used in the earlier part of the model formulation process. Two products are produced by one of the most popular lighting companies, LED lights and colorful lampshades. Each product is made in two steps, which includes wiring and assembly. Each lamphade is wired in approximately 2 hours and each LED light takes 3 hours. Final assembly takes 6 hours and 5 respectively for the LED lamp shade and light. Production is so fast that 12 hours are required for wiring and 30 hour of assembly. It is very strict about maximizing the use of the wiring department’s hours without any waste and looking forward to having no overtime in its assembly department. The company makes $7 per lamphade, and $6 for each LED light. The company is contractually required to deliver at least 7 LED lights. The company has also moved to a new location, and believes that initially maximising profit is unrealistic. The management sets an $30 profit level that will be acceptable during the period. Given the constraints of production, the company seeks to determine the product mix that will achieve this goal. The following model was developed based on the case. Source — by Author. Where X1 & X2 represent decision variables. Now. Let’s find the optimal solution. Step 1 — Construct a coefficient matrix. Our coefficients are derived using the numeric values of X1 or X2 variables. So 7X1 plus 6X2, 3X1+ 3X2, 6X1+ 5X2 and 8X2 are the coefficients. We now have the 4-x-2 matrix. The number of columns is equal to the number and number of decisions variables. Step 2 — Create a Target vector. The target vector represents the values that must be reached in order to achieve the objectives. The number of elements in this target vector is the same as the number objective. Step 3 — Create the Achievement Data Framework that defines the goals. The 1st column is set as an objective. It also contains the index to a specific objective. We have four objectives, so count 1,2…4 will be mentioned. The Priority column captures the objective’s priority. The 1st objective has the highest priority, followed by the 4th and then the 2nd and the 3rd objectives respectively. This is why the depiction below of it. 3rd column is the representation of positive deviational variables,(Overachievement). It is usually represented by the notation “p”, in the “R Visuals.” 4th column is the representation of negative deviational variables,(Underachievement). It is usually represented by the notation “n”, in R Visuals. Step 4 — The final computation of the optimal result using R package and function that minimizes deviational variables. To find the optimal solution, R uses modified simplex. Another important thing to remember is that the data frame will contain five named columns if weight or priority needs to be taken into account for goals. These columns will be identical to those in the previous columns. The fifth column, referred to as ‘w’, is the weight that is associated with the priority level. The complete R — code is shown below. # Copy “goalprog” package from the specified path url <- "https://cran.r-project.org/src/contrib/Archive/goalprog/goalprog_1.0-2.tar.gz"pkgFile <- "goalprog_1.0-2.tar.gz"download.file(url = url, destfile = pkgFile) # Install "goalprog" packageinstall.packages(pkgs=pkgFile, type="source", repos=NULL) library(goalprog) # Use function llgp to solve multi-opjective optimization model # List coefficients as specified in objective functions# Store as a matrixcoefficients <- matrix( c( 7, 6, 2, 3, 6, 5, 0, 1 ), nrow=4, byrow=TRUE )coefficients # List target values as specified in objective functions# Store as a vectortargets <- c( 30, 12, 30, 7 )targets # List achievement goals as specified in objective functions# Store as a data frame, where 1st column is objective,2nd column is priority,# 3rd column is deviational variable indicating overachievement and is indicated as p,# 4th column is deviational variable indicating underachievement and is indicated as n, achievements <- data.frame( matrix( c( 1, 1, 0, 1, 2, 3, 1, 1, 3, 4, 1, 1, 4, 2, 0, 1), nrow=4, byrow=TRUE ) )# Functions to get or set the names of an object.names( achievements ) <- c( "objective", "priority", "p", "n" )achievements soln <- llgp( coefficients, targets, achievements )soln$outprint( soln$out) A glimpse of captured results from executing "R" code which I will explain in detail to derive a conclusion. The result above denotes that X1 is 0 (7 lampshades were produced in accordance with contractual obligations) and X2 is 7 (7 LED lights). # Use function llgp to solve multi-objective optimization model. d2+= 9 (hours of overutilization in Wiring as the target 12 hour but it was 21 hour) d3+= 5 (5 hours Overtime in Assembly as the target 30 hour but it was 35hours) Note: In order to achieve the optimal result, you don't need any underachievement deviational variable value. The "under" column is set at 0. The optimal solution may include other underachievement variables depending on the issue at hand. Source : https://economictimes.indiatimes.com/jobs/5-ways-to-deal-with-a-colleague-who-takes-all-the-credit/share-credit/slideshow/67636783.cms Hence with this result, we conclude that our high priority goals of target profit and no contractual breach has been well-taken care of at the expense of lower priority goals as goal programming works on the "Satisficing" principle rather than complete minimization or maximization principle. The goal priority and constraints are such that the best solution will be found. I hope you enjoyed this. Follow me on LinkedIn at Suriya Ghosh and Twitter @isupriyaghosh. Part 2 of the Multi-Objective Optimization model Solved using R was published originally in . Medium users are responding by highlighting this story. Published via

THE FOREFRONT OF TECHNOLOGY

We monitors and writes about new technologies in areas such as technology, innovation, digitization, space, Earth, IT and AI.

Related Posts

Leave a Reply