DOCloudSolver.hh 2.13 KB
Newer Older
1 2
// (C) Copyright 2015 by Autodesk, Inc.

3 4
//=============================================================================
//
5
//  CLASS DOCloudSolver
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
//
//=============================================================================
#ifndef COMISO_DOCloudSolver_HH
#define COMISO_DOCloudSolver_HH

//== COMPILE-TIME PACKAGE REQUIREMENTS ========================================
#include <CoMISo/Config/config.hh>
#if COMISO_DOCLOUD_AVAILABLE

//== INCLUDES =================================================================

#include <CoMISo/Config/CoMISoDefines.hh>
#include <vector>
#include <string>
#include "NProblemInterface.hh"
#include "NConstraintInterface.hh"
#include "VariableType.hh"

//== FORWARDDECLARATIONS ======================================================

//== NAMESPACES ===============================================================

namespace COMISO {

//== CLASS DEFINITION =========================================================

/**
    Solver interface for the IBM Decision Optimization Cloud.

    \todo A more elaborate description.
*/
class COMISODLLEXPORT DOCloudSolver
{
public:
  //! \throws Outcome
  void solve(
    NProblemInterface* _problem, // problem instance
    const std::vector<NConstraintInterface*>& _constraints, // linear constraints
    const std::vector<PairIndexVtype>& _discrete_constraints, // discrete constraints
    const double _time_limit = 60); // time limit in seconds

  //! \throws Outcome
  void solve(
    NProblemInterface* _problem, // problem instance
    const std::vector<NConstraintInterface*>& _constraints, // linear constraints
    const double _time_limit = 60) // time limit in seconds
  {
    std::vector<PairIndexVtype> dc;
    return solve(_problem, _constraints, dc, _time_limit);
  }
};


//=============================================================================
} // namespace COMISO

//=============================================================================
#endif // COMISO_DOCLOUD_AVAILABLE
//=============================================================================
#endif // COMISO_DOCloudSolver_HH
//=============================================================================