Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::glop::PrimalPrices Class Reference

#include <reduced_costs.h>

Public Member Functions

 PrimalPrices (absl::BitGenRef random, const VariablesInfo &variables_info, PrimalEdgeNorms *primal_edge_norms, ReducedCosts *reduced_costs)
 
ColIndex GetBestEnteringColumn ()
 
void UpdateBeforeBasisPivot (ColIndex entering_col, UpdateRow *update_row)
 
void RecomputePriceAt (ColIndex col)
 Triggers a recomputation of the price at the given column only.
 
void SetAndDebugCheckThatColumnIsDualFeasible (ColIndex col)
 
void ForceRecomputation ()
 

Detailed Description

Maintains the list of dual infeasible positions and their associated prices.

Todo
(user): Not high priority but should probably be moved to its own file.

Definition at line 299 of file reduced_costs.h.

Constructor & Destructor Documentation

◆ PrimalPrices()

operations_research::glop::PrimalPrices::PrimalPrices ( absl::BitGenRef random,
const VariablesInfo & variables_info,
PrimalEdgeNorms * primal_edge_norms,
ReducedCosts * reduced_costs )

Takes references to what we need.

Todo
(user): Switch to a model based API like in CP-SAT.

Definition at line 527 of file reduced_costs.cc.

Member Function Documentation

◆ ForceRecomputation()

void operations_research::glop::PrimalPrices::ForceRecomputation ( )
inline

If the incremental updates are not properly called for a while, then it is important to make sure that the prices will be recomputed the next time GetBestEnteringColumn() is called.

Definition at line 326 of file reduced_costs.h.

◆ GetBestEnteringColumn()

ColIndex operations_research::glop::PrimalPrices::GetBestEnteringColumn ( )

Returns the best candidate out of the dual infeasible positions to enter the basis during a primal simplex iterations.

Definition at line 577 of file reduced_costs.cc.

◆ RecomputePriceAt()

void operations_research::glop::PrimalPrices::RecomputePriceAt ( ColIndex col)

Triggers a recomputation of the price at the given column only.

Definition at line 555 of file reduced_costs.cc.

◆ SetAndDebugCheckThatColumnIsDualFeasible()

void operations_research::glop::PrimalPrices::SetAndDebugCheckThatColumnIsDualFeasible ( ColIndex col)

Same than RecomputePriceAt() for the case where we know the position is dual feasible.

If we need a recomputation, we cannot assumes that the reduced costs are valid until we are about to recompute the prices.

Definition at line 568 of file reduced_costs.cc.

◆ UpdateBeforeBasisPivot()

void operations_research::glop::PrimalPrices::UpdateBeforeBasisPivot ( ColIndex entering_col,
UpdateRow * update_row )

Similar to the other UpdateBeforeBasisPivot() functions.

Important: Both the primal norms and reduced costs must have been updated before this is called.

If we are recomputing everything when requested, no need to update.

Note
the set of positions works because both the reduced costs and the primal edge norms are updated on the same positions which are given by the update_row.

This should be redundant with the call above, except in degenerate cases where the update_row has a zero position on the entering col!

Definition at line 539 of file reduced_costs.cc.


The documentation for this class was generated from the following files: