OS  2.10.2
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 
41 extern "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 
71 class CsdpSolver : public DefaultSolver
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 
84 public:
85 
87  CsdpSolver();
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 
120  void dataEchoCheck();
121 
127 
133 
134 
135 private:
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*/
OSConfig.h
OSExpressionTree.h
CsdpSolver::m_osolreader
OSoLReader * m_osolreader
m_osolreader is an OSoLReader object used to create an osoption from an osol string if needed
Definition: OSCsdpSolver.h:132
OSiLReader
Used to read an OSiL string.
Definition: OSiLReader.h:37
OSErrorClass.h
OSoLReader
Used to read an OSoL string.
Definition: OSoLReader.h:37
OSrLWriter.h
OSrLWriter
Take an OSResult object and write a string that validates against OSrL.
Definition: OSrLWriter.h:30
CsdpSolver::setSolverOptions
virtual void setSolverOptions()
The implementation of the virtual functions.
CsdpSolver
The CsdpSolver class solves problems using Csdp.
Definition: OSCsdpSolver.h:71
OSResult.h
OSInstance.h
This file defines the OSInstance class along with its supporting classes.
OSOption.h
OSFileUtil.h
OSoLReader.h
OSiLReader.h
CsdpSolver::dataEchoCheck
void dataEchoCheck()
use this for debugging, print out the instance that the solver thinks it has and compare this with th...
OSDefaultSolver.h
CsdpSolver::solve
virtual void solve()
solve results in an instance being read into the Csdp data structures and optimized
ErrorClass
used for throwing exceptions.
Definition: OSErrorClass.h:31
CsdpSolver::m_osilreader
OSiLReader * m_osilreader
m_osilreader is an OSiLReader object used to create an osinstance from an osil string if needed
Definition: OSCsdpSolver.h:126
CsdpSolver::CsdpSolver
CsdpSolver()
the CsdpSolver class constructor
CsdpSolver::~CsdpSolver
virtual ~CsdpSolver()
the CsdpSolver class destructor
OSGeneral.h
DefaultSolver
The Default Solver Class.
Definition: OSDefaultSolver.h:35
OSParameters.h
CsdpSolver::buildSolverInstance
virtual void buildSolverInstance()
The implementation of the virtual functions.
OSnLNode.h
This file defines the OSnLNode class along with its derived classes.