1 Technical Appendix

Clear environment and load libraries

# Clear environment of variables and functions
rm(list = ls(all = TRUE)) 

# Clear environmet of packages
if(is.null(sessionInfo()$otherPkgs) == FALSE)lapply(paste("package:", names(sessionInfo()$otherPkgs), sep=""), detach, character.only = TRUE, unload = TRUE)
# Load lpSolve package to demonstrate simple LP
library(lpSolve)
library(lpSolveAPI)
library(tidyverse)
## ── Attaching packages ──────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse 1.2.1 ──
## ✔ ggplot2 3.2.1     ✔ purrr   0.3.2
## ✔ tibble  2.1.3     ✔ dplyr   0.8.3
## ✔ tidyr   1.0.0     ✔ stringr 1.4.0
## ✔ readr   1.3.1     ✔ forcats 0.4.0
## ── Conflicts ─────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
`%>%` <- magrittr::`%>%`
library(knitr)
library(kableExtra)
## 
## Attaching package: 'kableExtra'
## The following object is masked from 'package:dplyr':
## 
##     group_rows
library(nloptr)
library(patchwork)
library(queueing)
#import peices data
df <- read.csv(file = 'Data.csv')
head(df)
##     Artist            Piece
## 1 Nicholas       Perfection
## 2 Nicholas           Burden
## 3 Nicholas        Emergence
## 4     Rita           Beyond
## 5     Rita Who Has Control?
## 6     Rita    Domestication
##                                                   Description.of.Piece
## 1                              A wire mesh sculpture of the human body
## 2                                      A wire mesh sculpture of a mule
## 3                                       A wire mesh sculpture of a man
## 4                              A series of computer-generated drawings
## 5 A computer-generated drawing intermeshed with lines of computer code
## 6                                     A pen-and-ink drawing of a house
##   Gender  Price Painting       Medium.Style
## 1      M 300000        N          Wire Mesh
## 2      M 250000        N          Wire Mesh
## 3      M 125000        N          Wire Mesh
## 4      F 400000        N Computer-generated
## 5      F 500000        N Computer-generated
## 6      F 400000        N            Drawing

1.1 Proposal 1

1.1.1 Set up problem

  • Maximize the number of pieces displayed x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 + x10 + x11 + x12 + x13 + x14 + x15 + x16 + x17 + x18 + x19 + x20 + x21 + x22 + x23 + x24 + x25 + x26 + x27 + x28 + x29 + x30 + x31 + x32 + x33 + x34

  • Subject to x9 + x16 + x29 + x30 = 1 (only one collage)

    x1 + x2 + x3 - x4 - x5 - M <= 0 (at least one wire mesh sculpture displayed if a computer-generated drawing is displayed.

    x4 + x5 - x1 - x2 - x3 + M <= 0 + M Alternatively, she wants at least one computer-generated drawing displayed if a wire mesh sculpture is displayed)

    x14 + x15 + x19 >= 1 (at least one photo-realistic) x20 + x27 + x28 >= 1 (at least one cubist) x21 = 1 (at least one expressionist painting) x10 + x11 + x31 + x32 + x33 + x34 >= 1 (at least one watercolor painting) x12 + x13 + x22 + x24 + x26 >= 1 (at least one oil painting)

    (painting - 3arts <= 0) (the number of paintings to be no greater than three times the number of other art forms)

    x10 + x11 = 2 (both of Helen paintings displayed) x14 + x15 >= 1 x19 + x20 + x21 >= 1 (x14 + x15) - (x19 + x20 + x21) = 0 (display as many pieces from Darcy as from Emma and to display at least one piece from each of them) x29 + x30 <= 1 (only accept one display piece from Rick, if any at all)

    (male - 3female <= 0) (at least one piece from a female artist for every three pieces included from a male artist)

    x8 + x9 >= 1 (either one or both of the pieces “Aging Earth” and “Wasted Resources”) x24 + x25 + x26 >= 1 (at least one piece by Stuart) x4 + x5 + x22 + x23 >= 1 (at least one of the following pieces: “Beyond,”“Who Has Control,” “Where are we now?”and “Pioneers.”)

    x1 + x2 + x3 + x8 + x17 + x18 <= 4 (space for four sculptures)

    x4 + x5 + x6 + x7 + x9 + x10 + x11 + x12 + x13 + x14 + x15 + x16 + x19 + x20 + x21 + x22 + x23 + x24 + x25 + x26 + x27 + x28 + x29 + x30 + x31 + x32 + x33 + x34 <= 20 (enough floor space for four sculptures and enough wall space for around 20 paintings, collages, and drawings)

    x17 - x30 >= 0 (if “Narcissism” is displayed, “Reflection” should also be displayed)

    (budget limitation)

