Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. ---
  2. title: "Linear Programming - Day Two Starter"
  3. author: "A Beautiful Individual <3"
  4. date: "April 18, 2019"
  5. output: html_document
  6. ---
  7.  
  8. ```{r setup, include=FALSE}
  9. knitr::opts_chunk$set(echo = TRUE)
  10. ```
  11.  
  12. # Setup
  13.  
  14. ## Install and Load Packages
  15. ```{r}
  16. pkgLoad <- function(x)
  17. {
  18. if (!require(x,character.only = TRUE))
  19. {
  20. install.packages(x,dep=TRUE)
  21. if(!require(x,character.only = TRUE)) stop("Package not found")
  22. }
  23. }
  24.  
  25. pkgLoad('lpSolve')
  26. pkgLoad('lpSolveAPI')
  27. ```
  28.  
  29. # Apple Code
  30.  
  31. ## Create our LP Model
  32. ```{r}
  33. ```
  34.  
  35. ## Add Constraints
  36. ```{r}
  37. ```
  38.  
  39. ## Add Objective Function and Max
  40. ```{r}
  41. ```
  42.  
  43. ## Solve and View Model
  44. ```{r}
  45. ```
  46.  
  47. ## View Variables, Sensitivity, and Objective
  48. ```{r}
  49. ```
  50.  
  51. # Raikes Admission Knapsack
  52. ## Create our LP Model
  53. ```{r}
  54. ```
  55.  
  56. ## Add Constraints
  57. ```{r}
  58. ```
  59.  
  60. ## Add Objective Function and Max
  61. ```{r}
  62. ```
  63.  
  64. ## Update Type to Binary
  65. ```{r}
  66. ```
  67.  
  68. ## Solve and View Model
  69. ```{r}
  70. ```
  71.  
  72. ## View Variables, Sensitivity, and Objective
  73. ```{r}
  74. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement