Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F65152882
micpsolver.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Jun 1, 06:36
Size
2 KB
Mime Type
text/x-c++
Expires
Mon, Jun 3, 06:36 (2 d)
Engine
blob
Format
Raw Data
Handle
18013276
Attached To
rSPECMICP SpecMiCP / ReactMiCP
micpsolver.hpp
View Options
/*-------------------------------------------------------
- Module : micpsolver
- File : micpsolver.hpp
- Author : Fabien Georget
Copyright (c) 2014, Fabien Georget, Princeton University
---------------------------------------------------------*/
#ifndef SPECMIC_MICPSOLVER_MICPSOLVER_HPP
#define SPECMIC_MICPSOLVER_MICPSOLVER_HPP
#include <memory>
#include <Eigen/Dense>
#include "ncp_function.hpp"
//! \file micpsolver.hpp The MiCP solver
namespace
specmicp
{
namespace
micpsolver
{
//! Options for the MiCPSolver
class
MiCPSolverOptions
{
double
penalization_factor
;
//! Penalization factor for the penalized Fisher-Burmeister function
MiCPSolverOptions
()
:
penalization_factor
(
0.8
)
{}
};
//! MiCP Solver
//!
//! References :
//! - F. Facchinei and J.-S. Pang.
//! Finite-dimensional variational inequalities and complementarity problems.
//! Springer, New York, 2003.
//! - T. S. Munson, F. Facchinei, M. C. Ferris, A. Fischer, and C. Kanzow.
//! The Semismooth Algorithm for Large Scale Complementarity Problems.
//! INFORMS Journal on Computing, 13(4):294-311, 2001.
template
<
class
Program
>
class
MiCPSolver
{
public
:
MiCPSolver
();
const
MiCPSolverOptions
&
get_options
()
const
{
return
m_options
;}
MiCPSolverOptions
&
get_options
()
{
return
m_options
;}
// Merit function
// ##############
//! First NCP-function
double
phi1
(
doubla
a
,
double
b
)
{
return
penalized_fisher_burmeister
(
a
,
b
,
get_options
().
penalization_factor
);}
//! Second NCP_function
double
phi2
(
double
a
,
double
b
)
{
return
fisher_burmeister
(
a
,
b
);}
//! Reformulation for lower bounded variable
double
phi_lower_bounded
(
const
double
&
x
,
const
double
&
r
,
const
double
&
l
)
const
{
return
phi1
(
x
-
l
,
r
);}
//! Reformulation function for upper bounded variable
double
phi_upper_bounded
(
const
double
&
x
,
const
double
&
r
,
const
double
&
u
)
const
{
return
-
phi1
(
u
-
x
,
-
r
);}
//! Reformulation function for lower and upper bounded variable
double
phi_lower_upper_bounded
(
const
double
&
x
,
const
double
&
r
,
const
double
&
l
,
const
double
&
u
)
const
{
return
phi2
(
x
-
l
,
phi1
(
u
-
x
,
-
r
));}
//! Reformulation for free variable
double
phi_free
(
const
double
&
r
)
const
{
return
-
r
;
}
//! Reformulation for one variable
double
phi_i
(
const
double
&
x
,
const
double
&
r
,
const
double
&
l
,
const
double
&
u
)
const
;
//! Reformulation
//!
//! Reformulate the problem
double
reformulate
(
const
Eigen
::
VectorXd
&
x
,
VectorXd
&
r
);
// Algorithm
// #########
private
:
std
::
shared_ptr
<
Program
>
m_program
;
MiCPSolverOptions
m_options
;
};
}
// end namespace micpsolver
}
// end namespace specmicp
// ###############//
// Implementation //
// ###############//
#include "micpsolver.inl"
#endif
// SPECMIC_MICPSOLVER_MICPSOLVER_HPP
Event Timeline
Log In to Comment