File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -647,19 +647,18 @@ def row_att(
647647 print (f"{ sec_name } value { val } ignored for neutral row { row_name } ." )
648648 return
649649 attr = self .seq_row .get (row_seq ) # [row_name, lo_bnd, up_bnd, row_type]
650- if sec_name == "rhs" : # process the RHS value
651- if row_type == "G" : # update lo_bnd
650+ match sec_name , row_type :
651+ case "rhs" , "G" : # update lo_bnd
652652 attr [1 ] = val
653- elif row_type == "L" : # update up_bnd
653+ case "rhs" , "L" : # update up_bnd
654654 attr [2 ] = val
655- elif row_type == "E" : # update both bounds
655+ case "rhs" , "E" : # update both bounds
656656 attr [1 ] = attr [2 ] = val
657- else : # process the ranges value
658- if row_type == "G" : # update up_bnd
657+ case "ranges" , "G" : # update up_bnd
659658 attr [2 ] = attr [1 ] + abs (val )
660- elif row_type == "L" : # update lo_bnd
659+ case "ranges" , "L" : # update lo_bnd
661660 attr [1 ] = attr [2 ] - abs (val )
662- elif row_type == "E" : # update both bounds
661+ case "ranges" , "E" : # update both bounds
663662 if val > 0 :
664663 attr [2 ] = attr [1 ] + val
665664 else :
You can’t perform that action at this time.
0 commit comments