2
$\begingroup$

I have a C API program uploaded here in Dropbox that is an LP. Here is the problem: When I compile the C file it gives me "1017 Not available for mixed-integer problems" while the problem is apparently LP. At the same time, when it prints its solution, it is integer. However, when I write the lp in a .lp file and solve it with CPLEX terminal, it gives the right solution.

$\endgroup$
8
  • $\begingroup$ Can you identify which line in the C file generates the 1017 error? $\endgroup$
    – prubin
    Dec 19, 2022 at 17:13
  • $\begingroup$ @prubin: This is a small block of a larger callback program. BTW, this is so strange, I never faced something like this. Even in my larger code, I am not able to solve this part as a linear programming. The interesting part is when I change type of variables to integer and use mipopt instead of lpopt. No error at all. $\endgroup$
    – Max
    Dec 19, 2022 at 18:04
  • $\begingroup$ Presumably, you don't have my error! line 2302. $\endgroup$
    – Max
    Dec 19, 2022 at 20:28
  • 1
    $\begingroup$ I don't use C, so I can't run your code. Line 2302 is a print statement, so that's an unlikely location for the error to occur. $\endgroup$
    – prubin
    Dec 19, 2022 at 21:18
  • $\begingroup$ I can provide my makefile if it works for you. Definitely, the error refers to line 2295 (CPXlpopt). Here is the point: even CPXgetprobtype returns MILP, while there is no integer/binary variable in the problem. $\endgroup$
    – Max
    Dec 19, 2022 at 21:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.