2 people like it.

Mixed Integer Programming tuning tool for OPL Model (CPLEX)

This is a tool to run model in F# and to tune a MIP. We run sequentially a MIP using different parameters

  1: 
  2: 
  3: 
  4: 
  5: 
  6: 
  7: 
  8: 
  9: 
 10: 
 11: 
 12: 
 13: 
 14: 
 15: 
 16: 
 17: 
 18: 
 19: 
 20: 
 21: 
 22: 
 23: 
 24: 
 25: 
 26: 
 27: 
 28: 
 29: 
 30: 
 31: 
 32: 
 33: 
 34: 
 35: 
 36: 
 37: 
 38: 
 39: 
 40: 
 41: 
 42: 
 43: 
 44: 
 45: 
 46: 
 47: 
 48: 
 49: 
 50: 
 51: 
 52: 
 53: 
 54: 
 55: 
 56: 
 57: 
 58: 
 59: 
 60: 
 61: 
 62: 
 63: 
 64: 
 65: 
 66: 
 67: 
 68: 
 69: 
 70: 
 71: 
 72: 
 73: 
 74: 
 75: 
 76: 
 77: 
 78: 
 79: 
 80: 
 81: 
 82: 
 83: 
 84: 
 85: 
 86: 
 87: 
 88: 
 89: 
 90: 
 91: 
 92: 
 93: 
 94: 
 95: 
 96: 
 97: 
 98: 
 99: 
100: 
101: 
102: 
103: 
104: 
105: 
106: 
107: 
108: 
109: 
110: 
111: 
112: 
113: 
114: 
115: 
116: 
117: 
118: 
119: 
120: 
121: 
122: 
123: 
124: 
125: 
126: 
127: 
128: 
129: 
130: 
131: 
132: 
133: 
134: 
135: 
136: 
137: 
138: 
139: 
140: 
141: 
142: 
143: 
144: 
145: 
146: 
147: 
148: 
149: 
150: 
151: 
152: 
153: 
154: 
155: 
156: 
157: 
158: 
159: 
160: 
161: 
162: 
163: 
164: 
165: 
166: 
167: 
168: 
169: 
170: 
171: 
172: 
173: 
174: 
175: 
176: 
177: 
178: 
179: 
180: 
181: 
182: 
183: 
184: 
185: 
186: 
187: 
188: 
189: 
190: 
191: 
192: 
193: 
194: 
195: 
196: 
197: 
198: 
199: 
200: 
201: 
202: 
203: 
204: 
205: 
206: 
207: 
208: 
209: 
210: 
211: 
212: 
213: 
214: 
215: 
216: 
217: 
218: 
219: 
220: 
221: 
222: 
223: 
224: 
225: 
226: 
227: 
228: 
229: 
230: 
231: 
232: 
233: 
234: 
235: 
236: 
237: 
238: 
239: 
240: 
241: 
242: 
243: 
244: 
245: 
246: 
247: 
248: 
249: 
250: 
251: 
252: 
253: 
254: 
255: 
256: 
257: 
258: 
259: 
260: 
261: 
262: 
263: 
264: 
265: 
266: 
267: 
268: 
269: 
270: 
271: 
272: 
273: 
274: 
275: 
276: 
277: 
278: 
279: 
280: 
281: 
282: 
283: 
284: 
285: 
286: 
287: 
288: 
// OplFs: OPL tools in FSharp

#light

namespace OplFs
open System
open ILOG.Concert
open ILOG.OPL
open ILOG.CPLEX