1.1.2 Set up the model

# This model has 34 + 1 variables that are binary
prop1 <- make.lp(0, 35)
set.type(prop1, 1:35, "binary")
lp.control(prop1, sense = "max")
## $anti.degen
## [1] "fixedvars" "stalling" 
## 
## $basis.crash
## [1] "none"
## 
## $bb.depthlimit
## [1] -50
## 
## $bb.floorfirst
## [1] "automatic"
## 
## $bb.rule
## [1] "pseudononint" "greedy"       "dynamic"      "rcostfixing" 
## 
## $break.at.first
## [1] FALSE
## 
## $break.at.value
## [1] 1e+30
## 
## $epsilon
##       epsb       epsd      epsel     epsint epsperturb   epspivot 
##      1e-10      1e-09      1e-12      1e-07      1e-05      2e-07 
## 
## $improve
## [1] "dualfeas" "thetagap"
## 
## $infinite
## [1] 1e+30
## 
## $maxpivot
## [1] 250
## 
## $mip.gap
## absolute relative 
##    1e-11    1e-11 
## 
## $negrange
## [1] -1e+06
## 
## $obj.in.basis
## [1] TRUE
## 
## $pivoting
## [1] "devex"    "adaptive"
## 
## $presolve
## [1] "none"
## 
## $scalelimit
## [1] 5
## 
## $scaling
## [1] "geometric"   "equilibrate" "integers"   
## 
## $sense
## [1] "maximize"
## 
## $simplextype
## [1] "dual"   "primal"
## 
## $timeout
## [1] 0
## 
## $verbose
## [1] "neutral"
set.objfn(prop1, c(rep(1,34),0))
M <- 1000

#x9 + x16 + x29 + x30 = 1 (only one collage)
add.constraint(prop1, c(rep(0,8),1, rep(0,6),1, rep(0,12),1,1,rep(0,5)), "=", 1)

#x1 + x2 + x3 - x4 - x5 - M <= 0 (at least one wire mesh sculpture displayed if a computer-generated drawing is displayed)
add.constraint(prop1, c(1,1,1,-1,-1,rep(0,29),-M), "<=", 0)

#x4 + x5 - x1 - x2 - x3 + M <= 0 + M (Alternatively, she wants at least one computer-generated drawing displayed if a wire mesh sculpture is displayed)
add.constraint(prop1, c(-1,-1,-1,1,1,rep(0,29),M), "<=", 0 + M)

#14x + x15 + x19 >= 1 (at least one photo-realistic)
add.constraint(prop1, c(rep(0,13),1,1,0,0,0,1,rep(0,16)), ">=", 1)

#x20 + x27 + x28 >= 1 (at least one cubist)
add.constraint(prop1, c(rep(0,19),1,0,0,0,0,0,0,1,1,rep(0,7)), ">=", 1)

#x21 = 1 (at least one expressionist painting)
add.constraint(prop1, c(rep(0,20),1,rep(0,14)), "=", 1)

#x10 + x11 + x31 + x32 + x33 + x34 >= 1 (at least one watercolor painting)
add.constraint(prop1, c(rep(0,9),1,1,rep(0,19),1,1,1,1,0), ">=", 1)

#x12 + x13 + x22 + x23 + x26  >= 1 (at least one oil painting)
add.constraint(prop1, c(rep(0,11),1,1,rep(0,8),1,1,0,0,1,rep(0,9)), ">=", 1)
  
#painting - 3arts <= 0
#the number of paintings to be no greater than three times the number of other art forms
add.constraint(prop1,c(rep(3,9),rep(-1,6),rep(3,3),rep(-1,5),3,3,rep(-1,3),3,3,rep(-1,4),0), ">=", 0)

