source: coopr.opt/trunk/coopr/opt/results/problem.py @ 2259

Last change on this file since 2259 was 2095, checked in by wehart, 12 years ago

Renaming TerminationStatus? to TerminationCondition?. This is a
more sensible description of this enum type.

File size: 1.3 KB
Line 
1#  _________________________________________________________________________
2#
3#  Coopr: A COmmon Optimization Python Repository
4#  Copyright (c) 2008 Sandia Corporation.
5#  This software is distributed under the BSD License.
6#  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
7#  the U.S. Government retains certain rights in this software.
8#  _________________________________________________________________________
9
10__all__ = ['ProblemInformation', 'ProblemSense']
11
12from container import *
13from pyutilib.enum import Enum
14
15ProblemSense = Enum('unknown', 'minimize', 'maximize')
16
17
18class ProblemInformation(MapContainer):
19
20    def __init__(self):
21        MapContainer.__init__(self)
22        self.declare('name')
23        self.declare('lower_bound', value=float('-inf'))
24        self.declare('upper_bound', value=float('inf'))
25        self.declare('number_of_objectives', value=1, required=True)
26        self.declare('number_of_constraints', value=0)
27        self.declare('number_of_variables', value=0)
28        self.declare('number_of_binary_variables')
29        self.declare('number_of_integer_variables')
30        self.declare('number_of_continuous_variables')
31        self.declare('number_of_nonzeros')
32        self.declare('sense', value=ProblemSense.unknown, required=True)
33       
Note: See TracBrowser for help on using the repository browser.