MispProblem

be.cetic.ddolibscala.examples.nolayer.misp.MispProblem
See theMispProblem companion object
class MispProblem(nodes: BitSet, val neighbors: Array[BitSet], val weights: Array[Int], _optimal: Option[Double]) extends Problem[BitSet]

Attributes

Companion
object
Graph
Supertypes
trait Problem[BitSet]
trait Problem[BitSet]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def domainLabels(state: BitSet): Iterable[Int]

Returns the domain of possible labels/actions from a given state.

Returns the domain of possible labels/actions from a given state.

Value parameters

state

the current state

Attributes

Returns

all feasible labels for the given state

Definition Classes
override def evaluate(solution: Seq[Int]): Double

Given a solution (a sequence of applied labels), returns its value and checks if the solution respects the problem's constraints.

Given a solution (a sequence of applied labels), returns its value and checks if the solution respects the problem's constraints.

Value parameters

solution

A solution of the problem (sequence of labels).

Attributes

Returns

The value of the input solution

Definition Classes
override def initialState(): BitSet

Returns the initial state of the problem.

Returns the initial state of the problem.

Attributes

Returns

the state representing the starting point of the optimization

Definition Classes
Problem -> Problem
override def initialValue(): Double

Returns the initial objective value associated with the initial state.

Returns the initial objective value associated with the initial state.

Attributes

Returns

the starting value of the objective function

Definition Classes
Problem -> Problem
override def isTarget(state: BitSet): Boolean

Checks whether the given state is a target (sink) state.

Checks whether the given state is a target (sink) state.

Value parameters

state

the current state

Attributes

Returns

true if the state is a target state, false otherwise

Definition Classes
Problem -> Problem
def numNodes: Int
override def optimal: Option[Double]

Returns the known optimal value of the problem, if available.

Returns the known optimal value of the problem, if available.

Attributes

Returns

an Option containing the known optimal value, or None if unknown

Definition Classes
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
override def transition(state: BitSet, label: Int): BitSet

Applies a label/action to a state, computing the next state according to the problem's transition function.

Applies a label/action to a state, computing the next state according to the problem's transition function.

Value parameters

label

the label to apply

state

the state from which the transition originates

Attributes

Returns

the resulting state after applying the label

Definition Classes
Problem -> Problem
override def transitionCost(state: BitSet, label: Int): Double

Computes the change in objective value resulting from applying a label to a given state.

Computes the change in objective value resulting from applying a label to a given state.

Value parameters

label

the label to apply

state

the state from which the transition originates

Attributes

Returns

the incremental objective cost/value associated with this label

Definition Classes
Problem -> Problem

Inherited methods

final override def domain(state: BitSet): Iterator[Integer]

Used by the solver. Converts the output of domainLabels from Scala to Java.

Used by the solver. Converts the output of domainLabels from Scala to Java.

Attributes

Definition Classes
Problem -> Problem
Inherited from:
Problem
final override def evaluate(solution: List[Integer]): Double

Used by the solver. Converts the input of evaluate from Java to Scala.

Used by the solver. Converts the input of evaluate from Java to Scala.

Attributes

Definition Classes
Problem -> Problem
Inherited from:
Problem
final override def optimalValue(): Optional[Double]

Used by the solver. Converts the output of optimal from Scala to Java.

Used by the solver. Converts the output of optimal from Scala to Java.

Attributes

Definition Classes
Problem -> Problem
Inherited from:
Problem

Concrete fields

val neighbors: Array[BitSet]
val weights: Array[Int]