#x10 + x11 = 2 (both of Helen paintings displayed)
add.constraint(prop1, c(rep(0,9),1,1,rep(0,24)), "=", 2)

#display as many pieces from Darcy as from Emma and to display at least one piece from each of them
#x14 + x15 >= 1
add.constraint(prop1, c(rep(0,13),1,1,rep(0,20)), ">=", 1)

#x19 + x20 + x21 >= 1
add.constraint(prop1, c(rep(0,18),1,1,1,rep(0,14)), ">=", 1)
  
#(x14 + x15) - (x19 + x20 + x21) = 0
add.constraint(prop1, c(rep(0,13),1,1,0,0,0,-1,-1,-1,rep(0,14)), "=", 0)

#29 + x30 <= 1 (only accept one display piece from Rick, if any at all)
add.constraint(prop1, c(rep(0,28),1,1,rep(0,5)), "<=", 1)

#(male - 3female <= 0)
#at least one piece from a female artist for every three pieces included from a male artist
add.constraint(prop1,c(-1,-1,-1,rep(3,4),-1,-1,3,3,rep(-1,4),rep(3,3),rep(-1,8),3,3,rep(-1,6),0), ">=", 0)

#x8 + x9 >= 1 (either one or both of the pieces “Aging Earth” and “Wasted Resources")
add.constraint(prop1, c(rep(0,7),1,1,rep(0,26)), ">=", 1)

#x24 + x25 + x26 >= 1 (at least one piece by Stuart)
add.constraint(prop1, c(rep(0,23),1,1,1,rep(0,9)), ">=", 1)

#x4 + x5 + x22 + x23 >= 1 (at least one of the following pieces: “Beyond,”“Who Has Control,”“Where are we now?” and “Pioneers.”)
add.constraint(prop1, c(rep(0,3),1,1,rep(0,16),1,1,rep(0,12)), ">=", 1)
  
#x1 + x2 + x3 + x8 + x17 + x18 <= 4 (space for four sculptures)
add.constraint(prop1, c(1,1,1,0,0,0,0,1,rep(0,8),1,1,rep(0,17)), "<=", 4)

#x4 + x5 + x6 + x7 + x9 + x10 + x11 + x12 + x13 + x14 + x15 + x16 + x19 + x20 + x21 + x22 + x23 + x24 + x25 + x26 + x27 + x28 + x29 + x30 + x31 + x32 + x33 + x34 <= 20
#(enough floor space for four sculptures and enough wall space for around 20 paintings, collages, and drawings)
add.constraint(prop1, c(0,0,0,1,1,1,1,0,rep(1,8),0,0,rep(1,16),0), "<=", 20)

#x17 - x30 >= 0 (if “Narcissism” is displayed, “Reflection” should also be displayed)
add.constraint(prop1, c(rep(0,16),1,rep(0,12),-1,rep(0,5)), ">=", 0)

#budget limitation
add.constraint(prop1, c(df$Price,0),"<=", 4000000)

# review model
prop1
## Model name: 
##   a linear program with 35 decision variables and 22 constraints

1.1.3 Solve model

solve(prop1)
## [1] 0
get.variables(prop1)
##  [1] 0 0 0 1 0 0 0 0 1 1 1 1 1 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 1 1 1 1 0
#cost
sum(get.variables(prop1)[1:34] * c(df$Price))
## [1] 3975000
get.objective(prop1)
## [1] 15

1.1.4 Result

  • Maximum 15 peices are displayed

  • Art pieces are displayed as below table shown

1.2 Proposal 2

1.2.1 Set up problem

  • Minimize cost: 300000x1+250000x2+125000x3+400000x4+500000x5+400000x6+550000x7+700000x8+575000x9+125000x10+300000x11+150000x12+150000x13+850000x14+750000x15+400000x16+175000x17+450000x18+500000x19+500000x20+500000x21+650000x22+650000x23+250000x24+350000x25+450000x26+400000x27+400000x28+300000x29+300000x30+50000x31+50000x32+50000x33+50000x34

  • Display at least 20 pieces.

1.2.2 Set up the model

