1 |
#ifndef _SIMPLEBOUNDCONS_H_
|
2 |
#define _SIMPLEBOUNDCONS_H_
|
3 |
|
4 |
#include "Constraint.hpp"
|
5 |
|
6 |
/**
|
7 |
* Simple Bound Constraint for nonlinear optimization problem
|
8 |
* boundType is used to identify whether it is upper bound or lower bound
|
9 |
*/
|
10 |
class SimpleBoundCons : public ConstraintBase{
|
11 |
public:
|
12 |
|
13 |
SimpleBoundCons(int theIndex, double b, bool flag);
|
14 |
SimpleBoundCons(int dim, int theIndex, double b, bool flag);
|
15 |
|
16 |
virtual double calcResidual(vector<double>& x);
|
17 |
virtual vector<double> calcConsGrad(vector<double>& x);
|
18 |
virtual SymMatrix calcConsHessian(vector<double>& x);
|
19 |
|
20 |
protected:
|
21 |
|
22 |
int index;
|
23 |
};
|
24 |
#endif
|