module MathProg =
    let GenererModele fichierModele fichierDonnees = 
        let stopWatch = Diagnostics.Stopwatch.StartNew()
         // 01. Loading OPL objects
        printfn "\ta. Loading OPL object"
        stopWatch.Restart()

        OplFactory.DebugMode <-true
        let factory = new OplFactory()
        let errorHandler = factory.CreateOplErrorHandler(Console.Out)
        let settings = factory.CreateOplSettings(errorHandler)
        settings.DisplayPrecision <- 10
        settings.setWithWarnings(false)

        let modelSource = factory.CreateOplModelSource(fichierModele)
        let modelDefinition = factory.CreateOplModelDefinition(modelSource, settings)
        let cplex = factory.CreateCplex()
        let model = factory.CreateOplModel(modelDefinition, cplex)

        //let proj = factory.CreateOplProject(repertoireProjet)
        //let x=proj.MakeRunConfiguration()

        printfn "\t\tObjects load in %d millisec" (stopWatch.ElapsedMilliseconds/1000L)

        // 02. Chargement des données
        printfn "\tb. Loading data and pre-process"
        stopWatch.Restart()

        let dataSource = factory.CreateOplDataSource(fichierDonnees)
        model.AddDataSource(dataSource)
        let dataElement=model.MakeDataElements

        printfn"\t\tData load in %d millisec" stopWatch.ElapsedMilliseconds

        // Génération du modèle
        stopWatch.Restart()
        printfn "\tc. Generate model"
        model.Generate()
        printfn"\t\tModel load in %d millisec" stopWatch.ElapsedMilliseconds
        model, dataElement, cplex


