Forum Discussion

FICO's avatar
FICO
Community Manager
8 years ago

Bug report: problem.loadproblem not correct

Hi,

In Python, I want to give an MIQP to Xpress directly [i.e. in matrix form], as it saves me the time to construct the model. To do so, I am using the problem.loadproblem functionality explained in the manual (page 260-261). I am also using the examples on FICO's website, e.g. https://examples.xpress.fico.com/example.pl?id=LoadLP_python_4

In that specific example, the qptype = ['I','B'] and mgcols = [0,1], which means that the first variable is an integer variable, while the second variable is a binary variable. However, when I run that example, and I check the solution of that example, it gives the following result:

p.getSolution()

>> [-0.6150098373886015, -0.7725461529183737, -0.9974341677681422]

i.e. neither the first nor the second variable values are integer/binary.

Any ideas why this is and how I can circumvent this?

1 Reply

  • FICO's avatar
    FICO
    Community Manager

    Hi Richard,

    it seems to be a bug of loadproblem(): for some reason it expects either integer/binary variables AND special-ordered sets (SOS) or it doesn't read any. To overcome this temporary bug (to be fixed asap) I suggest using, before solve(),

    p.chgcoltype([0,1], ['I', 'B'])

    Thanks,

    Pietro