update the path of Knitro 8.1.1
calculating flow variables based on V(s) and P(d|s)