How are we doing? Please help us improve Stack Overflow. Take our short survey

Questions tagged [solver]

A solver is a generic term indicating a piece of mathematical software, possibly in the form of a stand-alone computer program or as a software library, that 'solves' a mathematical problem.

solver
Filter by
Sorted by
Tagged with
0 votes
1 answer
33 views

loop of ufunc does not support argument 0 of type Float which has no callable log method

a = 0.5 b = 1 l = Symbol('l') l = solve(a*b/2+b/l-1, l)[0] num = 1-l/b*(r-a*b/2) -1/l*np.log(num) gives error TypeError: loop of ufunc does not support argument 0 of type Float which has no callable ...
1 vote
2 answers
2k views

How to let Excel pick up several numbers that give a sum wanted?

I'm not sure how I can phrase the question better but please see the image attached below. Basically, in the example, I have a number as the goal, 10 (on the left). Then, I have a number list on the ...
0 votes
0 answers
14 views

How to Use Solver with If Statements to Optimize Stock Market Returns

Hello StackOverflow World, I am trying to analyze a stock trading strategy using Solver, but when I try to run the simulation nothing happens. I've added some context below and here is the link to the ...
0 votes
1 answer
30 views

Gurobi: ImportError: DLL load failed while importing gurobipy: The specified module could not be found

I use 'conda' to install gurobi 11.0, and when I run the code on the pycharm 2023 platform 'from gurobipy import *'. It then always gives off ' from .gurobipy import * ImportError: DLL load failed ...
-2 votes
1 answer
22 views

Can I define multiple objectives for solver in excel without writing a macro?

I need to solve an equation for each cell of a column in excel by changing one variable (a separate cell in the sheet) that will impact all the cells. how can I do this in excel?
1 vote
1 answer
35 views

Setting values for IntVar for CP-SAT solver from OR-Tools

I am currently using a google OR-tools CP-SAT solver for a planification problem. I am using IntVars as a representation of the date. All those IntVars are in a dictionnary. I have a few constraints ...
0 votes
1 answer
41 views

What is the role of Pyomo/JuMP/Yalmip in solving optimization model using Python/Julia/Matlab and Gurobi Solver?

I am trying to understand the role of modeling frameworks such as Pyomo for Python, JuMP for Julia, and Yalmip for Matlab in solving the optimization model. I am solving a model with many constraints ...
0 votes
0 answers
28 views

How to convert a CNF file (in Dimacs format) to NNF file using any python library? [closed]

Sorry if I didn't mention what I tried before with PyEDA. I have a CNF(Conjunctive Normal Form) file in dimacs format and want to convert it or to represent it into a NNF (Negation Normal Form) file ...
0 votes
0 answers
41 views

Algorithm Optimization - Lights' Out game modification

I am given a m x n board (maximum 8), and k pieces (maximum 15), and a depth variable (maximum 4). The board contains values between 0 and depth. When you put a piece on the board, it will increment ...
3 votes
1 answer
18k views

VBA Solver disabling the dialog box that pops after each iteration

I am using the built-in solver in Excel 2007 within a VBA loop to solve a number of different problems. Occasionally, the solver hits the maximum time, which causes a pop-up dialog box to appear ...
0 votes
1 answer
38 views

Solving Constraints with Closed World Assumption in Z3 Solver

