[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] How to reuse the problem object to solve another MIP pro
Re: [Help-glpk] How to reuse the problem object to solve another MIP problem without deleting it?
Sun, 6 Feb 2005 23:43:45 +0300
>I'm trying to reuse a problem object (not deleting) to solve two different
>The columns and objective function are the same for both problems, that's
>why I don't want to delete the problem after solve the first one.
>If I solve each one separately I got the correct objective values with
>status: "INTEGER OPTIMAL".
>However, when the second problem after the first I get the wrong answer for
>the second problem with status: "INTEGER UNDEFINED".
>All I'm doing is to remove all rows from the problem object after solving
>the first problem and before solving the second one.
>Is there anything else I should do to "clean up" the problem object
Before re-optimization via lpx_simplex/lpx_integer you should call
lpx_std_basis (or lpx_adv_basis) to provide a valid initial basis needed
by lpx_simplex to start from. lpx_simplex always starts from the current
basis stored in the problem object, however, deleting rows may make the
basis invalid (if you delete non-basic rows, i.e. active constraints), in
which case lpx_simplex cannot begin/continue the search.