[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] Re: Problem
From: |
Andrew Makhorin |
Subject: |
[Help-glpk] Re: Problem |
Date: |
Fri, 19 Dec 2003 01:14:07 +0300 |
>What I do is:
>- create the Problem and solve it with lpx_simplex + lpx_integer
>- destroy the problem object using lib_free_env
>- call lpx_create_prob to re-create the Problem and solve it again
>
>lpx_create_prob LPX1 ' Create 1rst pb
>.... fill rows and columns
>lpx_reset_parms LPX1 ' Just in case
>lpx_write_lpt LPX1, "Prob1" ' Write problem to file Prob1
>lpx_simplex LPX1 ' Launch simplex
>lpx_print_sol LPX1, "Sol1" ' Write Solution to file Sol1
>lpx_integer LPX1 ' Launch MIP driver
>lpx_delete_prob LPX1 ' Delete pb
>lpx_create_prob LPX2 ' Create new pb
>.... fill rows and columns
>lpx_reset_parms LPX1 ' Just in case
>lpx_write_lpt LPX2, "Prob2" ' Write problem to file Prob2
>lpx_simplex LPX2 ' Launch simplex
>lpx_print_sol LPX2, "Sol2" ' Write Solution to file Sol2
>
>Files Prob1 and Prob2 are identical
>Files sol1 and sol2 are different
Incredible! I must look at Prob1, Prob2, sol1, and sol2. Please send
them to me.
Btw, you do not need to call lpx_reset_parms whenever you create a new
problem object, because each problem object has its own set of control
parameters.
Andrew Makhorin