예제 #1
0
 def __init__(self, **kwds):
     kwds['type'] = 'cplexdirect'
     DirectSolver.__init__(self, **kwds)
     self._init()
     self._wallclock_time = None
     self._pyomo_var_to_ndx_map = ComponentMap()
     self._ndx_count = 0
예제 #2
0
    def __init__(self, **kwds):
        kwds.setdefault('type', 'mosek_direct')
        DirectSolver.__init__(self, **kwds)
        self._pyomo_cone_to_solver_cone_map = dict()
        self._solver_cone_to_pyomo_cone_map = ComponentMap()
        self._name = None
        try:
            import mosek
            self._mosek = mosek
            self._mosek_env = self._mosek.Env()
            self._python_api_exists = True
            self._version = self._mosek_env.getversion()
            self._name = "MOSEK " + ".".join(str(i) for i in self._version)
        except ImportError:
            self._python_api_exists = False
        except Exception as e:
            print("Import of MOSEK failed - MOSEK message = " + str(e) + "\n")
            self._python_api_exists = False

        self._range_constraint = set()
        self._max_obj_degree = 2
        self._max_constraint_degree = 2
        self._termcode = None

        # Undefined capabilities default to None.
        self._capabilities.linear = True
        self._capabilities.quadratic_objective = True
        self._capabilities.quadratic_constraint = True
        self._capabilities.integer = True
        self._capabilities.conic_constraints = True
        self._capabilities.sos1 = False
        self._capabilities.sos2 = False
예제 #3
0
파일: cplex_direct.py 프로젝트: Pyomo/pyomo
 def __init__(self, **kwds):
     kwds['type'] = 'cplexdirect'
     DirectSolver.__init__(self, **kwds)
     self._init()
     self._wallclock_time = None
     self._pyomo_var_to_ndx_map = ComponentMap()
     self._ndx_count = 0
예제 #4
0
 def __init__(self, **kwds):
     kwds['type'] = 'gurobi_direct'
     DirectSolver.__init__(self, **kwds)
     self._pyomo_var_to_solver_var_map = ComponentMap()
     self._solver_var_to_pyomo_var_map = ComponentMap()
     self._pyomo_con_to_solver_con_map = dict()
     self._solver_con_to_pyomo_con_map = ComponentMap()
     self._init()
예제 #5
0
 def __init__(self, **kwds):
     kwds['type'] = 'gurobi_direct'
     DirectSolver.__init__(self, **kwds)
     self._pyomo_var_to_solver_var_map = ComponentMap()
     self._solver_var_to_pyomo_var_map = ComponentMap()
     self._pyomo_con_to_solver_con_map = dict()
     self._solver_con_to_pyomo_con_map = ComponentMap()
     self._init()
예제 #6
0
 def __init__(self, **kwds):
     kwds['type'] = 'gurobi_direct'
     DirectSolver.__init__(self, **kwds)
     self._init()