module Util =
    type cplexParamCat =
        |IntParam of int
        |DoubleParam of float
        |BooleanParam of bool
        |StringParam of string
        |LongParam of int64
        
    type cplexParam = {
            cplexParamName:string;
            cplexParamValue:cplexParamCat}

    type tuningTrial = cplexParam list

    type tuningResult =  {
            cplexParamList: cplexParam list;
            result:string;
            cplexStatus:string;
            elapsedTime:int64}

    let setCplexIntParam (cplex : Cplex) cplexParamName cplexParamValue=
        match cplexParamName with
            | "AdvInd" -> cplex.SetParam(Cplex.IntParam.AdvInd, cplexParamValue)//General
            | "ClockType" -> cplex.SetParam(Cplex.IntParam.ClockType, cplexParamValue)//General
            | "MIPEmphasis" -> cplex.SetParam(Cplex.IntParam.MIPEmphasis, cplexParamValue)//Insistance
            | "BndStrenInd" -> cplex.SetParam(Cplex.IntParam.BndStrenInd, cplexParamValue)//Pré-traitement
            | "CoeRedInd" -> cplex.SetParam(Cplex.IntParam.CoeRedInd, cplexParamValue)//Pré-traitement
            | "DepInd" -> cplex.SetParam(Cplex.IntParam.DepInd, cplexParamValue)//Pré-traitement
            | "PreDual" -> cplex.SetParam(Cplex.IntParam.PreDual, cplexParamValue)//Pré-traitement
            | "AggFill" -> cplex.SetParam(Cplex.IntParam.AggFill, cplexParamValue)//Pré-traitement
            | "PrePass" -> cplex.SetParam(Cplex.IntParam.PrePass, cplexParamValue)//Pré-traitement
            | "Reduce" -> cplex.SetParam(Cplex.IntParam.Reduce, cplexParamValue)//Pré-traitement
            | "RelaxPreInd" -> cplex.SetParam(Cplex.IntParam.RelaxPreInd, cplexParamValue)//Pré-traitement
            | "RepeatPresolve" -> cplex.SetParam(Cplex.IntParam.RepeatPresolve, cplexParamValue)//Pré-traitement
            | "Symmetry" -> cplex.SetParam(Cplex.IntParam.Symmetry, cplexParamValue)//Pré-traitement
            | "ScaInd" -> cplex.SetParam(Cplex.IntParam.ScaInd, cplexParamValue) //Lecture
            | "MIPDisplay" -> cplex.SetParam(Cplex.IntParam.MIPDisplay, cplexParamValue)//MIP General
            | "MIPOrdType" -> cplex.SetParam(Cplex.IntParam.MIPOrdType, cplexParamValue)//MIP General
            | "BrDir" -> cplex.SetParam(Cplex.IntParam.BrDir, cplexParamValue)//MIP Stratégie
            | "DiveType" -> cplex.SetParam(Cplex.IntParam.DiveType, cplexParamValue)//MIP Stratégie
            | "FPHeur" -> cplex.SetParam(Cplex.IntParam.FPHeur, cplexParamValue)//MIP Stratégie
            | "HeurFreq" -> cplex.SetParam(Cplex.IntParam.HeurFreq, cplexParamValue)//MIP Stratégie
            | "MIPKappaStats" -> cplex.SetParam(Cplex.IntParam.MIPKappaStats, cplexParamValue)//MIP Stratégie
            | "NodeSel" -> cplex.SetParam(Cplex.IntParam.NodeSel, cplexParamValue)
            | "PreslvNd" -> cplex.SetParam(Cplex.IntParam.PreslvNd, cplexParamValue)
            | "Probe" -> cplex.SetParam(Cplex.IntParam.Probe, cplexParamValue)
            | "RINSHeur" -> cplex.SetParam(Cplex.IntParam.RINSHeur, cplexParamValue)
            | "RootAlg" -> cplex.SetParam(Cplex.IntParam.RootAlg, cplexParamValue)
            | "NodeAlg" -> cplex.SetParam(Cplex.IntParam.NodeAlg, cplexParamValue)
            | "VarSel" -> cplex.SetParam(Cplex.IntParam.VarSel, cplexParamValue)
            | "MIPSearch" -> cplex.SetParam(Cplex.IntParam.MIPSearch, cplexParamValue)
            | "CutPass" -> cplex.SetParam(Cplex.IntParam.CutPass, cplexParamValue)//MIP Limites
            | "Cliques" -> cplex.SetParam(Cplex.IntParam.Cliques, cplexParamValue)//Coupes
            | "Covers" -> cplex.SetParam(Cplex.IntParam.Covers, cplexParamValue)//Coupes
            | "DisjCuts" -> cplex.SetParam(Cplex.IntParam.DisjCuts, cplexParamValue)//Coupes
            | "FlowCovers" -> cplex.SetParam(Cplex.IntParam.FlowCovers, cplexParamValue)//Coupes
            | "FracCuts" -> cplex.SetParam(Cplex.IntParam.FracCuts, cplexParamValue)//Coupes
            | "GUBCovers" -> cplex.SetParam(Cplex.IntParam.GUBCovers, cplexParamValue)//Coupes
            | "ImplBd" -> cplex.SetParam(Cplex.IntParam.ImplBd, cplexParamValue)//Coupes
            | "MIRCuts" -> cplex.SetParam(Cplex.IntParam.MIRCuts, cplexParamValue)//Coupes
            | "MCFCuts" -> cplex.SetParam(Cplex.IntParam.MCFCuts, cplexParamValue)//Coupes
            | "FlowPaths" -> cplex.SetParam(Cplex.IntParam.FlowPaths, cplexParamValue)//Coupes
            | "ZeroHalfCuts" -> cplex.SetParam(Cplex.IntParam.ZeroHalfCuts, cplexParamValue)//Coupes
            | "BarColNz" -> cplex.SetParam(Cplex.IntParam.BarColNz, cplexParamValue)//Barrière
            | "BarAlg" -> cplex.SetParam(Cplex.IntParam.BarAlg, cplexParamValue)//Barrière
            | "BarCrossAlg" -> cplex.SetParam(Cplex.IntParam.BarCrossAlg, cplexParamValue)
            | "BarDisplay" -> cplex.SetParam(Cplex.IntParam.BarDisplay, cplexParamValue)
            | "BarOrder" -> cplex.SetParam(Cplex.IntParam.BarOrder, cplexParamValue)
            | "BarStartAlg" -> cplex.SetParam(Cplex.IntParam.BarStartAlg, cplexParamValue)
            | _ -> printfn "Paramètre inexistant: %s" cplexParamName //Manquante: LocalImplied, solutiontype, BQP, LPMethode
            //Fonctionne pas: AggFill

    let setCplexDoubleParam (cplex : Cplex) cplexParamName cplexParamValue=
        match cplexParamName with
            | "TiLim" -> cplex.SetParam(Cplex.DoubleParam.TiLim, cplexParamValue)//Général
            | "DetTiLim" -> cplex.SetParam(Cplex.DoubleParam.DetTiLim, cplexParamValue)//Général
            | "EpGap" -> cplex.SetParam(Cplex.DoubleParam.EpGap, cplexParamValue)//MIP Tolérance
            | "BarEpComp" -> cplex.SetParam(Cplex.DoubleParam.BarEpComp, cplexParamValue)//Barrière
            | "BarQCPEpComp" -> cplex.SetParam(Cplex.DoubleParam.BarQCPEpComp, cplexParamValue)//Barrière
            | "BarGrowth" -> cplex.SetParam(Cplex.DoubleParam.BarGrowth, cplexParamValue)//Barrière
            | "BarObjRng" -> cplex.SetParam(Cplex.DoubleParam.BarObjRng, cplexParamValue)//Barrière
            | _ -> printfn "Unavailable parameter: %s" cplexParamName

    let setCplexBooleanParam (cplex : Cplex) cplexParamName cplexParamValue =
        match cplexParamName with
            | "NumericalEmphasis" -> cplex.SetParam(Cplex.BooleanParam.NumericalEmphasis, cplexParamValue)//Insistance
            | "PreLinear" -> cplex.SetParam(Cplex.BooleanParam.PreLinear, cplexParamValue)//Pré-traitement
            | "PreInd" -> cplex.SetParam(Cplex.BooleanParam.PreInd, cplexParamValue)//Pré-traitement
            | "LBHeur" -> cplex.SetParam(Cplex.BooleanParam.LBHeur, cplexParamValue)//MIP Stratégie
            | "MIPOrdInd" -> cplex.SetParam(Cplex.BooleanParam.MIPOrdInd, cplexParamValue)//MIP Stratégie
            | _ -> printfn "Unavailable parameter: %s" cplexParamName

    let setCplexStringParam (cplex : Cplex) cplexParamName cplexParamValue =
        match cplexParamName with
            | "WorkDir" -> cplex.SetParam(Cplex.StringParam.WorkDir, cplexParamValue)//Général
            | _ -> printfn "Unavailable parameter: %s" cplexParamName
    let setCplexLongParam (cplex : Cplex) cplexParamName cplexParamValue  =
        match cplexParamName with            
            | "CutPass" -> cplex.SetParam(Cplex.LongParam.CutPass, cplexParamValue)//MIP Limites
            | "BarMaxCor" -> cplex.SetParam(Cplex.LongParam.BarMaxCor, cplexParamValue)//Barrière
            | "BarItLim" -> cplex.SetParam(Cplex.LongParam.BarItLim, cplexParamValue)//Barrière
            | _ -> printfn "Unavailable parameter: %s" cplexParamName


    let setCplexParam (cplex : Cplex)(param :cplexParam) =
        match param.cplexParamValue with
            | IntParam prm ->  setCplexIntParam cplex param.cplexParamName prm
            | DoubleParam prm ->  setCplexDoubleParam cplex param.cplexParamName prm
            | BooleanParam prm ->  setCplexBooleanParam cplex param.cplexParamName prm
            | StringParam prm ->  setCplexStringParam cplex param.cplexParamName prm
            | LongParam prm ->  setCplexLongParam cplex param.cplexParamName prm

    let generateTuningList lstParamToTest=
        let rec listCartesianProduct LL = 
            match LL with
            | [] -> Seq.singleton []
            | L::Ls -> seq {for x in L do for xs in listCartesianProduct Ls -> x::xs}

        let tblLstPrm =
            seq{for (paramName, paramValues) in lstParamToTest do
                    for paramValue in paramValues do
                        yield{cplexParamName=paramName; cplexParamValue=paramValue}
                }|>Seq.groupBy (fun x -> x.cplexParamName)|>Seq.map (fun (a,b) -> b)|>Seq.toList

        listCartesianProduct tblLstPrm|>Seq.toList

    let tune (cplex : Cplex) (tuningList: tuningTrial list) :tuningResult list=
        let setCplexParamInst = setCplexParam cplex
        let stopWatch = Diagnostics.Stopwatch.StartNew()
        let resultats= 
            seq{for trial in tuningList do
                    cplex.SetParam(Cplex.IntParam.AdvInd, 0)//Advanced start switch à off
                    //cplex.SetParam(Cplex.IntParam.ClockType, 1)//Temps déterministe
                    stopWatch.Restart()
                    trial|>Seq.iter setCplexParamInst
                    let resultat=
                        match cplex.Solve() with
                            | true -> "Success"
                            | false -> "Error"
                    yield{cplexParamList=trial;result=resultat; 
                        cplexStatus=cplex.GetCplexStatus().ToString(); elapsedTime=stopWatch.ElapsedMilliseconds}
                }
        Seq.toList résultats

