I am a engineer who is working on an optimization problem and my constraints are in the form of this statement "if $x_1=1$ then $d_1=1T$" where $T$ is just a given time period.
Scenario 1
Particularly, I need to linearize or formulate an entire system that looks like this:
$\left\{ \begin{array}{l} \begin{array}{*{20}{c}} {{\rm{if}}}&{{x_1} = 1}&{{\rm{then}}}&{{d_1} = 1T} \end{array}\\ \begin{array}{*{20}{c}} {{\rm{if}}}&{{x_2} = 1}&{{\rm{then}}}&{{d_2} = 2T} \end{array}\\ \begin{array}{*{20}{c}} {{\rm{if}}}&{{x_3} = 1}&{{\rm{then}}}&{{d_3} = 3T} \end{array}\\ \begin{array}{*{20}{c}} {...}&{...}&{...}&{...} \end{array}\\ \begin{array}{*{20}{c}} {{\rm{if}}}&{{x_n} = 1}&{{\rm{then}}}&{{d_n} = nT} \end{array} \end{array} \right.$
Scenario 2
$\left\{ {\begin{array}{*{20}{l}} {\begin{array}{*{20}{c}} {{\rm{if}}}&{{x_1} = 1}&{{\rm{then}}}&{{d_1} = 1T}\\ {{\rm{if}}}&{{x_1} = 0}&{{\rm{then}}}&{{d_1} = + \infty } \end{array}}\\ {\begin{array}{*{20}{c}} {{\rm{if}}}&{{x_2} = 1}&{{\rm{then}}}&{{d_2} = 2T}\\ {{\rm{if}}}&{{x_2} = 0}&{{\rm{then}}}&{{d_2} = + \infty } \end{array}}\\ {\begin{array}{*{20}{c}} {{\rm{if}}}&{{x_3} = 1}&{{\rm{then}}}&{{d_3} = 3T}\\ {{\rm{if}}}&{{x_3} = 0}&{{\rm{then}}}&{{d_3} = + \infty } \end{array}}\\ {\begin{array}{*{20}{c}} {...}&{...}&{...}&{...} \end{array}}\\ {\begin{array}{*{20}{c}} {{\rm{if}}}&{{x_n} = 1}&{{\rm{then}}}&{{d_n} = nT}\\ {{\rm{if}}}&{{x_n} = 0}&{{\rm{then}}}&{{d_n} = + \infty } \end{array}} \end{array}} \right.$
Here, the $x$ are binary variables that satisfied ${x_1},{x_2},{x_3},...,{x_n} \in \left\{ {0,1} \right\}$. On the other hand, ${d_1},{d_2},{d_3},...,{d_n} \ge 0$ are just some real non-negative variables. Please help me with this.
Editted
For completeness, I add scenario 2 where some enforcement is needed for the system to work.
The answer of Mr @RobPratt work quite neat but are there anyway to avoid this Big-M formulation ?
Thank you for your enthusiasm !