Replies: 3 comments 2 replies
-
@niesmo, I don't know if it helps, but with regard to MaxDuration, you may be able to create a new settings instance and alter the value for that field in your top level calling code. Line 404 in 705056e let settings = { settings with MaxDuration = yourNewValue } As to access the parameters that are intrinsic to each solver, I don't remember there is a way to interact with that at all. There was some discussions for evolving the design and opening some customisation for advance usages, and also, some exploration on my end, on possible designs to do so in context of a CPlex specific solver. |
Beta Was this translation helpful? Give feedback.
-
One idea that comes to mind from a design perspective (this is not backwards compatible as is) would be something like this:
type SolverSettings =
{ SolverType : SolverType
MaxDuration : int64
WriteLPFile : Option<string>
WriteMPSFile : Option<string>
// We want to enable this in the next major release
//EnableOutput : bool }
and SolverType =
| Cplex128 of CplexConfiguration
| Gurobi900 of GurobiConfiguration
// for CBC and GLOP
and CplexConfiguration =
{ MIPGap : decimal
MIPGapAbs : decimal }
and GurobiConfiguration =
{ MIPGap : decimal
MIPGapAbs : decimal } Now to include some convenient features, you can add something like let defaultCplexConfiguration= { MIPGap = 0; MIPGapAbs = 0 }
let defaultGurobiConfiguration = { MIPGap = 0; MIPGapAbs = 0 } So the call to the solver is going to be let model = ...
let solverSetting =
{ MaxDuration = 10_000L
SolverType = Cplex128 Config.defaultCplexConfiguration
WriteLPFile = None
WriteMPSFile = None }
let _ = Sovler.solve solverSetting model |
Beta Was this translation helpful? Give feedback.
-
I hope I'm in the right place with my question: How does one select the solver Flips uses on a system with multiple solvers installed? I'm struggling to find any documentation on this, so apologies if it's a stupid question... |
Beta Was this translation helpful? Give feedback.
-
Hi all 👋,
I was looking into doing some tuning of our optimization model and from what I can tell, there's no exposed way to set
SolverConfiguration
when calling theSolver.solve
function. For reference, Flips is setting theTimeLimit
when instantiating the solver object here and here using theSolverConfiguration
.I think it would be awesome to expose the ability to set those configurations through either the
SolverSettings
or some new construct.If there already exist a way to configure these parameters (like
MIPGap
), please let me know. If not, I think exposing those configuration (not asking for the OPTANO type to be exposed -- likely some parallel type from Flips) would be a great addition to the library.-Nima
Beta Was this translation helpful? Give feedback.
All reactions