ruby-cbc 0.1.9 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/Rakefile +0 -2
- data/lib/ruby-cbc.rb +1 -1
- data/lib/ruby-cbc/problem.rb +6 -8
- data/lib/ruby-cbc/version.rb +1 -1
- data/ruby-cbc.gemspec +3 -2
- metadata +17 -287
- data/ext/ruby-cbc/cbc.i +0 -15
- data/ext/ruby-cbc/cbc_wrap.c +0 -4618
- data/ext/ruby-cbc/extconf.rb +0 -60
- data/ext/ruby-cbc/install/bin/cbc +0 -0
- data/ext/ruby-cbc/install/bin/clp +0 -0
- data/ext/ruby-cbc/install/include/coin/CbcBranchActual.hpp +0 -24
- data/ext/ruby-cbc/install/include/coin/CbcBranchAllDifferent.hpp +0 -62
- data/ext/ruby-cbc/install/include/coin/CbcBranchBase.hpp +0 -78
- data/ext/ruby-cbc/install/include/coin/CbcBranchCut.hpp +0 -183
- data/ext/ruby-cbc/install/include/coin/CbcBranchDecision.hpp +0 -129
- data/ext/ruby-cbc/install/include/coin/CbcBranchDefaultDecision.hpp +0 -100
- data/ext/ruby-cbc/install/include/coin/CbcBranchDynamic.hpp +0 -206
- data/ext/ruby-cbc/install/include/coin/CbcBranchLotsize.hpp +0 -242
- data/ext/ruby-cbc/install/include/coin/CbcBranchToFixLots.hpp +0 -94
- data/ext/ruby-cbc/install/include/coin/CbcBranchingObject.hpp +0 -236
- data/ext/ruby-cbc/install/include/coin/CbcClique.hpp +0 -303
- data/ext/ruby-cbc/install/include/coin/CbcCompare.hpp +0 -39
- data/ext/ruby-cbc/install/include/coin/CbcCompareActual.hpp +0 -14
- data/ext/ruby-cbc/install/include/coin/CbcCompareBase.hpp +0 -142
- data/ext/ruby-cbc/install/include/coin/CbcCompareDefault.hpp +0 -120
- data/ext/ruby-cbc/install/include/coin/CbcCompareDepth.hpp +0 -47
- data/ext/ruby-cbc/install/include/coin/CbcCompareEstimate.hpp +0 -48
- data/ext/ruby-cbc/install/include/coin/CbcCompareObjective.hpp +0 -49
- data/ext/ruby-cbc/install/include/coin/CbcConfig.h +0 -14
- data/ext/ruby-cbc/install/include/coin/CbcConsequence.hpp +0 -49
- data/ext/ruby-cbc/install/include/coin/CbcCountRowCut.hpp +0 -168
- data/ext/ruby-cbc/install/include/coin/CbcCutGenerator.hpp +0 -482
- data/ext/ruby-cbc/install/include/coin/CbcCutModifier.hpp +0 -57
- data/ext/ruby-cbc/install/include/coin/CbcCutSubsetModifier.hpp +0 -66
- data/ext/ruby-cbc/install/include/coin/CbcDummyBranchingObject.hpp +0 -83
- data/ext/ruby-cbc/install/include/coin/CbcEventHandler.hpp +0 -245
- data/ext/ruby-cbc/install/include/coin/CbcFathom.hpp +0 -137
- data/ext/ruby-cbc/install/include/coin/CbcFathomDynamicProgramming.hpp +0 -169
- data/ext/ruby-cbc/install/include/coin/CbcFeasibilityBase.hpp +0 -56
- data/ext/ruby-cbc/install/include/coin/CbcFixVariable.hpp +0 -67
- data/ext/ruby-cbc/install/include/coin/CbcFollowOn.hpp +0 -207
- data/ext/ruby-cbc/install/include/coin/CbcFullNodeInfo.hpp +0 -161
- data/ext/ruby-cbc/install/include/coin/CbcGeneral.hpp +0 -60
- data/ext/ruby-cbc/install/include/coin/CbcGeneralDepth.hpp +0 -279
- data/ext/ruby-cbc/install/include/coin/CbcHeuristic.hpp +0 -682
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDINS.hpp +0 -96
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDW.hpp +0 -309
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDive.hpp +0 -192
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveCoefficient.hpp +0 -52
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveFractional.hpp +0 -52
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveGuided.hpp +0 -55
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveLineSearch.hpp +0 -52
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDivePseudoCost.hpp +0 -60
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicDiveVectorLength.hpp +0 -52
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicFPump.hpp +0 -340
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicGreedy.hpp +0 -280
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicLocal.hpp +0 -271
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicPivotAndFix.hpp +0 -58
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicRENS.hpp +0 -77
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicRINS.hpp +0 -102
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicRandRound.hpp +0 -58
- data/ext/ruby-cbc/install/include/coin/CbcHeuristicVND.hpp +0 -94
- data/ext/ruby-cbc/install/include/coin/CbcLinked.hpp +0 -1406
- data/ext/ruby-cbc/install/include/coin/CbcMessage.hpp +0 -94
- data/ext/ruby-cbc/install/include/coin/CbcMipStartIO.hpp +0 -26
- data/ext/ruby-cbc/install/include/coin/CbcModel.hpp +0 -2952
- data/ext/ruby-cbc/install/include/coin/CbcNWay.hpp +0 -166
- data/ext/ruby-cbc/install/include/coin/CbcNode.hpp +0 -351
- data/ext/ruby-cbc/install/include/coin/CbcNodeInfo.hpp +0 -349
- data/ext/ruby-cbc/install/include/coin/CbcObject.hpp +0 -272
- data/ext/ruby-cbc/install/include/coin/CbcObjectUpdateData.hpp +0 -64
- data/ext/ruby-cbc/install/include/coin/CbcOrClpParam.cpp +0 -4134
- data/ext/ruby-cbc/install/include/coin/CbcOrClpParam.hpp +0 -532
- data/ext/ruby-cbc/install/include/coin/CbcParam.hpp +0 -324
- data/ext/ruby-cbc/install/include/coin/CbcPartialNodeInfo.hpp +0 -110
- data/ext/ruby-cbc/install/include/coin/CbcSOS.hpp +0 -279
- data/ext/ruby-cbc/install/include/coin/CbcSimpleInteger.hpp +0 -286
- data/ext/ruby-cbc/install/include/coin/CbcSimpleIntegerDynamicPseudoCost.hpp +0 -564
- data/ext/ruby-cbc/install/include/coin/CbcSimpleIntegerPseudoCost.hpp +0 -114
- data/ext/ruby-cbc/install/include/coin/CbcSolver.hpp +0 -447
- data/ext/ruby-cbc/install/include/coin/CbcStrategy.hpp +0 -258
- data/ext/ruby-cbc/install/include/coin/CbcSubProblem.hpp +0 -83
- data/ext/ruby-cbc/install/include/coin/CbcTree.hpp +0 -490
- data/ext/ruby-cbc/install/include/coin/CbcTreeLocal.hpp +0 -372
- data/ext/ruby-cbc/install/include/coin/Cbc_C_Interface.h +0 -381
- data/ext/ruby-cbc/install/include/coin/Cgl012cut.hpp +0 -464
- data/ext/ruby-cbc/install/include/coin/CglAllDifferent.hpp +0 -115
- data/ext/ruby-cbc/install/include/coin/CglClique.hpp +0 -308
- data/ext/ruby-cbc/install/include/coin/CglConfig.h +0 -19
- data/ext/ruby-cbc/install/include/coin/CglCutGenerator.hpp +0 -121
- data/ext/ruby-cbc/install/include/coin/CglDuplicateRow.hpp +0 -189
- data/ext/ruby-cbc/install/include/coin/CglFlowCover.hpp +0 -371
- data/ext/ruby-cbc/install/include/coin/CglGMI.hpp +0 -364
- data/ext/ruby-cbc/install/include/coin/CglGMIParam.hpp +0 -313
- data/ext/ruby-cbc/install/include/coin/CglGomory.hpp +0 -204
- data/ext/ruby-cbc/install/include/coin/CglKnapsackCover.hpp +0 -310
- data/ext/ruby-cbc/install/include/coin/CglLandP.hpp +0 -306
- data/ext/ruby-cbc/install/include/coin/CglLandPValidator.hpp +0 -130
- data/ext/ruby-cbc/install/include/coin/CglLiftAndProject.hpp +0 -104
- data/ext/ruby-cbc/install/include/coin/CglMessage.hpp +0 -50
- data/ext/ruby-cbc/install/include/coin/CglMixedIntegerRounding.hpp +0 -429
- data/ext/ruby-cbc/install/include/coin/CglMixedIntegerRounding2.hpp +0 -427
- data/ext/ruby-cbc/install/include/coin/CglOddHole.hpp +0 -160
- data/ext/ruby-cbc/install/include/coin/CglParam.hpp +0 -93
- data/ext/ruby-cbc/install/include/coin/CglPreProcess.hpp +0 -492
- data/ext/ruby-cbc/install/include/coin/CglProbing.hpp +0 -543
- data/ext/ruby-cbc/install/include/coin/CglRedSplit.hpp +0 -448
- data/ext/ruby-cbc/install/include/coin/CglRedSplit2.hpp +0 -494
- data/ext/ruby-cbc/install/include/coin/CglRedSplit2Param.hpp +0 -495
- data/ext/ruby-cbc/install/include/coin/CglRedSplitParam.hpp +0 -272
- data/ext/ruby-cbc/install/include/coin/CglResidualCapacity.hpp +0 -240
- data/ext/ruby-cbc/install/include/coin/CglSimpleRounding.hpp +0 -174
- data/ext/ruby-cbc/install/include/coin/CglStored.hpp +0 -125
- data/ext/ruby-cbc/install/include/coin/CglTreeInfo.hpp +0 -180
- data/ext/ruby-cbc/install/include/coin/CglTwomir.hpp +0 -565
- data/ext/ruby-cbc/install/include/coin/CglZeroHalf.hpp +0 -133
- data/ext/ruby-cbc/install/include/coin/ClpAmplObjective.hpp +0 -113
- data/ext/ruby-cbc/install/include/coin/ClpCholeskyBase.hpp +0 -294
- data/ext/ruby-cbc/install/include/coin/ClpCholeskyDense.hpp +0 -162
- data/ext/ruby-cbc/install/include/coin/ClpConfig.h +0 -17
- data/ext/ruby-cbc/install/include/coin/ClpConstraint.hpp +0 -125
- data/ext/ruby-cbc/install/include/coin/ClpConstraintAmpl.hpp +0 -108
- data/ext/ruby-cbc/install/include/coin/ClpConstraintLinear.hpp +0 -110
- data/ext/ruby-cbc/install/include/coin/ClpConstraintQuadratic.hpp +0 -119
- data/ext/ruby-cbc/install/include/coin/ClpDualRowDantzig.hpp +0 -71
- data/ext/ruby-cbc/install/include/coin/ClpDualRowPivot.hpp +0 -129
- data/ext/ruby-cbc/install/include/coin/ClpDualRowSteepest.hpp +0 -153
- data/ext/ruby-cbc/install/include/coin/ClpDummyMatrix.hpp +0 -183
- data/ext/ruby-cbc/install/include/coin/ClpDynamicExampleMatrix.hpp +0 -186
- data/ext/ruby-cbc/install/include/coin/ClpDynamicMatrix.hpp +0 -381
- data/ext/ruby-cbc/install/include/coin/ClpEventHandler.hpp +0 -187
- data/ext/ruby-cbc/install/include/coin/ClpFactorization.hpp +0 -432
- data/ext/ruby-cbc/install/include/coin/ClpGubDynamicMatrix.hpp +0 -247
- data/ext/ruby-cbc/install/include/coin/ClpGubMatrix.hpp +0 -358
- data/ext/ruby-cbc/install/include/coin/ClpInterior.hpp +0 -570
- data/ext/ruby-cbc/install/include/coin/ClpLinearObjective.hpp +0 -103
- data/ext/ruby-cbc/install/include/coin/ClpMatrixBase.hpp +0 -524
- data/ext/ruby-cbc/install/include/coin/ClpMessage.hpp +0 -131
- data/ext/ruby-cbc/install/include/coin/ClpModel.hpp +0 -1307
- data/ext/ruby-cbc/install/include/coin/ClpNetworkMatrix.hpp +0 -229
- data/ext/ruby-cbc/install/include/coin/ClpNode.hpp +0 -349
- data/ext/ruby-cbc/install/include/coin/ClpNonLinearCost.hpp +0 -401
- data/ext/ruby-cbc/install/include/coin/ClpObjective.hpp +0 -134
- data/ext/ruby-cbc/install/include/coin/ClpPackedMatrix.hpp +0 -638
- data/ext/ruby-cbc/install/include/coin/ClpParameters.hpp +0 -126
- data/ext/ruby-cbc/install/include/coin/ClpPdcoBase.hpp +0 -103
- data/ext/ruby-cbc/install/include/coin/ClpPlusMinusOneMatrix.hpp +0 -290
- data/ext/ruby-cbc/install/include/coin/ClpPresolve.hpp +0 -299
- data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnDantzig.hpp +0 -72
- data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnPivot.hpp +0 -155
- data/ext/ruby-cbc/install/include/coin/ClpPrimalColumnSteepest.hpp +0 -247
- data/ext/ruby-cbc/install/include/coin/ClpQuadraticObjective.hpp +0 -155
- data/ext/ruby-cbc/install/include/coin/ClpSimplex.hpp +0 -1797
- data/ext/ruby-cbc/install/include/coin/ClpSimplexDual.hpp +0 -300
- data/ext/ruby-cbc/install/include/coin/ClpSimplexNonlinear.hpp +0 -117
- data/ext/ruby-cbc/install/include/coin/ClpSimplexOther.hpp +0 -277
- data/ext/ruby-cbc/install/include/coin/ClpSimplexPrimal.hpp +0 -244
- data/ext/ruby-cbc/install/include/coin/ClpSolve.hpp +0 -446
- data/ext/ruby-cbc/install/include/coin/Clp_C_Interface.h +0 -525
- data/ext/ruby-cbc/install/include/coin/CoinAlloc.hpp +0 -176
- data/ext/ruby-cbc/install/include/coin/CoinBuild.hpp +0 -149
- data/ext/ruby-cbc/install/include/coin/CoinDenseFactorization.hpp +0 -419
- data/ext/ruby-cbc/install/include/coin/CoinDenseVector.hpp +0 -383
- data/ext/ruby-cbc/install/include/coin/CoinDistance.hpp +0 -48
- data/ext/ruby-cbc/install/include/coin/CoinError.hpp +0 -257
- data/ext/ruby-cbc/install/include/coin/CoinFactorization.hpp +0 -2044
- data/ext/ruby-cbc/install/include/coin/CoinFileIO.hpp +0 -166
- data/ext/ruby-cbc/install/include/coin/CoinFinite.hpp +0 -34
- data/ext/ruby-cbc/install/include/coin/CoinFloatEqual.hpp +0 -177
- data/ext/ruby-cbc/install/include/coin/CoinHelperFunctions.hpp +0 -1111
- data/ext/ruby-cbc/install/include/coin/CoinIndexedVector.hpp +0 -1164
- data/ext/ruby-cbc/install/include/coin/CoinLpIO.hpp +0 -805
- data/ext/ruby-cbc/install/include/coin/CoinMessage.hpp +0 -96
- data/ext/ruby-cbc/install/include/coin/CoinMessageHandler.hpp +0 -666
- data/ext/ruby-cbc/install/include/coin/CoinModel.hpp +0 -1054
- data/ext/ruby-cbc/install/include/coin/CoinModelUseful.hpp +0 -441
- data/ext/ruby-cbc/install/include/coin/CoinMpsIO.hpp +0 -1056
- data/ext/ruby-cbc/install/include/coin/CoinOslFactorization.hpp +0 -280
- data/ext/ruby-cbc/install/include/coin/CoinPackedMatrix.hpp +0 -947
- data/ext/ruby-cbc/install/include/coin/CoinPackedVector.hpp +0 -657
- data/ext/ruby-cbc/install/include/coin/CoinPackedVectorBase.hpp +0 -269
- data/ext/ruby-cbc/install/include/coin/CoinParam.hpp +0 -644
- data/ext/ruby-cbc/install/include/coin/CoinPragma.hpp +0 -26
- data/ext/ruby-cbc/install/include/coin/CoinPresolveDoubleton.hpp +0 -73
- data/ext/ruby-cbc/install/include/coin/CoinPresolveDual.hpp +0 -85
- data/ext/ruby-cbc/install/include/coin/CoinPresolveDupcol.hpp +0 -226
- data/ext/ruby-cbc/install/include/coin/CoinPresolveEmpty.hpp +0 -116
- data/ext/ruby-cbc/install/include/coin/CoinPresolveFixed.hpp +0 -181
- data/ext/ruby-cbc/install/include/coin/CoinPresolveForcing.hpp +0 -61
- data/ext/ruby-cbc/install/include/coin/CoinPresolveImpliedFree.hpp +0 -60
- data/ext/ruby-cbc/install/include/coin/CoinPresolveIsolated.hpp +0 -51
- data/ext/ruby-cbc/install/include/coin/CoinPresolveMatrix.hpp +0 -1842
- data/ext/ruby-cbc/install/include/coin/CoinPresolveMonitor.hpp +0 -105
- data/ext/ruby-cbc/install/include/coin/CoinPresolvePsdebug.hpp +0 -166
- data/ext/ruby-cbc/install/include/coin/CoinPresolveSingleton.hpp +0 -112
- data/ext/ruby-cbc/install/include/coin/CoinPresolveSubst.hpp +0 -101
- data/ext/ruby-cbc/install/include/coin/CoinPresolveTighten.hpp +0 -55
- data/ext/ruby-cbc/install/include/coin/CoinPresolveTripleton.hpp +0 -66
- data/ext/ruby-cbc/install/include/coin/CoinPresolveUseless.hpp +0 -63
- data/ext/ruby-cbc/install/include/coin/CoinPresolveZeros.hpp +0 -60
- data/ext/ruby-cbc/install/include/coin/CoinRational.hpp +0 -44
- data/ext/ruby-cbc/install/include/coin/CoinSearchTree.hpp +0 -465
- data/ext/ruby-cbc/install/include/coin/CoinShallowPackedVector.hpp +0 -148
- data/ext/ruby-cbc/install/include/coin/CoinSignal.hpp +0 -117
- data/ext/ruby-cbc/install/include/coin/CoinSimpFactorization.hpp +0 -431
- data/ext/ruby-cbc/install/include/coin/CoinSmartPtr.hpp +0 -528
- data/ext/ruby-cbc/install/include/coin/CoinSnapshot.hpp +0 -476
- data/ext/ruby-cbc/install/include/coin/CoinSort.hpp +0 -678
- data/ext/ruby-cbc/install/include/coin/CoinStructuredModel.hpp +0 -247
- data/ext/ruby-cbc/install/include/coin/CoinTime.hpp +0 -310
- data/ext/ruby-cbc/install/include/coin/CoinTypes.hpp +0 -64
- data/ext/ruby-cbc/install/include/coin/CoinUtility.hpp +0 -19
- data/ext/ruby-cbc/install/include/coin/CoinUtilsConfig.h +0 -34
- data/ext/ruby-cbc/install/include/coin/CoinWarmStart.hpp +0 -58
- data/ext/ruby-cbc/install/include/coin/CoinWarmStartBasis.hpp +0 -456
- data/ext/ruby-cbc/install/include/coin/CoinWarmStartDual.hpp +0 -166
- data/ext/ruby-cbc/install/include/coin/CoinWarmStartPrimalDual.hpp +0 -211
- data/ext/ruby-cbc/install/include/coin/CoinWarmStartVector.hpp +0 -488
- data/ext/ruby-cbc/install/include/coin/Coin_C_defines.h +0 -115
- data/ext/ruby-cbc/install/include/coin/Idiot.hpp +0 -298
- data/ext/ruby-cbc/install/include/coin/OsiAuxInfo.hpp +0 -206
- data/ext/ruby-cbc/install/include/coin/OsiBranchingObject.hpp +0 -1005
- data/ext/ruby-cbc/install/include/coin/OsiCbcSolverInterface.hpp +0 -764
- data/ext/ruby-cbc/install/include/coin/OsiChooseVariable.hpp +0 -534
- data/ext/ruby-cbc/install/include/coin/OsiClpSolverInterface.hpp +0 -1509
- data/ext/ruby-cbc/install/include/coin/OsiColCut.hpp +0 -324
- data/ext/ruby-cbc/install/include/coin/OsiCollections.hpp +0 -35
- data/ext/ruby-cbc/install/include/coin/OsiConfig.h +0 -19
- data/ext/ruby-cbc/install/include/coin/OsiCut.hpp +0 -245
- data/ext/ruby-cbc/install/include/coin/OsiCuts.hpp +0 -474
- data/ext/ruby-cbc/install/include/coin/OsiPresolve.hpp +0 -252
- data/ext/ruby-cbc/install/include/coin/OsiRowCut.hpp +0 -331
- data/ext/ruby-cbc/install/include/coin/OsiRowCutDebugger.hpp +0 -187
- data/ext/ruby-cbc/install/include/coin/OsiSolverBranch.hpp +0 -152
- data/ext/ruby-cbc/install/include/coin/OsiSolverInterface.hpp +0 -2143
- data/ext/ruby-cbc/install/include/coin/OsiSolverParameters.hpp +0 -142
- data/ext/ruby-cbc/install/include/coin/OsiUnitTests.hpp +0 -374
- data/ext/ruby-cbc/install/lib/libCbc.la +0 -35
- data/ext/ruby-cbc/install/lib/libCbc.so +0 -0
- data/ext/ruby-cbc/install/lib/libCbc.so.3 +0 -0
- data/ext/ruby-cbc/install/lib/libCbc.so.3.9.7 +0 -0
- data/ext/ruby-cbc/install/lib/libCbcSolver.la +0 -35
- data/ext/ruby-cbc/install/lib/libCbcSolver.so +0 -0
- data/ext/ruby-cbc/install/lib/libCbcSolver.so.3 +0 -0
- data/ext/ruby-cbc/install/lib/libCbcSolver.so.3.9.7 +0 -0
- data/ext/ruby-cbc/install/lib/libCgl.la +0 -35
- data/ext/ruby-cbc/install/lib/libCgl.so +0 -0
- data/ext/ruby-cbc/install/lib/libCgl.so.1 +0 -0
- data/ext/ruby-cbc/install/lib/libCgl.so.1.9.7 +0 -0
- data/ext/ruby-cbc/install/lib/libClp.la +0 -35
- data/ext/ruby-cbc/install/lib/libClp.so +0 -0
- data/ext/ruby-cbc/install/lib/libClp.so.1 +0 -0
- data/ext/ruby-cbc/install/lib/libClp.so.1.13.9 +0 -0
- data/ext/ruby-cbc/install/lib/libClpSolver.la +0 -35
- data/ext/ruby-cbc/install/lib/libClpSolver.so +0 -0
- data/ext/ruby-cbc/install/lib/libClpSolver.so.1 +0 -0
- data/ext/ruby-cbc/install/lib/libClpSolver.so.1.13.9 +0 -0
- data/ext/ruby-cbc/install/lib/libCoinUtils.la +0 -35
- data/ext/ruby-cbc/install/lib/libCoinUtils.so +0 -0
- data/ext/ruby-cbc/install/lib/libCoinUtils.so.3 +0 -0
- data/ext/ruby-cbc/install/lib/libCoinUtils.so.3.10.11 +0 -0
- data/ext/ruby-cbc/install/lib/libOsi.la +0 -35
- data/ext/ruby-cbc/install/lib/libOsi.so +0 -0
- data/ext/ruby-cbc/install/lib/libOsi.so.1 +0 -0
- data/ext/ruby-cbc/install/lib/libOsi.so.1.12.6 +0 -0
- data/ext/ruby-cbc/install/lib/libOsiCbc.la +0 -35
- data/ext/ruby-cbc/install/lib/libOsiCbc.so +0 -0
- data/ext/ruby-cbc/install/lib/libOsiCbc.so.3 +0 -0
- data/ext/ruby-cbc/install/lib/libOsiCbc.so.3.9.7 +0 -0
- data/ext/ruby-cbc/install/lib/libOsiClp.la +0 -35
- data/ext/ruby-cbc/install/lib/libOsiClp.so +0 -0
- data/ext/ruby-cbc/install/lib/libOsiClp.so.1 +0 -0
- data/ext/ruby-cbc/install/lib/libOsiClp.so.1.13.9 +0 -0
- data/ext/ruby-cbc/install/lib/libOsiCommonTests.la +0 -35
- data/ext/ruby-cbc/install/lib/libOsiCommonTests.so +0 -0
- data/ext/ruby-cbc/install/lib/libOsiCommonTests.so.1 +0 -0
- data/ext/ruby-cbc/install/lib/libOsiCommonTests.so.1.12.6 +0 -0
- data/ext/ruby-cbc/install/lib/pkgconfig/cbc.pc +0 -12
- data/ext/ruby-cbc/install/lib/pkgconfig/cgl.pc +0 -12
- data/ext/ruby-cbc/install/lib/pkgconfig/clp.pc +0 -12
- data/ext/ruby-cbc/install/lib/pkgconfig/coindatamiplib3.pc +0 -9
- data/ext/ruby-cbc/install/lib/pkgconfig/coindatasample.pc +0 -9
- data/ext/ruby-cbc/install/lib/pkgconfig/coinutils.pc +0 -12
- data/ext/ruby-cbc/install/lib/pkgconfig/osi-cbc.pc +0 -12
- data/ext/ruby-cbc/install/lib/pkgconfig/osi-clp.pc +0 -12
- data/ext/ruby-cbc/install/lib/pkgconfig/osi-unittests.pc +0 -12
- data/ext/ruby-cbc/install/lib/pkgconfig/osi.pc +0 -12
@@ -1,682 +0,0 @@
|
|
1
|
-
/* $Id: CbcHeuristic.hpp 2094 2014-11-18 11:15:36Z forrest $ */
|
2
|
-
// Copyright (C) 2002, International Business Machines
|
3
|
-
// Corporation and others. All Rights Reserved.
|
4
|
-
// This code is licensed under the terms of the Eclipse Public License (EPL).
|
5
|
-
|
6
|
-
#ifndef CbcHeuristic_H
|
7
|
-
#define CbcHeuristic_H
|
8
|
-
|
9
|
-
#include <string>
|
10
|
-
#include <vector>
|
11
|
-
#include "CoinPackedMatrix.hpp"
|
12
|
-
#include "OsiCuts.hpp"
|
13
|
-
#include "CoinHelperFunctions.hpp"
|
14
|
-
#include "OsiBranchingObject.hpp"
|
15
|
-
|
16
|
-
class OsiSolverInterface;
|
17
|
-
|
18
|
-
class CbcModel;
|
19
|
-
|
20
|
-
//#############################################################################
|
21
|
-
|
22
|
-
class CbcHeuristicNodeList;
|
23
|
-
class CbcBranchingObject;
|
24
|
-
|
25
|
-
/** A class describing the branching decisions that were made to get
|
26
|
-
to the node where a heuristic was invoked from */
|
27
|
-
|
28
|
-
class CbcHeuristicNode {
|
29
|
-
private:
|
30
|
-
void gutsOfConstructor(CbcModel& model);
|
31
|
-
CbcHeuristicNode();
|
32
|
-
CbcHeuristicNode& operator=(const CbcHeuristicNode&);
|
33
|
-
private:
|
34
|
-
/// The number of branching decisions made
|
35
|
-
int numObjects_;
|
36
|
-
/** The indices of the branching objects. Note: an index may be
|
37
|
-
listed multiple times. E.g., a general integer variable that has
|
38
|
-
been branched on multiple times. */
|
39
|
-
CbcBranchingObject** brObj_;
|
40
|
-
public:
|
41
|
-
CbcHeuristicNode(CbcModel& model);
|
42
|
-
|
43
|
-
CbcHeuristicNode(const CbcHeuristicNode& rhs);
|
44
|
-
~CbcHeuristicNode();
|
45
|
-
double distance(const CbcHeuristicNode* node) const;
|
46
|
-
double minDistance(const CbcHeuristicNodeList& nodeList) const;
|
47
|
-
bool minDistanceIsSmall(const CbcHeuristicNodeList& nodeList,
|
48
|
-
const double threshold) const;
|
49
|
-
double avgDistance(const CbcHeuristicNodeList& nodeList) const;
|
50
|
-
};
|
51
|
-
|
52
|
-
class CbcHeuristicNodeList {
|
53
|
-
private:
|
54
|
-
void gutsOfDelete();
|
55
|
-
void gutsOfCopy(const CbcHeuristicNodeList& rhs);
|
56
|
-
private:
|
57
|
-
std::vector<CbcHeuristicNode*> nodes_;
|
58
|
-
public:
|
59
|
-
CbcHeuristicNodeList() {}
|
60
|
-
CbcHeuristicNodeList(const CbcHeuristicNodeList& rhs);
|
61
|
-
CbcHeuristicNodeList& operator=(const CbcHeuristicNodeList& rhs);
|
62
|
-
~CbcHeuristicNodeList();
|
63
|
-
|
64
|
-
void append(CbcHeuristicNode*& node);
|
65
|
-
void append(const CbcHeuristicNodeList& nodes);
|
66
|
-
inline const CbcHeuristicNode* node(int i) const {
|
67
|
-
return nodes_[i];
|
68
|
-
}
|
69
|
-
inline int size() const {
|
70
|
-
return static_cast<int>(nodes_.size());
|
71
|
-
}
|
72
|
-
};
|
73
|
-
|
74
|
-
//#############################################################################
|
75
|
-
/** Heuristic base class */
|
76
|
-
|
77
|
-
class CbcHeuristic {
|
78
|
-
private:
|
79
|
-
void gutsOfDelete() {}
|
80
|
-
void gutsOfCopy(const CbcHeuristic & rhs);
|
81
|
-
|
82
|
-
public:
|
83
|
-
// Default Constructor
|
84
|
-
CbcHeuristic ();
|
85
|
-
|
86
|
-
// Constructor with model - assumed before cuts
|
87
|
-
CbcHeuristic (CbcModel & model);
|
88
|
-
|
89
|
-
// Copy constructor
|
90
|
-
CbcHeuristic ( const CbcHeuristic &);
|
91
|
-
|
92
|
-
virtual ~CbcHeuristic();
|
93
|
-
|
94
|
-
/// Clone
|
95
|
-
virtual CbcHeuristic * clone() const = 0;
|
96
|
-
|
97
|
-
/// Assignment operator
|
98
|
-
CbcHeuristic & operator=(const CbcHeuristic& rhs);
|
99
|
-
|
100
|
-
/// update model (This is needed if cliques update matrix etc)
|
101
|
-
virtual void setModel(CbcModel * model);
|
102
|
-
|
103
|
-
/// Resets stuff if model changes
|
104
|
-
virtual void resetModel(CbcModel * model) = 0;
|
105
|
-
|
106
|
-
/** returns 0 if no solution, 1 if valid solution
|
107
|
-
with better objective value than one passed in
|
108
|
-
Sets solution values if good, sets objective value
|
109
|
-
This is called after cuts have been added - so can not add cuts
|
110
|
-
*/
|
111
|
-
virtual int solution(double & objectiveValue,
|
112
|
-
double * newSolution) = 0;
|
113
|
-
|
114
|
-
/** returns 0 if no solution, 1 if valid solution, -1 if just
|
115
|
-
returning an estimate of best possible solution
|
116
|
-
with better objective value than one passed in
|
117
|
-
Sets solution values if good, sets objective value (only if nonzero code)
|
118
|
-
This is called at same time as cut generators - so can add cuts
|
119
|
-
Default is do nothing
|
120
|
-
*/
|
121
|
-
virtual int solution2(double & /*objectiveValue*/,
|
122
|
-
double * /*newSolution*/,
|
123
|
-
OsiCuts & /*cs*/) {
|
124
|
-
return 0;
|
125
|
-
}
|
126
|
-
|
127
|
-
/// Validate model i.e. sets when_ to 0 if necessary (may be NULL)
|
128
|
-
virtual void validate() {}
|
129
|
-
|
130
|
-
/** Sets "when" flag - 0 off, 1 at root, 2 other than root, 3 always.
|
131
|
-
If 10 added then don't worry if validate says there are funny objects
|
132
|
-
as user knows it will be fine
|
133
|
-
*/
|
134
|
-
inline void setWhen(int value) {
|
135
|
-
when_ = value;
|
136
|
-
}
|
137
|
-
/// Gets "when" flag - 0 off, 1 at root, 2 other than root, 3 always
|
138
|
-
inline int when() const {
|
139
|
-
return when_;
|
140
|
-
}
|
141
|
-
|
142
|
-
/// Sets number of nodes in subtree (default 200)
|
143
|
-
inline void setNumberNodes(int value) {
|
144
|
-
numberNodes_ = value;
|
145
|
-
}
|
146
|
-
/// Gets number of nodes in a subtree (default 200)
|
147
|
-
inline int numberNodes() const {
|
148
|
-
return numberNodes_;
|
149
|
-
}
|
150
|
-
/** Switches (does not apply equally to all heuristics)
|
151
|
-
1 bit - stop once allowable gap on objective reached
|
152
|
-
2 bit - always do given number of passes
|
153
|
-
4 bit - weaken cutoff by 5% every 50 passes?
|
154
|
-
8 bit - if has cutoff and suminf bobbling for 20 passes then
|
155
|
-
first try halving distance to best possible then
|
156
|
-
try keep halving distance to known cutoff
|
157
|
-
16 bit - needs new solution to run
|
158
|
-
1024 bit - stop all heuristics on max time
|
159
|
-
*/
|
160
|
-
inline void setSwitches(int value) {
|
161
|
-
switches_ = value;
|
162
|
-
}
|
163
|
-
/** Switches (does not apply equally to all heuristics)
|
164
|
-
1 bit - stop once allowable gap on objective reached
|
165
|
-
2 bit - always do given number of passes
|
166
|
-
4 bit - weaken cutoff by 5% every 50 passes?
|
167
|
-
8 bit - if has cutoff and suminf bobbling for 20 passes then
|
168
|
-
first try halving distance to best possible then
|
169
|
-
try keep halving distance to known cutoff
|
170
|
-
16 bit - needs new solution to run
|
171
|
-
1024 bit - stop all heuristics on max time
|
172
|
-
65536 bit and above used for temporary communication
|
173
|
-
*/
|
174
|
-
inline int switches() const {
|
175
|
-
return switches_;
|
176
|
-
}
|
177
|
-
/// Whether to exit at once on gap
|
178
|
-
bool exitNow(double bestObjective) const;
|
179
|
-
/// Sets feasibility pump options (-1 is off)
|
180
|
-
inline void setFeasibilityPumpOptions(int value) {
|
181
|
-
feasibilityPumpOptions_ = value;
|
182
|
-
}
|
183
|
-
/// Gets feasibility pump options (-1 is off)
|
184
|
-
inline int feasibilityPumpOptions() const {
|
185
|
-
return feasibilityPumpOptions_;
|
186
|
-
}
|
187
|
-
/// Just set model - do not do anything else
|
188
|
-
inline void setModelOnly(CbcModel * model) {
|
189
|
-
model_ = model;
|
190
|
-
}
|
191
|
-
|
192
|
-
|
193
|
-
/// Sets fraction of new(rows+columns)/old(rows+columns) before doing small branch and bound (default 1.0)
|
194
|
-
inline void setFractionSmall(double value) {
|
195
|
-
fractionSmall_ = value;
|
196
|
-
}
|
197
|
-
/// Gets fraction of new(rows+columns)/old(rows+columns) before doing small branch and bound (default 1.0)
|
198
|
-
inline double fractionSmall() const {
|
199
|
-
return fractionSmall_;
|
200
|
-
}
|
201
|
-
/// Get how many solutions the heuristic thought it got
|
202
|
-
inline int numberSolutionsFound() const {
|
203
|
-
return numberSolutionsFound_;
|
204
|
-
}
|
205
|
-
/// Increment how many solutions the heuristic thought it got
|
206
|
-
inline void incrementNumberSolutionsFound() {
|
207
|
-
numberSolutionsFound_++;
|
208
|
-
}
|
209
|
-
|
210
|
-
/** Do mini branch and bound - return
|
211
|
-
0 not finished - no solution
|
212
|
-
1 not finished - solution
|
213
|
-
2 finished - no solution
|
214
|
-
3 finished - solution
|
215
|
-
(could add global cut if finished)
|
216
|
-
-1 returned on size
|
217
|
-
-2 time or user event
|
218
|
-
*/
|
219
|
-
int smallBranchAndBound(OsiSolverInterface * solver, int numberNodes,
|
220
|
-
double * newSolution, double & newSolutionValue,
|
221
|
-
double cutoff , std::string name) const;
|
222
|
-
/// Create C++ lines to get to current state
|
223
|
-
virtual void generateCpp( FILE * ) {}
|
224
|
-
/// Create C++ lines to get to current state - does work for base class
|
225
|
-
void generateCpp( FILE * fp, const char * heuristic) ;
|
226
|
-
/// Returns true if can deal with "odd" problems e.g. sos type 2
|
227
|
-
virtual bool canDealWithOdd() const {
|
228
|
-
return false;
|
229
|
-
}
|
230
|
-
/// return name of heuristic
|
231
|
-
inline const char *heuristicName() const {
|
232
|
-
return heuristicName_.c_str();
|
233
|
-
}
|
234
|
-
/// set name of heuristic
|
235
|
-
inline void setHeuristicName(const char *name) {
|
236
|
-
heuristicName_ = name;
|
237
|
-
}
|
238
|
-
/// Set random number generator seed
|
239
|
-
void setSeed(int value);
|
240
|
-
/// Get random number generator seed
|
241
|
-
int getSeed() const;
|
242
|
-
/// Sets decay factor (for howOften) on failure
|
243
|
-
inline void setDecayFactor(double value) {
|
244
|
-
decayFactor_ = value;
|
245
|
-
}
|
246
|
-
/// Set input solution
|
247
|
-
void setInputSolution(const double * solution, double objValue);
|
248
|
-
/* Runs if bit set
|
249
|
-
0 - before cuts at root node (or from doHeuristics)
|
250
|
-
1 - during cuts at root
|
251
|
-
2 - after root node cuts
|
252
|
-
3 - after cuts at other nodes
|
253
|
-
4 - during cuts at other nodes
|
254
|
-
8 added if previous heuristic in loop found solution
|
255
|
-
*/
|
256
|
-
inline void setWhereFrom(int value) {
|
257
|
-
whereFrom_ = value;
|
258
|
-
}
|
259
|
-
inline int whereFrom() const {
|
260
|
-
return whereFrom_;
|
261
|
-
}
|
262
|
-
/** Upto this depth we call the tree shallow and the heuristic can be called
|
263
|
-
multiple times. That is, the test whether the current node is far from
|
264
|
-
the others where the jeuristic was invoked will not be done, only the
|
265
|
-
frequency will be tested. After that depth the heuristic will can be
|
266
|
-
invoked only once per node, right before branching. That's when it'll be
|
267
|
-
tested whether the heur should run at all. */
|
268
|
-
inline void setShallowDepth(int value) {
|
269
|
-
shallowDepth_ = value;
|
270
|
-
}
|
271
|
-
/** How often to invoke the heuristics in the shallow part of the tree */
|
272
|
-
inline void setHowOftenShallow(int value) {
|
273
|
-
howOftenShallow_ = value;
|
274
|
-
}
|
275
|
-
/** How "far" should this node be from every other where the heuristic was
|
276
|
-
run in order to allow the heuristic to run in this node, too. Currently
|
277
|
-
this is tested, but we may switch to avgDistanceToRun_ in the future. */
|
278
|
-
inline void setMinDistanceToRun(int value) {
|
279
|
-
minDistanceToRun_ = value;
|
280
|
-
}
|
281
|
-
|
282
|
-
/** Check whether the heuristic should run at all
|
283
|
-
0 - before cuts at root node (or from doHeuristics)
|
284
|
-
1 - during cuts at root
|
285
|
-
2 - after root node cuts
|
286
|
-
3 - after cuts at other nodes
|
287
|
-
4 - during cuts at other nodes
|
288
|
-
8 added if previous heuristic in loop found solution
|
289
|
-
*/
|
290
|
-
virtual bool shouldHeurRun(int whereFrom);
|
291
|
-
/** Check whether the heuristic should run this time */
|
292
|
-
bool shouldHeurRun_randomChoice();
|
293
|
-
void debugNodes();
|
294
|
-
void printDistanceToNodes();
|
295
|
-
/// how many times the heuristic has actually run
|
296
|
-
inline int numRuns() const {
|
297
|
-
return numRuns_;
|
298
|
-
}
|
299
|
-
|
300
|
-
/// How many times the heuristic could run
|
301
|
-
inline int numCouldRun() const {
|
302
|
-
return numCouldRun_;
|
303
|
-
}
|
304
|
-
/*! \brief Clone, but ...
|
305
|
-
|
306
|
-
If type is
|
307
|
-
- 0 clone the solver for the model,
|
308
|
-
- 1 clone the continuous solver for the model
|
309
|
-
- Add 2 to say without integer variables which are at low priority
|
310
|
-
- Add 4 to say quite likely infeasible so give up easily (clp only).
|
311
|
-
*/
|
312
|
-
OsiSolverInterface * cloneBut(int type);
|
313
|
-
protected:
|
314
|
-
|
315
|
-
/// Model
|
316
|
-
CbcModel * model_;
|
317
|
-
/// When flag - 0 off, 1 at root, 2 other than root, 3 always
|
318
|
-
int when_;
|
319
|
-
/// Number of nodes in any sub tree
|
320
|
-
int numberNodes_;
|
321
|
-
/** Feasibility pump options , -1 is off
|
322
|
-
>=0 for feasibility pump itself
|
323
|
-
-2 quick proximity search
|
324
|
-
-3 longer proximity search
|
325
|
-
*/
|
326
|
-
int feasibilityPumpOptions_;
|
327
|
-
/// Fraction of new(rows+columns)/old(rows+columns) before doing small branch and bound
|
328
|
-
mutable double fractionSmall_;
|
329
|
-
/// Thread specific random number generator
|
330
|
-
CoinThreadRandom randomNumberGenerator_;
|
331
|
-
/// Name for printing
|
332
|
-
std::string heuristicName_;
|
333
|
-
|
334
|
-
/// How often to do (code can change)
|
335
|
-
mutable int howOften_;
|
336
|
-
/// How much to increase how often
|
337
|
-
double decayFactor_;
|
338
|
-
/** Switches (does not apply equally to all heuristics)
|
339
|
-
1 bit - stop once allowable gap on objective reached
|
340
|
-
2 bit - always do given number of passes
|
341
|
-
4 bit - weaken cutoff by 5% every 50 passes?
|
342
|
-
8 bit - if has cutoff and suminf bobbling for 20 passes then
|
343
|
-
first try halving distance to best possible then
|
344
|
-
try keep halving distance to known cutoff
|
345
|
-
16 bit - needs new solution to run
|
346
|
-
1024 bit - stop all heuristics on max time
|
347
|
-
*/
|
348
|
-
mutable int switches_;
|
349
|
-
/* Runs if bit set
|
350
|
-
0 - before cuts at root node (or from doHeuristics)
|
351
|
-
1 - during cuts at root
|
352
|
-
2 - after root node cuts
|
353
|
-
3 - after cuts at other nodes
|
354
|
-
4 - during cuts at other nodes
|
355
|
-
8 added if previous heuristic in loop found solution
|
356
|
-
*/
|
357
|
-
int whereFrom_;
|
358
|
-
/** Upto this depth we call the tree shallow and the heuristic can be called
|
359
|
-
multiple times. That is, the test whether the current node is far from
|
360
|
-
the others where the jeuristic was invoked will not be done, only the
|
361
|
-
frequency will be tested. After that depth the heuristic will can be
|
362
|
-
invoked only once per node, right before branching. That's when it'll be
|
363
|
-
tested whether the heur should run at all. */
|
364
|
-
int shallowDepth_;
|
365
|
-
/** How often to invoke the heuristics in the shallow part of the tree */
|
366
|
-
int howOftenShallow_;
|
367
|
-
/** How many invocations happened within the same node when in a shallow
|
368
|
-
part of the tree. */
|
369
|
-
int numInvocationsInShallow_;
|
370
|
-
/** How many invocations happened when in the deep part of the tree. For
|
371
|
-
every node we count only one invocation. */
|
372
|
-
int numInvocationsInDeep_;
|
373
|
-
/** After how many deep invocations was the heuristic run last time */
|
374
|
-
int lastRunDeep_;
|
375
|
-
/// how many times the heuristic has actually run
|
376
|
-
int numRuns_;
|
377
|
-
/** How "far" should this node be from every other where the heuristic was
|
378
|
-
run in order to allow the heuristic to run in this node, too. Currently
|
379
|
-
this is tested, but we may switch to avgDistanceToRun_ in the future. */
|
380
|
-
int minDistanceToRun_;
|
381
|
-
|
382
|
-
/// The description of the nodes where this heuristic has been applied
|
383
|
-
CbcHeuristicNodeList runNodes_;
|
384
|
-
|
385
|
-
/// How many times the heuristic could run
|
386
|
-
int numCouldRun_;
|
387
|
-
|
388
|
-
/// How many solutions the heuristic thought it got
|
389
|
-
int numberSolutionsFound_;
|
390
|
-
|
391
|
-
/// How many nodes the heuristic did this go
|
392
|
-
mutable int numberNodesDone_;
|
393
|
-
|
394
|
-
// Input solution - so can be used as seed
|
395
|
-
double * inputSolution_;
|
396
|
-
|
397
|
-
|
398
|
-
#ifdef JJF_ZERO
|
399
|
-
/// Lower bounds of last node where the heuristic found a solution
|
400
|
-
double * lowerBoundLastNode_;
|
401
|
-
/// Upper bounds of last node where the heuristic found a solution
|
402
|
-
double * upperBoundLastNode_;
|
403
|
-
#endif
|
404
|
-
};
|
405
|
-
/** Rounding class
|
406
|
-
*/
|
407
|
-
|
408
|
-
class CbcRounding : public CbcHeuristic {
|
409
|
-
public:
|
410
|
-
|
411
|
-
// Default Constructor
|
412
|
-
CbcRounding ();
|
413
|
-
|
414
|
-
// Constructor with model - assumed before cuts
|
415
|
-
CbcRounding (CbcModel & model);
|
416
|
-
|
417
|
-
// Copy constructor
|
418
|
-
CbcRounding ( const CbcRounding &);
|
419
|
-
|
420
|
-
// Destructor
|
421
|
-
~CbcRounding ();
|
422
|
-
|
423
|
-
/// Assignment operator
|
424
|
-
CbcRounding & operator=(const CbcRounding& rhs);
|
425
|
-
|
426
|
-
/// Clone
|
427
|
-
virtual CbcHeuristic * clone() const;
|
428
|
-
/// Create C++ lines to get to current state
|
429
|
-
virtual void generateCpp( FILE * fp) ;
|
430
|
-
|
431
|
-
/// Resets stuff if model changes
|
432
|
-
virtual void resetModel(CbcModel * model);
|
433
|
-
|
434
|
-
/// update model (This is needed if cliques update matrix etc)
|
435
|
-
virtual void setModel(CbcModel * model);
|
436
|
-
|
437
|
-
using CbcHeuristic::solution ;
|
438
|
-
/** returns 0 if no solution, 1 if valid solution
|
439
|
-
with better objective value than one passed in
|
440
|
-
Sets solution values if good, sets objective value (only if good)
|
441
|
-
This is called after cuts have been added - so can not add cuts
|
442
|
-
*/
|
443
|
-
virtual int solution(double & objectiveValue,
|
444
|
-
double * newSolution);
|
445
|
-
/** returns 0 if no solution, 1 if valid solution
|
446
|
-
with better objective value than one passed in
|
447
|
-
Sets solution values if good, sets objective value (only if good)
|
448
|
-
This is called after cuts have been added - so can not add cuts
|
449
|
-
Use solutionValue rather than solvers one
|
450
|
-
*/
|
451
|
-
virtual int solution(double & objectiveValue,
|
452
|
-
double * newSolution,
|
453
|
-
double solutionValue);
|
454
|
-
/// Validate model i.e. sets when_ to 0 if necessary (may be NULL)
|
455
|
-
virtual void validate();
|
456
|
-
|
457
|
-
|
458
|
-
/// Set seed
|
459
|
-
void setSeed(int value) {
|
460
|
-
seed_ = value;
|
461
|
-
}
|
462
|
-
/** Check whether the heuristic should run at all
|
463
|
-
0 - before cuts at root node (or from doHeuristics)
|
464
|
-
1 - during cuts at root
|
465
|
-
2 - after root node cuts
|
466
|
-
3 - after cuts at other nodes
|
467
|
-
4 - during cuts at other nodes
|
468
|
-
8 added if previous heuristic in loop found solution
|
469
|
-
*/
|
470
|
-
virtual bool shouldHeurRun(int whereFrom);
|
471
|
-
|
472
|
-
protected:
|
473
|
-
// Data
|
474
|
-
|
475
|
-
// Original matrix by column
|
476
|
-
CoinPackedMatrix matrix_;
|
477
|
-
|
478
|
-
// Original matrix by
|
479
|
-
CoinPackedMatrix matrixByRow_;
|
480
|
-
|
481
|
-
// Down locks
|
482
|
-
unsigned short * down_;
|
483
|
-
|
484
|
-
// Up locks
|
485
|
-
unsigned short * up_;
|
486
|
-
|
487
|
-
// Equality locks
|
488
|
-
unsigned short * equal_;
|
489
|
-
|
490
|
-
// Seed for random stuff
|
491
|
-
int seed_;
|
492
|
-
};
|
493
|
-
|
494
|
-
/** Partial solution class
|
495
|
-
If user knows a partial solution this tries to get an integer solution
|
496
|
-
it uses hotstart information
|
497
|
-
*/
|
498
|
-
|
499
|
-
class CbcHeuristicPartial : public CbcHeuristic {
|
500
|
-
public:
|
501
|
-
|
502
|
-
// Default Constructor
|
503
|
-
CbcHeuristicPartial ();
|
504
|
-
|
505
|
-
/** Constructor with model - assumed before cuts
|
506
|
-
Fixes all variables with priority <= given
|
507
|
-
and does given number of nodes
|
508
|
-
*/
|
509
|
-
CbcHeuristicPartial (CbcModel & model, int fixPriority = 10000, int numberNodes = 200);
|
510
|
-
|
511
|
-
// Copy constructor
|
512
|
-
CbcHeuristicPartial ( const CbcHeuristicPartial &);
|
513
|
-
|
514
|
-
// Destructor
|
515
|
-
~CbcHeuristicPartial ();
|
516
|
-
|
517
|
-
/// Assignment operator
|
518
|
-
CbcHeuristicPartial & operator=(const CbcHeuristicPartial& rhs);
|
519
|
-
|
520
|
-
/// Clone
|
521
|
-
virtual CbcHeuristic * clone() const;
|
522
|
-
/// Create C++ lines to get to current state
|
523
|
-
virtual void generateCpp( FILE * fp) ;
|
524
|
-
|
525
|
-
/// Resets stuff if model changes
|
526
|
-
virtual void resetModel(CbcModel * model);
|
527
|
-
|
528
|
-
/// update model (This is needed if cliques update matrix etc)
|
529
|
-
virtual void setModel(CbcModel * model);
|
530
|
-
|
531
|
-
using CbcHeuristic::solution ;
|
532
|
-
/** returns 0 if no solution, 1 if valid solution
|
533
|
-
with better objective value than one passed in
|
534
|
-
Sets solution values if good, sets objective value (only if good)
|
535
|
-
This is called after cuts have been added - so can not add cuts
|
536
|
-
*/
|
537
|
-
virtual int solution(double & objectiveValue,
|
538
|
-
double * newSolution);
|
539
|
-
/// Validate model i.e. sets when_ to 0 if necessary (may be NULL)
|
540
|
-
virtual void validate();
|
541
|
-
|
542
|
-
|
543
|
-
/// Set priority level
|
544
|
-
void setFixPriority(int value) {
|
545
|
-
fixPriority_ = value;
|
546
|
-
}
|
547
|
-
|
548
|
-
/** Check whether the heuristic should run at all */
|
549
|
-
virtual bool shouldHeurRun(int whereFrom);
|
550
|
-
|
551
|
-
protected:
|
552
|
-
// Data
|
553
|
-
|
554
|
-
// All variables with abs priority <= this will be fixed
|
555
|
-
int fixPriority_;
|
556
|
-
};
|
557
|
-
|
558
|
-
/** heuristic - just picks up any good solution
|
559
|
-
found by solver - see OsiBabSolver
|
560
|
-
*/
|
561
|
-
|
562
|
-
class CbcSerendipity : public CbcHeuristic {
|
563
|
-
public:
|
564
|
-
|
565
|
-
// Default Constructor
|
566
|
-
CbcSerendipity ();
|
567
|
-
|
568
|
-
/* Constructor with model
|
569
|
-
*/
|
570
|
-
CbcSerendipity (CbcModel & model);
|
571
|
-
|
572
|
-
// Copy constructor
|
573
|
-
CbcSerendipity ( const CbcSerendipity &);
|
574
|
-
|
575
|
-
// Destructor
|
576
|
-
~CbcSerendipity ();
|
577
|
-
|
578
|
-
/// Assignment operator
|
579
|
-
CbcSerendipity & operator=(const CbcSerendipity& rhs);
|
580
|
-
|
581
|
-
/// Clone
|
582
|
-
virtual CbcHeuristic * clone() const;
|
583
|
-
/// Create C++ lines to get to current state
|
584
|
-
virtual void generateCpp( FILE * fp) ;
|
585
|
-
|
586
|
-
/// update model
|
587
|
-
virtual void setModel(CbcModel * model);
|
588
|
-
|
589
|
-
using CbcHeuristic::solution ;
|
590
|
-
/** returns 0 if no solution, 1 if valid solution.
|
591
|
-
Sets solution values if good, sets objective value (only if good)
|
592
|
-
We leave all variables which are at one at this node of the
|
593
|
-
tree to that value and will
|
594
|
-
initially set all others to zero. We then sort all variables in order of their cost
|
595
|
-
divided by the number of entries in rows which are not yet covered. We randomize that
|
596
|
-
value a bit so that ties will be broken in different ways on different runs of the heuristic.
|
597
|
-
We then choose the best one and set it to one and repeat the exercise.
|
598
|
-
|
599
|
-
*/
|
600
|
-
virtual int solution(double & objectiveValue,
|
601
|
-
double * newSolution);
|
602
|
-
/// Resets stuff if model changes
|
603
|
-
virtual void resetModel(CbcModel * model);
|
604
|
-
|
605
|
-
protected:
|
606
|
-
};
|
607
|
-
|
608
|
-
/** Just One class - this chooses one at random
|
609
|
-
*/
|
610
|
-
|
611
|
-
class CbcHeuristicJustOne : public CbcHeuristic {
|
612
|
-
public:
|
613
|
-
|
614
|
-
// Default Constructor
|
615
|
-
CbcHeuristicJustOne ();
|
616
|
-
|
617
|
-
// Constructor with model - assumed before cuts
|
618
|
-
CbcHeuristicJustOne (CbcModel & model);
|
619
|
-
|
620
|
-
// Copy constructor
|
621
|
-
CbcHeuristicJustOne ( const CbcHeuristicJustOne &);
|
622
|
-
|
623
|
-
// Destructor
|
624
|
-
~CbcHeuristicJustOne ();
|
625
|
-
|
626
|
-
/// Clone
|
627
|
-
virtual CbcHeuristicJustOne * clone() const;
|
628
|
-
|
629
|
-
/// Assignment operator
|
630
|
-
CbcHeuristicJustOne & operator=(const CbcHeuristicJustOne& rhs);
|
631
|
-
|
632
|
-
/// Create C++ lines to get to current state
|
633
|
-
virtual void generateCpp( FILE * fp) ;
|
634
|
-
|
635
|
-
/** returns 0 if no solution, 1 if valid solution
|
636
|
-
with better objective value than one passed in
|
637
|
-
Sets solution values if good, sets objective value (only if good)
|
638
|
-
This is called after cuts have been added - so can not add cuts
|
639
|
-
This does Fractional Diving
|
640
|
-
*/
|
641
|
-
virtual int solution(double & objectiveValue,
|
642
|
-
double * newSolution);
|
643
|
-
/// Resets stuff if model changes
|
644
|
-
virtual void resetModel(CbcModel * model);
|
645
|
-
|
646
|
-
/// update model (This is needed if cliques update matrix etc)
|
647
|
-
virtual void setModel(CbcModel * model);
|
648
|
-
/// Selects the next variable to branch on
|
649
|
-
/** Returns true if all the fractional variables can be trivially
|
650
|
-
rounded. Returns false, if there is at least one fractional variable
|
651
|
-
that is not trivially roundable. In this case, the bestColumn
|
652
|
-
returned will not be trivially roundable.
|
653
|
-
This is dummy as never called
|
654
|
-
*/
|
655
|
-
virtual bool selectVariableToBranch(OsiSolverInterface* /*solver*/,
|
656
|
-
const double* /*newSolution*/,
|
657
|
-
int& /*bestColumn*/,
|
658
|
-
int& /*bestRound*/) {
|
659
|
-
return true;
|
660
|
-
}
|
661
|
-
/// Validate model i.e. sets when_ to 0 if necessary (may be NULL)
|
662
|
-
virtual void validate();
|
663
|
-
/// Adds an heuristic with probability
|
664
|
-
void addHeuristic(const CbcHeuristic * heuristic, double probability);
|
665
|
-
/// Normalize probabilities
|
666
|
-
void normalizeProbabilities();
|
667
|
-
protected:
|
668
|
-
// Data
|
669
|
-
|
670
|
-
// Probability of running a heuristic
|
671
|
-
double * probabilities_;
|
672
|
-
|
673
|
-
// Heuristics
|
674
|
-
CbcHeuristic ** heuristic_;
|
675
|
-
|
676
|
-
// Number of heuristics
|
677
|
-
int numberHeuristics_;
|
678
|
-
|
679
|
-
};
|
680
|
-
|
681
|
-
#endif
|
682
|
-
|