Perform the solve.
163413
def solve(self):
        
        with log_duration(self._print, "memcache get (resolve) took %s"):
            solver_dict = self._get_cached_solve()

        if solver_dict:
            self.from_cache = True
            self._set_result(solver_dict)
        else:
            self.from_cache = False
            solver = self._solve()
            solver_dict = self._solver_to_dict(solver)
            self._set_result(solver_dict)

            with log_duration(self._print, "memcache set (resolve) took %s"):
                self._set_cached_solve(solver_dict)
1200752
def _cho_solve(c_and_lower, b, check_finite=True):
    """"""

    L = c_and_lower[0]
    y = cpxl.solve_triangular(L, b, trans=0, lower=True,
                              check_finite=check_finite)
    return cpxl.solve_triangular(L, y, trans=1, lower=True,
                                 check_finite=check_finite)
425543
public void process() {
		solver.solve(Y,X);

		double a = X.data[0];
		double b = X.data[1];
		double c = X.data[2];
		double d = X.data[3];
		double e = X.data[4];

		double bottom = 4*a*c - b*b;
		deltaX = (b*e - 2*d*c)/bottom;
		deltaY = (b*d - 2*a*e)/bottom;
	}
35106
def prepareToSolve(self):
        '''
        
        '''
        self.setAndUpdateValues(self.solution_next,self.IncomeDstn,self.LivPrb,self.DiscFac)
        self.defBoroCnst(self.BoroCnstArt)
864300
def optimize
      # Ensure pending variables and constraints are added
      parent_update

      # Run the solver and save the status for later
      Cbc.Cbc_solve @ptr
      fail if Cbc.Cbc_status(@ptr) != 0

      save_solution

      @ptr = new_model
      reset_model
    end
460778
public void solve() {
        if (this.isSolved()) return;
        explain = false;
        session.setGlobal("explain", explain);
        if( steppingFactHandle != null ){
            session.delete( steppingFactHandle );
            steppingFactHandle = null;
            stepping = null;
        }
        this.session.fireAllRules();
//        dumpGrid();
    }
1191141
def results
      Solve
        .it!(@graph, initial_solve_constraints)
        .map do |name, version|
          dep = @resolver.dependencies[name]
          dep.version = Semverse::Version.new(version)
          dep
        end
    end
223603
@Override
    public void solve(ZMatrixRMaj B, ZMatrixRMaj X) {
        if( X.numRows != numCols )
            throw new IllegalArgumentException("Unexpected dimensions for X");
        else if( B.numRows != numRows || B.numCols != X.numCols )
            throw new IllegalArgumentException("Unexpected dimensions for B");

        int BnumCols = B.numCols;

        Y.reshape(numRows,1);
        Z.reshape(numRows,1);

        // solve each column one by one
        for( int colB = 0; colB < BnumCols; colB++ ) {

            // make a copy of this column in the vector
            for( int i = 0; i < numRows; i++ ) {
                int indexB = B.getIndex(i,colB);
                Y.data[i*2]   = B.data[indexB];
                Y.data[i*2+1] = B.data[indexB+1];
            }

            // Solve Qa=b
            // a = Q'b
            CommonOps_ZDRM.mult(Qt, Y, Z);

            // solve for Rx = b using the standard upper triangular solver
            TriangularSolver_ZDRM.solveU(R.data, Z.data, numCols);

            // save the results
            for( int i = 0; i < numCols; i++ ) {
                X.set(i,colB,Z.data[i*2],Z.data[i*2+1]);
            }
        }
    }
81780
@Override
    public void solve(DMatrixRBlock B, DMatrixRBlock X) {
        if( B.blockLength != blockLength )
            throw new IllegalArgumentException("Unexpected blocklength in B.");

        DSubmatrixD1 L = new DSubmatrixD1(decomposer.getT(null));

        if( X != null ) {
            if( X.blockLength != blockLength )
                throw new IllegalArgumentException("Unexpected blocklength in X.");
            if( X.numRows != L.col1 ) throw new IllegalArgumentException("Not enough rows in X");
        }
        
        if( B.numRows != L.col1 ) throw new IllegalArgumentException("Not enough rows in B");

        //  L * L^T*X = B

        // Solve for Y:  L*Y = B
        TriangularSolver_DDRB.solve(blockLength,false,L,new DSubmatrixD1(B),false);

        // L^T * X = Y
        TriangularSolver_DDRB.solve(blockLength,false,L,new DSubmatrixD1(B),true);

        if( X != null ) {
            // copy the solution from B into X
            MatrixOps_DDRB.extractAligned(B,X);
        }

    }
