Search in sources :

Example 11 with MathProgSysModel

use of org.ojalgo.optimisation.MathProgSysModel in project ojAlgo by optimatika.

the class NetlibCase method testShare2b.

/**
 * OK! 2010-04-19 lp_solve => -415.73224074
 */
@Test
public void testShare2b() {
    final File tmpFile = new File(PATH + "share2b.mps");
    final MathProgSysModel tmpMPS = MathProgSysModel.make(tmpFile);
    final ExpressionsBasedModel tmpModel = tmpMPS.getExpressionsBasedModel();
    this.assertMinMaxVal(tmpModel, new BigDecimal("-4.1573224074E+02"), null);
}
Also used : MathProgSysModel(org.ojalgo.optimisation.MathProgSysModel) File(java.io.File) ExpressionsBasedModel(org.ojalgo.optimisation.ExpressionsBasedModel) BigDecimal(java.math.BigDecimal) Test(org.junit.jupiter.api.Test)

Example 12 with MathProgSysModel

use of org.ojalgo.optimisation.MathProgSysModel in project ojAlgo by optimatika.

the class NetlibCase method testKb2.

/**
 * OK! 2010-04-19 lp_solve => -1749.90012991
 */
@Test
public void testKb2() {
    final File tmpFile = new File(PATH + "kb2.mps");
    final MathProgSysModel tmpMPS = MathProgSysModel.make(tmpFile);
    final ExpressionsBasedModel tmpModel = tmpMPS.getExpressionsBasedModel();
    this.assertMinMaxVal(tmpModel, new BigDecimal("-1.74990012991E+03"), null);
}
Also used : MathProgSysModel(org.ojalgo.optimisation.MathProgSysModel) File(java.io.File) ExpressionsBasedModel(org.ojalgo.optimisation.ExpressionsBasedModel) BigDecimal(java.math.BigDecimal) Test(org.junit.jupiter.api.Test)

Example 13 with MathProgSysModel

use of org.ojalgo.optimisation.MathProgSysModel in project ojAlgo by optimatika.

the class NetlibCase method testSc50b.

/**
 * OK! 2010-04-19 lp_solve => -70.00000000
 */
@Test
public void testSc50b() {
    final File tmpFile = new File(PATH + "sc50b.mps");
    final MathProgSysModel tmpMPS = MathProgSysModel.make(tmpFile);
    final ExpressionsBasedModel tmpModel = tmpMPS.getExpressionsBasedModel();
    this.assertMinMaxVal(tmpModel, new BigDecimal("-7.0000000000E+01"), null);
}
Also used : MathProgSysModel(org.ojalgo.optimisation.MathProgSysModel) File(java.io.File) ExpressionsBasedModel(org.ojalgo.optimisation.ExpressionsBasedModel) BigDecimal(java.math.BigDecimal) Test(org.junit.jupiter.api.Test)

Example 14 with MathProgSysModel

use of org.ojalgo.optimisation.MathProgSysModel in project ojAlgo by optimatika.

the class NetlibCase method testBlend.

/**
 * OK! 2010-04-19 lp_solve => -30.81214985
 */
@Test
public void testBlend() {
    final File tmpFile = new File(PATH + "blend.mps");
    final MathProgSysModel tmpMPS = MathProgSysModel.make(tmpFile);
    final ExpressionsBasedModel tmpModel = tmpMPS.getExpressionsBasedModel();
    // tmpModel.options.problem = new NumberContext(32, 8, RoundingMode.HALF_EVEN);
    // tmpModel.options.solution = new NumberContext(16, 10, RoundingMode.HALF_EVEN);
    // tmpModel.options.debug(LinearSolver.class);
    this.assertMinMaxVal(tmpModel, new BigDecimal("-3.0812149846E+01"), null);
}
Also used : MathProgSysModel(org.ojalgo.optimisation.MathProgSysModel) File(java.io.File) ExpressionsBasedModel(org.ojalgo.optimisation.ExpressionsBasedModel) BigDecimal(java.math.BigDecimal) Test(org.junit.jupiter.api.Test)

Example 15 with MathProgSysModel

use of org.ojalgo.optimisation.MathProgSysModel in project ojAlgo by optimatika.

the class MarketShareCase method makeModel.

private static ExpressionsBasedModel makeModel() {
    final File tmpFile = new File(MipLibCase.PATH + "markshare_5_0.mps");
    final MathProgSysModel tmpMPS = MathProgSysModel.make(tmpFile);
    return tmpMPS.getExpressionsBasedModel();
}
Also used : MathProgSysModel(org.ojalgo.optimisation.MathProgSysModel) File(java.io.File)

Aggregations

File (java.io.File)16 MathProgSysModel (org.ojalgo.optimisation.MathProgSysModel)16 ExpressionsBasedModel (org.ojalgo.optimisation.ExpressionsBasedModel)15 Test (org.junit.jupiter.api.Test)14 BigDecimal (java.math.BigDecimal)12 Disabled (org.junit.jupiter.api.Disabled)2 Variable (org.ojalgo.optimisation.Variable)2 Expression (org.ojalgo.optimisation.Expression)1 Optimisation (org.ojalgo.optimisation.Optimisation)1 Result (org.ojalgo.optimisation.Optimisation.Result)1 State (org.ojalgo.optimisation.Optimisation.State)1