Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CoMISo
CoMISo
Commits
295188fe
Commit
295188fe
authored
Aug 16, 2017
by
Max Lyon
Browse files
Merge from ReForm
parents
49e4334c
d4ad1599
Pipeline
#5572
failed with stages
in 2 minutes and 29 seconds
Changes
52
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
EigenSolver/ArpackSolver.hh
View file @
295188fe
...
...
@@ -42,17 +42,9 @@ namespace COMISO {
class
COMISODLLEXPORT
ArpackSolver
{
public:
// sparse matrix type
typedef
EigenArpackMatrixT
<
double
,
Eigen
::
SparseMatrix
<
double
,
Eigen
::
ColMajor
>
>
Matrix
;
/// Constructor
ArpackSolver
()
{}
/// Destructor
~
ArpackSolver
()
{}
// solve eigenproblem
// number of desired eigenvalues -> _n_eigenvalues
// which eigenvalues -> one of {LA (largest algebraic), SA (smalles algebraic), LM (largest magnitude), SM(smallest magnitued), BE(both ends)}
...
...
@@ -77,9 +69,6 @@ public:
// check resulting eigenvalues/eigenvectors
template
<
class
MatrixT
,
class
MatrixT2
>
void
check_result
(
const
MatrixT
&
_A
,
std
::
vector
<
double
>&
_eigenvalues
,
MatrixT2
&
_eigenvectors
);
private:
};
...
...
EigenSolver/EigenArpackMatrixT.hh
View file @
295188fe
...
...
@@ -74,9 +74,6 @@ public:
}
}
/// Destructor
~
EigenArpackMatrixT
()
{}
// get reference on matrix
Matrix
&
matrix
()
{
return
mat_
;
}
...
...
NSolver/AcceleratedQuadraticProxy.hh
View file @
295188fe
...
...
@@ -45,9 +45,6 @@ public:
AcceleratedQuadraticProxy
(
const
double
_eps
=
1e-6
,
const
int
_max_iters
=
1000
,
const
double
_accelerate
=
100.0
,
const
double
_alpha_ls
=
0.2
,
const
double
_beta_ls
=
0.6
)
:
eps_
(
_eps
),
max_iters_
(
_max_iters
),
accelerate_
(
_accelerate
),
alpha_ls_
(
_alpha_ls
),
beta_ls_
(
_beta_ls
)
{}
/// Destructor
~
AcceleratedQuadraticProxy
()
{}
// solve without linear constraints
int
solve
(
NProblemInterface
*
_quadratic_problem
,
NProblemInterface
*
_nonlinear_problem
,
bool
_update_factorization
=
true
)
{
...
...
NSolver/BoundConstraint.cc
View file @
295188fe
...
...
@@ -30,14 +30,6 @@ BoundConstraint(const unsigned int _var_idx, // index of variable for bound c
}
//-----------------------------------------------------------------------------
BoundConstraint
::
~
BoundConstraint
()
{
}
//-----------------------------------------------------------------------------
...
...
NSolver/BoundConstraint.hh
View file @
295188fe
...
...
@@ -47,10 +47,6 @@ public:
const
unsigned
int
_n
=
0
,
// number of unknowns in problem
const
ConstraintType
_type
=
NC_LESS_EQUAL
);
// type of bound upper, lower or both (equal)
/// Destructor
virtual
~
BoundConstraint
();
virtual
int
n_unknowns
(
);
virtual
double
eval_constraint
(
const
double
*
_x
);
virtual
void
eval_gradient
(
const
double
*
_x
,
SVectorNC
&
_g
);
...
...
NSolver/CBCSolver.hh
View file @
295188fe
...
...
@@ -39,12 +39,6 @@ namespace COMISO {
class
COMISODLLEXPORT
CBCSolver
{
public:
/// Default constructor
CBCSolver
()
{}
/// Destructor
~
CBCSolver
()
{}
// ********** SOLVE **************** //
//! \throws Outcome
bool
solve
(
...
...
NSolver/COMISOSolver.hh
View file @
295188fe
...
...
@@ -44,12 +44,6 @@ public:
typedef
std
::
pair
<
unsigned
int
,
VariableType
>
PairUiV
;
/// Default constructor
COMISOSolver
()
{}
/// Destructor
~
COMISOSolver
()
{}
// ********** SOLVE **************** //
void
solve
(
NProblemInterface
*
_problem
,
// problem instance
std
::
vector
<
NConstraintInterface
*>&
_constraints
,
// linear constraints
...
...
NSolver/CPLEXSolver.cc
View file @
295188fe
...
...
@@ -1300,14 +1300,6 @@ add_constraint_to_model( NConstraintInterface* _constraint, std::vector<IloNumVa
}
CPLEXSolver
::
CPLEXSolver
()
{
}
//-----------------------------------------------------------------------------
...
...
NSolver/CPLEXSolver.hh
View file @
295188fe
...
...
@@ -45,12 +45,6 @@ class COMISODLLEXPORT CPLEXSolver
{
public:
/// Default constructor
CPLEXSolver
();
/// Destructor
~
CPLEXSolver
()
{
/*env_.end();*/
}
// ********** SOLVE **************** //
// this function has to be inline due to static linking issues
bool
solve
(
NProblemInterface
*
_problem
,
// problem instance
...
...
NSolver/CombinedProblem.cc
View file @
295188fe
...
...
@@ -5,22 +5,20 @@
//== INCLUDES =================================================================
#include
"CombinedProblem.hh"
#include
<Base/Debug/DebOut.hh>
namespace
COMISO
{
CombinedProblem
::
CombinedProblem
(
NProblemInterface
*
_p1
,
NProblemInterface
*
_p2
,
const
double
_c1
,
const
double
_c2
)
:
p1_
(
_p1
)
,
p2_
(
_p2
),
c1_
(
_c1
),
c2_
(
_c2
)
{
if
(
p1_
->
n_unknowns
()
!=
p2_
->
n_unknowns
())
std
::
cerr
<<
"Warning: CombinedProblem received two problems with different #unknowns!!!"
<<
std
::
endl
;
DEB_enter_func
;
DEB_warning_if
(
p1_
->
n_unknowns
()
!=
p2_
->
n_unknowns
(),
1
,
"CombinedProblem received two problems with different unknowns #"
);
g_temp_
.
resize
(
p1_
->
n_unknowns
());
}
CombinedProblem
::~
CombinedProblem
()
{
}
int
CombinedProblem
::
n_unknowns
()
{
return
p1_
->
n_unknowns
();
...
...
NSolver/CombinedProblem.hh
View file @
295188fe
...
...
@@ -48,9 +48,6 @@ public:
/// Default constructor
CombinedProblem
(
NProblemInterface
*
_p1
,
NProblemInterface
*
_p2
,
const
double
_c1
=
1.0
,
const
double
_c2
=
1.0
);
/// Destructor
virtual
~
CombinedProblem
();
// problem definition
virtual
int
n_unknowns
();
...
...
NSolver/ConeConstraint.cc
View file @
295188fe
...
...
@@ -39,9 +39,6 @@ ConeConstraint::ConeConstraint(const double _c, const int _i, const SMatrixNC& _
{
}
/// Destructor
ConeConstraint
::~
ConeConstraint
()
{}
int
ConeConstraint
::
n_unknowns
()
{
return
Q_
.
cols
();
...
...
NSolver/ConeConstraint.hh
View file @
295188fe
...
...
@@ -39,9 +39,6 @@ public:
// cone constraint of the form -> 0.5*(c_ * x(i_)^2 - x^T Q_ x) >= 0
ConeConstraint
(
const
double
_c
,
const
int
_i
,
const
SMatrixNC
&
_Q
);
/// Destructor
virtual
~
ConeConstraint
();
virtual
int
n_unknowns
();
// resize coefficient vector = #unknowns
...
...
NSolver/ConstraintTools.cc
View file @
295188fe
...
...
@@ -13,17 +13,6 @@
namespace
COMISO
{
ConstraintTools
::
ConstraintTools
()
{
}
//-----------------------------------------------------------------------------
ConstraintTools
::~
ConstraintTools
()
{
}
//-----------------------------------------------------------------------------
void
...
...
NSolver/ConstraintTools.hh
View file @
295188fe
...
...
@@ -47,12 +47,6 @@ public:
typedef
gmm
::
row_matrix
<
SVectorGMM
>
RMatrixGMM
;
typedef
gmm
::
col_matrix
<
SVectorGMM
>
CMatrixGMM
;
/// Default constructor
ConstraintTools
();
/// Destructor
~
ConstraintTools
();
// remove all linear dependent linear equality constraints. the remaining constraints are a subset of the original ones
// nonlinear or equality constraints are preserved.
static
void
remove_dependent_linear_constraints
(
std
::
vector
<
NConstraintInterface
*>&
_constraints
,
const
double
_eps
=
1e-8
);
...
...
NSolver/DOCloudJob.cc
View file @
295188fe
...
...
@@ -242,8 +242,6 @@ private:
Job
::~
Job
()
{
DEB_enter_func
;
delete
stts_
;
if
(
url_
.
empty
())
// not setup
...
...
NSolver/FiniteElementProblem.cc
View file @
295188fe
...
...
@@ -13,11 +13,6 @@ FiniteElementProblem::FiniteElementProblem(const unsigned int _n)
{
}
/// Destructor
FiniteElementProblem
::~
FiniteElementProblem
()
{
}
void
FiniteElementProblem
::
add_set
(
FiniteElementSetBase
*
_fe_set
)
{
fe_sets_
.
push_back
(
_fe_set
);
...
...
NSolver/FiniteElementProblem.hh
View file @
295188fe
...
...
@@ -237,9 +237,6 @@ public:
/// Default constructor
FiniteElementProblem
(
const
unsigned
int
_n
);
/// Destructor
virtual
~
FiniteElementProblem
();
void
add_set
(
FiniteElementSetBase
*
_fe_set
);
void
clear_sets
();
...
...
NSolver/GUROBISolver.cc
View file @
295188fe
...
...
@@ -59,13 +59,6 @@ void add_constraint_to_model(COMISO::NConstraintInterface* _constraint,
//-----------------------------------------------------------------------------
GUROBISolver
::
GUROBISolver
()
{
}
//-----------------------------------------------------------------------------
static
void
process_gurobi_exception
(
const
GRBException
&
_exc
)
{
DEB_enter_func
;
...
...
NSolver/GUROBISolver.hh
View file @
295188fe
...
...
@@ -42,13 +42,6 @@ namespace COMISO {
class
COMISODLLEXPORT
GUROBISolver
{
public:
/// Default constructor
GUROBISolver
();
/// Destructor
~
GUROBISolver
()
{}
// ********** SOLVE **************** //
bool
solve
(
NProblemInterface
*
_problem
,
// problem instance
std
::
vector
<
NConstraintInterface
*>&
_constraints
,
// linear constraints
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment