scpsolver.problems
Interface Problem

All Known Subinterfaces:
ConstrainedProblem
All Known Implementing Classes:
LinearProgram, QuadraticProgram, StochasticProgram

public interface Problem

Basic optimization problem format.

Author:
schober

Method Summary
 double evaluate(double[] x)
          Returns the value of the function at position x.
 int getDimension()
          Returns the dimension of the input variable space.
 java.lang.String getName()
          Gets a string containing the type of problem that is formulated with a given instance.
 boolean isMinProblem()
          Specifies whether the target function of this instance is to be minimized or maximized.
 void setMinProblem(boolean bool)
          Controls if the target function is to be maximized or minimized.
 

Method Detail

getName

java.lang.String getName()
Gets a string containing the type of problem that is formulated with a given instance. E. g., the LinearProgram class returns "Linear Program".

Please note, that this method will not return the actual name of a given instance. If you have two instances of linear programs, a method call will yield the same result. Therefore, two different linear programs cannot be distinguish via this method and must be kept apart somehow differently.

Returns:
the type of problem this instance describes

evaluate

double evaluate(double[] x)
Returns the value of the function at position x. The length of the array must be the same as the value returned by getDimension.

Parameters:
x - input variable vector for the target function
Returns:
the value of the function at position x

getDimension

int getDimension()
Returns the dimension of the input variable space.

Returns:
the dimension of the input space

isMinProblem

boolean isMinProblem()
Specifies whether the target function of this instance is to be minimized or maximized. The default is maximization.

Returns:
true if the target function is to be maximized, false otherwise

setMinProblem

void setMinProblem(boolean bool)
Controls if the target function is to be maximized or minimized. If no value is given prior to optimization, the function will be maximized.

Parameters:
bool - true if this function is to be minimized, false otherwise