How to use the pyscipopt.SCIP_RESULT.INFEASIBLE function in PySCIPOpt

To help you get started, we’ve selected a few PySCIPOpt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SCIP-Interfaces / PySCIPOpt / tests / test_tsp.py View on Github external
def conscheck(self, constraints, solution, check_integrality,
                  check_lp_rows, print_reason, completely, **results):
        if self.find_subtours(solution):
            return {"result": SCIP_RESULT.INFEASIBLE}
        else:
            return {"result": SCIP_RESULT.FEASIBLE}
github SCIP-Interfaces / PySCIPOpt / tests / test_customizedbenders.py View on Github external
self.model.setupBendersSubproblem(probnumber, self, solution)
        self.subprob.solveProbingLP()
        subprob = self.model.getBendersSubproblem(probnumber, self)
        assert self.subprob.getObjVal() == subprob.getObjVal()

        result_dict = {}

        objective = subprob.infinity()
        result = SCIP_RESULT.DIDNOTRUN
        lpsolstat = self.subprob.getLPSolstat()
        if lpsolstat == SCIP_LPSOLSTAT.OPTIMAL:
           objective = self.subprob.getObjVal()
           result = SCIP_RESULT.FEASIBLE
        elif lpsolstat == SCIP_LPSOLSTAT.INFEASIBLE:
           objective = self.subprob.infinity()
           result = SCIP_RESULT.INFEASIBLE
        elif lpsolstat == SCIP_LPSOLSTAT.UNBOUNDEDRAY:
           objective = self.subprob.infinity()
           result = SCIP_RESULT.UNBOUNDED


        result_dict["objective"] = objective
        result_dict["result"] = result

        return result_dict
github SCIP-Interfaces / PySCIPOpt / tests / test_alldiff.py View on Github external
def conscheck(self, constraints, solution, check_integrality, check_lp_rows, print_reason, completely):
        for cons in constraints:
            if not self.is_cons_feasible(cons, solution):
                return {"result": SCIP_RESULT.INFEASIBLE}
        return {"result": SCIP_RESULT.FEASIBLE}
github SCIP-Interfaces / PySCIPOpt / tests / test_customizedbenders.py View on Github external
self.model.setupBendersSubproblem(probnumber, self, solution)
        self.subprob.solveProbingLP()
        subprob = self.model.getBendersSubproblem(probnumber, self)
        assert self.subprob.getObjVal() == subprob.getObjVal()

        result_dict = {}

        objective = subprob.infinity()
        result = SCIP_RESULT.DIDNOTRUN
        lpsolstat = self.subprob.getLPSolstat()
        if lpsolstat == SCIP_LPSOLSTAT.OPTIMAL:
           objective = self.subprob.getObjVal()
           result = SCIP_RESULT.FEASIBLE
        elif lpsolstat == SCIP_LPSOLSTAT.INFEASIBLE:
           objective = self.subprob.infinity()
           result = SCIP_RESULT.INFEASIBLE
        elif lpsolstat == SCIP_LPSOLSTAT.UNBOUNDEDRAY:
           objective = self.subprob.infinity()
           result = SCIP_RESULT.UNBOUNDED


        result_dict["objective"] = objective
        result_dict["result"] = result

        return result_dict
github SCIP-Interfaces / PySCIPOpt / examples / unfinished / vrp_lazy.py View on Github external
def conscheck(self, constraints, solution, checkintegrality, checklprows, printreason):
        if self.addCuts(checkonly = True):
            return {"result": SCIP_RESULT.INFEASIBLE}
        else:
            return {"result": SCIP_RESULT.FEASIBLE}
github SCIP-Interfaces / PySCIPOpt / examples / unfinished / tsp_lazy.py View on Github external
def conscheck(self, constraints, solution, checkintegrality, checklprows, printreason):
        if self.findSubtours(checkonly = True, sol = solution):
            return {"result": SCIP_RESULT.INFEASIBLE}
        else:
            return {"result": SCIP_RESULT.FEASIBLE}
github SCIP-Interfaces / PySCIPOpt / examples / finished / lotsizing_lazy.py View on Github external
def conscheck(self, constraints, solution, checkintegrality, checklprows, printreason, completely):
        if not self.addcut(checkonly = True, sol = solution):
            return {"result": SCIP_RESULT.INFEASIBLE}
        else:
            return {"result": SCIP_RESULT.FEASIBLE}