// Script to tune OPL Cplex model. Enter a list of all parameters possible value and the script will try all combinaison of parameters

(*#light
#if INTERACTIVE
#r "C:\Program Files\IBM\ILOG\CPLEX_Studio1263\opl\lib\oplall.dll"
#load "OplFs.fs"
#endif

open OplFs
open OplFs.Util
open OplFs.MathProg
open System

let stopWatch = Diagnostics.Stopwatch.StartNew()
let repertoireProjet = @"C:\YourProjectDirectory\"
let fichierModele = repertoireProjet + "Warehouse.mod"
let  fichierDonnees = repertoireProjet + "Warehouse.dat"

let model, dataElement, cplex =GenererModele fichierModele fichierDonnees

//Parmètres CPLEX
//Liste de paramètres à tester
//Test de coupes
let lstParamToTest=
        [("TiLim", [DoubleParam 140.0]);
        ("RootAlg", [IntParam 4]);
        ("BarAlg", [ IntParam 3]);
        ("BarStartAlg", [IntParam 4]);
        ("BarOrder", [IntParam 1;IntParam 2;IntParam 3]);
        ("BarCrossAlg", [IntParam 1]);
        ("BarColNz", [IntParam 229;IntParam 100;IntParam 300;IntParam 400]);
        ("EpGap", [DoubleParam 0.05]);
        ("NodeAlg", [IntParam 4]);
        ("HeurFreq",[IntParam 10]);
        ("CutPass", [IntParam -1]);
        ]

stopWatch.Restart()
printfn "\td. Tune"

let tuningList = generateTuningList lstParamToTest
let resultatTuning=tune cplex tuningList

for x in resultatTuning do
    printfn "%d" x.elapsedTime*)

