Python Pulp using with Matrices
问题 I am still very new to Python, after years and years of Matlab. I am trying to use Pulp to set up an integer linear program. Given an array of numbers: {P[i]:i=1...N} I want to maximize: sum( x_i P_i ) subject to the constraints A x <= b A_eq x = b_eq and with bounds (vector based bounds) LB <= x <= UB In pulp however, I don't see how to do vector declarations properly. I was using: RANGE = range(numpy.size(P)) x = pulp.LpVariable.dicts("x", LB_ind, UB_ind, "Integer") where I can only enter