I am not familiar with linear programming. My expertise is in statistics, econometrics. So I might have written the code with some errors.
But I have searched the sources as much as I can. In the article I reviewed, it was suggested to use mixed-integer linear programming for variable selection in DEA.
I attached the Equation and I wrote the code as below, but the R gives errors in the last 5 codes (in constraints). What I may have written wrong?
I would be very happy if anyone who knows about the subject helps.
Thank you
model <- MIPModel() %>%
+ add_variable(pi[i],i=1:45,type="binary") %>%
+ add_variable(p[i],i=1:45,type="binary") %>%
+ add_variable(y1[i],i=1:45,type="C") %>%
+ add_variable(x1[i],i=1:45,type="C") %>%
+ add_variable(z1[i],i=1:45,type="C") %>%
+ set_objective(sum_expr(u[i]*y1[i]-w[i]*z1[i]+c[i],i=1:45)) %>%
+ add_constraint((v[i]*x1[i],i=1:45)=1))
+ add_constraint((y1*u[i]-x1*v[i]-z1*w[i]+c[i],i:1=45)<=0)
+ add_constraint((sum_expr(pi^[i],i=1:5)+(sum_expr(p^[i],i=2:10))<=3)
+ add_constraint(u[i],ub=pi)
+ add_constraint(w[i],ub=p) ```
(v[i]*x1[i],i=1:45)=1. That does not make sense to me. My version of OMPR is already complaining abouttype="C". I would suggest developing the model more slowly, i.e. one constraint at the time. It also would help to post more complete code that we can run. Also, if you are more familiar with matrix notation, you may want to look at cvxr.