-1

I have to maximize this function

$max \sum_{i=0}^{n}x_{i}$ , $\bar{x}\in \mathbb{Z}, \bar{x}\geq 0$

is to possible to define this as a constraint ?

$\sum_{t=0}^{T_{i}}M_{i,x_{i+t}}= T_{i}$

(I'm using a variable as subscript,M is a matrix of variables, and Ti is given)

Koinos
  • 191

1 Answers1

1

Add a constraint $x_i = \sum_{k=1}^p k y_k$ with $y_i \in \{0,1\}$, so that $y_k=1$ if $x_i=k$. Then $M_{i,x_{i+t}} = \sum_{j=1}^{n} M_{i,j} y_{i+t}$.

LinAlg
  • 19,822
  • Thanks so much @LinAlg , i answered this because i thought i can use this concept in order to solve the problem in the link below, what do you think ? https://math.stackexchange.com/questions/2946184/stuck-with-a-integer-programming-problem – Koinos Oct 08 '18 at 06:46