# This model has 34 + 1 variables that are binary
prop2 <- make.lp(0, 35)
set.type(prop2, 1:35, "binary")
lp.control(prop2, sense = "min")
## $anti.degen
## [1] "fixedvars" "stalling" 
## 
## $basis.crash
## [1] "none"
## 
## $bb.depthlimit
## [1] -50
## 
## $bb.floorfirst
## [1] "automatic"
## 
## $bb.rule
## [1] "pseudononint" "greedy"       "dynamic"      "rcostfixing" 
## 
## $break.at.first
## [1] FALSE
## 
## $break.at.value
## [1] -1e+30
## 
## $epsilon
##       epsb       epsd      epsel     epsint epsperturb   epspivot 
##      1e-10      1e-09      1e-12      1e-07      1e-05      2e-07 
## 
## $improve
## [1] "dualfeas" "thetagap"
## 
## $infinite
## [1] 1e+30
## 
## $maxpivot
## [1] 250
## 
## $mip.gap
## absolute relative 
##    1e-11    1e-11 
## 
## $negrange
## [1] -1e+06
## 
## $obj.in.basis
## [1] TRUE
## 
## $pivoting
## [1] "devex"    "adaptive"
## 
## $presolve
## [1] "none"
## 
## $scalelimit
## [1] 5
## 
## $scaling
## [1] "geometric"   "equilibrate" "integers"   
## 
## $sense
## [1] "minimize"
## 
## $simplextype
## [1] "dual"   "primal"
## 
## $timeout
## [1] 0
## 
## $verbose
## [1] "neutral"
set.objfn(prop2, c(df$Price,0))
M <- 1000

#x9 + x16 + x29 + x30 = 1 (only one collage)
add.constraint(prop2, c(rep(0,8),1, rep(0,6),1, rep(0,12),1,1,rep(0,5)), "=", 1)

#x1 + x2 + x3 - x4 - x5 - M <= 0 (at least one wire mesh sculpture displayed if a computer-generated drawing is displayed)
add.constraint(prop2, c(1,1,1,-1,-1,rep(0,29),-M), "<=", 0)

#x4 + x5 - x1 - x2 - x3 + M <= 0 + M (Alternatively, she wants at least one computer-generated drawing displayed if a wire mesh sculpture is displayed)
add.constraint(prop2, c(-1,-1,-1,1,1,rep(0,29),M), "<=", 0 + M)

#14x + x15 + x19 >= 1 (at least one photo-realistic)
add.constraint(prop2, c(rep(0,13),1,1,0,0,0,1,rep(0,16)), ">=", 1)

#x20 + x27 + x28 >= 1 (at least one cubist)
add.constraint(prop2, c(rep(0,19),1,0,0,0,0,0,0,1,1,rep(0,7)), ">=", 1)

#x21 = 1 (at least one expressionist painting)
add.constraint(prop2, c(rep(0,20),1,rep(0,14)), "=", 1)

#x10 + x11 + x31 + x32 + x33 + x34 >= 1 (at least one watercolor painting)
add.constraint(prop2, c(rep(0,9),1,1,rep(0,19),1,1,1,1,0), ">=", 1)

#x12 + x13 + x22 + x23 + x26  >= 1 (at least one oil painting)
add.constraint(prop2, c(rep(0,11),1,1,rep(0,8),1,1,0,0,1,rep(0,9)), ">=", 1)
  
#painting - 3arts <= 0
#the number of paintings to be no greater than three times the number of other art forms
add.constraint(prop2,c(rep(3,9),rep(-1,6),rep(3,3),rep(-1,5),3,3,rep(-1,3),3,3,rep(-1,4),0), ">=", 0)

#x10 + x11 = 2 (both of Helen paintings displayed)
add.constraint(prop2, c(rep(0,9),1,1,rep(0,24)), "=", 2)

#display as many pieces from Darcy as from Emma and to display at least one piece from each of them
#x14 + x15 >= 1
add.constraint(prop2, c(rep(0,13),1,1,rep(0,20)), ">=", 1)

#x19 + x20 + x21 >= 1
add.constraint(prop2, c(rep(0,18),1,1,1,rep(0,14)), ">=", 1)
  
