linear-programming

pandas, melt, unmelt preserve index

pandas, melt, unmelt preserve index Question: I’ve got a table of clients (coper) and asset allocation (asset) A = [[1,2],[3,4],[5,6]] idx = [‘coper1′,’coper2′,’coper3’] cols = [‘asset1′,’asset2’] df = pd.DataFrame(A,index = idx, columns = cols) so my data look like asset1 asset2 coper1 1 2 coper2 3 4 coper3 5 6 and I want to run …

Total answers: 3

How do I generate PuLP variables and constrains without using exec?

How do I generate PuLP variables and constrains without using exec? Question: I have written the following Python Code using the PuLP Library for solving the Knapsack Problem using the Integer Programming formulation. I am using strings to generate the LpVariable commands and add the constraints and then executing them with eval. Is there a …

Total answers: 3

Python Mixed Integer Linear Programming

Python Mixed Integer Linear Programming Question: Are there any Mixed Integer Linear Programming(MILP) solver for Python? Can GLPK python solve MILP problem? I read that it can solve Mixed integer problem. I am very new to linear programming problem. So i am rather confused and cant really differentiate if Mixed Integer Programming is different from …

Total answers: 3

linear programming in python?

linear programming in python? Question: I need to make a linear programming model. Here are the inequalities I’m using (for example): 6x + 4y <= 24 x + 2y <= 6 -x + y <= 1 y <= 2 I need to find the area described by these inequalities, and shade it in a graph, …

Total answers: 8