OS 2.10.2
Loading...
Searching...
No Matches
OSCsdpSolver.h
Go to the documentation of this file.
1/* $Id: OSCsdpSolver.h 4562 2013-01-02 12:31:12Z Gassmann $ */
15#ifndef CSDPSOLVER_H
16#define CSDPSOLVER_H
17
18#include "OSConfig.h"
19#include "OSDefaultSolver.h"
20#include "OSrLWriter.h"
21#include "OSInstance.h"
22#include "OSParameters.h"
23#include "OSnLNode.h"
24#include "OSiLReader.h"
25#include "OSoLReader.h"
26#include "OSInstance.h"
27#include "OSExpressionTree.h"
28#include "OSnLNode.h"
29#include "OSGeneral.h"
30#include "OSFileUtil.h"
31#include "OSErrorClass.h"
32
33#include "OSResult.h"
34#include "OSInstance.h"
35#include "OSOption.h"
36
37/*
38 * Include CSDP declarations so that we'll know the calling interfaces.
39 */
40
41extern "C"
42{
43#include "declarations.h"
44}
45
46
47#include <cstddef>
48#include <cstdlib>
49#include <cctype>
50#include <cassert>
51#include <stack>
52#include <string>
53#include <iostream>
54#include <vector>
55#include <map>
56
57
72{
73// These declarations are taken from the main method csdp.c
74 int nC_rows; // number of rows/columns in each matrix
75 int nC_blks; // number of blocks per matrix
76 int ncon; // number of constraints (and constraint matrices A_i)
77 struct blockmatrix C_matrix; // the matrix in the objective, A0
78 double *rhsValues; // the right-hand side values of the constraints
79 struct constraintmatrix *mconstraints; // the collection of matrices in the constraints (A_i)
80 struct blockmatrix X,Z; // for the primal and dual matrix values, respectively
81 double *y; // dual variables of the constraints
82 double pobj,dobj; // primal and dual objective values
83
84public:
85
88
90 virtual ~CsdpSolver();
91
94 virtual void solve() throw (ErrorClass) ;
95
100 virtual void buildSolverInstance() throw(ErrorClass);
101
106 virtual void setSolverOptions() throw(ErrorClass);
107
113 //void verifyForm() throw(ErrorClass);
114
121
127
133
134
135private:
136 OSrLWriter *osrlwriter;
137
149 // CsdpSolver();
150 //CsdpSolver(const CsdpSolver&);
151 //CsdpSolver& operator=(const CsdpSolver&);
153 //std::string csdpErrorMsg;
154 std::string *csdpErrorMsg;
155};
156
157
158#endif /*CSDPSOLVER_H*/
This file defines the OSInstance class along with its supporting classes.
This file defines the OSnLNode class along with its derived classes.
The CsdpSolver class solves problems using Csdp.
Definition: OSCsdpSolver.h:72
OSiLReader * m_osilreader
m_osilreader is an OSiLReader object used to create an osinstance from an osil string if needed
Definition: OSCsdpSolver.h:126
virtual ~CsdpSolver()
the CsdpSolver class destructor
virtual void setSolverOptions()
The implementation of the virtual functions.
virtual void solve()
solve results in an instance being read into the Csdp data structures and optimized
virtual void buildSolverInstance()
The implementation of the virtual functions.
CsdpSolver()
the CsdpSolver class constructor
void dataEchoCheck()
use this for debugging, print out the instance that the solver thinks it has and compare this with th...
OSoLReader * m_osolreader
m_osolreader is an OSoLReader object used to create an osoption from an osol string if needed
Definition: OSCsdpSolver.h:132
The Default Solver Class.
used for throwing exceptions.
Definition: OSErrorClass.h:32
Used to read an OSiL string.
Definition: OSiLReader.h:38
Used to read an OSoL string.
Definition: OSoLReader.h:38
Take an OSResult object and write a string that validates against OSrL.
Definition: OSrLWriter.h:31