Python Forum
How to solve equations, with groups of variables and or constraints?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to solve equations, with groups of variables and or constraints?
#1
I need a way to formulate a series of equations that are about finding at least one combination of groups of variables, that added together, equal a certain sum.

Example time:
(A,B)+(C,D,E)=3

This means that at least one combination of one variable chosen from each group (for example AC or BE but not ACD) when added needs to sum up to 3. Furthermore I also need to be able to constraint all variables to a range of integers, in this example all 5 variables can have the value 0, 1 or 2. This means that at least one variable in AB will have the value 1, and at least one variable in CDE will have the value 2, or vice versa, for this equation to hold true.

So I need to solve a lot of equations similar to this, all together. I have looked into Linear Programming in general, and Mixed Integer Linear Programming (and the mip library) specifically, but I have not been able to find anything about how to make these or constraints.

Is Linear Programming/Mixed Integer Linear Programming even the answer, or do I need to go in another direction to solve these types of equations?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Ldap Search for finding user Groups ilknurg 1 1,755 Mar-11-2022, 12:10 PM
Last Post: DeaD_EyE
Heart how to solve complex equations in python HoangF 3 2,788 Dec-26-2021, 07:04 PM
Last Post: HoangF
Question Help with code to solve polynomials equations hiviera 1 1,785 Jul-31-2021, 01:56 AM
Last Post: hiviera
  Make Groups with the List Elements quest 2 1,964 Jul-11-2021, 09:58 AM
Last Post: perfringo
  Understanding Regex Groups matt_the_hall 5 2,820 Jan-11-2021, 02:55 PM
Last Post: matt_the_hall
  Solve system of equations Sancho_Pansa 19 8,898 Oct-27-2020, 08:15 AM
Last Post: Sancho_Pansa
  Solve a system of linear equations with binary variables lopeslimagabriel 3 2,487 Sep-24-2020, 07:09 AM
Last Post: scidam
  Create homogeneous groups with Kmeans ? preliator 0 1,530 Sep-01-2020, 02:29 PM
Last Post: preliator
  Linear Programming (PuLP) - loop for constraints littleangel83 1 3,782 Jun-02-2020, 02:39 PM
Last Post: littleangel83
  Regex: finding if three groups have a value in them Daring_T 7 3,328 May-15-2020, 12:27 AM
Last Post: Daring_T

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020