// Script to optimise a model
(*#light
#if INTERACTIVE
#r "C:\Program Files\IBM\ILOG\CPLEX_Studio1263\opl\lib\oplall.dll"
#load "OplFs.fs"
#endif

open OplFs
open OplFs.Util
open OplFs.MathProg
open System

let stopWatch = Diagnostics.Stopwatch.StartNew()
let repertoireProjet = @"C:\YourProjectDirectory\"
let fichierModele = repertoireProjet + "Warehouse.mod"
let  fichierDonnees = repertoireProjet + "Warehouse.dat"
let model, dataElement, cplex =GenererModele fichierModele fichierDonnees

printfn "\td. Optimise"
stopWatch.Restart()
let resultatOptimisation=tune cplex [[{cplexParamName = "TiLim";   cplexParamValue = DoubleParam 140.0;};
                                      {cplexParamName = "RootAlg"; cplexParamValue = IntParam 4;};
                                            {cplexParamName = "BarAlg";  cplexParamValue = IntParam 3;};
                                            {cplexParamName = "ScaInd";  cplexParamValue = IntParam 1;};
                                            {cplexParamName ="BarColNz";  cplexParamValue = IntParam 1000;};
                                            {cplexParamName = "BarStartAlg"; cplexParamValue = IntParam 4;};
                                            {cplexParamName = "BarCrossAlg";cplexParamValue = IntParam 1;}; 
                                            {cplexParamName = "EpGap";cplexParamValue = DoubleParam 0.05;};
                                            {cplexParamName = "HeurFreq";cplexParamValue = IntParam 10;};
                                            {cplexParamName = "MIPEmphasis";cplexParamValue = IntParam 1;};  
                                            {cplexParamName = "NodeAlg";cplexParamValue = IntParam 4;};
                                            {cplexParamName = "Symmetry"; cplexParamValue=IntParam 0;};
                                            {cplexParamName = "DiveType"; cplexParamValue=IntParam 1;};
                                            {cplexParamName = "FlowCovers";cplexParamValue = IntParam 0;};
                                            {cplexParamName = "FPHeur";cplexParamValue = IntParam 2;};
                                            {cplexParamName = "FracCuts";cplexParamValue = IntParam 0;};
                                            {cplexParamName = "GUBCovers";cplexParamValue = IntParam 0;};
                                            {cplexParamName = "ImplBd";cplexParamValue = IntParam 0;}; 
                                            {cplexParamName = "MIRCuts";cplexParamValue = IntParam 0;};
                                            {cplexParamName = "MCFCuts";cplexParamValue = IntParam 2;};
                                            {cplexParamName = "FlowPaths";cplexParamValue = IntParam 0;};
                                            {cplexParamName = "ZeroHalfCuts";cplexParamValue = IntParam 0;}
                                           ]]

printfn"\t\tOptimisation en %d millisec" stopWatch.ElapsedMilliseconds
*)
namespace System
val GenererModele : fichierModele:'a -> fichierDonnees:'b -> 'c * 'd * 'e

