se.optimatika.ampl
Class JAMPL

java.lang.Object
  extended by org.ojalgo.netio.SystemProcess
      extended by se.optimatika.ampl.JAMPL
All Implemented Interfaces:
Optimisation, Optimisation.Model<JAMPL>, Optimisation.Solver

public class JAMPL
extends SystemProcess
implements Optimisation.Model<JAMPL>, Optimisation.Solver


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.ojalgo.optimisation.Optimisation
Optimisation.Constraint, Optimisation.Model<S extends Optimisation.Solver>, Optimisation.Objective, Optimisation.Options, Optimisation.Result, Optimisation.Solver, Optimisation.State, Optimisation.ValidationException
 
Field Summary
static boolean DEBUG
           
 
Constructor Summary
JAMPL()
           
JAMPL(ExpressionsBasedModel aModel)
           
 
Method Summary
 List<Message> communicate(Command aCommand)
           
 List<Message> communicate(Command aCommand, String anArg)
           
 double doubleValue(int anInd)
           
 BigDecimal get(int anInd)
           
 JAMPL getDefaultSolver()
           
 BasicMatrix.Factory getMatrixFactory()
           
 Optimisation.State getState()
           
 BigDecimal getValue()
           
 boolean isMaximisation()
           
 boolean isMinimisation()
           
 Iterator<BigDecimal> iterator()
           
 Optimisation.Result maximise()
           
 Optimisation.Result minimise()
           
 void reset()
           
 void setMatrixFactory(BasicMatrix.Factory aMatrixFactory)
           
 void setMaximisation(boolean aFlag)
           
 void setMinimisation(boolean aFlag)
           
 int size()
           
 Optimisation.Result solve()
           
 JAMPL solve(JAMPL aModel)
           
 void terminate()
           
 String toArgumentString(List<Variable> theVars, Expression aFunction)
           
 String toArgumentString(Variable aVar)
           
 boolean validate()
           
 boolean validateComposition()
          Deprecated. Use validate() instead
 
Methods inherited from class org.ojalgo.netio.SystemProcess
communicate, communicate, getLastReturnArgument
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static boolean DEBUG
Constructor Detail

JAMPL

public JAMPL()

JAMPL

public JAMPL(ExpressionsBasedModel aModel)
Method Detail

communicate

public List<Message> communicate(Command aCommand)

communicate

public List<Message> communicate(Command aCommand,
                                 String anArg)

doubleValue

public double doubleValue(int anInd)

get

public BigDecimal get(int anInd)

getDefaultSolver

public JAMPL getDefaultSolver()
Specified by:
getDefaultSolver in interface Optimisation.Model<JAMPL>
Returns:
A solver that should be able to solve this problem.

getMatrixFactory

public BasicMatrix.Factory getMatrixFactory()

getState

public Optimisation.State getState()

getValue

public BigDecimal getValue()

isMaximisation

public boolean isMaximisation()

isMinimisation

public boolean isMinimisation()

iterator

public Iterator<BigDecimal> iterator()

maximise

public Optimisation.Result maximise()
Specified by:
maximise in interface Optimisation.Model<JAMPL>

minimise

public Optimisation.Result minimise()
Specified by:
minimise in interface Optimisation.Model<JAMPL>

reset

public void reset()

setMatrixFactory

public void setMatrixFactory(BasicMatrix.Factory aMatrixFactory)

setMaximisation

public void setMaximisation(boolean aFlag)

setMinimisation

public void setMinimisation(boolean aFlag)

size

public int size()

solve

public Optimisation.Result solve()
Specified by:
solve in interface Optimisation.Solver

solve

public JAMPL solve(JAMPL aModel)

terminate

public void terminate()
Overrides:
terminate in class SystemProcess

toArgumentString

public String toArgumentString(List<Variable> theVars,
                               Expression aFunction)

toArgumentString

public String toArgumentString(Variable aVar)

validate

public boolean validate()
                 throws Optimisation.ValidationException
Specified by:
validate in interface Optimisation.Model<JAMPL>
Returns:
true If eveything is ok
Throws:
Optimisation.ValidationException - If something is structurally impossible. Maybe you've defined a lower bound that is leger than the upper bound.

validateComposition

@Deprecated
public boolean validateComposition()
                            throws Optimisation.ValidationException
Deprecated. Use validate() instead

Throws:
Optimisation.ValidationException