[SOLVED] CS代写 title: ‘Resource Allocation LP Problem: Blue Ridge Hot Tubs’

30 $

File Name: CS代写_title:_‘Resource_Allocation_LP_Problem:__Blue_Ridge_Hot_Tubs’.zip
File Size: 697.08 KB

SKU: 8066846555 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


title: ‘Resource Allocation LP Problem:Blue Ridge Hot Tubs’
pdf_document: default
html_document: default

Copyright By PowCoder代写加微信 assignmentchef

“`{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)

Two popular R packages for solving linear programming models are: lpSolve and lpSolveAPI.Make sure you have them installed.

#install.packages(‘lpSolve’)
#install.packages(‘lpSolveAPI’)

library(lpSolveAPI)

**Resource Allocation LP Problem:Blue Ridge Hot Tubs**

Blue Ridge Hot Tubs produces two types of hot tubs: Aqua-Spas & Hydro-Luxes. , owner-operator of the company, needs to decide how many of each type of hot tub to produce during the next production cycle.

Howie buys prefabricated fiberglass hot tub shells from a local supplier and adds the pump and tubing to the shells to create his hot tubs. Howie installs the same type of pump into both hot tub models. He will have only 200 pumps available for the next production rub. In manufacturing the hot tubs, the main difference between the Aqua-Spa and Hydro-Lux models is the amount of tubing and labor required. Each Aqua-Spa requires 9 hours of labor and 12 feet of tubing. Each Hydro-Lux requires 6 hours of labor and 16 feet of tubing. Howie expects to have 1,566 production labor hours and 2,880 feet of tubing available.

Howie earns a profit of $350 on each Aqua-Spa he sells and $300 on each Hydro-Lux he sells. How many of each model hot tub should Blue Ridge produce in order to maximize profits during the next production cycle?

Let X1 = # of Aquq-Spa models and X2 = # of Hydro-Lux models.

Maximize 350(X1) + 300(X2)
subject to:
1(X1)+ 1(X2)<= 2009(X1)+ 6(X2)<= 156612(X1) + 16(X2) <= 2800“`{r include=FALSE}## We have 2 decision variables and 3 constraintsmodel <- make.lp(3,2)lp.control(model, sense = “max”)A common convention for defining the model constraints in lpSolve is by column.## columns of constraintsset.column(model, 1, c(1, 9, 12))set.column(model, 2, c(1, 6, 16))## vector for comparison operators in constraintsset.constr.type(model, c(rep(“<=”,3)))## vector for right hand side of constraintsset.rhs(model, c(200,1566,2880))## Now set objective functionset.objfn(model, c(350, 300))##Set type of decision variables, if desired.##Choices are “integer” and “binary”.Default is “Real” (continuous)set.type(model, c(1:2), ‘integer’)## You can set the names of the constraints (rows) and decision variables (columns), if desired.dimnames(model) <- list(c(‘pumps’, ‘labor’, ‘tubing’), c(‘Aqua-Spa’, ‘Hydro-Lux’))## Solve the modelsolve(model)Common status codes:0 – optimal solution found1 – model sub-optimal2 – model infeasible3 – model unbounded7 – timeout## retrieve optimal solutionget.variables(model)## retrieve objective function value at optimal solutionget.objective(model)## retrieve constraint values at optimal solutionget.constraints(model)## retrieve sensitivity valuesget.sensitivity.rhs(model)get.sensitivity.obj(model)“`{r include=FALSE}## Add Typhoon-Lagoon at $320 unit profitmodel2 <- make.lp(3,3)lp.control(model2, sense = “max”)set.column(model2, 1, c(1, 9, 12))set.column(model2, 2, c(1, 6, 16))set.column(model2, 3, c(1, 8, 13))set.constr.type(model2, c(rep(“<=”,3)))set.rhs(model2, c(200,1566,2880))set.objfn(model2, c(350, 300, 320))set.type(model2, c(1:3), ‘integer’)dimnames(model2) <- list(c(‘pumps’, ‘labor’, ‘tubing’), c(‘Aqua-Spa’, ‘Hydro-Lux’, ‘Typhoon-Lagoon’))solve(model2)get.variables(model2)get.objective(model2)get.sensitivity.rhs(model2)get.sensitivity.obj(model2)程序代写 CS代考加微信: assignmentchef QQ: 1823890830 Email: [email protected]

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] CS代写 title: ‘Resource Allocation LP Problem: Blue Ridge Hot Tubs’
30 $