Full name: OplFs.MathProg.GenererModele
val fichierModele : 'a
val fichierDonnees : 'b
val stopWatch : Diagnostics.Stopwatch
namespace System.Diagnostics
Multiple items
type Stopwatch =
  new : unit -> Stopwatch
  member Elapsed : TimeSpan
  member ElapsedMilliseconds : int64
  member ElapsedTicks : int64
  member IsRunning : bool
  member Reset : unit -> unit
  member Restart : unit -> unit
  member Start : unit -> unit
  member Stop : unit -> unit
  static val Frequency : int64
  ...

Full name: System.Diagnostics.Stopwatch

--------------------
Diagnostics.Stopwatch() : unit
Diagnostics.Stopwatch.StartNew() : Diagnostics.Stopwatch
val printfn : format:Printf.TextWriterFormat<'T> -> 'T

Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.printfn
Diagnostics.Stopwatch.Restart() : unit
val factory : obj
val errorHandler : obj
type Console =
  static member BackgroundColor : ConsoleColor with get, set
  static member Beep : unit -> unit + 1 overload
  static member BufferHeight : int with get, set
  static member BufferWidth : int with get, set
  static member CapsLock : bool
  static member Clear : unit -> unit
  static member CursorLeft : int with get, set
  static member CursorSize : int with get, set
  static member CursorTop : int with get, set
  static member CursorVisible : bool with get, set
  ...

Full name: System.Console
property Console.Out: IO.TextWriter
val settings : obj
val modelSource : obj
val modelDefinition : obj
val cplex : 'e
val model : 'c
property Diagnostics.Stopwatch.ElapsedMilliseconds: int64
val dataSource : obj
val dataElement : 'd
module Util

from OplFs
type cplexParamCat =
  | IntParam of int
  | DoubleParam of float
  | BooleanParam of bool
  | StringParam of string
  | LongParam of int64

Full name: OplFs.Util.cplexParamCat
union case cplexParamCat.IntParam: int -> cplexParamCat
Multiple items
val int : value:'T -> int (requires member op_Explicit)

Full name: Microsoft.FSharp.Core.Operators.int

--------------------
type int = int32

Full name: Microsoft.FSharp.Core.int

--------------------
type int<'Measure> = int

Full name: Microsoft.FSharp.Core.int<_>
union case cplexParamCat.DoubleParam: float -> cplexParamCat
Multiple items
val float : value:'T -> float (requires member op_Explicit)

Full name: Microsoft.FSharp.Core.Operators.float

--------------------
type float = Double

Full name: Microsoft.FSharp.Core.float

--------------------
type float<'Measure> = float

Full name: Microsoft.FSharp.Core.float<_>
union case cplexParamCat.BooleanParam: bool -> cplexParamCat
type bool = Boolean

Full name: Microsoft.FSharp.Core.bool
union case cplexParamCat.StringParam: string -> cplexParamCat
Multiple items
val string : value:'T -> string

Full name: Microsoft.FSharp.Core.Operators.string

--------------------
type string = String

Full name: Microsoft.FSharp.Core.string
union case cplexParamCat.LongParam: int64 -> cplexParamCat
Multiple items
val int64 : value:'T -> int64 (requires member op_Explicit)

Full name: Microsoft.FSharp.Core.Operators.int64

--------------------
type int64 = Int64

Full name: Microsoft.FSharp.Core.int64