#(x14 + x15) - (x19 + x20 + x21) = 0
add.constraint(prop2, c(rep(0,13),1,1,0,0,0,-1,-1,-1,rep(0,14)), "=", 0)

#29 + x30 <= 1 (only accept one display piece from Rick, if any at all)
add.constraint(prop2, c(rep(0,28),1,1,rep(0,5)), "<=", 1)

#(male - 3female <= 0)
#at least one piece from a female artist for every three pieces included from a male artist
add.constraint(prop2,c(-1,-1,-1,rep(3,4),-1,-1,3,3,rep(-1,4),rep(3,3),rep(-1,8),3,3,rep(-1,6),0), ">=", 0)

#x8 + x9 >= 1 (either one or both of the pieces “Aging Earth” and “Wasted Resources")
add.constraint(prop2, c(rep(0,7),1,1,rep(0,26)), ">=", 1)

#x24 + x25 + x26 >= 1 (at least one piece by Stuart)
add.constraint(prop2, c(rep(0,23),1,1,1,rep(0,9)), ">=", 1)

#x4 + x5 + x22 + x23 >= 1 (at least one of the following pieces: “Beyond,”“Who Has Control,”“Where are we now?” and “Pioneers.”)
add.constraint(prop2, c(rep(0,3),1,1,rep(0,16),1,1,rep(0,12)), ">=", 1)
  
#x1 + x2 + x3 + x8 + x17 + x18 <= 4 (space for four sculptures)
add.constraint(prop2, c(1,1,1,0,0,0,0,1,rep(0,8),1,1,rep(0,17)), "<=", 4)

#x4 + x5 + x6 + x7 + x9 + x10 + x11 + x12 + x13 + x14 + x15 + x16 + x19 + x20 + x21 + x22 + x23 + x24 + x25 + x26 + x27 + x28 + x29 + x30 + x31 + x32 + x33 + x34 <= 20
#(enough floor space for four sculptures and enough wall space for around 20 paintings, collages, and drawings)
add.constraint(prop2, c(0,0,0,1,1,1,1,0,rep(1,8),0,0,rep(1,16),0), "<=", 20)

#x17 - x30 = 0 (if “Narcissism” is displayed, “Reflection” should also be displayed)
add.constraint(prop2, c(rep(0,16),1,rep(0,12),-1,rep(0,5)), ">=", 0)

#peices limitation
add.constraint(prop2, c(rep(1,34),0),">=", 20)

# review model
prop2
## Model name: 
##   a linear program with 35 decision variables and 22 constraints

1.2.3 Solve model

solve(prop2)
## [1] 0
get.variables(prop2)
##  [1] 1 1 1 1 0 1 0 0 1 1 1 1 1 0 1 0 1 0 0 0 1 0 0 1 1 0 0 1 0 0 1 1 1 1 1
sum(get.variables(prop2)[1:34])
## [1] 20
get.objective(prop2)
## [1] 5400000

1.2.4 Result

  • Exhibit cost is 5.4M

  • 20 peices are displayed

  • Art pieces are displayed as below table shown

1.3 Proposal 3

1.3.1 Set up problem

Apparently Valentina and Celeste were using an old pricing sheet when they made their exhibit decisions. They still want to maintain the same criteria, but realize the cost of each piece of art could increase or decrease by as much as 20% of the cost on the old price sheet. That is, the random price change of each piece can range between –20% and +20% independently with equal probability. How does that possibility impact the cost of Celeste’s plan in part 2?

1.3.2 Set up the model

# number of simulations
n <- 1000
set.seed(1234)
# Intialize vector to hold simulation results
p3 <- vector()

