@@ -333,17 +333,17 @@ def add_constr(self: "SolverHighs", lin_expr: "mip.LinExpr", name: str = ""):
333
333
self ._cons_col [name ] = row
334
334
335
335
def add_lazy_constr (self : "SolverHighs" , lin_expr : "mip.LinExpr" ):
336
- raise NotImplementedError ()
336
+ raise NotImplementedError ("HiGHS doesn't support lazy constraints!" )
337
337
338
338
def add_sos (
339
339
self : "SolverHighs" ,
340
340
sos : List [Tuple ["mip.Var" , numbers .Real ]],
341
341
sos_type : int ,
342
342
):
343
- raise NotImplementedError ()
343
+ raise NotImplementedError ("HiGHS doesn't support SOS!" )
344
344
345
345
def add_cut (self : "SolverHighs" , lin_expr : "mip.LinExpr" ):
346
- raise NotImplementedError ()
346
+ raise NotImplementedError ("HiGHS doesn't support cut callbacks!" )
347
347
348
348
def get_objective_bound (self : "SolverHighs" ) -> numbers .Real :
349
349
return self ._get_double_info_value ("mip_dual_bound" )
@@ -420,10 +420,10 @@ def generate_cuts(
420
420
max_cuts : int = mip .INT_MAX ,
421
421
min_viol : numbers .Real = 1e-4 ,
422
422
) -> "mip.CutPool" :
423
- raise NotImplementedError ()
423
+ raise NotImplementedError ("HiGHS doesn't support manual cut generation." )
424
424
425
425
def clique_merge (self , constrs : Optional [List ["mip.Constr" ]] = None ):
426
- raise NotImplementedError ()
426
+ raise NotImplementedError ("HiGHS doesn't support clique merging!" )
427
427
428
428
def optimize (
429
429
self : "SolverHighs" ,
@@ -442,7 +442,6 @@ def optimize(
442
442
mip .OptimizationStatus .OPTIMAL ,
443
443
mip .OptimizationStatus .FEASIBLE ,
444
444
):
445
- # TODO: also handle primal/dual rays?
446
445
n , m = self .num_cols (), self .num_rows ()
447
446
col_value = ffi .new ("double[]" , n )
448
447
col_dual = ffi .new ("double[]" , n )
@@ -473,10 +472,10 @@ def get_objective_value(self: "SolverHighs") -> numbers.Real:
473
472
def get_log (
474
473
self : "SolverHighs" ,
475
474
) -> List [Tuple [numbers .Real , Tuple [numbers .Real , numbers .Real ]]]:
476
- raise NotImplementedError ()
475
+ raise NotImplementedError ("HiGHS doesn't give access to a progress log." )
477
476
478
477
def get_objective_value_i (self : "SolverHighs" , i : int ) -> numbers .Real :
479
- raise NotImplementedError ()
478
+ raise NotImplementedError ("HiGHS doesn't store multiple solutions." )
480
479
481
480
def get_num_solutions (self : "SolverHighs" ) -> int :
482
481
# Multiple solutions are not supported (through C API?).
@@ -499,7 +498,7 @@ def set_objective_sense(self: "SolverHighs", sense: str):
499
498
check (self ._lib .Highs_changeObjectiveSense (self ._model , sense_map [sense ]))
500
499
501
500
def set_start (self : "SolverHighs" , start : List [Tuple ["mip.Var" , numbers .Real ]]):
502
- raise NotImplementedError ()
501
+ raise NotImplementedError ("HiGHS doesn't support a start solution." )
503
502
504
503
def set_objective (self : "SolverHighs" , lin_expr : "mip.LinExpr" , sense : str = "" ):
505
504
# set coefficients
@@ -545,10 +544,10 @@ def set_max_solutions(self: "SolverHighs", max_solutions: int):
545
544
self ._get_int_option_value ("mip_max_improving_sols" , max_solutions )
546
545
547
546
def get_pump_passes (self : "SolverHighs" ) -> int :
548
- raise NotImplementedError ()
547
+ raise NotImplementedError ("HiGHS doesn't support pump passes." )
549
548
550
549
def set_pump_passes (self : "SolverHighs" , passes : int ):
551
- raise NotImplementedError ()
550
+ raise NotImplementedError ("HiGHS doesn't support pump passes." )
552
551
553
552
def get_max_nodes (self : "SolverHighs" ) -> int :
554
553
return self ._get_int_option_value ("mip_max_nodes" )
@@ -584,10 +583,10 @@ def num_int(self: "SolverHighs") -> int:
584
583
return sum (vt != mip .CONTINUOUS for vt in self ._var_type )
585
584
586
585
def get_emphasis (self : "SolverHighs" ) -> mip .SearchEmphasis :
587
- raise NotImplementedError ()
586
+ raise NotImplementedError ("HiGHS doesn't support search emphasis." )
588
587
589
588
def set_emphasis (self : "SolverHighs" , emph : mip .SearchEmphasis ):
590
- raise NotImplementedError ()
589
+ raise NotImplementedError ("HiGHS doesn't support search emphasis." )
591
590
592
591
def get_cutoff (self : "SolverHighs" ) -> numbers .Real :
593
592
return self ._get_double_option_value ("objective_bound" )
@@ -908,7 +907,7 @@ def var_get_x(self: "SolverHighs", var: "mip.Var") -> numbers.Real:
908
907
return self ._x [var .idx ]
909
908
910
909
def var_get_xi (self : "SolverHighs" , var : "mip.Var" , i : int ) -> numbers .Real :
911
- raise NotImplementedError ()
910
+ raise NotImplementedError ("HiGHS doesn't store multiple solutions." )
912
911
913
912
def var_get_name (self : "SolverHighs" , idx : int ) -> str :
914
913
return self ._var_name [idx ]
@@ -971,7 +970,7 @@ def get_status(self: "SolverHighs") -> mip.OptimizationStatus:
971
970
972
971
def cgraph_density (self : "SolverHighs" ) -> float :
973
972
"""Density of the conflict graph"""
974
- raise NotImplementedError ()
973
+ raise NotImplementedError ("HiGHS doesn't support conflict graph." )
975
974
976
975
def conflicting (
977
976
self : "SolverHighs" ,
@@ -980,18 +979,18 @@ def conflicting(
980
979
) -> bool :
981
980
"""Checks if two assignment to binary variables are in conflict,
982
981
returns none if no conflict graph is available"""
983
- raise NotImplementedError ()
982
+ raise NotImplementedError ("HiGHS doesn't support conflict graph." )
984
983
985
984
def conflicting_nodes (
986
985
self : "SolverHighs" , v1 : Union ["mip.Var" , "mip.LinExpr" ]
987
986
) -> Tuple [List ["mip.Var" ], List ["mip.Var" ]]:
988
987
"""Returns all assignment conflicting with the assignment in v1 in the
989
988
conflict graph.
990
989
"""
991
- raise NotImplementedError ()
990
+ raise NotImplementedError ("HiGHS doesn't support conflict graph." )
992
991
993
992
def feature_values (self : "SolverHighs" ) -> List [float ]:
994
- raise NotImplementedError ()
993
+ raise NotImplementedError ("HiGHS doesn't support feature extraction." )
995
994
996
995
def feature_names (self : "SolverHighs" ) -> List [str ]:
997
- raise NotImplementedError ()
996
+ raise NotImplementedError ("HiGHS doesn't support feature extraction." )
0 commit comments