Ipopt Documentation  
 
Loading...
Searching...
No Matches
IpPiecewisePenalty.hpp
Go to the documentation of this file.
1// Copyright (C) 2007 International Business Machines and others.
2// All Rights Reserved.
3// This code is published under the Eclipse Public License.
4//
5// Authors: Lifeng Chen/Zaiwen Wen Columbia Univ
6
7#ifndef __IPPIECEWISEPENALTY_HPP__
8#define __IPPIECEWISEPENALTY_HPP__
9
10#include "IpJournalist.hpp"
11#include "IpDebug.hpp"
12#include "IpOptionsList.hpp"
15#include "IpPDSystemSolver.hpp"
16#include <list>
17#include <vector>
18
19namespace Ipopt
20{
21
23typedef struct PiecewisePenEntry
24{
28} PiecewisePenEntry;
29
37{
38public:
41
43 Index dim);
46 {
47 // ToDo figure out if that here is necessary
48 // Clear();
49 }
51
53 // Initialize Piecewise Penalty list
55 {
56 return PiecewisePenalty_list_.empty();
57 }
58
60 Number pen_r,
61 Number barrier_obj,
62 Number infeasi)
63 {
64 AddEntry(pen_r, barrier_obj, infeasi);
65 }
66
75 );
76
79
82 Number barrier_obj,
83 Number infeasi );
84
87 Number pen_r,
88 Number barrier_obj,
89 Number infeasi
90 )
91 {
94 {
95 TmpEntry.pen_r = 0.0;
96 }
97 else
98 {
99 TmpEntry.pen_r = pen_r;
100 }
101 TmpEntry.barrier_obj = barrier_obj;
102 TmpEntry.infeasi = infeasi;
104 }
105
108 Number pen_r,
109 Number barrier_obj,
110 Number infeasi
111 )
112 {
114 AddEntry(pen_r, barrier_obj, infeasi);
115 }
116
118
120 void Clear()
121 {
123 }
124
126 void Print(
127 const Journalist& jnlst
128 );
129
130private:
141
145 const PiecewisePenalty&
146 );
147
150 const PiecewisePenalty&
151 );
153
156
159
162
164 std::vector<PiecewisePenEntry> PiecewisePenalty_list_;
165};
166
167} // namespace Ipopt
168
169#endif
Templated class which stores one entry for the CachedResult class.
Class responsible for all message output.
Class for the Piecewise Penalty.
void operator=(const PiecewisePenalty &)
Default Assignment Operator.
PiecewisePenalty()
Default Constructor.
Index dim_
Dimension of the Piecewise Penalty (number of coordinates per entry)
void ResetList(Number pen_r, Number barrier_obj, Number infeasi)
Clear and reset the piecewise penalty list.
void UpdateEntry(Number barrier_obj, Number infeasi)
Update Piecewise Penalty entry for given coordinates.
Number BiggestBarr()
Get the value of the biggest barrier function so far.
void AddEntry(Number pen_r, Number barrier_obj, Number infeasi)
Add a entry to the list.
void Clear()
Delete all Piecewise Penalty entries.
bool Acceptable(Number Fzconst, Number Fzlin)
Check acceptability of given coordinates with respect to the Piecewise Penalty.
Index max_piece_number_
The max number of the break points in the piecewise penalty list.
Number min_piece_penalty_
The min penalty value for the piecewise penalty list.
PiecewisePenalty(Index dim)
Default Constructor.
void Print(const Journalist &jnlst)
Print current Piecewise Penalty entries.
PiecewisePenalty(const PiecewisePenalty &)
Copy Constructor.
std::vector< PiecewisePenEntry > PiecewisePenalty_list_
vector storing the Piecewise Penalty entries
void InitPiecewisePenaltyList(Number pen_r, Number barrier_obj, Number infeasi)
This file contains a base class for all exceptions and a set of macros to help with exceptions.
ipindex Index
Type of all indices of vectors, matrices etc.
Definition IpTypes.hpp:20
ipnumber Number
Type of all numbers.
Definition IpTypes.hpp:17
struct for one Piecewise Penalty entry.