You should know that this part wont work, well it will but not the way you want it to be
// Naming the analog pins:
int analog_pin_0 = 0;
int analog_pin_1 = 1;
int analog_pin_2 = 2;
int analog_pin_3 = 3;
int analog_pin_4 = 4;
int analog_pin_5 = 5;
The right way to declare an analog pin is by using A0 to A5 in your case like this
// Naming the analog pins:
int analog_pin_0 = A0;
int analog_pin_1 = A1;
int analog_pin_2 = A2;
int analog_pin_3 = A3;
int analog_pin_4 = A4;
int analog_pin_5 = A5;
one part that i an wondering is that
I am working on a project that takes the input of two analog sensors and outputs one PWM signal as a function of the two.
but in your code
T_min = analogRead(analog_pin_0);
T_max = analogRead(analog_pin_1);
T = analogRead(analog_pin_2);
......
P_min = analogRead(analog_pin_3);
P_max = analogRead(analog_pin_4);
P = analogRead(analog_pin_5);
do you use 2 or 6 Analog pin?
if you are using 2 analog input and you want min, max and current value something along this line should work
int min = 1023;
int max = 0;
int current = analogRead(A0) // Just and example
if ( current < min) min= current;
if ( current > max) max = current;
int Tout = (((1023/ (t_max - t_min)) * (t - t_min))/4);
you know for the output part you do not need any conditioning since the arduino know if 0 its equal to low and 255 equal to high so
analogWrite(pin_f_out, final_out);
would have been enough