965314
def filter_solvers(solvers, requirements):
    """"""
    for solver in solvers:
        for req, value in iteritems(requirements):
            if (req in ('integer', 'quadratic', 'rational', 'name') and
                    (req not in solver or solver[req] != value)):
                break
        else:
            yield solver
1270755
def doSolve(fitsfn: Path, args: str=None):
    
    # binpath = Path(find_executable('solve-field')).parent
    opts = args.split(' ') if args else []
# %% build command
    cmd = ['solve-field', '--overwrite', str(fitsfn)]
    cmd += opts
    print('\n', ' '.join(cmd), '\n')
# %% execute
    ret = subprocess.check_output(cmd, universal_newlines=True)

    # solve-field returns 0 even if it didn't solve!
    print(ret)
    if 'Did not solve' in ret:
        raise RuntimeError(f'could not solve {fitsfn}')

    print('\n\n *** done with astrometry.net ***\n ')
24831
def solve(self):
        
        case = self.om.case
        self._base_mva = case.base_mva
        # TODO: Find an explanation for this value.
        self.opt["cost_mult"] = 1e-4

        # Unpack the OPF model.
        self._bs, self._ln, self._gn, _ = self._unpack_model(self.om)
        # Compute problem dimensions.
        self._ipol, _, self._nb, self._nl, _, self._ny, self._nxyz = \
            self._dimension_data(self._bs, self._ln, self._gn)

        # Compute problem dimensions.
        self._ng = len(self._gn)
#        gpol = [g for g in gn if g.pcost_model == POLYNOMIAL]

        # Linear constraints (l <= A*x <= u).
        A, l, u = self.om.linear_constraints()
#        AA, bb = self._linear_constraints(self.om)

        _, xmin, xmax = self._var_bounds()

        # Select an interior initial point for interior point solver.
        x0 = self._initial_interior_point(self._bs, self._gn, xmin, xmax, self._ny)

        # Build admittance matrices.
        self._Ybus, self._Yf, self._Yt = case.Y

        # Optimisation variables.

        self._Pg = self.om.get_var("Pg")
        self._Qg = self.om.get_var("Qg")
        self._Va = self.om.get_var("Va")
        self._Vm = self.om.get_var("Vm")

        # Adds a constraint on the reference bus angles.
#        xmin, xmax = self._ref_bus_angle_constraint(bs, Va, xmin, xmax)

        # Solve using Python Interior Point Solver (PIPS).
        s = self._solve(x0, A, l, u, xmin, xmax)

        Vang, Vmag, Pgen, Qgen = self._update_solution_data(s)

        self._update_case(self._bs, self._ln, self._gn, self._base_mva,
            self._Yf, self._Yt, Vang, Vmag, Pgen, Qgen, s["lmbda"])

        return s
176211
def solvedBy(self, user):
        
        _Solution(store=self.store, who=user, what=self)
819731
def solve_unchecked(self, sense=None):
        
        if sense is not None:
            self.set_objective_sense(sense)

        parm = swiglpk.glp_smcp()
        swiglpk.glp_init_smcp(parm)
        if self._do_presolve:
            parm.presolve = swiglpk.GLP_ON
            self._do_presolve = False
        else:
            parm.presolve = swiglpk.GLP_OFF

        parm.tol_bnd = self._feasibility_tolerance
        parm.tol_dj = self._optimality_tolerance

        logger.debug('Solving using glp_simplex()')
        r = swiglpk.glp_simplex(self._p, parm)
        if r in (swiglpk.GLP_ENOPFS, swiglpk.GLP_ENODFS):
            self._result = Result(self, r)
            return self._result
        elif r != 0:
            raise GLPKError('glp_simplex: {}'.format(r))

        if swiglpk.glp_get_num_int(self._p) == 0:
            self._result = Result(self)
        else:
            # The intopt MILP solver needs an optimal solution to the LP
            # relaxation. Therefore, glp_simplex has to run before glp_intopt
            # for MILP problems.
            logger.debug('Solving using glp_intopt()')
            parm = swiglpk.glp_iocp()
            swiglpk.glp_init_iocp(parm)
            parm.tol_int = self._integrality_tolerance
            r = swiglpk.glp_intopt(self._p, parm)
            if r != 0:
                raise GLPKError('glp_intopt: {}'.format(r))

            self._result = MIPResult(self)

        return self._result
