1'''
2Objects to contain all model data and solve results for the ROSolver
3'''
4
5class ROSolveResults(object):
6    '''
7    Container for solve-instance data returned to the user after solving with PyROS.
8
9    Attributes:
10        :pyros_termination_condition: termination condition of the PyROS algorithm
11        :config: the config block for this solve instance
12        :time: Total solver CPU time
13        :iterations: total iterations done by PyROS solver
14        :final_objective_value: objective function value at termination
15    '''
16    pass
17
18class MasterProblemData(object):
19    '''
20    Container for the grcs master problem
21
22    Attributes:
23        :master_model: master problem model object
24        :base_model: block representing the original model object
25        :iteration: current iteration of the algorithm
26    '''
27
28class SeparationProblemData(object):
29    '''
30    Container for the grcs separation problem
31
32    Attributes:
33        :separation_model: separation problem model object
34        :points_added_to_master: list of parameter violations added to the master problem over the course of the algorithm
35        :separation_problem_subsolver_statuses: list of subordinate sub-solver statuses throughout separations
36        :total_global_separation_solvers: Counter for number of times global solvers were employed in separation
37        :constraint_violations: List of constraint violations identified in separation
38    '''
39    pass
40
41class MasterResult(object):
42    """Data class for master problem results data.
43
44   Attributes:
45        - termination_condition: Solver termination condition
46        - fsv_values: list of design variable values
47        - ssv_values: list of control variable values
48        - first_stage_objective: objective contribution due to first-stage degrees of freedom
49        - second_stage_objective: objective contribution due to second-stage degrees of freedom
50        - grcs_termination_condition: the conditions under which the grcs terminated
51                                      (max_iter, robust_optimal, error)
52        - pyomo_results: results object from solve() statement
53
54    """
55
56class SeparationResult(object):
57    """Data class for master problem results data.
58
59   Attributes:
60        - termination_condition: Solver termination condition
61        - violation_found: True if a violating parameter realization was identified in separation. For a given
62           separation objective function, it is considered a violation only if the parameter realization led to a
63           violation of the corresponding ineq. constraint used to define that objective
64        - is_global: True if separation problem differed to global solver, False if local solver
65        - separation_model: Pyomo model for separation problem at optimal solution
66        - control_var_values: list of control variable values
67        - violating_param_realization: list for the values of the uncertain_params identified as a violation
68        - list_of_violations: value of constraints violation for each ineq. constraint considered
69           in separation against the violation in violating_param_realizations
70        - pyomo_results: results object from solve() statement
71
72    """