First rule of integer programming: Avoid nonlinearities at all costs
Second rule of integer programming: See rule 1.
almost at least. As you've coded it now, I guess the last resort bnb solver is invoked, at it explicitly warns you that it will most likely not deliver a good solution.
You will have to model the bilinear products, introduce a variable W1223 to model X(1,2)*X(2,3). W1223 should be zero when either of the two X is zero, and 1 otherwise, i.e W1223 = X(1,2) AND X(2,3)
W1223 = binvar(1,1)
W1223 <= X(1,2)
W1223 <= X(2,3)
W1223 >= X(1,2)+X(2,3)-1
and similar for all terms in P
Objective even worse. Now you have fractional terms.
(2*(X(1,2)+X(2,3))+2*(X(1,4)
+X(4,3))+3*(X(1,2)+X(2,4)+X(4,3)))/P
Write as minimize t subject to 2*(X(1,2)+X(2,3))+2*(X(1,4)
+X(4,3))+3*(X(1,2)+X(2,4)+X(4,3))}/P <= t
which you write as
2*(X(1,2)+X(2,3))+2*(X(1,4)
+X(4,3))+3*(X(1,2)+X(2,4)+X(4,3)) <= t*P = t*(W1223 + ---)
Bilinear terms again, this time between the general variable t and the Wijkl variables. These you also have to model
sdpvar tW1223
...
if W1223 is zero then tW1223 should be zero, otherwise tW1223 should be t. You now W1223 is less than or equal to 1, so the big-M model is
tW1223 <= M*W1223
-M*(1-W1223) <= t-W1223 <= M*(1-W1223)
M is a small-but-sufficiently large big-M constant which you have to derive a good value for. It should follow trivially from your model since it is easy to derive upper bounds on all terms since everything is bounded due to the use of binary variables (for instance, t can never be larger than 17)
http://users.isy.liu.se/johanl/yalmip/pmwiki.php?n=Tutorials.Big-MAndConvexHulls