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
Tag: cplex
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
IBM Watson CPLEX Shows no Variables, no Solution when solving LP file
I’m migrating an application that formerly ran on IBM’s DoCloud to their new API based off of Watson. Since our application doesn’t have data formatted in CSV nor a separation between the model and data layers it seemed simpler to upload an LP file along with a model file that reads the LP file and solves it. I can upload
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