I am working on an optimization problem in which my choice variable (to build or not) is a binary variable. The photo attached shows the optimal build choices (solved using Solver in Excel).
I am trying to replicate this problem in R. Minimizing the sum of expected value (EV) with the budget constraint ≤ 30 and build choices as the choice variable.
The problem is that EV changes with the given combination of build decisions. The general formula for it is:
EV = probability of fire (p)*Damage(when there is a fire) + (1-p)*Damage (no fire) + Cost (K).
Damage is 0 when there is no fire. High damage when there is a fire and the plot does not have a tower and low damage when the plot has a tower built on it.
So EV = p*Damage(fire state) + Cost
Plot i: Ten plots of land (size or other attributes do not matter). H: High damage. High damage only if there is no build decision. L: Low damage. Low damage if we chose to build a tower in a given plot. p: Probability of fire. K: Cost of building watch tower. Given B profile: B is a binary variable. B=1 signifies we chose to built in the given plot. EV(B=1): Expected value if we chose to build. EV(B=0): Expected value if we do not build. EV: Final expected value. If we build, EV = EV(B=1) else EV = EV(B=0). Budget constraint: If we build, it is equal to the cost of building, else it is 0.