--------------------
type int64<'Measure> = int64

Full name: Microsoft.FSharp.Core.int64<_>
type cplexParam =
  {cplexParamName: string;
   cplexParamValue: cplexParamCat;}

Full name: OplFs.Util.cplexParam
cplexParam.cplexParamName: string
cplexParam.cplexParamValue: cplexParamCat
type tuningTrial = cplexParam list

Full name: OplFs.Util.tuningTrial
type 'T list = List<'T>

Full name: Microsoft.FSharp.Collections.list<_>
type tuningResult =
  {cplexParamList: cplexParam list;
   result: string;
   cplexStatus: string;
   elapsedTime: int64;}

Full name: OplFs.Util.tuningResult
tuningResult.cplexParamList: cplexParam list
tuningResult.result: string
tuningResult.cplexStatus: string
tuningResult.elapsedTime: int64
val setCplexIntParam : cplex:'a -> cplexParamName:string -> cplexParamValue:'b -> unit

Full name: OplFs.Util.setCplexIntParam
val cplex : 'a
val cplexParamName : string
val cplexParamValue : 'b
val setCplexDoubleParam : cplex:'a -> cplexParamName:string -> cplexParamValue:'b -> unit

Full name: OplFs.Util.setCplexDoubleParam
val setCplexBooleanParam : cplex:'a -> cplexParamName:string -> cplexParamValue:'b -> unit

Full name: OplFs.Util.setCplexBooleanParam
val setCplexStringParam : cplex:'a -> cplexParamName:string -> cplexParamValue:'b -> unit

Full name: OplFs.Util.setCplexStringParam
val setCplexLongParam : cplex:'a -> cplexParamName:string -> cplexParamValue:'b -> unit

Full name: OplFs.Util.setCplexLongParam
val setCplexParam : cplex:'a -> param:cplexParam -> unit

Full name: OplFs.Util.setCplexParam
val param : cplexParam
val prm : int
val prm : float
val prm : bool
val prm : string
val prm : int64
val generateTuningList : lstParamToTest:seq<string * #seq<cplexParamCat>> -> cplexParam list list

Full name: OplFs.Util.generateTuningList
val lstParamToTest : seq<string * #seq<cplexParamCat>>
val listCartesianProduct : (#seq<'c> list -> seq<'c list>)
val LL : #seq<'c> list
module Seq

from Microsoft.FSharp.Collections
val singleton : value:'T -> seq<'T>

Full name: Microsoft.FSharp.Collections.Seq.singleton
val L : #seq<'c>
val Ls : #seq<'c> list
Multiple items
val seq : sequence:seq<'T> -> seq<'T>

Full name: Microsoft.FSharp.Core.Operators.seq

--------------------
type seq<'T> = Collections.Generic.IEnumerable<'T>

Full name: Microsoft.FSharp.Collections.seq<_>
val x : 'c
val xs : 'c list
val tblLstPrm : seq<cplexParam> list
val paramName : string
val paramValues : #seq<cplexParamCat>
val paramValue : cplexParamCat
val groupBy : projection:('T -> 'Key) -> source:seq<'T> -> seq<'Key * seq<'T>> (requires equality)

Full name: Microsoft.FSharp.Collections.Seq.groupBy
val x : cplexParam
val map : mapping:('T -> 'U) -> source:seq<'T> -> seq<'U>

Full name: Microsoft.FSharp.Collections.Seq.map
val a : string
val b : seq<cplexParam>
val toList : source:seq<'T> -> 'T list

Full name: Microsoft.FSharp.Collections.Seq.toList
val tune : cplex:'a -> tuningList:tuningTrial list -> tuningResult list

Full name: OplFs.Util.tune
val tuningList : tuningTrial list
val setCplexParamInst : (cplexParam -> unit)
val resultats : seq<tuningResult>
val trial : tuningTrial
val iter : action:('T -> unit) -> source:seq<'T> -> unit

Full name: Microsoft.FSharp.Collections.Seq.iter
val resultat : string
Raw view Test code New version

More information

Link:http://fssnip.net/7PD
Posted:8 years ago
Author:Marko Blais
Tags: optimization programming language , opl , cplex , mixed integer programming , tuner