JWally / jsLPSolver

Simple OOP javaScript library to solve linear programs, and mixed integer linear programs
The Unlicense
420 stars 69 forks source link

Prefer to spread variable decision #125

Open jason-linthwaite opened 1 year ago

jason-linthwaite commented 1 year ago

Hey again. This could be simply the multi objective optimisation problem I recently posted about, but quick question, given the model:

  1. Has 3 variables
  2. All 3 variables have the same attributes
  3. The model optimizes max on one of the attributes/values
  4. Has constraints for a max of 3 per variable
  5. Searches for a max of "score"

Currently, the solver will provide a solution suggesting variable 1 to have 3 occurrences.

Is there a way to tell the solver / to calculate options where the solver will prefer to "spread" the solution among similar variables, so in this case, the solution would be variable 1, variable 2 and variable 3 each with 1 occurrence?