summaryrefslogtreecommitdiff
path: root/src/generic/problemresolver/tier_limits.h
blob: 0f7b8e4dc66c64aa72e61c5916ad6573a8560fb2 (plain)
1
2
3
4
5
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
68
69
/** \file tier_limits.h */    // -*-c++-*-


//   Copyright (C) 2009-2010 Daniel Burrows
//
//   This program is free software; you can redistribute it and/or
//   modify it under the terms of the GNU General Public License as
//   published by the Free Software Foundation; either version 2 of
//   the License, or (at your option) any later version.
//
//   This program is distributed in the hope that it will be useful,
//   but WITHOUT ANY WARRANTY; without even the implied warranty of
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
//   General Public License for more details.
//
//   You should have received a copy of the GNU General Public License
//   along with this program; see the file COPYING.  If not, write to
//   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
//   Boston, MA 02111-1307, USA.

#ifndef TIER_LIMITS_H
#define TIER_LIMITS_H

#include "tier.h"
#include "tier_operation.h"

class tier_limits
{
public:
  static const int maximum_level = INT_MAX;

  /** \brief The maximum structural level; reserved for solutions that
   *  contain a logical conflict and thus are dead-ends.
   *
   *  Search nodes at this level are discarded without being visited.
   */
  static const int conflict_structural_level = maximum_level;

  /** \brief The second highest structural level; reserved for
   *  solutions that were already generated (to prevent them from
   *  being generated again).
   *
   *  Search nodes at this level are discarded without being visited.
   */
  static const int already_generated_structural_level = conflict_structural_level - 1;

  /** \brief The third highest structural level; reserved for solutions
   *  that violate a user constraint and will be deferred until the
   *  constraints are changed.
   */
  static const int defer_structural_level = conflict_structural_level - 2;

  /** \brief The minimum level; this is the initial level of the empty
   *  solution.
   */
  static const int minimum_level = INT_MIN;

  /** \brief Tier operations that just increase the structural level.
   */
  // @{
  static const tier_operation increase_to_maximum_op;
  static const tier_operation increase_to_conflict_op;
  static const tier_operation increase_to_already_generated_op;
  static const tier_operation increase_to_defer_op;
  static const tier_operation minimum_op;
  // @}
};

#endif