I am trying to write the following expression in Gurobi+Java or Gurobi+python, if it is more practical It could be expressed as a big-M formulation.
\begin{equation} \label{const4} \text{D}_{uv} = \begin{cases} \quad 0 & \quad \text{if } \quad Z_{uv}+Z_{vu} = 1\\ \quad 0.3 & \quad \text{if } \quad Z_{uu}+Z_{vv} = 2 \\ \quad 0.7 & \quad \text{if } \quad P_{u}= 1 \\ \end{cases} \end{equation}
the variable $D_{uv}$ is used in a minimization objective function, where $C_{uv}$ is the parameter cost. I want to update the value for the variable $D_{uv}$, according to the behaviour of variable $Z_{uv}$ and $P_{u}$.
\begin{equation} f_{min}= \sum_{(u,v) \in P(i,j)} C_{uv} (\text{D}_{uv}) \end{equation}
I used the method GRBModel.AddGenConstrIndicator() (Gurobi+Java), but, when any of the conditions are fulfilled I do not see any changes in the value for variable $D_{uv}$, it does not change at all.
I want to express these conditional statements using the indicator constraints by gurobi, if it is not possible, I would like to use a big-M formulation. I have tried to express the conditional statements as big-M formulations without success.