865297
def solve(self, assumptions=[]):
        

        if self.glucose:
            if self.use_timer:
                 start_time = time.clock()

            # saving default SIGINT handler
            def_sigint_handler = signal.signal(signal.SIGINT, signal.SIG_DFL)

            self.status = pysolvers.glucose41_solve(self.glucose, assumptions)

            # recovering default SIGINT handler
            def_sigint_handler = signal.signal(signal.SIGINT, def_sigint_handler)

            if self.use_timer:
                self.call_time = time.clock() - start_time
                self.accu_time += self.call_time

            return self.status
1352973
def solve(self):
        """"""
        self._initialize()
        while self._outer_error_is_decreasing() and self._outer_iters < MAX_OUTERS:
            print('* Starting outer iteration {0:03d}. Current err = {1:12.5E}'
                  ''.format(self._outer_iters, self._last_outer_error))
            self._iterate_to_update_x_transforms()
            self._update_y_transform()
            self._outer_iters += 1
238239
@Override
	public void run() throws SolverException {
		// Create an executor for concurrent evaluation of derivatives
		if(numberOfThreads > 1) {
			if(executor == null) {
				executor = Executors.newFixedThreadPool(numberOfThreads);
				executorShutdownWhenDone = true;
			}
		}

		try {

			// Allocate memory
			int numberOfParameters	= initialParameters.length;
			int numberOfValues		= targetValues.length;

			parameterTest		= initialParameters.clone();
			parameterIncrement	= new double[numberOfParameters];
			parameterCurrent	= new double[numberOfParameters];

			valueTest			= new double[numberOfValues];
			valueCurrent		= new double[numberOfValues];
			derivativeCurrent	= new double[parameterCurrent.length][valueCurrent.length];

			hessianMatrix = new double[parameterCurrent.length][parameterCurrent.length];
			beta = new double[parameterCurrent.length];

			iteration = 0;

			while(true) {
				// Count iterations
				iteration++;

				// Calculate values for test parameters
				setValues(parameterTest, valueTest);

				// Calculate error
				double errorMeanSquaredTest = getMeanSquaredError(valueTest);

				/*
				 * Note: The following test will be false if errorMeanSquaredTest is NaN.
				 * That is: NaN is consider as a rejected point.
				 */
				if(errorMeanSquaredTest < errorMeanSquaredCurrent) {
					errorRootMeanSquaredChange = Math.sqrt(errorMeanSquaredCurrent) - Math.sqrt(errorMeanSquaredTest);

					// Accept point
					System.arraycopy(parameterTest, 0, parameterCurrent, 0, parameterCurrent.length);
					System.arraycopy(valueTest, 0, valueCurrent, 0, valueCurrent.length);
					errorMeanSquaredCurrent		= errorMeanSquaredTest;

					// Derivative has to be recalculated
					isParameterCurrentDerivativeValid = false;

					// Decrease lambda (move faster)
					lambda			/= lambdaDivisor;
				} else {
					errorRootMeanSquaredChange = Math.sqrt(errorMeanSquaredTest) - Math.sqrt(errorMeanSquaredCurrent);

					// Reject point, increase lambda (move slower)
					lambda				*= lambdaMultiplicator;
				}

				// Update a new parameter trial, if we are not done
				if (!done()) {
					updateParameterTest();
				} else {
					break;
				}

				// Log iteration
				if (logger.isLoggable(Level.FINE))
				{
					String logString = "Iteration: " + iteration + "\tLambda="
							+ lambda + "\tError Current:" + errorMeanSquaredCurrent
							+ "\tError Change:" + errorRootMeanSquaredChange + "\t";
					for (int i = 0; i < parameterCurrent.length; i++) {
						logString += "[" + i + "] = " + parameterCurrent[i] + "\t";
					}
					logger.fine(logString);
				}
			}
		}
		finally {
			// Shutdown executor if present.
			if(executor != null && executorShutdownWhenDone) {
				executor.shutdown();
				executor = null;
			}
		}
	}