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
  Random student selection from groups. esahan 7 2,067 Jul-08-2024, 12:28 AM
Last Post: AdamHensley
  How to group related products in relationship groups? RegionHUser 2 1,056 Jun-02-2024, 03:51 PM
Last Post: Pedroski55
  Ldap Search for finding user Groups ilknurg 1 3,012 Mar-11-2022, 12:10 PM
Last Post: DeaD_EyE
Heart how to solve complex equations in python HoangF 3 4,030 Dec-26-2021, 07:04 PM
Last Post: HoangF
Question Help with code to solve polynomials equations hiviera 1 2,390 Jul-31-2021, 01:56 AM
Last Post: hiviera
  Make Groups with the List Elements quest 2 2,830 Jul-11-2021, 09:58 AM
Last Post: perfringo
  Understanding Regex Groups matt_the_hall 5 4,340 Jan-11-2021, 02:55 PM
Last Post: matt_the_hall
  Solve system of equations Sancho_Pansa 19 13,411 Oct-27-2020, 08:15 AM
Last Post: Sancho_Pansa
  Solve a system of linear equations with binary variables lopeslimagabriel 3 3,628 Sep-24-2020, 07:09 AM
Last Post: scidam
  Create homogeneous groups with Kmeans ? preliator 0 2,120 Sep-01-2020, 02:29 PM
Last Post: preliator

Forum Jump:

User Panel Messages

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