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,142 +0,0 @@
|
|
1
|
-
// Copyright (C) 2000, International Business Machines
|
2
|
-
// Corporation and others. All Rights Reserved.
|
3
|
-
// This code is licensed under the terms of the Eclipse Public License (EPL).
|
4
|
-
|
5
|
-
#ifndef OsiSolverParameters_H
|
6
|
-
#define OsiSolverParameters_H
|
7
|
-
|
8
|
-
enum OsiIntParam {
|
9
|
-
/*! \brief Iteration limit for initial solve and resolve.
|
10
|
-
|
11
|
-
The maximum number of iterations (whatever that means for the given
|
12
|
-
solver) the solver can execute in the OsiSolverinterface::initialSolve()
|
13
|
-
and OsiSolverinterface::resolve() methods before terminating.
|
14
|
-
*/
|
15
|
-
OsiMaxNumIteration = 0,
|
16
|
-
/*! \brief Iteration limit for hot start
|
17
|
-
|
18
|
-
The maximum number of iterations (whatever that means for the given
|
19
|
-
solver) the solver can execute in the
|
20
|
-
OsiSolverinterface::solveFromHotStart() method before terminating.
|
21
|
-
*/
|
22
|
-
OsiMaxNumIterationHotStart,
|
23
|
-
/*! \brief Handling of row and column names.
|
24
|
-
|
25
|
-
The name discipline specifies how the solver will handle row and column
|
26
|
-
names:
|
27
|
-
- 0: Auto names: Names cannot be set by the client. Names of the form
|
28
|
-
Rnnnnnnn or Cnnnnnnn are generated on demand when a name for a
|
29
|
-
specific row or column is requested; nnnnnnn is derived from the row
|
30
|
-
or column index. Requests for a vector of names return a vector with
|
31
|
-
zero entries.
|
32
|
-
- 1: Lazy names: Names supplied by the client are retained. Names of the
|
33
|
-
form Rnnnnnnn or Cnnnnnnn are generated on demand if no name has been
|
34
|
-
supplied by the client. Requests for a vector of names return a
|
35
|
-
vector sized to the largest index of a name supplied by the client;
|
36
|
-
some entries in the vector may be null strings.
|
37
|
-
- 2: Full names: Names supplied by the client are retained. Names of the
|
38
|
-
form Rnnnnnnn or Cnnnnnnn are generated on demand if no name has been
|
39
|
-
supplied by the client. Requests for a vector of names return a
|
40
|
-
vector sized to match the constraint system, and all entries will
|
41
|
-
contain either the name specified by the client or a generated name.
|
42
|
-
*/
|
43
|
-
OsiNameDiscipline,
|
44
|
-
/*! \brief End marker.
|
45
|
-
|
46
|
-
Used by OsiSolverInterface to allocate a fixed-sized array to store
|
47
|
-
integer parameters.
|
48
|
-
*/
|
49
|
-
OsiLastIntParam
|
50
|
-
} ;
|
51
|
-
|
52
|
-
enum OsiDblParam {
|
53
|
-
/*! \brief Dual objective limit.
|
54
|
-
|
55
|
-
This is to be used as a termination criteria in algorithms where the dual
|
56
|
-
objective changes monotonically (e.g., dual simplex, volume algorithm).
|
57
|
-
*/
|
58
|
-
OsiDualObjectiveLimit = 0,
|
59
|
-
/*! \brief Primal objective limit.
|
60
|
-
|
61
|
-
This is to be used as a termination criteria in algorithms where the
|
62
|
-
primal objective changes monotonically (e.g., primal simplex)
|
63
|
-
*/
|
64
|
-
OsiPrimalObjectiveLimit,
|
65
|
-
/*! \brief Dual feasibility tolerance.
|
66
|
-
|
67
|
-
The maximum amount a dual constraint can be violated and still be
|
68
|
-
considered feasible.
|
69
|
-
*/
|
70
|
-
OsiDualTolerance,
|
71
|
-
/*! \brief Primal feasibility tolerance.
|
72
|
-
|
73
|
-
The maximum amount a primal constraint can be violated and still be
|
74
|
-
considered feasible.
|
75
|
-
*/
|
76
|
-
OsiPrimalTolerance,
|
77
|
-
/** The value of any constant term in the objective function. */
|
78
|
-
OsiObjOffset,
|
79
|
-
/*! \brief End marker.
|
80
|
-
|
81
|
-
Used by OsiSolverInterface to allocate a fixed-sized array to store
|
82
|
-
double parameters.
|
83
|
-
*/
|
84
|
-
OsiLastDblParam
|
85
|
-
};
|
86
|
-
|
87
|
-
|
88
|
-
enum OsiStrParam {
|
89
|
-
/*! \brief The name of the loaded problem.
|
90
|
-
|
91
|
-
This is the string specified on the Name card of an mps file.
|
92
|
-
*/
|
93
|
-
OsiProbName = 0,
|
94
|
-
/*! \brief The name of the solver.
|
95
|
-
|
96
|
-
This parameter is read-only.
|
97
|
-
*/
|
98
|
-
OsiSolverName,
|
99
|
-
/*! \brief End marker.
|
100
|
-
|
101
|
-
Used by OsiSolverInterface to allocate a fixed-sized array to store
|
102
|
-
string parameters.
|
103
|
-
*/
|
104
|
-
OsiLastStrParam
|
105
|
-
};
|
106
|
-
|
107
|
-
enum OsiHintParam {
|
108
|
-
/** Whether to do a presolve in initialSolve */
|
109
|
-
OsiDoPresolveInInitial = 0,
|
110
|
-
/** Whether to use a dual algorithm in initialSolve.
|
111
|
-
The reverse is to use a primal algorithm */
|
112
|
-
OsiDoDualInInitial,
|
113
|
-
/** Whether to do a presolve in resolve */
|
114
|
-
OsiDoPresolveInResolve,
|
115
|
-
/** Whether to use a dual algorithm in resolve.
|
116
|
-
The reverse is to use a primal algorithm */
|
117
|
-
OsiDoDualInResolve,
|
118
|
-
/** Whether to scale problem */
|
119
|
-
OsiDoScale,
|
120
|
-
/** Whether to create a non-slack basis (only in initialSolve) */
|
121
|
-
OsiDoCrash,
|
122
|
-
/** Whether to reduce amount of printout, e.g., for branch and cut */
|
123
|
-
OsiDoReducePrint,
|
124
|
-
/** Whether we are in branch and cut - so can modify behavior */
|
125
|
-
OsiDoInBranchAndCut,
|
126
|
-
/** Just a marker, so that OsiSolverInterface can allocate a static sized
|
127
|
-
array to store parameters. */
|
128
|
-
OsiLastHintParam
|
129
|
-
};
|
130
|
-
|
131
|
-
enum OsiHintStrength {
|
132
|
-
/** Ignore hint (default) */
|
133
|
-
OsiHintIgnore = 0,
|
134
|
-
/** This means it is only a hint */
|
135
|
-
OsiHintTry,
|
136
|
-
/** This means do hint if at all possible */
|
137
|
-
OsiHintDo,
|
138
|
-
/** And this means throw an exception if not possible */
|
139
|
-
OsiForceDo
|
140
|
-
};
|
141
|
-
|
142
|
-
#endif
|
@@ -1,374 +0,0 @@
|
|
1
|
-
// Copyright (C) 2010
|
2
|
-
// All Rights Reserved.
|
3
|
-
// This code is licensed under the terms of the Eclipse Public License (EPL).
|
4
|
-
|
5
|
-
/*! \file OsiUnitTests.hpp
|
6
|
-
|
7
|
-
Utility methods for OSI unit tests.
|
8
|
-
*/
|
9
|
-
|
10
|
-
#ifndef OSISOLVERINTERFACETEST_HPP_
|
11
|
-
#define OSISOLVERINTERFACETEST_HPP_
|
12
|
-
|
13
|
-
#include <cstdio>
|
14
|
-
#include <cstdlib>
|
15
|
-
#include <iostream>
|
16
|
-
#include <string>
|
17
|
-
#include <sstream>
|
18
|
-
#include <vector>
|
19
|
-
#include <list>
|
20
|
-
#include <map>
|
21
|
-
|
22
|
-
class OsiSolverInterface;
|
23
|
-
class CoinPackedVectorBase;
|
24
|
-
|
25
|
-
/** A function that tests that a lot of problems given in MPS files (mostly the NETLIB problems) solve properly with all the specified solvers.
|
26
|
-
*
|
27
|
-
* The routine creates a vector of NetLib problems (problem name, objective,
|
28
|
-
* various other characteristics), and a vector of solvers to be tested.
|
29
|
-
*
|
30
|
-
* Each solver is run on each problem. The run is deemed successful if the
|
31
|
-
* solver reports the correct problem size after loading and returns the
|
32
|
-
* correct objective value after optimization.
|
33
|
-
|
34
|
-
* If multiple solvers are available, the results are compared pairwise against
|
35
|
-
* the results reported by adjacent solvers in the solver vector. Due to
|
36
|
-
* limitations of the volume solver, it must be the last solver in vecEmptySiP.
|
37
|
-
*/
|
38
|
-
void OsiSolverInterfaceMpsUnitTest
|
39
|
-
(const std::vector<OsiSolverInterface*> & vecEmptySiP,
|
40
|
-
const std::string& mpsDir);
|
41
|
-
|
42
|
-
/** A function that tests the methods in the OsiSolverInterface class.
|
43
|
-
* Some time ago, if this method is compiled with optimization,
|
44
|
-
* the compilation took 10-15 minutes and the machine pages (has 256M core memory!)...
|
45
|
-
*/
|
46
|
-
void OsiSolverInterfaceCommonUnitTest
|
47
|
-
(const OsiSolverInterface* emptySi,
|
48
|
-
const std::string& mpsDir,
|
49
|
-
const std::string& netlibDir);
|
50
|
-
|
51
|
-
/** A function that tests the methods in the OsiColCut class. */
|
52
|
-
void OsiColCutUnitTest
|
53
|
-
(const OsiSolverInterface * baseSiP,
|
54
|
-
const std::string & mpsDir);
|
55
|
-
|
56
|
-
/** A function that tests the methods in the OsiRowCut class. */
|
57
|
-
void OsiRowCutUnitTest
|
58
|
-
(const OsiSolverInterface * baseSiP,
|
59
|
-
const std::string & mpsDir);
|
60
|
-
|
61
|
-
/** A function that tests the methods in the OsiRowCutDebugger class. */
|
62
|
-
void OsiRowCutDebuggerUnitTest
|
63
|
-
(const OsiSolverInterface * siP,
|
64
|
-
const std::string & mpsDir);
|
65
|
-
|
66
|
-
/** A function that tests the methods in the OsiCuts class. */
|
67
|
-
void OsiCutsUnitTest();
|
68
|
-
|
69
|
-
/// A namespace so we can define a few `global' variables to use during tests.
|
70
|
-
namespace OsiUnitTest {
|
71
|
-
|
72
|
-
class TestOutcomes;
|
73
|
-
|
74
|
-
/*! \brief Verbosity level of unit tests
|
75
|
-
|
76
|
-
0 (default) for minimal output; larger numbers produce more output
|
77
|
-
*/
|
78
|
-
extern unsigned int verbosity;
|
79
|
-
|
80
|
-
/*! \brief Behaviour on failing a test
|
81
|
-
|
82
|
-
- 0 (= default) continue
|
83
|
-
- 1 press any key to continue
|
84
|
-
- 2 stop with abort()
|
85
|
-
*/
|
86
|
-
extern unsigned int haltonerror;
|
87
|
-
|
88
|
-
/*! \brief Test outcomes
|
89
|
-
|
90
|
-
A global TestOutcomes object to store test outcomes during the run of the unit test
|
91
|
-
for an OSI.
|
92
|
-
*/
|
93
|
-
extern TestOutcomes outcomes;
|
94
|
-
|
95
|
-
/*! \brief Print an error message
|
96
|
-
|
97
|
-
Formatted as "XxxSolverInterface testing issue: message" where Xxx is the string
|
98
|
-
provided as \p solverName.
|
99
|
-
|
100
|
-
Flushes std::cout before printing to std::cerr.
|
101
|
-
*/
|
102
|
-
void failureMessage(const std::string &solverName,
|
103
|
-
const std::string &message) ;
|
104
|
-
/// \overload
|
105
|
-
void failureMessage(const OsiSolverInterface &si,
|
106
|
-
const std::string &message) ;
|
107
|
-
|
108
|
-
/*! \brief Print an error message, specifying the test name and condition
|
109
|
-
|
110
|
-
Formatted as "XxxSolverInterface testing issue: testname failed: testcond" where
|
111
|
-
Xxx is the OsiStrParam::OsiSolverName parameter of the \p si.
|
112
|
-
Flushes std::cout before printing to std::cerr.
|
113
|
-
*/
|
114
|
-
void failureMessage(const std::string &solverName,
|
115
|
-
const std::string &testname, const std::string &testcond) ;
|
116
|
-
|
117
|
-
/// \overload
|
118
|
-
void failureMessage(const OsiSolverInterface &si,
|
119
|
-
const std::string &testname, const std::string &testcond) ;
|
120
|
-
|
121
|
-
/*! \brief Print a message.
|
122
|
-
|
123
|
-
Prints the message as given. Flushes std::cout before printing to std::cerr.
|
124
|
-
*/
|
125
|
-
void testingMessage(const char *const msg) ;
|
126
|
-
|
127
|
-
/*! \brief Utility method to check equality
|
128
|
-
|
129
|
-
Tests for equality using CoinRelFltEq with tolerance \p tol. Understands the
|
130
|
-
notion of solver infinity and obtains the value for infinity from the solver
|
131
|
-
interfaces supplied as parameters.
|
132
|
-
*/
|
133
|
-
bool equivalentVectors(const OsiSolverInterface * si1,
|
134
|
-
const OsiSolverInterface * si2,
|
135
|
-
double tol, const double * v1, const double * v2, int size) ;
|
136
|
-
|
137
|
-
/*! \brief Compare two problems for equality
|
138
|
-
|
139
|
-
Compares the problems held in the two solvers: constraint matrix, row and column
|
140
|
-
bounds, column type, and objective. Rows are checked using upper and lower bounds
|
141
|
-
and using sense, bound, and range.
|
142
|
-
*/
|
143
|
-
bool compareProblems(OsiSolverInterface *osi1, OsiSolverInterface *osi2) ;
|
144
|
-
|
145
|
-
/*! \brief Compare a packed vector with an expanded vector
|
146
|
-
|
147
|
-
Checks that all values present in the packed vector are present in the full vector
|
148
|
-
and checks that there are no extra entries in the full vector. Uses CoinRelFltEq
|
149
|
-
with the default tolerance.
|
150
|
-
*/
|
151
|
-
bool isEquivalent(const CoinPackedVectorBase &pv, int n, const double *fv) ;
|
152
|
-
|
153
|
-
/*! \brief Process command line parameters.
|
154
|
-
|
155
|
-
An unrecognised keyword which is not in the \p ignorekeywords map will trigger the
|
156
|
-
help message and a return value of false. For each keyword in \p ignorekeywords, you
|
157
|
-
can specify the number of following parameters that should be ignored.
|
158
|
-
|
159
|
-
This should be replaced with the one of the standard CoinUtils parameter mechanisms.
|
160
|
-
*/
|
161
|
-
bool processParameters (int argc, const char **argv,
|
162
|
-
std::map<std::string,std::string>& parms,
|
163
|
-
const std::map<std::string,int>& ignorekeywords = std::map<std::string,int>());
|
164
|
-
|
165
|
-
/// A single test outcome record.
|
166
|
-
class TestOutcome {
|
167
|
-
public:
|
168
|
-
/// Test result
|
169
|
-
typedef enum {
|
170
|
-
NOTE = 0,
|
171
|
-
PASSED = 1,
|
172
|
-
WARNING = 2,
|
173
|
-
ERROR = 3,
|
174
|
-
LAST = 4
|
175
|
-
} SeverityLevel;
|
176
|
-
/// Print strings for SeverityLevel
|
177
|
-
static std::string SeverityLevelName[LAST];
|
178
|
-
/// Name of component under test
|
179
|
-
std::string component;
|
180
|
-
/// Name of test
|
181
|
-
std::string testname;
|
182
|
-
/// Condition being tested
|
183
|
-
std::string testcond;
|
184
|
-
/// Test result
|
185
|
-
SeverityLevel severity;
|
186
|
-
/// Set to true if problem is expected
|
187
|
-
bool expected;
|
188
|
-
/// Name of code file where test executed
|
189
|
-
std::string filename;
|
190
|
-
/// Line number in code file where test executed
|
191
|
-
int linenumber;
|
192
|
-
/// Standard constructor
|
193
|
-
TestOutcome(const std::string& comp, const std::string& tst,
|
194
|
-
const char* cond, SeverityLevel sev,
|
195
|
-
const char* file, int line, bool exp = false)
|
196
|
-
: component(comp),testname(tst),testcond(cond),severity(sev),
|
197
|
-
expected(exp),filename(file),linenumber(line)
|
198
|
-
{ }
|
199
|
-
/// Print the test outcome
|
200
|
-
void print() const;
|
201
|
-
};
|
202
|
-
|
203
|
-
/// Utility class to maintain a list of test outcomes.
|
204
|
-
class TestOutcomes : public std::list<TestOutcome> {
|
205
|
-
public:
|
206
|
-
/// Add an outcome to the list
|
207
|
-
void add(std::string comp, std::string tst, const char* cond,
|
208
|
-
TestOutcome::SeverityLevel sev, const char* file, int line,
|
209
|
-
bool exp = false)
|
210
|
-
{ push_back(TestOutcome(comp,tst,cond,sev,file,line,exp)); }
|
211
|
-
|
212
|
-
/*! \brief Add an outcome to the list
|
213
|
-
|
214
|
-
Get the component name from the solver interface.
|
215
|
-
*/
|
216
|
-
void add(const OsiSolverInterface& si, std::string tst, const char* cond,
|
217
|
-
TestOutcome::SeverityLevel sev, const char* file, int line,
|
218
|
-
bool exp = false);
|
219
|
-
/// Print the list of outcomes
|
220
|
-
void print() const;
|
221
|
-
/*! \brief Count total and expected outcomes at given severity level
|
222
|
-
|
223
|
-
Given a severity level, walk the list of outcomes and count the total number
|
224
|
-
of outcomes at this severity level and the number expected.
|
225
|
-
*/
|
226
|
-
void getCountBySeverity(TestOutcome::SeverityLevel sev,
|
227
|
-
int& total, int& expected) const;
|
228
|
-
};
|
229
|
-
|
230
|
-
/// Convert parameter to a string (stringification)
|
231
|
-
#define OSIUNITTEST_QUOTEME_(x) #x
|
232
|
-
/// Convert to string with one level of expansion of the parameter
|
233
|
-
#define OSIUNITTEST_QUOTEME(x) OSIUNITTEST_QUOTEME_(x)
|
234
|
-
|
235
|
-
template <typename Component>
|
236
|
-
bool OsiUnitTestAssertSeverityExpected(
|
237
|
-
bool condition, const char * condition_str, const char *filename,
|
238
|
-
int line, const Component& component, const std::string& testname,
|
239
|
-
TestOutcome::SeverityLevel severity, bool expected)
|
240
|
-
{
|
241
|
-
if (condition) {
|
242
|
-
OsiUnitTest::outcomes.add(component, testname, condition_str,
|
243
|
-
OsiUnitTest::TestOutcome::PASSED, filename, line, false);
|
244
|
-
if (OsiUnitTest::verbosity >= 2) {
|
245
|
-
std::ostringstream successmsg;
|
246
|
-
successmsg << __FILE__ << ":" << __LINE__ << ": " << testname
|
247
|
-
<< " (condition \'" << condition_str << "\') passed.\n";
|
248
|
-
OsiUnitTest::testingMessage(successmsg.str().c_str());
|
249
|
-
}
|
250
|
-
return true;
|
251
|
-
}
|
252
|
-
OsiUnitTest::outcomes.add(component, testname, condition_str,
|
253
|
-
severity, filename, line, expected);
|
254
|
-
OsiUnitTest::failureMessage(component, testname, condition_str);
|
255
|
-
switch (OsiUnitTest::haltonerror) {
|
256
|
-
case 2:
|
257
|
-
{ if (severity >= OsiUnitTest::TestOutcome::ERROR ) std::abort(); break; }
|
258
|
-
case 1:
|
259
|
-
{ std::cout << std::endl << "press any key to continue..." << std::endl;
|
260
|
-
std::getchar();
|
261
|
-
break ; }
|
262
|
-
default: ;
|
263
|
-
}
|
264
|
-
return false;
|
265
|
-
}
|
266
|
-
|
267
|
-
/// Add a test outcome to the list held in OsiUnitTest::outcomes
|
268
|
-
#define OSIUNITTEST_ADD_OUTCOME(component,testname,testcondition,severity,expected) \
|
269
|
-
OsiUnitTest::outcomes.add(component,testname,testcondition,severity,\
|
270
|
-
__FILE__,__LINE__,expected)
|
271
|
-
/*! \brief Test for a condition and record the result
|
272
|
-
|
273
|
-
Test \p condition and record the result in OsiUnitTest::outcomes.
|
274
|
-
If it succeeds, record the result as OsiUnitTest::TestOutcome::PASSED and print
|
275
|
-
a message for OsiUnitTest::verbosity >= 2.
|
276
|
-
If it fails, record the test as failed with \p severity and \p expected and
|
277
|
-
react as specified by OsiUnitTest::haltonerror.
|
278
|
-
|
279
|
-
\p failurecode is executed when failure is not fatal.
|
280
|
-
*/
|
281
|
-
#define OSIUNITTEST_ASSERT_SEVERITY_EXPECTED(condition,failurecode,component,\
|
282
|
-
testname, severity, expected) \
|
283
|
-
{ \
|
284
|
-
if (!OsiUnitTestAssertSeverityExpected(condition, #condition, \
|
285
|
-
__FILE__, __LINE__, component, testname, severity, expected)) { \
|
286
|
-
failurecode; \
|
287
|
-
} \
|
288
|
-
}
|
289
|
-
|
290
|
-
/*! \brief Perform a test with severity OsiUnitTest::TestOutcome::ERROR, failure not
|
291
|
-
expected.
|
292
|
-
*/
|
293
|
-
#define OSIUNITTEST_ASSERT_ERROR(condition, failurecode, component, testname) \
|
294
|
-
OSIUNITTEST_ASSERT_SEVERITY_EXPECTED(condition,failurecode,component,testname,\
|
295
|
-
OsiUnitTest::TestOutcome::ERROR,false)
|
296
|
-
|
297
|
-
/*! \brief Perform a test with severity OsiUnitTest::TestOutcome::WARNING, failure
|
298
|
-
not expected.
|
299
|
-
*/
|
300
|
-
#define OSIUNITTEST_ASSERT_WARNING(condition, failurecode, component, testname) \
|
301
|
-
OSIUNITTEST_ASSERT_SEVERITY_EXPECTED(condition,failurecode,component,testname,\
|
302
|
-
OsiUnitTest::TestOutcome::WARNING,false)
|
303
|
-
|
304
|
-
/*! \brief Perform a test surrounded by a try/catch block
|
305
|
-
|
306
|
-
\p trycode is executed in a try/catch block; if there's no throw the test is deemed
|
307
|
-
to have succeeded and is recorded in OsiUnitTest::outcomes with status
|
308
|
-
OsiUnitTest::TestOutcome::PASSED. If the \p trycode throws a CoinError, the failure
|
309
|
-
is recorded with status \p severity and \p expected and the value of
|
310
|
-
OsiUnitTest::haltonerror is consulted. If the failure is not fatal, \p catchcode is
|
311
|
-
executed. If any other error is thrown, the failure is recorded as for a CoinError
|
312
|
-
and \p catchcode is executed (haltonerror is not consulted).
|
313
|
-
*/
|
314
|
-
#define OSIUNITTEST_CATCH_SEVERITY_EXPECTED(trycode, catchcode, component, testname,\
|
315
|
-
severity, expected) \
|
316
|
-
{ \
|
317
|
-
try { \
|
318
|
-
trycode; \
|
319
|
-
OSIUNITTEST_ADD_OUTCOME(component,testname,#trycode " did not throw exception",\
|
320
|
-
OsiUnitTest::TestOutcome::PASSED,false); \
|
321
|
-
if (OsiUnitTest::verbosity >= 2) { \
|
322
|
-
std::string successmsg( __FILE__ ":" OSIUNITTEST_QUOTEME(__LINE__) ": "); \
|
323
|
-
successmsg = successmsg + testname; \
|
324
|
-
successmsg = successmsg + " (code \'" #trycode "\') did not throw exception"; \
|
325
|
-
successmsg = successmsg + ".\n" ; \
|
326
|
-
OsiUnitTest::testingMessage(successmsg.c_str()); \
|
327
|
-
} \
|
328
|
-
} catch (CoinError& e) { \
|
329
|
-
std::stringstream errmsg; \
|
330
|
-
errmsg << #trycode " threw CoinError: " << e.message(); \
|
331
|
-
if (e.className().length() > 0) \
|
332
|
-
errmsg << " in " << e.className(); \
|
333
|
-
if (e.methodName().length() > 0) \
|
334
|
-
errmsg << " in " << e.methodName(); \
|
335
|
-
if (e.lineNumber() >= 0) \
|
336
|
-
errmsg << " at " << e.fileName() << ":" << e.lineNumber(); \
|
337
|
-
OSIUNITTEST_ADD_OUTCOME(component,testname,errmsg.str().c_str(),\
|
338
|
-
severity,expected); \
|
339
|
-
OsiUnitTest::failureMessage(component,testname,errmsg.str().c_str()); \
|
340
|
-
switch(OsiUnitTest::haltonerror) { \
|
341
|
-
case 2: \
|
342
|
-
{ if (severity >= OsiUnitTest::TestOutcome::ERROR) abort(); break; } \
|
343
|
-
case 1: \
|
344
|
-
{ std::cout << std::endl << "press any key to continue..." << std::endl; \
|
345
|
-
getchar(); \
|
346
|
-
break ; } \
|
347
|
-
default: ; \
|
348
|
-
} \
|
349
|
-
catchcode; \
|
350
|
-
} catch (...) { \
|
351
|
-
std::string errmsg; \
|
352
|
-
errmsg = #trycode; \
|
353
|
-
errmsg = errmsg + " threw unknown exception"; \
|
354
|
-
OSIUNITTEST_ADD_OUTCOME(component,testname,errmsg.c_str(),severity,false); \
|
355
|
-
OsiUnitTest::failureMessage(component,testname,errmsg.c_str()); \
|
356
|
-
catchcode; \
|
357
|
-
} \
|
358
|
-
}
|
359
|
-
|
360
|
-
/*! \brief Perform a try/catch test with severity OsiUnitTest::TestOutcome::ERROR,
|
361
|
-
failure not expected.
|
362
|
-
*/
|
363
|
-
#define OSIUNITTEST_CATCH_ERROR(trycode, catchcode, component, testname) \
|
364
|
-
OSIUNITTEST_CATCH_SEVERITY_EXPECTED(trycode, catchcode, component, testname, OsiUnitTest::TestOutcome::ERROR, false)
|
365
|
-
|
366
|
-
/*! \brief Perform a try/catch test with severity OsiUnitTest::TestOutcome::WARNING,
|
367
|
-
failure not expected.
|
368
|
-
*/
|
369
|
-
#define OSIUNITTEST_CATCH_WARNING(trycode, catchcode, component, testname) \
|
370
|
-
OSIUNITTEST_CATCH_SEVERITY_EXPECTED(trycode, catchcode, component, testname, OsiUnitTest::TestOutcome::WARNING, false)
|
371
|
-
|
372
|
-
} // end namespace OsiUnitTest
|
373
|
-
|
374
|
-
#endif /*OSISOLVERINTERFACETEST_HPP_*/
|