linear-programming

Python Pulp using with Matrices

。_饼干妹妹 提交于 2020-12-29 02:52:05
问题 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

Python Pulp using with Matrices

倖福魔咒の 提交于 2020-12-29 02:52:04
问题 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

Resource with schedules allocation problem

爷,独闯天下 提交于 2020-08-26 09:34:32
问题 I have a similar to this task but with some differencies in bold. That is: I have a set of J jobs that need to be completed. Jobs are organized into set of directed graphs. Each job can have one or more preceding(parent) jobs that have to be completed before it starts All jobs take different times to complete, but the time is known I have a set of R human resources. Important!!! Each resource has a schedule when this resource is available Some jobs can be preempted once started. E.g. if a

Resource with schedules allocation problem

南笙酒味 提交于 2020-08-26 09:34:26
问题 I have a similar to this task but with some differencies in bold. That is: I have a set of J jobs that need to be completed. Jobs are organized into set of directed graphs. Each job can have one or more preceding(parent) jobs that have to be completed before it starts All jobs take different times to complete, but the time is known I have a set of R human resources. Important!!! Each resource has a schedule when this resource is available Some jobs can be preempted once started. E.g. if a