Bcp 1.4.4
Loading...
Searching...
No Matches
BCP_warmstart_primaldual Class Reference

This class describes a warmstart information that consists solely of the dual vector. More...

#include <BCP_warmstart_primaldual.hpp>

+ Inheritance diagram for BCP_warmstart_primaldual:
+ Collaboration diagram for BCP_warmstart_primaldual:

Public Member Functions

Constructors and destructor
 BCP_warmstart_primaldual (BCP_buffer &buf)
 Create the object by unpacking it from a buffer.
 
 BCP_warmstart_primaldual (const double *pfirst, const double *plast, const double *dfirst, const double *dlast)
 Create an explicitly stored warmstart info by considering the double arrays [fpirst,plast) and [dpirst,dlast) as the primal and dual vectors.
 
 BCP_warmstart_primaldual (const BCP_warmstart_primaldual &ws)
 Copy constructor.
 
virtual ~BCP_warmstart_primaldual ()
 
virtual CoinWarmStartconvert_to_CoinWarmStart () const
 Return an CoinWarmStart object that can be fed to the LP engine.
 
virtual BCP_storage_t storage () const
 Return how the warmstarting info is stored.
 
virtual BCP_warmstartclone () const
 Make a replica of the current warmstart information.
 
virtual BCP_warmstartempty_wrt_this () const
 Create a warmstart info describing that no change should be done.
 
virtual int storage_size () const
 Return how much memory it'll take to pack this warmstart info.
 
virtual void update (const BCP_warmstart *const change)
 Update the current data with the one in the argument.
 
virtual BCP_warmstartas_change (const BCP_warmstart *const old_ws, const BCP_vec< int > &del_vars, const BCP_vec< int > &del_cuts, const double petol, const double detol) const
 Return a pointer to a warmstart info describing the currently stored data as a change with respect to that stored in old_ws.
 
void pack (BCP_buffer &buf) const
 Pack the warmstart info into a buffer.
 
- Public Member Functions inherited from BCP_warmstart
virtual ~BCP_warmstart ()
 The destructor is pure virtual.
 

Detailed Description

This class describes a warmstart information that consists solely of the dual vector.

Definition at line 21 of file BCP_warmstart_primaldual.hpp.

Constructor & Destructor Documentation

◆ BCP_warmstart_primaldual() [1/3]

BCP_warmstart_primaldual::BCP_warmstart_primaldual ( BCP_buffer & buf)
inline

Create the object by unpacking it from a buffer.

Definition at line 43 of file BCP_warmstart_primaldual.hpp.

◆ BCP_warmstart_primaldual() [2/3]

BCP_warmstart_primaldual::BCP_warmstart_primaldual ( const double * pfirst,
const double * plast,
const double * dfirst,
const double * dlast )
inline

Create an explicitly stored warmstart info by considering the double arrays [fpirst,plast) and [dpirst,dlast) as the primal and dual vectors.

Definition at line 47 of file BCP_warmstart_primaldual.hpp.

◆ BCP_warmstart_primaldual() [3/3]

BCP_warmstart_primaldual::BCP_warmstart_primaldual ( const BCP_warmstart_primaldual & ws)
inline

Copy constructor.

Definition at line 51 of file BCP_warmstart_primaldual.hpp.

◆ ~BCP_warmstart_primaldual()

virtual BCP_warmstart_primaldual::~BCP_warmstart_primaldual ( )
inlinevirtual

Definition at line 54 of file BCP_warmstart_primaldual.hpp.

Member Function Documentation

◆ convert_to_CoinWarmStart()

virtual CoinWarmStart * BCP_warmstart_primaldual::convert_to_CoinWarmStart ( ) const
virtual

Return an CoinWarmStart object that can be fed to the LP engine.

The implementation for this class will return an CoinWarmStartDual object.

Implements BCP_warmstart.

◆ storage()

virtual BCP_storage_t BCP_warmstart_primaldual::storage ( ) const
inlinevirtual

Return how the warmstarting info is stored.

Implements BCP_warmstart.

Definition at line 63 of file BCP_warmstart_primaldual.hpp.

◆ clone()

virtual BCP_warmstart * BCP_warmstart_primaldual::clone ( ) const
inlinevirtual

Make a replica of the current warmstart information.

Implements BCP_warmstart.

Definition at line 82 of file BCP_warmstart_primaldual.hpp.

◆ empty_wrt_this()

virtual BCP_warmstart * BCP_warmstart_primaldual::empty_wrt_this ( ) const
inlinevirtual

Create a warmstart info describing that no change should be done.

This is really the task of a constructor, but BCP does not know the type of warmstart the user will use, so it will invoke this method for a warmstart that was created by the user. Tricky, isn't it?

Implements BCP_warmstart.

Definition at line 86 of file BCP_warmstart_primaldual.hpp.

◆ storage_size()

virtual int BCP_warmstart_primaldual::storage_size ( ) const
inlinevirtual

Return how much memory it'll take to pack this warmstart info.

It is used when comparing which sort of storage is smaller.

Implements BCP_warmstart.

Definition at line 92 of file BCP_warmstart_primaldual.hpp.

◆ update()

virtual void BCP_warmstart_primaldual::update ( const BCP_warmstart *const change)
virtual

Update the current data with the one in the argument.

If the argument is of explicit storage then just replace the current data. If it is relative and the current data is explicit then perform the update. Otherwise throw an exception.

Implements BCP_warmstart.

◆ as_change()

virtual BCP_warmstart * BCP_warmstart_primaldual::as_change ( const BCP_warmstart *const old_ws,
const BCP_vec< int > & del_vars,
const BCP_vec< int > & del_cuts,
const double petol,
const double detol ) const
virtual

Return a pointer to a warmstart info describing the currently stored data as a change with respect to that stored in old_ws.

However, if the currently stored data is shorter to store than the change, then this method can return a copy of the current data! The current data must be explicitly stored and old_ws must be either explicit or can contain no data. Otherwise an exception must be thrown.

Parameters
old_wsthe old warmstart info
del_varsthe indices of the variables that are deleted from the formulation old_ws was created for
del_cutssame for the cuts
petolprimal zero tolerance
detoldual zero tolerance

Implements BCP_warmstart.

◆ pack()

void BCP_warmstart_primaldual::pack ( BCP_buffer & buf) const
inline

Pack the warmstart info into a buffer.

Definition at line 107 of file BCP_warmstart_primaldual.hpp.


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