for(i in 1:n){
  
# This model has 34 + 1 variables that are binary
prop3 <- make.lp(0, 35)
set.type(prop3, 1:35, "binary")
lp.control(prop3, sense = "min")

M <- 1000
obj_fn <- c(runif(34, (df$Price)*0.8, (df$Price)*1.2), 0)
set.objfn(prop3, obj_fn)


#x9 + x16 + x29 + x30 = 1 (only one collage)
add.constraint(prop3, c(rep(0,8),1, rep(0,6),1, rep(0,12),1,1,rep(0,5)), "=", 1)

#x1 + x2 + x3 - x4 - x5 - M <= 0 (at least one wire mesh sculpture displayed if a computer-generated drawing is displayed)
add.constraint(prop3, c(1,1,1,-1,-1,rep(0,29),-M), "<=", 0)

#x4 + x5 - x1 - x2 - x3 + M <= 0 + M (Alternatively, she wants at least one computer-generated drawing displayed if a wire mesh sculpture is displayed)
add.constraint(prop3, c(-1,-1,-1,1,1,rep(0,29),M), "<=", 0 + M)

#14x + x15 + x19 >= 1 (at least one photo-realistic)
add.constraint(prop3, c(rep(0,13),1,1,0,0,0,1,rep(0,16)), ">=", 1)

#x20 + x27 + x28 >= 1 (at least one cubist)
add.constraint(prop3, c(rep(0,19),1,0,0,0,0,0,0,1,1,rep(0,7)), ">=", 1)

#x21 = 1 (at least one expressionist painting)
add.constraint(prop3, c(rep(0,20),1,rep(0,14)), "=", 1)

#x10 + x11 + x31 + x32 + x33 + x34 >= 1 (at least one watercolor painting)
add.constraint(prop3, c(rep(0,9),1,1,rep(0,19),1,1,1,1,0), ">=", 1)

#x12 + x13 + x22 + x23 + x26  >= 1 (at least one oil painting)
add.constraint(prop3, c(rep(0,11),1,1,rep(0,8),1,1,0,0,1,rep(0,9)), ">=", 1)
  
#painting - 3arts <= 0
#the number of paintings to be no greater than three times the number of other art forms
add.constraint(prop3,c(rep(3,9),rep(-1,6),rep(3,3),rep(-1,5),3,3,rep(-1,3),3,3,rep(-1,4),0), ">=", 0)

#x10 + x11 = 2 (both of Helen paintings displayed)
add.constraint(prop3, c(rep(0,9),1,1,rep(0,24)), "=", 2)

#display as many pieces from Darcy as from Emma and to display at least one piece from each of them
#x14 + x15 >= 1
add.constraint(prop3, c(rep(0,13),1,1,rep(0,20)), ">=", 1)

#x19 + x20 + x21 >= 1
add.constraint(prop3, c(rep(0,18),1,1,1,rep(0,14)), ">=", 1)
  
#(x14 + x15) - (x19 + x20 + x21) = 0
add.constraint(prop3, c(rep(0,13),1,1,0,0,0,-1,-1,-1,rep(0,14)), "=", 0)

#29 + x30 <= 1 (only accept one display piece from Rick, if any at all)
add.constraint(prop3, c(rep(0,28),1,1,rep(0,5)), "<=", 1)

#(male - 3female <= 0)
#at least one piece from a female artist for every three pieces included from a male artist
add.constraint(prop3,c(-1,-1,-1,rep(3,4),-1,-1,3,3,rep(-1,4),rep(3,3),rep(-1,8),3,3,rep(-1,6),0), ">=", 0)

#x8 + x9 >= 1 (either one or both of the pieces “Aging Earth” and “Wasted Resources")
add.constraint(prop3, c(rep(0,7),1,1,rep(0,26)), ">=", 1)

#x24 + x25 + x26 >= 1 (at least one piece by Stuart)
add.constraint(prop3, c(rep(0,23),1,1,1,rep(0,9)), ">=", 1)

#x4 + x5 + x22 + x23 >= 1 (at least one of the following pieces: “Beyond,”“Who Has Control,”“Where are we now?” and “Pioneers.”)
add.constraint(prop3, c(rep(0,3),1,1,rep(0,16),1,1,rep(0,12)), ">=", 1)
  
#x1 + x2 + x3 + x8 + x17 + x18 <= 4 (space for four sculptures)
add.constraint(prop3, c(1,1,1,0,0,0,0,1,rep(0,8),1,1,rep(0,17)), "<=", 4)

#x4 + x5 + x6 + x7 + x9 + x10 + x11 + x12 + x13 + x14 + x15 + x16 + x19 + x20 + x21 + x22 + x23 + x24 + x25 + x26 + x27 + x28 + x29 + x30 + x31 + x32 + x33 + x34 <= 20
#(enough floor space for four sculptures and enough wall space for around 20 paintings, collages, and drawings)
add.constraint(prop3, c(0,0,0,1,1,1,1,0,rep(1,8),0,0,rep(1,16),0), "<=", 20)

#x17 - x30 = 0 (if “Narcissism” is displayed, “Reflection” should also be displayed)
add.constraint(prop3, c(rep(0,16),1,rep(0,12),-1,rep(0,5)), ">=", 0)

#peices limitation
add.constraint(prop3, c(rep(1,34),0),">=", 20)

# Solve the model
solve(prop3)

#output
p3 <- rbind(p3, get.objective(prop3))

}
# Convert obj fn to positive for max
p3[,1] <- -1*p3[,1]

# Make table
out_w <- round(rbind(apply(p3, 2, mean), apply(p3, 2, sd), 
             apply(p3, 2, max), apply(p3, 2, min)), 2)
rownames(out_w) <- c("mean", "sd", "max", "min")
colnames(out_w) <- c("Total Cost")

# Print output
kable(out_w, caption = "Loop results") %>%
  kable_styling(bootstrap_options = c("striped", "bordered"))
Loop results
Total Cost
mean -5323365.3
sd 157804.5
max -4870831.3
min -5807792.8
p3_sim <- as.data.frame(p3) %>% 
  ggplot(aes(x = p3[,1])) + geom_histogram(bins = 20, fill = "white", color = "black") + 
  geom_vline(xintercept = mean(p3[,1]), color = "red") +
  labs(title = "Cost Distribution from 1000 simulation", x = "Total Cost") + theme_classic() + geom_density()

p3_sim

1.3.3 Result

  • 1000 simulations have been running in term of the cost of each piece of art could be increased or decreased by as much as 20%. As above shown, the result indicates that the uncertain cost of each piece of art impacts the total cost between $4.8 million and $5.8 million with an average of total cost $5.3 million.

2 Memo

To: Guggenheim Museum Board of Directors

From: Yun Tzu (Gloria) Chen

Date: 06/08/2020

RE: Guggenheim Museum proposals 1 – 3 analysis


Dear Board of Directors,

Regarding curating a new exhibit, I have analyzed different proposals to accomplish all the specific requirements from art director Celeste and artist Valentino. Based on the 34 art pieces that Valentino provided, there are three different proposals to maximize the pieces that can be displayed, reduce the total cost of displaying, and calculate the impact of the uncertain cost of each piece. In the following, there are more detail of each proposal presented.

2.1 Proposal 1

The Guggenheim decides to allocate $4 million to fund the exhibit and the specific requirements from Celeste and Valentino, my analysis shows that there are maximum 15 pieces can be displayed in the exhibit without exceeding the budget. Table 1 shows the 15 art pieces that should be displayed. Therefore, the total cost for this proposal is $3.975 million.

Table 1: List of 15 art peices displayed based on proposal 1

2.2 Proposal 2

To ensure that the exhibit draws the attention of the public, Celeste decides that it must include at least 20 pieces. My analysis shows that the minimum total cost for these requirements is 5.4 million. Table 2 shows that 20 art pieces should be displayed at the exhibit.

Table 2: List of 20 art peices displayed based on proposal 2

2.3 Proposal 3

Valentina and Celeste realize the cost of each piece of art could increase or decrease by as much as 20% of the cost on the old price sheet. With this uncertainty, I ran 1000 simulation in term of the cost of each piece of art could be increased or decreased by as much as 20%. In Table 3, the result indicates that the uncertain cost of each piece of art impacts the total cost between $4.8 million and $5.8 million with an average of total cost $5.3 million. The chart of distribution of cost from 1000 simulation is also provided as below shown.

Table 3: Impact on proposal 2 with uncertain cost
Total Cost
mean 5323365.3
sd 157804.5
max 5807792.8
min 4870831.3

Above are the three analyses based on three proposals and the requirements that Valentina and Celeste provided. I’d like to discuss further if anything is not clear or needs to be elaborated more. Please feel free to contact me through my email: . Thank you!

Best regards,

Gloria