linear-programming

Scheduling T teacher having max S students into S slots

Scheduling T teacher having max S students into S slots Question: There are T teachers who can each have a maximum of S students. Each student can have a maximum of S teachers. There are S time slots for the student and teacher to meet. In each slot a teacher will teach one of its …

Total answers: 2

How do I enforce mutual exclusivity for an LP problem using PuLP?

How do I enforce mutual exclusivity for an LP problem using PuLP? Question: I made the following LP problem formulation in PuLP. We have an objective function with 5 decision variables, each with bounds. We also have 5 binary variables for each decision variable, in order to enforce mutual exclusivity between the first 3, and …

Total answers: 1

Python Linear Programming Binary exclusive or choose only one group

Python Linear Programming Binary exclusive or choose only one group Question: I am trying to identify the designers with best cost to finish the complete dress. The Conditions: Need to get complete dress Either Paul1 or Paul2 can be selected but not both even though the combination of these two could be the best cost. …

Total answers: 2

How can I make sure my constraint can operate mathematically with the LpVariable?

How can I make sure my constraint can operate mathematically with the LpVariable? Question: I am trying to use the pulb libraries classes to solve a LP-Problem. I am having problems implementing the constraint into my code. After importing the relevant classes and reading from my CSV file I wrote: prob = pulp.LpProblem("Optimal Number of …

Total answers: 1

PuLP linear programming problem is infeasible

PuLP linear programming problem is infeasible Question: I am writing a Linear Programming problem to help generate daily fantasy lineups. The goal is: Maximize Fpts projection The constraints are: Salary (Maximum 50,000) Positionality (Have to have 1 PG, 1 SG, 1 SF, 1 PF, 1 C, 1 G, 1 F and 1 UTIL player) where …

Total answers: 1

Python Pulp Solver: How to use compare signs (>= or <=) as variables in equation?

Python Pulp Solver: How to use compare signs (>= or <=) as variables in equation? Question: Hello I am trying to develop a Python Pulp Linear Programming solver which is not hard-coded but instead takes all input from the user. I have successfully done the part of objective function but I am having problem with …

Total answers: 1

How do you write Ranged Inequality Constraint in Pyomo

How do you write Ranged Inequality Constraint in Pyomo Question: I’m new to Pyomo and I need help writing this equation in Pyomo. I’m trying to write a (ranged inequality) constraint equation in Pyomo. Here is the equation: So far I wrote these 2 versions: Version 1: Not sure if this correct model.amount_of_energy_con = pe.ConstraintList() …

Total answers: 1

Python PulP linear optimisation for off-grid PV and battery system

Python PulP linear optimisation for off-grid PV and battery system Question: I’m trying to use linear optimisation to minimise the size of solar PV and battery for an off-grid property. I have solar irradiance data and household energy consumption data – I have created a year’s worth (8760 data points) of the data below. I …

Total answers: 1