I have a mixed integer/binary linear programming problem, the free version of excel solver can find a solution that satisfies all the constraints. however, the lp_solve API that I call from C++ could not find a solution. I suspect that excel solver simplifies the problem. So far I locate 2 parameters in excel solver option: mip gap and constraint precision. the former is set to 1%, i set the lp_solve's mip gap to 1%, but I do not know what is the equivalent constraint precision in lp_solve. Anyone can help? Thanks!
Related
I saw a few posts before regarding the Excel solver, but I have been unable to find a clear answer as to how to implement the GRG nonlinear solver in python (also with the option to apply constraints). Is this possible? IF so, could somebody please let me know how to achieve this, possibly with an example?
I am trying to solve a optimization problem using Pyomo. For that i need to declare a two dimensional vector and a three dimensional vector . Both of the vectors can store only [0,1].
Sri and Xrij
R=3 V=8 1<=i,j<=V 1<=r<=R
I tried to to do using range in pyomo
model.IDXV = range(v+1)
model.IDXR = range(r+1)
model.x=Var(model.IDXR,model.IDXV,model.IDXV,within=Binary,initialize=0)
model.s=Var(model.IDXR,model.IDXV,within=Binary,initialize=0)
I am using the 'ipopt' solver but after execution the value of X and S is in fraction instead of 0 or 1.
Please help me to do this.
Axel Kemper (in the comments) is correct. ipopt is a nonlinear programming solver and automatically assumes that you intend to relax discrete values.
For linear-discrete problems, there are the cbc and glpk free solvers. gurobi and cplex are the major commercial solvers.
For nonlinear-discrete problems, couenneand bonmin are the free solvers. Several other commercial and academic solvers are also available.
For example, how can I simply find the minimum of (x-1)^2 via ortools in Python?
I read the document of ortools, but I cannot find it. I knew it does not belong to linear optimization, but I cannot find a proper type in its document.
Google OR-Tools does not support quadratic programming. This page contains a list of what it supports:
Google Optimization Tools (OR-Tools) is a fast and portable software suite for solving combinatorial optimization problems. The suite contains:
A constraint programming solver.
A simple and unified interface to several linear programming and mixed integer programming solvers, including CBC, CLP, GLOP, GLPK, Gurobi, CPLEX, and SCIP.
Graph algorithms (shortest paths, min cost flow, max flow, linear sum assignment).
Algorithms for the Traveling Salesman Problem and Vehicle Routing Problem.
Bin packing and knapsack algorithms.
The following link clarifies that the mixed integer programming (MIP) support does not include quadratic MIP (MIQP):
https://github.com/google/or-tools/issues/598
You might check out this resource for ideas of how to do QP in Python:
https://scaron.info/blog/quadratic-programming-in-python.html
I'm using SolveXL as an add-in for excel to do a multi-objective optimization. SolveXL solves it by applying the Non-dominated sorting genetic algorithm II (NSGA-II). My problem is with the constraints, when I have constraints to not exceed a value (less than 15) for example like this
=IF(C5>15;C5-15;0)
The software give me all solutions satisfying this. But when I want the solutions to be greater than a value (15)
=IF(C5<15;15-C5;0)
I don't get any solution with infeasibility zero. I'm sure I'm computing it right because I tried it with a small example.
Could it not be working because of the complexity of my excel computations?
Well, I have a data set (length 20) and I want to check its gaussianity or non-gaussianity. I'm an somewhat advanced user of matlab so I already know (it doesn't fit a gaussian) but I have to prove it with excel and I have never used its statistical tools very much. What's the best way to do it?
EDIT: I had several ideas, but none of those appear to be practical in excel. First, I thought it would be a fitting tool (something like matlab's histfit) but I didn't find it. Second, I thought I could say my data is approximate gaussian if the deciles of my data set are the approximate the same of the gaussian distribution with mean=dataSetMean and variance=dataSetVariance, but excel doesn't have any of those.