24 package org.lightjason.agentspeak.action.builtin.math.linearprogram;
26 import org.apache.commons.lang3.tuple.Pair;
27 import org.apache.commons.math3.optim.linear.LinearConstraint;
28 import org.apache.commons.math3.optim.linear.LinearObjectiveFunction;
35 import javax.annotation.Nonnegative;
36 import javax.annotation.Nonnull;
37 import java.util.Collection;
38 import java.util.List;
39 import java.util.stream.Collectors;
78 @Nonnull
final List<ITerm> p_argument, @Nonnull
final List<ITerm> p_return )
80 final List<ITerm> l_arguments =
CCommon.flatten( p_argument ).collect( Collectors.toList() );
83 l_arguments.get( 0 ).<Pair<LinearObjectiveFunction, Collection<LinearConstraint>>>raw().getRight().add(
86 .limit( l_arguments.size() - 2 )
88 .mapToDouble( i -> i.<Number>raw().doubleValue() )
90 this.
getRelation( l_arguments.get( l_arguments.size() - 2 ).<String>raw() ),
91 l_arguments.get( l_arguments.size() - 1 ).<Number>raw().doubleValue()
final int minimalArgumentNumber()
minimum number of arguments
final Relationship getRelation( @Nonnull final String p_symbol)
returns the enum of a relationship by a string value
abstract class for constraint actions
add a linear value constraint to the LP.
static< N > IFuzzyValue< N > from( @Nonnull final N p_value)
factory
common structure for execution definition
final IFuzzyValue< Boolean > execute(final boolean p_parallel, @Nonnull final IContext p_context, @Nonnull final List< ITerm > p_argument, @Nonnull final List< ITerm > p_return)
defines a plan-body operation
execution context with local data
static final long serialVersionUID
serial id
result for an immutable fuzzy value
class for any helper calls