Skip to content
Advertisement

Tag: cplex

`SolverResults Error` When Parallelising Pyomo Optimisations

I’m trying to optimise multiple linear programming problems in parallel using Pyomo and the standard Python multiprocessing library. When switching to using multi-processing I keep running into the error: ValueError: Cannot load a SolverResults object with bad status: error. A similar issue was reported in this question, where their problem seemed to be that the solver (n.b. they used cbc

Print linear constraints of CPLEX LP on Python

I need to print all my linear constraints to verify the correctness of what I wrote but not knowing the CPLEX library for Python well I would not know how to do it. That’s my part of LP: I want to print out these 22 linear constraints. I’m working with CPLEX 12.9 on Python 3.7.9 Answer This will write the

Making CPLEX use a greedy solution

How do you make cplex use a greedy optimization solution as opposed to the optimal solution? Are there parameters you can set or is this not possible? Answer What you can do is to compute the greedy solution yourself and then submit this as a warmstart/MIP start. There are no parameters to force CPLEX to use a greedy algorithm to

Pyomo: Minimize for Max Value in Vector

I am optimizing the behavior of battery storage combined with solar PV to generate the highest possible revenue stream. I now want to add one more revenue stream: Peak Shaving (or Demand Charge Reduction) My approach is as follows: Next to the price per kWh, an industrial customer pays for the maximal amount of power (kW) he was drawing from

Advertisement