0

I'm trying to solve this PL with R Studio:

a<-c(3,4)
A<-matrix(c(2,3,2,1,1,3),nrow = 3, byrow = TRUE)
b<-c(180, 120, 150)
result<-simplex(a, A1=A, b1=b, maxi=TRUE)

I got this after running the last line

Error in simplex(a, A1 = A, b1 = b, maxi = TRUE) :
could not find function "simplex"

how can i solve it ?

Konrad Rudolph
  • 530,221
  • 131
  • 937
  • 1,214
  • 1
    There’s no function called `simplex` in R. You will need to load a package (e.g. ‘boot’) that defines this function (or write it yourself). – Konrad Rudolph Feb 28 '22 at 10:46

1 Answers1

0

To use the function simplex you need to import it first. Simplex is part of the boot-package, you can install and activate it with (usually written at top of the script):

install.packages("boot")
library("boot")

Now it should work.