solver

How to use 'cbc' in pyomo's SolverFactory in Windows 10

不羁岁月 提交于 2020-07-10 10:26:46
问题 I have been trying to use 'cbc' solver in pyomo as following: """ import pyomo.environ as pe solver = pe.SolverFactory('cbc') result = solver.solve(m) """ Currently, I have been relying on the embedded solver with pyomo installation, which is 'glpk', and I have found that 'cbc' can do better job in many circumstances. I am using: python 3.XX Anaconda environment Windows 10 Pyomo (installed via Conda) It would be great to upgrade the ability of pyomo by using advanced solver! 回答1: You will

C# : Referencing or using .so files in .NET Core on Linux

一世执手 提交于 2020-06-29 03:44:30
问题 We have a project on .NET Framework that references the Fico Xpress solver dll. The dll’s required are – Xprb.dll Xprbdn.dll Xprsdn.dll As no nuget packages are available for using Fico Xpress Solver, we installed the Fico Xpress Solver and copied these dll’s from the installation directory to our local folder named lib inside the project folder and added path reference to these dll’s inside the lib folder. So when compiling, the project uses the reference of these dll’s (present in the lib

Initial Guess/Warm start in CVXPY: give a hint of the solution

血红的双手。 提交于 2020-06-22 12:54:53
问题 In this bit of code: import cvxpy as cvx # Examples: linear programming # Create two scalar optimization variables. x = cvx.Variable() y = cvx.Variable() # Create 4 constraints. constraints = [x >= 0, y >= 0, x + y >= 1, 2*x + y >= 1] # Form objective. obj = cvx.Minimize(x+y) # Form and solve problem. prob = cvx.Problem(obj, constraints) prob.solve(warm_start= True) # Returns the optimal value. print ("status:", prob.status) print ("optimal value", prob.value) print ("optimal var", x.value, y

Is there an Excel Function to find a combination of numbers

筅森魡賤 提交于 2020-06-11 05:18:45
问题 I am not familiar with all of excel's functions and data tools, though I am familiar with excel. My problem is that I have a number on a spreadsheet which is a combination of many different numbers on a list. For example: A list contains: 100, 200, 250, 500, and 1000, and the number I need to explain is: 800 The answer would be 500, 200, 100 . Not hard to do in my head for a short list with simple numbers, but I'm dealing with over 1500 currency cells ($xxxx.xx) which make a total ( and not

Is there an Excel Function to find a combination of numbers

梦想与她 提交于 2020-06-11 05:18:02
问题 I am not familiar with all of excel's functions and data tools, though I am familiar with excel. My problem is that I have a number on a spreadsheet which is a combination of many different numbers on a list. For example: A list contains: 100, 200, 250, 500, and 1000, and the number I need to explain is: 800 The answer would be 500, 200, 100 . Not hard to do in my head for a short list with simple numbers, but I'm dealing with over 1500 currency cells ($xxxx.xx) which make a total ( and not

z3 alternative for Gecode branch() function?

南楼画角 提交于 2020-06-01 07:41:27
问题 In constraint solver like Gecode , We can control the exploration of search space with help of branching function. for e.g. branch(home , x , INT_VAL_MIN ) This will start exploring the search space from the minimum possible value of variable x in its domain and try to find solution.(There are many such alternatives .) For z3, do we have this kind of flexibility in-built ?? Any alternative possible?? 回答1: SMT solvers usually do not allow for these sorts of "hints" to be given, they act more

Implementing the Bartels–Stewart algorithm in Eigen3 — real matrices only?

核能气质少年 提交于 2020-05-31 04:41:06
问题 The bounty expires in 5 days . Answers to this question are eligible for a +50 reputation bounty. Charlie wants to draw more attention to this question. Based off this question and solution -- Implementing the Bartels–Stewart algorithm in Eigen3? -- I am trying to solve Lyapunov equations (AX + XA^T = C) using the Eigen library, but am limited to real matrices. The R (with c++) code below works, but involves complex numbers. It can definitely be simplified (since in this framing, there is no

How can I emulate Microsoft Excel's Solver functionality (GRG Nonlinear) in C#?

坚强是说给别人听的谎言 提交于 2020-02-26 06:10:12
问题 I have a non-linear optimization problem with constraints. It can be solved in Microsoft Excel with the Solver add-in, but I am having trouble replicating that in C#. My problem is shown in the following spreadsheet. I am solving the classic A x = b problem but with the caveat that all components of x must be non-negative. So instead of using standard linear algebra I use Solver with the non-negative constraint, minimizing the sum of the squared differences, and get a reasonable solution. I