parent
adb3feeb1e
commit
4ba87c59e7
|
@ -0,0 +1,20 @@
|
|||
NAME HS35
|
||||
ROWS
|
||||
N OBJ.FUNC
|
||||
G R------1
|
||||
COLUMNS
|
||||
C------1 OBJ.FUNC -.800000e+01 R------1 -.100000e+01
|
||||
C------2 OBJ.FUNC -.600000e+01 R------1 -.100000e+01
|
||||
C------3 OBJ.FUNC -.400000e+01 R------1 -.200000e+01
|
||||
RHS
|
||||
RHS OBJ.FUNC -.900000e+01
|
||||
RHS R------1 -.300000e+01
|
||||
RANGES
|
||||
BOUNDS
|
||||
QUADOBJ
|
||||
C------1 C------1 0.400000e+01
|
||||
C------1 C------2 0.200000e+01
|
||||
C------1 C------3 0.200000e+01
|
||||
C------2 C------2 0.400000e+01
|
||||
C------3 C------3 0.200000e+01
|
||||
ENDATA
|
|
@ -107,7 +107,7 @@ struct QPSParser::MPSGrammar: base_grammar {
|
|||
cols = lexeme[lit("COLUMNS") >> *blank >> eol
|
||||
>> +((col_double | col_single) >> eol)];
|
||||
quad = lexeme[lit("QUADOBJ") >> *blank >> eol >> +(quad_l >> eol)];
|
||||
bounds = lexeme[lit("BOUNDS") >> +space >> +((bound | bound_fr) >> eol)];
|
||||
bounds = lexeme[lit("BOUNDS") >> +space >> *((bound | bound_fr) >> eol)];
|
||||
ranges = lexeme[lit("RANGES") >> +space
|
||||
>> *((range_double | range_single) >> eol)];
|
||||
end = lexeme[lit("ENDATA") >> *space];
|
||||
|
|
|
@ -281,7 +281,7 @@ TEST(QPSolver, HS21) {
|
|||
CHECK(assert_equal(expectedSolution, actualSolution))
|
||||
}
|
||||
|
||||
TEST(QPSolver, HS118) {
|
||||
TEST_DISABLED(QPSolver, HS118) {
|
||||
QP problem = QPSParser("HS118.QPS").Parse();
|
||||
VectorValues actualSolution;
|
||||
VectorValues expectedSolution;
|
||||
|
@ -295,6 +295,14 @@ TEST(QPSolver, HS118) {
|
|||
CHECK(assert_equal(expectedSolution, actualSolution))
|
||||
}
|
||||
|
||||
TEST(QPSolver, HS35) {
|
||||
QP problem = QPSParser("HS35.QPS").Parse();
|
||||
VectorValues actualSolution;
|
||||
boost::tie(actualSolution, boost::tuples::ignore) = QPSolver(problem).optimize();
|
||||
double error_actual = problem.cost.error(actualSolution);
|
||||
CHECK(assert_equal(1.11111111e-01,error_actual, 1e-7))
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
// Create Matlab's test graph as in http://www.mathworks.com/help/optim/ug/quadprog.html
|
||||
QP createTestMatlabQPEx() {
|
||||
|
|
Loading…
Reference in New Issue