I am working on a constraint satisfaction problem using the Z3 Solver in Python, where I need to solve a constraint of the form: ForAll([x, y], Implies(And(situation(x), situation(y)), And(actions(x), ...
1 vote
1 answer
82 views

Get the only solution based on given constraints using z3 theorem

I have a set of constraints: Lane(l0) == True, Lane(l1) == True, OnComingLane(l1) == True, LaneMarking(m1) == True, LaneMarking(m0) == True, SolidWhiteLine(m1) == True, SolidWhiteLine(m0) == True, ...
0 votes
1 answer
34 views

Is cvc5 able to minimize or maximize an expression, given a set of constraints?

Other mathematical solvers, such as z3 or cplex, are able to solve mathematical models with multiple constraints with the purpose to minimize/maximize an expression, such as: a+b=10; 2<=b<=6 ...
23 votes
5 answers
56k views

poetry install | SolverProblemError Because my_project depends on string (*) which doesn't match any versions, version solving failed

I am yet to use poetry to run project, so excuse lack of understanding. I successfully installed the poetry python library manager, using: curl -sSL https://raw.githubusercontent.com/python-poetry/...
-1 votes
0 answers
48 views

Match-3 gravity games solver?

[sorry for bad English] I’m playing a game similar to candy Crush. There’s only one level, but it can be can played potentially forever, increasing points. There’s only one problem:time running down. ...
1 vote
1 answer
48 views

Is there a constraint to pieces of the stateFunction only go in ascending or descending order?

I have 3 intervals: dvar interval MyInterval[0..2]; And I have state function stateFunction MyStateFunction; And I have constraints: alwysConstant(MyStateFunction, MyInterval[i]); alwyasIn(...
0 votes
1 answer
153 views

Solving equation with integration using MATLAB

I would like to solve an equation below using MATLAB: All the parameters except p are known, so I only need to solve for p. However since I need to consider the sign of the integrand and there is an ...
0 votes
1 answer
237 views

Matlab: Using Ode23 on a continuous input span

I'm trying to figure out how to use ode23 for this. I have a function: function res = HardyWeinberg(inAFrequency, inFitness_AA, inFitness_Aa, inFitness_aa) fA = inAFrequency; wAA = ...
0 votes
1 answer
562 views

solve for a parameter such that area under curve equals 1

I have just found that I can use the function trapz in Matlab to find the area under a curve given a vector. What I want to do is to normalize the values in this vector in such that the area under the ...
0 votes
0 answers
245 views

Cannot cast array data from dtype('O') to dtype('float64') according to the rule 'safe' in Ode solver

I have a function which needs to be simulated by using a scipy 'odeint' solver. I am providing initial values as an numpy array which contains 13 parameters which are different in sizes. Also, all are ...
0 votes
0 answers
15 views

Change variable cells in OpenSolver model

I am trying to change the variable cells in OpenSolver with a click of a button. Like with vba to change the OpenSolver model's variable cells. I tried to use the following: Sub ChangeVariableCells() ...
0 votes
1 answer
69 views

Is it possible for "alwaysIn" (state functions) select from set of values?

State functions looks like the best option for modeling my situation. The image as it is now Now interval variable X might be in range of state functin from 'vmin' to 'vmax'. But in my situation any ...
0 votes
0 answers
16 views

Maple polynomial equation solver not identifying solutions

I have a polynomial in four variables and would like to use Maple to find all the solutions to F = n for particular values of n over the integers (so I am using isolve). F (below) is defined with a ...
-1 votes
1 answer
154 views

How to un-encrypt a string in javascript

Here is the the format of encription The password structure is as follows: <section1>-<section2>-<section3>-<section4>-<section5> Section 1 The first name length added to ...
0 votes
0 answers
29 views

Python solver returns no values upon running the code

I need to calculate the vertical natural frequency and the horizontal natural frequency of a beam. In order to do this I have been given two values of the vertical and horizontal natural frequency ...
1 vote
3 answers
83 views

Optimisation problem with constraint in R: how to solve problem with "complex" logarithmic benefit functions?

I have the following optimisation problem: Maximisise combined benefit functions F(x) = 2*10^9 + 160*x - 7*x*ln(x) F(y) = 3*10^9 + 170*y - 7.5*y*ln(y) subject to x + y <= 3*10^9 x,y >= 0 I ...
0 votes
0 answers
18 views

Excel Solver - Useful methods to "kick" Nonlinear solutions out of a stuck point

I'm running Excel Solver using the Nonlinear method (because the problem is much too nonlinear to suggest using any other method). There are over 40 variables, so there are over 80 constraints - some ...
0 votes
0 answers
42 views

LP problem status is not correct when time limit is used in PuLP solver

I´m solving a Integer linear programming problem in python using the PuLP library Solver "PULP_CBC_CMD". I defined my problem as: model = pulp.LpProblem("shift assignment problem", ...
-1 votes
1 answer
54 views

Adding constraints to PULP. Transportation problem

I am solving transportation problem using PULP. I have a list of suppliers (supply) and list of customers (demand). The supply is always more than demand and in some cases not every supplier is chosen ...
0 votes
1 answer
23 views

Looping though Rows and Columns while running Goalseek

in an Active Worksheet, I want to create an array of values where in the Macro copies values from a particular cell (let's say "L5") and paste it into target cell (I4). Thereafter run goal ...
0 votes
0 answers
132 views

How to optimise result of a macro with Excel solver?

This is my first title here. I hope I do not make any formatting mistakes. I have been having issue to trigger a macro and optimise its result with excel solver. I have not seen such an example and ...
2 votes
0 answers
160 views

math domain error in a python code involving fsolve and quad integrations

Im getting math domain error in this code. But the same function F does work in another program (I didn't use fsolve) without any domain error. import numpy as np from scipy.integrate import quad from ...
1 vote
2 answers
45 views

sympy solve one equation in 2 unknowns and symbols

import sympy from sympy.abc import x, y, z, a, b I want to find the roots in x and y for the following equation: f(x,y) = 2(x - a) + (y - b), whose roots are x=a, y=b. Using sympy I get instead sym....
0 votes
1 answer
124 views

I need a highly accurate simultaneous equation solver for Python

np.linalg.solve(X,Y) just isn't accurate enough. The code below solves a relatively small system of 5 equations: import numpy as np n=5 Y = np.random.rand(n) X = np.tile(np.array(range(1,n+1)),n) X ...
0 votes
2 answers
487 views

Solver: OR-Tools or clingo(ASP) model for "simple" logical problem

I try to solve a "simple" logical problem with OR-Tools or clingo(ASP). It goes like this: I have a set of Persons like Person(Tony, Bob, Ann, Carl, Amber, Peter) I also have groups like ...
0 votes
1 answer
374 views

How to solve an equation in Python? Which is the equivalent to ode45 for Matlab?

I'm trying to solve an equation in Python. This is an implicit equation and this is not easy to solve. I think that the Matlab command is ode45, but what is the equivalent for Python? Is there a ...
0 votes
0 answers
30 views

Consumer Maximization Problem Doesn't Work in Wolfram Mathematica

I'm trying to solve a problem that can be seen in the paper "The Role of the Structural Transformation in Aggregate Productivity". The problem is: Manually it is difficult to find the ...
0 votes
0 answers
88 views

Migrating from CVXPY directly to Solver or How to Make CVXPY run faster

I am trying to solve a convex optimization problem very quickly with python. My problem looks like this: with p, m, z and o being arrays of values. Z being the one to solve for. and both p and z ...
0 votes
0 answers
36 views

Solve( in tibasic is outputting the wrong answer

If I have a solve command set up in a tibasic script like so: Solve(A=BC, A, 2), where B=2 and C=5 The Solve( will output 2. To my knowledge the syntax for solve is: Solve(expression, variable, guess, ...
0 votes
2 answers
64 views

Python ODE system 4th order with equation system

I'm coding a python script for the solution for the following ode system. I use scipy solve_bvp library. Here is my implementation: from scipy.integrate import solve_bvp import numpy as np def ode(r,...
0 votes
1 answer
38 views

Pyomo error: No value for uninitialized NumericValue object

I'm a very new Pyomo user. I have been trying to find examples similar to my problem but I couldn't find any that were neither too easy or too difficult. It appears I have a problem initializing a ...
1 vote
1 answer
53 views

Details of numerical methods used by Dymola solvers

Dymola offers a wide range of ODE and DAE solvers, which the user can choose from depending on the application. However, I have not been able to find any reference to the details of the related ...
0 votes
2 answers
68 views

Sympy Solve Taking forever to run

I've been trying to solve a system of equations with Sympy's solve() function; but whenever I run it in my Jupyter Notebook, the kernel just says it is busy and it doesn't seem to finish running and ...
1 vote
3 answers
55 views

Set of equations describing general triangle only numerically solvable using sympy

I have two triangles sharing side c. Knowns are angles alpha,alpha' and side a and a'. I am looking for b and b'. From the set of 3 cosine rules I can find e.g. b' as shown in the code below. ...
0 votes
1 answer
83 views

Pyomo - Streaming model solver output via Websocket with FastAPI

I'm creating an optimization model with pyomo and trying to expose it via FastAPI (plain FastAPI or celery). In this process I'm trying to capture the solver output to stream it near-real-time to user ...
1 vote
1 answer
102 views

Differences between Excel Solver & PuLP solver in python,

Solver in excel is more efficient like PuLP Solver, or I made some mistake. Please can you help me? Python PuLP (Not correct results): from pulp import * p = (120, 72, 80) o = (0.85, 0.85, 0.80) lp= ...
0 votes
1 answer
699 views

Basic javascript solving quadratic equations

Very new programmer, trying to make a quadratic equation solver in javascript. //QuadSolver, a b c as in classic ax^2 + bx + c format function quadsolve(x, a, b, c) { var sol = ( ((a * (x * ...
23 votes
5 answers
36k views

JavaScript equation solver library

Is there a JavaScript library or function that will solve equations for variables? Such as 9 = 3 + x and solve for x. But it should also solve more advanced equations that include sine, cosine, and ...
1 vote
1 answer
192 views

Constraint programming to ensure uniqueness of tuples of variables while minimizing number of distinct values

I would like to solve the following optimization problem : I have integer variables P[r][c][s] in -k,k with : r in 0, 9 c in 0, 9 s in 0, 3 Contraints Those variables are under the following ...
-1 votes
1 answer
203 views

Forgot My Username and Password for Oracle SQL Developer

I am using SQL Developer for Oracle, but I forgot my username and password. I need help finding the username and password enter image description here Is there a command-line option for recovering my ...

1
2 3 4 5
34