Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F81411235
micpsolver_structs.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
Thu, Sep 5, 22:18
Size
2 KB
Mime Type
text/x-c
Expires
Sat, Sep 7, 22:18 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20328815
Attached To
rSPECMICP SpecMiCP / ReactMiCP
micpsolver_structs.hpp
View Options
#ifndef SPECMICP_REACTMICP_MICPSOLVER_MICPSOLVERSTRUCTS_HPP
#define SPECMICP_REACTMICP_MICPSOLVER_MICPSOLVERSTRUCTS_HPP
namespace
specmicp
{
namespace
reactmicp
{
namespace
micpsolver
{
//! options for the ReactMiCP solver
struct
MiCPParabolicSolverOptions
{
double
alpha
;
double
penalization_factor
;
double
factor_descent_direction
;
double
power_descent_direction
;
double
step_tolerance
;
double
residuals_tolerance
;
double
threshold_stationary_point
;
double
maximum_step_length
;
double
coeff_accept_newton_step
;
double
maximum_iterations
;
double
maximum_iterations_at_maximum_step
;
MiCPParabolicSolverOptions
()
:
alpha
(
1.0
),
penalization_factor
(
0.8
),
factor_descent_direction
(
1.0
),
power_descent_direction
(
2.0
),
step_tolerance
(
1e-10
),
residuals_tolerance
(
1e-5
),
threshold_stationary_point
(
1e-4
),
maximum_step_length
(
10.0
),
coeff_accept_newton_step
(
0.9
),
maximum_iterations
(
50
),
maximum_iterations_at_maximum_step
(
50
)
{}
};
enum
class
MiCPParabolicSolverReturnCode
{
UnknownError
=
-
10
,
FailedDecomposition
=
-
5
,
MaxStepTakenTooManyTimes
=
-
3
,
MaxIterations
=
-
2
,
StationaryPoint
=
-
1
,
NotConvergedYet
=
0
,
ResidualMinimized
=
1
,
ErrorMinimized
=
2
};
struct
MiCPParabolicSolverPerformance
{
bool
gradient_step_taken
;
bool
maximum_step_taken
;
int
nb_iterations
;
int
nb_maximum_step_taken
;
int
nb_consecutive_maximum_step_taken
;
int
nb_call_residuals
;
int
nb_call_jacobian
;
MiCPParabolicSolverReturnCode
return_code
;
MiCPParabolicSolverPerformance
()
:
gradient_step_taken
(
false
),
maximum_step_taken
(
false
),
nb_iterations
(
0
),
nb_maximum_step_taken
(
0
),
nb_consecutive_maximum_step_taken
(
0
),
nb_call_residuals
(
0
),
nb_call_jacobian
(
0
),
return_code
(
MiCPParabolicSolverReturnCode
::
NotConvergedYet
)
{}
};
}
// end namespace micpsolver
}
// end namespace reactmicp
}
// end namespace specmicp
#endif
// SPECMICP_REACTMICP_MICPSOLVER_MICPSOLVERSTRUCTS_HPP
Event Timeline
Log In to Comment