I'd like to minimize a function, which takes a 3x8 matrix of non-negative integers as input. Each row specifies a variable, whereas each column specifies a certain time point in the system. See the input in CSV format below.
,Time0,Time1,Time2
U_i,0,0,0
U_o,0,0,0
C_i,0,0,0
C_o,0,0,0
T_i,0,0,0
T_o,0,0,0
D_i,0,0,0
D_o,0,0,0
The constraints for each column is:
C_i + T_i >= U_i
C_o + T_o >= U_o
D_i <= 15
D_o <= 15
D_i = 0 if C_i == 0
D_o = 0 if C_o == 0
And the overall constraint across rows is C_i + C_o + T_i + T_o = 5. I've looked at scipy.optimize, but cannot find a proper method that handles integers. Could someone give me a hint or a MWE on how to do this?