Forum Discussion

FICO's avatar
FICO
Community Manager
2 years ago

Is it possible to configure the linear relaxation simplex solve of an MIP problem?

I have created a complex MIP program and during testing I have noticed that the final solution does not always converge to the same answer after several tests. I understand that simplex algorithms are not deterministic, but is it possible to set an initial seed of sorts so that tests can be compared more accurately?

5 Replies

  • FICO's avatar
    FICO
    Community Manager

    Our implementation of the simplex algorithm is fully deterministic, meaning that if you run it on the same problem twice, you'll always get the same answer.

    However, if the problem changes, even if the change is trivial, such as a reordering of constraints, then you will typically get a different (but equally optimal) solution.

    So, what kind of nondeterminism are you experiencing?

  • FICO's avatar
    FICO
    Community Manager

    We have written the model in the C# BCL libraries, and without changing the underlying data or structure of the program, iterative runs return not only different final solutions, but the simplex results also vary by upwards of 0.1%. When our solution accuracy is attempting to be 0.0001% the initial delta seems to be causing large swings in the final solution. I have attached some images that show the different solutions

    Example 1 - Value = 1544224914Example 2 - Value = 1543141100

  • FICO's avatar
    FICO
    Community Manager

    You mentioned the order of the constraints can change things; during some discussion with the other developer, it was brought up that we query our database as part of the program and build out the constraints/decisions based on that data. If that data is not pulled into the program in the same order, and therefore the constraints are not created in the same order, is that a potential cause of this discrepancy

  • FICO's avatar
    FICO
    Community Manager

    Different order of rows may impact the simplex algorithm performance. Please take a look at the control PRESORT which allows you to ensure a sorting by name of your matrix rows, columns, and MIP entities before the search begins. This should lead to the same outcome of the simplex even if data base queries randomize the initial order.

    Note that PRESORT is a bit vector control. In order to sort all rows (PRESORT = 1), columns (PRESORT = 2), and MIP entities (PRESORT = 4), you have to set its value to 7.

  • FICO's avatar
    FICO
    Community Manager

    This looks like it is working. Thank you so much for your help.