fn compute_presolve_changes(
        &self
    ) -> Result<Changes<OF>, LinearProgramType<OF>> {
        let mut index = PresolveIndex::new(&self)?;

        let mut iterations_without_meaningful_change = 0;
        while !index.are_queues_empty() && iterations_without_meaningful_change < {
            // It can happen that a linear program is such that it can be recursively "tightened" by
            // presolving, arbitrarily precise, with the process never terminating. As this happens,
            // the numbers in the problem will have increasingly large representations.
            //
            // To make sure that doesn't happen, this heuristic rule decides when to stop.
            // TODO(ENHANCEMENT): When should we stop presolving?
            index.updates.nr_variables_remaining() + index.updates.nr_constraints_remaining()
        } {
            match index.presolve_step()? {
                Change::Meaningful => iterations_without_meaningful_change = 0,
                Change::None => {},
                Change::NotMeaningful => iterations_without_meaningful_change += 1,
            }
        }

        Ok(index.updates.into_changes())
    }
/// Run the presolve operation using a `PresolveIndex` and return all the proposed reductions.
///
/// # Return value
///
/// Updates for almost all fields, see method body.
///
/// # Errors
///
/// In case the linear program gets solved during this presolve operation, a solution.
Run the presolve operation using a `PresolveIndex` and return all the proposed reductions.
Run the presolve operation using a ` PresolveIndex ` and return all the proposed reductions .
fn compute_presolve_changes(
        &self
    ) -> Result<Changes<OF>, LinearProgramType<OF>> {
        let mut index = PresolveIndex::new(&self)?;
        let mut iterations_without_meaningful_change = 0;
        while !index.are_queues_empty() && iterations_without_meaningful_change < {
            // It can happen that a linear program is such that it can be recursively "tightened" by
            // presolving, arbitrarily precise, with the process never terminating. As this happens,
            // the numbers in the problem will have increasingly large representations.
            //
            // To make sure that doesn't happen, this heuristic rule decides when to stop.
            // TODO(ENHANCEMENT): When should we stop presolving?
            index.updates.nr_variables_remaining() + index.updates.nr_constraints_remaining()
        } {
            match index.presolve_step()? {
                Change::Meaningful => iterations_without_meaningful_change = 0,
                Change::None => {},
                Change::NotMeaningful => iterations_without_meaningful_change += 1,
            }
        }
        Ok(index.updates.into_changes())
    }
fn compute_presolve_changes ( & self ) -> Result < Changes < OF > , LinearProgramType < OF > > { let mut index = PresolveIndex :: new ( & self ) ? ; let mut iterations_without_meaningful_change = 0 ; while ! index . are_queues_empty ( ) && iterations_without_meaningful_change < { // It can happen that a linear program is such that it can be recursively "tightened" by // presolving, arbitrarily precise, with the process never terminating. As this happens, // the numbers in the problem will have increasingly large representations. // // To make sure that doesn't happen, this heuristic rule decides when to stop. // TODO(ENHANCEMENT): When should we stop presolving? index . updates . nr_variables_remaining ( ) + index . updates . nr_constraints_remaining ( ) } { match index . presolve_step ( ) ? { Change :: Meaningful => iterations_without_meaningful_change = 0 , Change :: None => { } , Change :: NotMeaningful => iterations_without_meaningful_change += 1 , } } Ok ( index . updates . into_changes ( ) ) }
Run the presolve operation using a `PresolveIndex` and return all the proposed reductions.
Run the presolve operation using a ` PresolveIndex ` and return all the proposed reductions .
&self
&self
return value
Updates for almost all fields, see method body.
Updates for almost all fields see method body .
errors
In case the linear program gets solved during this presolve operation, a solution.
In case the linear program gets solved during this presolve operation a solution .