Bonmin 1.8.9
Loading...
Searching...
No Matches
BonIpoptWarmStart.hpp
Go to the documentation of this file.
1// (C) Copyright International Business Machines Corporation, Carnegie Mellon University 2006
2// All Rights Reserved.
3// This code is published under the Eclipse Public License.
4//
5// Authors :
6// Pierre Bonami, Carnegie Mellon University,
7// Andreas Waechter, International Business Machines Corporation
8//
9// Date : 02/15/2006
10
11
12#ifndef IpoptWarmStart_HPP
13#define IpoptWarmStart_HPP
17
18
19namespace Bonmin
20{
21 class TMINLP2TNLP;
22
47 public virtual CoinWarmStartPrimalDual, public virtual CoinWarmStartBasis
48 {
49 public:
50
52 IpoptWarmStart(bool empty = 1, int numvars = 0, int numcont = 0);
57 IpoptWarmStart(int primal_size, int dual_size,
58 const double * primal, const double * dual);
60 IpoptWarmStart( const IpoptWarmStart &other, bool ownValues = 1);
64 virtual ~IpoptWarmStart();
65
67 virtual CoinWarmStart *clone() const
68 {
69 return new IpoptWarmStart(*this,1);
70 }
71
73 virtual CoinWarmStartDiff*
74 generateDiff(const CoinWarmStart *const oldCWS) const;
78 virtual void
79 applyDiff (const CoinWarmStartDiff *const cwsdDiff);
80
83 {
84 return warm_starter_;
85 }
86
88 void flushPoint();
89
91 bool empty() const
92 {
93 return empty_;
94 }
95 private:
99 bool empty_;
100 };
101
102 //###########################################################################
103
110 {
111 public:
112 friend class IpoptWarmStart;
124 warm_starter_(NULL /*other.warm_starter_*/) {}
125
128
130 virtual CoinWarmStartDiff *clone() const
131 {
132 return new IpoptWarmStartDiff(*this);
133 }
134
137 {
138 return warm_starter_;
139 }
141 private:
142
145 };
146
147}
148#endif
Diff class for IpoptWarmStart.
virtual CoinWarmStartDiff * clone() const
‘Virtual constructor’
virtual ~IpoptWarmStartDiff()
Abstract destructor.
IpoptWarmStartDiff(CoinWarmStartPrimalDualDiff *diff, Ipopt::SmartPtr< IpoptInteriorWarmStarter > warm_starter)
Useful constructor; takes over the data in diff.
IpoptWarmStartDiff(const IpoptWarmStartDiff &other)
Copy constructor.
Ipopt::SmartPtr< IpoptInteriorWarmStarter > warm_starter() const
Accessor to warm start information obecjt.
Class for storing warm start informations for Ipopt.
virtual CoinWarmStart * clone() const
‘Virtual constructor’
Ipopt::SmartPtr< IpoptInteriorWarmStarter > warm_starter() const
Accessor to warm start information obecjt.
virtual void applyDiff(const CoinWarmStartDiff *const cwsdDiff)
Apply 'differences' to an Ipopt warm start.
void flushPoint()
flush the starting point
IpoptWarmStart(const IpoptWarmStart &other, bool ownValues=1)
Copy constructor.
IpoptWarmStart(int primal_size, int dual_size, const double *primal, const double *dual)
Another usefull constructor, stores the passed point.
virtual ~IpoptWarmStart()
Abstract destructor.
IpoptWarmStart(const CoinWarmStartPrimalDual &pdws)
A constructor from a CoinWarmStartPrimalDual.
virtual CoinWarmStartDiff * generateDiff(const CoinWarmStart *const oldCWS) const
Generate the "differences" between two IpoptWarmStart.
IpoptWarmStart(const Ipopt::SmartPtr< TMINLP2TNLP > tnlp, Ipopt::SmartPtr< IpoptInteriorWarmStarter > warm_starter)
Usefull constructor, stores the current optimum of ipopt.
IpoptWarmStart(bool empty=1, int numvars=0, int numcont=0)
Default constructor.
bool empty() const
Is this an empty warm start?
void swap(CoinWarmStartPrimalDualDiff &rhs)
const double * dual() const
const double * primal() const
(C) Copyright International Business Machines Corporation 2007