@@ -77,14 +77,14 @@ def initialize_bound_fields(self):
77
77
dtype = float ,
78
78
count = len (s ._mpisppy_data .nonant_indices ),
79
79
)
80
- self . _nonant_lower_bounds = np .maximum (self ._nonant_lower_bounds , scenario_lower_bounds )
80
+ np .maximum (self ._nonant_lower_bounds , scenario_lower_bounds , out = self . _nonant_lower_bounds )
81
81
82
82
scenario_upper_bounds = np .fromiter (
83
83
_ub_generator (s ._mpisppy_data .nonant_indices .values ()),
84
84
dtype = float ,
85
85
count = len (s ._mpisppy_data .nonant_indices ),
86
86
)
87
- self . _nonant_upper_bounds = np .minimum (self ._nonant_upper_bounds , scenario_upper_bounds )
87
+ np .minimum (self ._nonant_upper_bounds , scenario_upper_bounds , out = self . _nonant_upper_bounds )
88
88
89
89
def create_integer_variable_where (self ):
90
90
self ._integer_variable_where = np .full (len (self ._nonant_lower_bounds ), False )
@@ -221,8 +221,8 @@ def extract_and_store_updated_nonant_bounds(self, lr_outer_bound):
221
221
nonzero_rc = np .where (self .rc_global == 0 , np .nan , self .rc_global )
222
222
bound_tightening = np .divide (self .BestInnerBound - lr_outer_bound , nonzero_rc )
223
223
224
- tighten_upper = np .where (bound_tightening > 0 , np .nan , bound_tightening )
225
- tighten_lower = np .where (bound_tightening < 0 , np .nan , bound_tightening )
224
+ tighten_upper = np .where (bound_tightening > 0 , bound_tightening , np .nan )
225
+ tighten_lower = np .where (bound_tightening < 0 , bound_tightening , np .nan )
226
226
227
227
tighten_upper += self ._nonant_lower_bounds
228
228
tighten_lower += self ._nonant_upper_bounds
@@ -237,7 +237,15 @@ def extract_and_store_updated_nonant_bounds(self, lr_outer_bound):
237
237
np .ceil (self ._nonant_lower_bounds , out = self ._nonant_lower_bounds , where = self ._integer_variable_where )
238
238
# floor of upper bounds for integer variables
239
239
np .floor (self ._nonant_upper_bounds , out = self ._nonant_upper_bounds , where = self ._integer_variable_where )
240
-
240
+
241
+ self .put_send_buffer (
242
+ self .send_buffers [Field .NONANT_LOWER_BOUNDS ],
243
+ Field .NONANT_LOWER_BOUNDS ,
244
+ )
245
+ self .put_send_buffer (
246
+ self .send_buffers [Field .NONANT_UPPER_BOUNDS ],
247
+ Field .NONANT_UPPER_BOUNDS ,
248
+ )
241
249
242
250
def main (self ):
243
251
# need the solution for ReducedCostsSpoke
0 commit comments