@@ -347,16 +347,23 @@ class SeparationLoopResults:
347
347
solver_call_results : ComponentMap
348
348
Mapping from performance constraints to corresponding
349
349
``SeparationSolveCallResults`` objects.
350
- worst_case_perf_con : None or int, optional
350
+ worst_case_perf_con : None or Constraint
351
351
Performance constraint mapped to ``SeparationSolveCallResults``
352
352
object in `self` corresponding to maximally violating
353
353
separation problem solution.
354
+ all_discrete_scenarios_exhausted : bool, optional
355
+ For problems with discrete uncertainty sets,
356
+ True if all scenarios were explicitly accounted for in master
357
+ (which occurs if there have been
358
+ as many PyROS iterations as there are scenarios in the set)
359
+ False otherwise.
354
360
355
361
Attributes
356
362
----------
357
363
solver_call_results
358
364
solved_globally
359
365
worst_case_perf_con
366
+ all_discrete_scenarios_exhausted
360
367
found_violation
361
368
violating_param_realization
362
369
scaled_violations
@@ -365,11 +372,18 @@ class SeparationLoopResults:
365
372
time_out
366
373
"""
367
374
368
- def __init__ (self , solved_globally , solver_call_results , worst_case_perf_con ):
375
+ def __init__ (
376
+ self ,
377
+ solved_globally ,
378
+ solver_call_results ,
379
+ worst_case_perf_con ,
380
+ all_discrete_scenarios_exhausted = False ,
381
+ ):
369
382
"""Initialize self (see class docstring)."""
370
383
self .solver_call_results = solver_call_results
371
384
self .solved_globally = solved_globally
372
385
self .worst_case_perf_con = worst_case_perf_con
386
+ self .all_discrete_scenarios_exhausted = all_discrete_scenarios_exhausted
373
387
374
388
@property
375
389
def found_violation (self ):
@@ -599,6 +613,17 @@ def get_violating_attr(self, attr_name):
599
613
"""
600
614
return getattr (self .main_loop_results , attr_name , None )
601
615
616
+ @property
617
+ def all_discrete_scenarios_exhausted (self ):
618
+ """
619
+ bool : For problems where the uncertainty set is of type
620
+ DiscreteScenarioSet,
621
+ True if last master problem solved explicitly
622
+ accounts for all scenarios in the uncertainty set,
623
+ False otherwise.
624
+ """
625
+ return self .get_violating_attr ("all_discrete_scenarios_exhausted" )
626
+
602
627
@property
603
628
def worst_case_perf_con (self ):
604
629
"""
0 commit comments