#include <examples/support.hh>

#include <gecode/minimodel.hh>
#include "gecode/set/int.hh"

#include <iostream>

using namespace Gecode;

class TestDebug : public Example {  
protected:
  /// Set of sessions 
  SetVarArray  x;  
public:
  TestDebug(const SizeOptions& opt) 
    :
    x ( *this, 4, IntSet::empty, 2, 4, 0, 4 )
  {
    IntSet e ( IntSet::empty );
    std::cout << e.min() << " - " << e.max() << std::endl;

    branch(*this, x, SET_VAR_NONE, SET_VAL_MIN_INC);
  }
  
  /// Constructor for cloning \a s
  TestDebug(bool share, TestDebug& s) 
    : Example(share,s)
  {
    x.update(*this, share, s.x);
  }
  
  /// Copy during cloning
  virtual Space*
  copy(bool share) {
    return new TestDebug(share, *this);
  }
  
  /// Print solution
  void
  print(std::ostream& os) {
    os << "Solution:\n=" << x << std::endl;
  }
};


int 
main(int argc, char* argv[])
{
  SizeOptions opt("MinCompletion");  
  opt.parse(argc,argv);
  Example::run<TestDebug,Restart,SizeOptions>(opt);
  return 0;
}
