How to embed the preceding knowledge in the training? I am trying to train a neural network that takes Height(X0) and Weight(X1) as input, output the corresponding prediction to calories(y). 
First 4 columns below are part of the training set, the last column is the prediction by the model.
   Height(X0)  Weight(X1)  Calories(y)  Measurement(C)  Prediction(y_hat)
1      177.11       69.85       2800.0             0.0             2800.1
2      167.11       59.85       2600.0            -0.1             2800.2
3      197.11       79.85       3500.0             0.2             2800.3
...

Calories(y) is the target value in the dataset for training. 
"Measurement" is some kind of measurement of Calories(y), whose absolute value is closer to 0, the better, which indicates how precisely the values of Calories(y) is. The negative and positive sign of C denote the direction, negative means less than, positive mean greater than. 
For instance, first record means 2800.0 Calories is the exact amount a person needs whose Height(X0) = 177.11 and Weight(X1) = 69.85;
2nd record means 2600.0 is actually less than the exact amount a person needs whose Height(X0) = 167.11 and Weight(X1) = 59.85;
3rd record means 3500.0 is actually greater than the exact amount a person needs whose Height(X0) = 197.11 and Weight(X1) = 79.85;
Well, those numbers are just used to explain how does the system work, may be wrong to nutritionists.
As to the last column, the learning/training algorithm should keep the prediction for record 1 around 2800, so, 2800.1 is pretty good; prediction for 2nd record would be a bit greater than 2600.0; prediction for 3rd record would be a bit less than 3500.0.
The question is that:
How to put the preceding knowledge "Measurement" in training? 
 A: I think the most sensible way to incorporate this information is by adding it to your loss function when training your model. 
For example we could take the standard loss function of mean square error or mean absolute error and modify it. 
You say it is another question to encode what value the model should predict given $B$ (which I'm going to refer to as $y$) and $C$. Lets just say there is a function $f$ that exists that encodes this. So the best prediction would be $y+f(C)$ instead of $y$ and in the simplest case might be something like $f(C)=C$. 
You could then use the loss function something like
$loss = \frac{(\hat{y}-(y+f(C)))^2}{|\hat{y}-y|}$ if $sign(\hat{y}-y)\neq sign(C)$ else $V$
where $V$ is just some large value. This is shown in the code and plot below. This gives an equivalent of the mean absolute loss. 
You could modify this to higher order (to mean square loss) using something like
$loss = \frac{(|\hat{y}-(y+f(C))|)^3}{|\hat{y}-y|}$
set order=2 below.
Hopefully this form is enough to get you started.
import numpy as np
import matplotlib.pyplot as plt

y0=0 # value of target

ys = y_hats=np.linspace(-3, 3, 10000) # potential predictions of y0, the target

def f(c):
    return c

def loss(y_hat, y, c, order=1, clipval=10):
    sign_penalty = (np.sign(y_hat-y)!= np.sign(c))*clipval
    value_penalty = np.abs(y_hat-(y + f(c)))**(order+1)  * np.abs(y_hat-y)**-1
    penalty = sign_penalty + value_penalty
    return np.clip(penalty, 0, clipval)

plt.plot(ys, loss(ys, y0, c=1, order=1), label='$c=1$')
plt.plot(ys, loss(ys, y0, c=-0.5, order=1), label='$c=-0.5$')
plt.xlabel('y_hat')
plt.ylabel('loss')
plt.legend()
plt.show()


