I am trying to formulate a network recovery problem. A part of this problem is to define a variable ω indicating whether or not damaged nodes in a network will be selected to be restored. Therefore, the number of ω is dependent on the number of damaged nodes, which is a random variable as well due to the uncertainty around the disruption.
One option depending on the rest of your model if you are willing to solve an integer program is to use a disjunctive constraint. Define Omega for all nodes and then add two constraints. The following pseudo code illustrates the idea:
Omega[i] <= M*(1-is_damaged_node[i])
Omega[i] >= -M*(1-is_damaged_node[i])
is_damaged_node[i] is binary for all I
And the variable M is chosen to be big enough that when is_damaged_node[i] == 0 the variable Omega[i]is unconstrained and is otherwise set to zero.