Changeset 2095


Ignore:
Timestamp:
Jan 2, 2010 12:57:13 AM (10 years ago)
Author:
wehart
Message:

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

Location:
coopr.opt/trunk/coopr/opt
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • coopr.opt/trunk/coopr/opt/colin/ps.py

    r1918 r2095  
    99#  _________________________________________________________________________
    1010
    11 from coopr.opt import SolverResults, ProblemSense, SolverStatus, SolutionStatus, TerminationStatus
     11from coopr.opt import SolverResults, ProblemSense, SolverStatus, SolutionStatus, TerminationCondition
    1212import solver
    1313import problem
     
    7575        ndim=len(x)
    7676        curr_iter=0
    77         tstatus = TerminationStatus.maxIterations
     77        tstatus = TerminationCondition.maxIterations
    7878        tmsg=None
    7979        while curr_iter < self.max_iterations:
     
    8787            #   
    8888            if best <= self.min_function_value:
    89                 tstatus = TerminationStatus.minFunctionValue
     89                tstatus = TerminationCondition.minFunctionValue
    9090                tmsg = "%s < %s" % (best,self.min_function_value)
    9191                break
    9292            if self.delta <= self.min_delta:
    93                 tstatus = TerminationStatus.minStepLength
     93                tstatus = TerminationCondition.minStepLength
    9494                tmsg = "%s < %s" % (self.delta,self.min_delta)
    9595                break
  • coopr.opt/trunk/coopr/opt/results/__init__.py

    r1935 r2095  
    11#from old_results import *
    22from results import *
    3 from solver import SolverStatus, TerminationStatus
     3from solver import SolverStatus, TerminationCondition
    44from problem import ProblemSense
    55from solution import SolutionStatus, Solution
  • coopr.opt/trunk/coopr/opt/results/problem.py

    r1918 r2095  
    2626        self.declare('number_of_constraints', value=0)
    2727        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')
    2831        self.declare('number_of_nonzeros')
    2932        self.declare('sense', value=ProblemSense.unknown, required=True)
  • coopr.opt/trunk/coopr/opt/results/results.py

    r2019 r2095  
    110110
    111111        repn = self._repn_(option)
    112         #print "HERE",repn,len(repn)
    113112        print >>ostream, "# =========================================================="
    114113        print >>ostream, "# = Solver Results                                         ="
  • coopr.opt/trunk/coopr/opt/results/solver.py

    r1918 r2095  
    99#  _________________________________________________________________________
    1010
    11 __all__ = ['SolverInformation', 'SolverStatus', 'TerminationStatus']
     11__all__ = ['SolverInformation', 'SolverStatus', 'TerminationCondition']
    1212
    1313from container import *
     
    1616
    1717SolverStatus = Enum('error', 'warning', 'ok', 'aborted')
    18 TerminationStatus = Enum('maxIterations', 'minFunctionValue', 'minStepLength', 'unbounded', 'globallyOptimal', 'locallyOptimal',
     18TerminationCondition = Enum('maxIterations', 'minFunctionValue', 'minStepLength',
     19                            'unbounded', 'globallyOptimal', 'locallyOptimal',
    1920                            'optimal', 'bestSoFar', 'feasible', 'infeasible',
    2021                            'stoppedByLimit', 'unsure', 'error', 'other')
     
    5758        self.declare('user_time', type=ScalarType.time)
    5859        self.declare('system_time', type=ScalarType.time)
    59         self.declare('termination_condition', value=TerminationStatus.unsure)
     60        self.declare('termination_condition', value=TerminationCondition.unsure)
    6061        self.declare('termination_message')
    6162        self.declare('statistics', value=SolverStatistics(), active=False)
Note: See TracChangeset for help on using the changeset viewer.