OSDipApp.cpp
Go to the documentation of this file.
1 //===========================================================================//
2 // This file is part of the Decomp Solver Framework. //
3 // //
4 // Decomp is distributed under the Common Public License as part of the //
5 // COIN-OR repository (http://www.coin-or.org). //
6 // //
7 // Author: Matthew Galati, Lehigh University
8 // Heavily edited by Kipp Martin, University of Chicago
9 // //
10 // Copyright (C) 2002-2009, Lehigh University, Matthew Galati, and Ted Ralphs//
11 // All Rights Reserved. //
12 //===========================================================================//
13 
14 //===========================================================================//
15 #include "OSDipApp.h"
16 //===========================================================================//
17 #include "DecompVar.h"
18 #include "OSDipBlockSolver.h"
19 #include "OSDipBlockCoinSolver.h"
20 
21 
22 
23 void OSDipApp::initializeApp(UtilParameters & utilParam) {
24 
25  UtilPrintFuncBegin(m_osLog, m_classTag, "initializeApp()",
26  m_appParam.LogLevel, 2);
27 
28  //---
29  //--- get application parameters
30  //---
31  m_appParam.getSettings(utilParam);
32  if (m_appParam.LogLevel >= 1)
33  m_appParam.dumpSettings(m_osLog);
34 
35  try {
36 
37  //---
38  //--- read OSiL instance
39  //
40  if (m_appParam.OSiLFile.size() <= 1)
41  throw ErrorClass("An OSiL file not specified in the parameter file");
42  std::string osilFile = m_appParam.DataDir + UtilDirSlash()
44  m_osInterface.readOSiL( osilFile);
45 
46  //---
47  //--- read OSoL instance -- it is not necessary, if not there
48  //-- all constraints become block constraints
49  //
50  //if(m_appParam.OSoLFile.size() <= 1) throw ErrorClass("An OSoL file not specified in the parameter file");
51  if (m_appParam.OSoLFile.size() > 0) {
52  std::string osolFile = m_appParam.DataDir + UtilDirSlash()
54  m_osInterface.readOSoL( osolFile);
55  }
56 
57  //get relevant sets and vectors
58  //first get a set of core constraint indexes
60 
61  // next get a vector of sets, where each set is the
62  // variable indexes for a block
64 
65  //get the solver factory for each block
67 
68  //finally get an osinstance for each block
70 
71 
72 
73  //loop over the instances and generate a solver for each block
74  std::vector<OSInstance*>::iterator vit1;
75 
76  std::string solverFactory;
77  int whichBlock = 0;
78 
79  OSDipBlockSolver *solver = NULL;
81 
82  for (vit1 = m_blockOSInstances.begin(); vit1
83  != m_blockOSInstances.end(); vit1++) {
84 
85  //kipp check for a valid name here --
86  if( m_blockFactories[ whichBlock].size() > 0){
87 
88  solverFactory = m_blockFactories[ whichBlock];
89 
90  }else{
91  //give it the default factory in the parameter file
92  solverFactory = m_appParam.solverFactory;
93 
94  }
95 
96 
97 
98 
99  OSDipBlockSolverFactory::factories[ solverFactory]->osinstance = *vit1;
100  OSDipBlockSolverFactory::factories[ solverFactory]->osoption = m_osInterface.m_osoption;
101  solver = OSDipBlockSolverFactory::factories[ solverFactory]->create();
102  solver->m_whichBlock = whichBlock;
103  m_osDipBlockSolver.push_back( solver);
104 
105  whichBlock++;
106 
107  }
108 
109  //get a list of all variables in block
110  std::vector<std::set<int> >::iterator vit;
111  std::set<int>::iterator sit;
112  std::set<int> blockVar;
113 
114  for (vit = m_blockVars.begin(); vit != m_blockVars.end(); vit++) {
115 
116  blockVar = *vit;
117 
118  for (sit = blockVar.begin(); sit != blockVar.end(); sit++) {
119 
120  if (m_blockVarsAll.find(*sit) == m_blockVarsAll.end()) {
121  m_blockVarsAll.insert(*sit);
122  }
123 
124  }
125 
126  }
127 
128  blockVar.clear();
129 
130  //---
131  //--- create models
132  //---
133  createModels();
134 
135  //some testing
185  } catch (const ErrorClass& eclass) {
186 
187  throw ErrorClass(eclass.errormsg);
188 
189  }
190 
191  UtilPrintFuncEnd(m_osLog, m_classTag, "initializeApp()",
192  m_appParam.LogLevel, 2);
193 
194 }//end initializeApp
195 
196 //===========================================================================//
197 void OSDipApp::createModelPart(DecompConstraintSet * model,
198  const int nRowsPart, const int * rowsPart) {
199 
200  const int nCols = m_osInterface.getVariableNumber();
201  const double * rowLB = m_osInterface.getRowLower();
202  const double * rowUB = m_osInterface.getRowUpper();
203  const double * colLB = m_osInterface.getColLower();
204  const double * colUB = m_osInterface.getColUpper();
205  const char * integerVars = m_osInterface.getIntegerColumns();
206 
207  std::cout << "STARTING createModelPart" << std::endl;
208 
209  model->M = new CoinPackedMatrix(false, 0.0, 0.0);
210 
211  if (!model->M)
212  throw UtilExceptionMemory("createModels", "OSDipApp");
213  model->reserve(nRowsPart, nCols);
214  model->M->submatrixOf(*m_osInterface.m_coinpm, nRowsPart, rowsPart);
215 
216  //---
217  //--- set the row upper and lower bounds
218  //--- set the col upper and lower bounds
219  //---
220  m_appParam.UseNames = true;
221  int i, r;
222  for (i = 0; i < nRowsPart; i++) {
223  r = rowsPart[i];
224  if (m_appParam.UseNames) {
225  const char * rowName =
227  // std::cout << "Row Name = " << m_osInterface.getConstraintNames()[r] << std::endl;
228  if (rowName)
229  model->rowNames.push_back(rowName);
230 
231  //std::cout << "Row Name = " << m_osInterface.getConstraintNames()[r] << std::endl;
232  }
233  model->rowLB.push_back(rowLB[r]);
234  model->rowUB.push_back(rowUB[r]);
235  }
236  copy(colLB, colLB + nCols, back_inserter(model->colLB));
237  copy(colUB, colUB + nCols, back_inserter(model->colUB));
238 
239  //---
240  //--- big fat hack... we don't deal with dual rays yet,
241  //--- so, we assume subproblems are bounded
242  //---
243  //--- NOTE: might also need to tighten LBs
244  //---
245  //--- Too small - ATM infeasible!
246  //--- Too big - round off issues with big coeffs in
247  //--- master-only vars
248  //---
249  //--- TODO: need extreme rays or bounded subproblems from user
250  //---
251 
252 
253  if (m_appParam.ColumnUB < 1.0e15) {
254  for (i = 0; i < nCols; i++) {
255  if (colUB[i] > 1.0e15) {
256  model->colUB[i] = m_appParam.ColumnUB;
257  }
258  }
259  }
260  if (m_appParam.ColumnLB > -1.0e15) {
261  for (i = 0; i < nCols; i++) {
262  if (colLB[i] < -1.0e15) {
263  model->colLB[i] = m_appParam.ColumnLB;
264  }
265  }
266  }
267 
268  //---
269  //--- set the indices of the integer variables of modelRelax
270  //--- also set the column names, if they exist
271  //---
272  for (i = 0; i < nCols; i++) {
273  if (m_appParam.UseNames) {
274  //const char * colName = m_osInterface.columnName(i);
275  const char * colName = m_osInterface.getVariableNames()[i].c_str();
276 
277  if (colName)
278  model->colNames.push_back(colName);
279  }
280 
281  if ((integerVars != NULL) && integerVars[i] == '1') {
282  //std::cout << "WE HAVE AN INTEGER VARIABLE " << std::endl;
283  model->integerVars.push_back(i);
284  }
285  }
286 
287  //free local memory
288  UTIL_DELARR(integerVars);
289 
290 }
291 
292 //===========================================================================//
294 
295  UtilPrintFuncBegin(m_osLog, m_classTag, "createModels()",
296  m_appParam.LogLevel, 2);
297 
298  const int nCols = m_osInterface.getVariableNumber();
299  int nRowsCore;
300  int *rowsCore = NULL;
301  int coreRowIndex;
302  int i;
303  int numBlocks;
304  std::set<int>::iterator sit;
305  std::string modelName;
306 
307  try {
308 
309  //First the define the objective function over the entire variable space
310  //Create the memory for the objective function
311  m_objective = new double[nCols];
312  for (i = 0; i < nCols; i++) {
314  //std::cout << "obj coeff = " << m_objective[i] << std::endl;
315  }
316  setModelObjective( m_objective);
317 
318  //define the blocks
319  numBlocks = static_cast<int> (m_blockVars.size());
320  for (i = 0; i < numBlocks; i++) {
321 
322  modelName = "Block" + UtilIntToStr(i);
323  setModelRelax(NULL, modelName, i);
324  }
325 
326  //define the core constraints -- constraints NOT in a block
327 
328  nRowsCore = m_coreConstraintIndexes.size();
329  if (nRowsCore <= 0)
330  throw ErrorClass("We need at least one coupling constraint");
331 
332  rowsCore = new int[nRowsCore];
333 
334  //std::set<int>::iterator sit;
335  coreRowIndex = 0;
336  for (sit = m_coreConstraintIndexes.begin(); sit
337  != m_coreConstraintIndexes.end(); sit++) {
338 
339  rowsCore[coreRowIndex++] = *sit;
340 
341  }
342 
343  if (coreRowIndex != nRowsCore)
344  throw ErrorClass("There was an error counting coupling constraints");
345 
346  DecompConstraintSet * modelCore = new DecompConstraintSet();
347  createModelPart(modelCore, nRowsCore, rowsCore);
348 
349  setModelCore(modelCore, "core");
350  //---
351  //--- save a pointer so we can delete it later
352  //---
353  m_modelC = modelCore;
354 
355  // done generating the core
356 
357  //get the master only variables
358  //modelCore->masterOnlyCols.push_back(i);
359 
360 
361  for (i = 0; i < nCols; i++) {
362 
363  if (m_blockVarsAll.find(i) == m_blockVarsAll.end()) {
364  modelCore->masterOnlyCols.push_back(i);
365  //std::cout << "MASTER ONLY VARIABLE " << i << std::endl;
366  }
367  }
368 
369  //---
370  //--- create an extra "empty" block for the master-only vars
371  //--- since I don't know what OSI will do with empty problem
372  //--- we will make column bounds explicity rows
373  //---
374  int nMasterOnlyCols =
375  static_cast<int> (modelCore->masterOnlyCols.size());
376  if (nMasterOnlyCols) {
377  if (m_appParam.LogLevel >= 1)
378  (*m_osLog) << "Create model part Master-Only." << std::endl;
379 
380  createModelMasterOnlys2(modelCore->masterOnlyCols);
381 
382  }
383 
384  UtilPrintFuncBegin(m_osLog, m_classTag, "printCurrentProblem()",
385  m_appParam.LogLevel, 2);
386 
387  //free local memory
388 
389  UTIL_DELARR(rowsCore);
390 
391  }//end try
392 
393  catch (const ErrorClass& eclass) {
394 
395  throw ErrorClass(eclass.errormsg);
396 
397  }
398 
399 }// end createModels()
400 
401 
402 //===========================================================================//
403 
404 void OSDipApp::createModelMasterOnlys2(std::vector<int> & masterOnlyCols) {
405 
406  int nBlocks = static_cast<int> (m_blockVars.size());
407  const int nCols = m_osInterface.getVariableNumber();
408  const double * colLB = m_osInterface.getColLower();
409  const double * colUB = m_osInterface.getColUpper();
410  const char * integerVars = m_osInterface.getIntegerColumns();
411  int nMasterOnlyCols = static_cast<int> (masterOnlyCols.size());
412 
413  if (m_appParam.LogLevel >= 1) {
414  (*m_osLog) << "nCols = " << nCols << std::endl;
415  (*m_osLog) << "nMasterOnlyCols = " << nMasterOnlyCols << std::endl;
416  }
417 
418  if (nMasterOnlyCols == 0)
419  return;
420 
421  int i;
422  std::vector<int>::iterator vit;
423  for (vit = masterOnlyCols.begin(); vit != masterOnlyCols.end(); vit++) {
424  i = *vit;
425 
426  //THINK:
427  // what-if master-only var is integer and bound is not at integer?
428 
429  DecompConstraintSet * model = new DecompConstraintSet();
430  model->m_masterOnly = true;
431  model->m_masterOnlyIndex = i;
432  model->m_masterOnlyLB = colLB[i];
433  //std::cout << "MASTER ONLY LB = " << model->m_masterOnlyLB << std::endl;
434  model->m_masterOnlyUB = colUB[i];
435  //std::cout << "MASTER ONLY UB = " << model->m_masterOnlyUB << std::endl;
436  //0=cont, 1=integer
437  if (integerVars[i] == '1')
438  model->m_masterOnlyIsInt = true;
439  //model->m_masterOnlyIsInt = integerVars[i] ? true : false;
440  if (m_appParam.ColumnUB < 1.0e15)
441  if (colUB[i] > 1.0e15)
442  model->m_masterOnlyUB = m_appParam.ColumnUB;
443  if (m_appParam.ColumnLB > -1.0e15)
444  if (colLB[i] < -1.0e15)
445  model->m_masterOnlyLB = m_appParam.ColumnLB;
446 
447  m_modelMasterOnly.insert(std::make_pair(i, model)); //keep track for garbage collection
448  setModelRelax(model, "master_only" + UtilIntToStr(i), nBlocks);
449  nBlocks++;
450  }
451  //free local memory
452  UTIL_DELARR(integerVars);
453  return;
454 }//end createModelMasterOnlys2
455 
456 
457 int OSDipApp::generateInitVars(DecompVarList & initVars) {
458 
459  //---
460  //--- generateInitVars is a virtual method and can be overriden
461  //--- if the user has some idea how to initialize the list of
462  //--- initial variables (columns in the DW master)
463  //---
464  std::cout << "GENERATE INIT VARS" << std::endl;
465  UtilPrintFuncBegin(m_osLog, m_classTag, "generateInitVars()",
466  m_appParam.LogLevel, 2);
467 
468  //---
469  //--- Get the initial solution from the OSOption object
470  //--- we want the variable other option where name="initialCol"
471  //---
472 
473  //std::vector<OtherVariableOption*> getOtherVariableOptions(std::string solver_name);
474  std::vector<OtherVariableOption*> otherVarOptions;
475  std::vector<OtherVariableOption*>::iterator vit;
476  int *index = NULL;
477  double *value = NULL;
478  int i;
479  double objValue;
480  int whichBlock;
481  DecompVar *var;
482 
483  try {
484  if (m_osInterface.m_osoption != NULL
486  > 0) {
487  std::cout << "Number of other variable options = "
489  << std::endl;
490  otherVarOptions
492  //iterate over the vector
493 
494  for (vit = otherVarOptions.begin(); vit != otherVarOptions.end(); vit++) {
495 
496  // see if we have an initialCol option
497 
498  if ((*vit)->name.compare("initialCol") == 0) {
499 
500  index = new int[(*vit)->numberOfVar];
501  value = new double[(*vit)->numberOfVar];
502 
503  objValue = 0.0;
504 
505  for (i = 0; i < (*vit)->numberOfVar; i++) {
506 
507  index[i] = (*vit)->var[i]->idx;
508 
509  //convert the string to integer
510  value[i] = atoi((*vit)->var[i]->value.c_str());
511  objValue += m_objective[index[i]];
512 
513  }
514 
515  whichBlock = atoi((*vit)->value.c_str());
516  var = new DecompVar((*vit)->numberOfVar, index, value,
517  objValue);
518  var->setBlockId(whichBlock);
519  initVars.push_back(var);
520 
521  //free local memory
522  UTIL_DELARR(index);
523  UTIL_DELARR(value);
524 
525  }
526 
527  }
528 
529  }
530 
531  //for bearcat
578  }//end try
579  catch (const ErrorClass& eclass) {
580 
581  throw ErrorClass(eclass.errormsg);
582 
583  }
584 
585  UtilPrintFuncEnd(m_osLog, m_classTag, "generateInitVars()",
586  m_appParam.LogLevel, 2);
587  return static_cast<int> (initVars.size());
588 }
589 
590 DecompSolverStatus OSDipApp::solveRelaxed(const int whichBlock,
591  const double * redCostX, const double convexDual,
592  std::list<DecompVar*> & vars) {
593 
594  UtilPrintFuncBegin(m_osLog, m_classTag, "solveRelaxed()",
595  m_appParam.LogLevel, 2);
596 
597  std::vector<int> solInd;
598  std::vector<double> solEls;
599  double varRedCost = 0.0;
600  double varOrigCost = 0.0;
601  int kount;
602 
603  std::set<int> blockVar;
604 
605 
606  blockVar = m_blockVars[ whichBlock];
607 
608 
609  std::set<int>::iterator sit;
610  std::vector<IndexValuePair*> solIndexValPair;
611  std::vector<IndexValuePair*>::iterator vit;
612 
613 
614 
615  double *cost = NULL;
616  int index;
617 
618  cost = new double[ blockVar.size()];
619 
620  index = 0;
621  int* reverseMap;
622  int reverseMapSize = blockVar.size();
623  reverseMap = new int[ reverseMapSize];
624 
625  for (sit = blockVar.begin(); sit != blockVar.end(); sit++) {
626 
627  cost[index] = redCostX[*sit];
628  reverseMap[ index] = *sit;
629  //std::cout << "cost[index] = " << cost[index] << std::endl;
630  index++;
631 
632  }
633 
634  try{
635 
636 
637  m_osDipBlockSolver[whichBlock]->m_whichBlock;
638 
639 
640  m_osDipBlockSolver[whichBlock]->solve(cost, &solIndexValPair, &varRedCost);
641  kount = 0;
642 
643  //std::cout << "NUMBER OF VARIABLES = " << solIndexValPair.size() << std::endl;
644  //kipp -- change this!!! Pushing back even the zero variables -- crazy!!!
645  /*
646  for (sit = blockVar.begin(); sit != blockVar.end(); sit++) {
647  //kipp be careful here -- the the dimension of the cost vector
648  //is the same as the number of variable in the block -- NOT in the model
649  if(solIndexValPair.size() != blockVar.size() ) throw ErrorClass("an inconsistent number of block variables");
650  solInd.push_back( *sit ) ; // again -- subproblem only sees variable in blockVar
651  //std::cout << "SOLUTION INDEX: = " << *sit << std::endl;
652  //std::cout << " SOLUTION INDEX SUBPROBLEM = " << kount ;
653  //std::cout << " VARIABLE VALUE = " << solIndexValPair[ kount]->value << std::endl;
654  solEls.push_back( solIndexValPair[ kount]->value ) ;
655  varOrigCost += m_objective[ *sit]*solIndexValPair[ kount]->value;
656  kount++;
657 
658  }
659  */
660 
661  for (vit = solIndexValPair.begin(); vit != solIndexValPair.end(); vit++) {
662 
663  //kipp -- check to make sure the variable indexed by (*vit)->idx is in the set blockVar
664  solInd.push_back( reverseMap[ (*vit)->idx] ) ;
665  solEls.push_back( (*vit)->value ) ;
666 
667  varOrigCost += m_objective[ reverseMap[ (*vit)->idx]]*(*vit)->value;
668 
669  }
670 
671 
672  delete[] reverseMap;
673 
674  } catch (const ErrorClass& eclass) {
675 
676  throw ErrorClass(eclass.errormsg);
677 
678  }
679 
680 
681 
682 
683  UTIL_DEBUG(m_appParam.LogLevel, 2,
684  std::cout << "WHICH BLOCK " << whichBlock << std::endl;
685  std::cout << "Convex Dual = " << convexDual << std::endl;
686  std::cout << "ORIGINAL COST = = " << varOrigCost << std::endl;
687  std::cout << "SUPROBLEM OPT VAL = " << varRedCost << std::endl;
688  printf("PUSH var with RC = %g\n", varRedCost - convexDual);
689  );
690 
691  //exit( 1);
692  DecompVar * var = new DecompVar(solInd, solEls, varRedCost - convexDual,
693  varOrigCost);
694 
695  var->setBlockId( whichBlock);
696  vars.push_back(var);
697 
698  UtilPrintFuncEnd(m_osLog, m_classTag, "APPsolveRelaxed()",
699  m_appParam.LogLevel, 2);
700 
701 
702 
703  delete[] cost;
704 
705  return DecompSolStatOptimal;
706 }//end solveRelaxed
707 
708 
709 int OSDipApp::generateCuts(const double * x,
710  DecompCutList & newCuts){
711 
712  std::cout << "I AM INSIDE GENERATE CUTS, IT WAS CALLED" << std::endl;
713 
714  //exit( 1);
715  return 0;
716 }//end generateCuts
717 
718 
719 
720 bool OSDipApp::APPisUserFeasible(const double * x,
721  const int n_cols,
722  const double tolZero){
723 
724  std::cout << "I AM INSIDE APPIS USER FEASIBLE, IT WAS CALLED" << std::endl;
725  //exit( 1);
726 
727  return true;
728 }
729 
730 
731 
732 
bool APPisUserFeasible(const double *x, const int n_cols, const double tolZero)
Definition: OSDipApp.cpp:720
void getSettings(UtilParameters &utilParam)
Definition: OSDipParam.h:53
DecompConstraintSet * m_modelC
The model constraint systems used for different algos.
Definition: OSDipApp.h:74
int m_whichBlock
m_whichBlock is the index of the subproblem we are working with
const int getVariableNumber() const
Get variable number.
void dumpSettings(std::ostream *os=&std::cout)
Definition: OSDipParam.h:70
std::string errormsg
errormsg is the error that is causing the exception to be thrown
Definition: OSErrorClass.h:42
const std::string m_classTag
Class id tag (for log / debugging).
Definition: OSDipApp.h:62
const double * getColLower() const
Get variable lower bounds.
int UseNames
Definition: OSDipParam.h:41
int LogLevel
Definition: OSDipParam.h:36
CoinPackedMatrix * m_coinpm
double * getObjectiveFunctionCoeff()
Returns array[getNumCols()] specifying if a variable is integer.
void createModelMasterOnlys2(std::vector< int > &masterOnlyCols)
Definition: OSDipApp.cpp:404
std::vector< OSDipBlockSolver * > m_osDipBlockSolver
m_osDipBlockSolver is a vector OSDipBlockSolvers
Definition: OSDipApp.h:44
OSDipParam m_appParam
Application specific parameters.
Definition: OSDipApp.h:68
void initializeApp(UtilParameters &utilParam)
Initialize application.
Definition: OSDipApp.cpp:23
const double * getColUpper() const
Get variable upper bounds.
void createModels()
Create model parts.
Definition: OSDipApp.cpp:293
std::set< int > m_blockVarsAll
m_blockVarsAll is the set of all variables that appear in a block
Definition: OSDipApp.h:53
std::string solverFactory
Definition: OSDipParam.h:40
const std::string * getConstraintNames() const
Get constraint names.
std::vector< std::set< int > > getBlockVarIndexes()
Returns array[getNumCols()] specifying if a variable is integer.
void readOSiL(std::string &filename)
Returns array[getNumCols()] specifying if a variable is integer.
static std::map< std::string, OSDipBlockSolverFactory * > factories
std::map< int, DecompConstraintSet * > m_modelMasterOnly
The model constraint system used master only vars.
Definition: OSDipApp.h:78
const double * getRowUpper() const
Get constraint upper bounds.
std::string OSoLFile
Definition: OSDipParam.h:39
OSOption * m_osoption
void createModelPart(DecompConstraintSet *model, const int nRowsPart, const int *rowsPart)
Definition: OSDipApp.cpp:197
std::vector< OSInstance * > m_blockOSInstances
m_blockOSInstances is a vector with an osinstance for each block
Definition: OSDipApp.h:47
double ColumnUB
Definition: OSDipParam.h:46
double ColumnLB
Definition: OSDipParam.h:47
double * m_objective
The model objective coefficients (original space).
Definition: OSDipApp.h:71
void fint fint fint real fint real real real real real real real * r
std::string OSiLFile
Definition: OSDipParam.h:38
int generateCuts(const double *x, DecompCutList &newCuts)
Definition: OSDipApp.cpp:709
const double * getRowLower() const
Get constraint lower bounds.
OS_DipInterface m_osInterface
the OS interface
Definition: OSDipApp.h:65
std::set< int > getCoreConstraintIndexes()
Returns array[getNumCols()] specifying if a variable is integer.
std::vector< std::set< int > > m_blockVars
m_blockVars is a vector with the set of variables for each block
Definition: OSDipApp.h:50
void readOSoL(std::string &filename)
Returns array[getNumCols()] specifying if a variable is integer.
DecompSolverStatus solveRelaxed(const int whichBlock, const double *redCostX, const double convexDual, std::list< DecompVar * > &vars)
Solve the relaxed problem.
Definition: OSDipApp.cpp:590
std::vector< OSInstance * > getBlockOSInstances()
Returns array[getNumCols()] specifying if a variable is integer.
std::set< int > m_coreConstraintIndexes
m_coreConstraintIndexes is the set core constraint indexes
Definition: OSDipApp.h:56
const std::string * getVariableNames() const
Get variable names.
std::vector< std::string > getBlockFactories()
Returns array[getNumCols()] specifying if a variable is integer.
OSDipFactoryInitializer * factoryInit
Definition: OSDipApp.h:41
const char * getIntegerColumns()
Returns array[getNumCols()] specifying if a variable is integer.
int generateInitVars(DecompVarList &initVars)
Definition: OSDipApp.cpp:457
int getNumberOfOtherVariableOptions()
Get the number of other variable options.
Definition: OSOption.cpp:2122
std::vector< std::string > m_blockFactories
m_blockFactories is a vector solver factory for each block
Definition: OSDipApp.h:59
used for throwing exceptions.
Definition: OSErrorClass.h:31
void fint fint fint real fint real * x
std::string DataDir
Definition: OSDipParam.h:37
std::vector< OtherVariableOption * > getOtherVariableOptions(std::string solver_name)
Get the &lt;other&gt; variable options associated with a particular solver.
Definition: OSOption.cpp:3315