Replies: 2 comments
-
What are you trying to optimize? Your problem description suggests using discrete event simulation. It appears simple enough to not need a DES app but rather could be coded up in R or perhaps Excel. |
Beta Was this translation helpful? Give feedback.
-
In the optimization model, the objective is to minimize the cost of the system. I have the data for patient arrivals. Let's assume that the objective is min sum (y_i[i] * ICU_LOS[i], for all i). For the capacity constraint, one way is to define a binary variable z[i,t] which will be one if the patient is in ICU and 0 otherwise. But the issue is the t index in z[i,t] is related to another variable in the optimization problem T^ar_i and l[i]. |
Beta Was this translation helpful? Give feedback.
-
I have a model in which I am deciding to send patients to ICU or not. The y_i variable is a binary variable which equals 1 if the patient i is sent to ICU and 0 otherwise. In the model I also have a capacity constraint for ICU (which has 10 beds) at each time period t.
So the patients, whose arrival time (which is a parameter given to the model) to ICU is less than or equal to t and the time they leave ICU is greater than or equal to t, use one capacity unit of the ICU. The length of patient stay in ICU, for each patient i, is also a variable in my optimization problem. Does anyone know how I can formulate this constraint using OMPR?
Model <- Model %>%
add_constraint(sum_expr(y_i[i] * as.numeric(T_ar[i] <= t & t <= T_ar[i] + ICU_LOS[i]), i=1:n) <= 10, t=1:100)
I have tried the above way, but it didn't work, because ICU_LOS[i] is a variable.
Beta Was this translation helpful? Give feedback.
All reactions