Package com.artelys.kalis
package com.artelys.kalis

ClassDescriptionThis class creates a X = abs(Y) constraint
Example :Propagation level of the constraintAn OptimalityToleranceChecker to use with any type of
KNumVar objective, which use an absolute difference criteria.This class implements a generic class for propagation of any binary constraint by local 2consistency (arc consistency) \
Two algorithms (AC3 and AC2001) are available for propagation of the constraint.
Example : X == Y + CDifferents level of propagation for the constraintsThis class implements a generic class for propagation of any binary constraint by local 2consistency (arc consistency).
Two algorithms (AC3 and AC2001) are available for propagation of the constraint.
Arcconsistency algorithms for binary table constraintThis class creates a X1 <> X2 <> ...Differents level of propagation for the constraintsAssign And Forbid branching scheme
Example :AssignVar Branching scheme
Example:This class represents an auxiliary variable to use in relaxations.
KAuxVar objects represent auxiliary variables, consisting of a name, lower
and upper bounds, and a type that is either "global" or "continuous".Value selector that selects the value of a variable that implies the best
bound for the objective.
For each possible value in the domain of a given variable, the variable
is instantiated on this value and the propagation is launched.This class represent an expression of the form X (+ , ) Y + cste where X and
Y are variables and cste an integer constant.
Abstract class defining branching schemes.
Search is made thanks to a tree search algorithm.This class implements an array of KBranchingScheme
Example :A branching scheme group represents a list of branching schemes to use nested
branching schemes.
List of brancing scheme group.Selection object to choose among a list of branching scheme group.
A nested branching scheme.
From a list of branching scheme groups, this brancing scheme apply
iteratively each group.
The default group selector uses input order.
Linear relaxation solver for ClpThis linear relaxation solver relies on CoinMP to solve the LP/MIP problem.
Example:Conditionnal numeric linear combination constraint.
This constraint can be represented as a linear combination
Sum(a_i * X_i * f(X_i)) { <= , !Available operators for the combinationThis class creates a Binary conjunction on two constraints `C1 and C2`.
Example :This class is an abstract interface for all constraints in Artelys Kalis
This class implements an array of KConstraint
Example :This constraint states that some tasks requiring a resource do not exceed the
resource capacity.A timedependant resource usage constraint.The cycle constraint ensures that the graph implicitly represented by a set of variables and their domain contains no subtours (tour visiting a partial number of nodes).Discrete resource
A discrete resource can process several tasks at the same time.
The following schema shows an example with three tasks A,B and C executing on
a disjunctive resource and on a cumulative resource with resource usage 3 for
task A, 1 for task B and 1 for task C :
Tasks may require, provide, consume and produce resources :
 A task requires a resource if some amount of the resource capacity must be made available for the execution of the activity.Propagation Hint AttributesThis class creates a Binary disjunction on two constraints `C1 or C2`
Example :This class implements an array of KDisjunction
Example :This class implements a disjunction selector that selects the disjunction in the input order.This class implements a disjunction selector that selects first the disjunction ith the highest priority
Example :Abstract interface class for disjunction selection heuristicThis class creates a abs(XY) == C constraint
Example :This class creates a abs(XY) >= C constraint
Example :This class creates a abs(XY) <= C constraint
Example :This class creates a abs(XY) !This class implements an array of doubles
Example :This class creates a X == Tab[I + cste] constraint
Example :This class creates a X == Tab[I + cste1][J + cste2] constraint
Example :This class represent an expression of type Tab[I] where Tab is an array of integer value and I is the indexing variable
Example :This class represent an expression of type Tab[I+a][J+b] where Tab is an array of integer value; I,J are the indexing variable and a and b indexing offsets
Example :This class creates a X == C constraint.
Example :This class creates a X == Y + C constraint.
Example :This class creates an Equivalence on two constraints `C1 <==> C2`.
Example :This class implements a variable with continuous real valued domain.
Conceptually the continuous variables can be represented the following way :
Example:This branching scheme is suited for branching on KFloatVar objects.
Float variable selector
This class implements a generic class for propagation of any nary constraint by forward checking/arc consistency or generalized arc consistency
Possible propagation algorithmsThis class implements a generic class for propagation of any nary constraint by generalized arc consistency \
This class implements a Global Cardinality Constraint.
A GCC (Global Cardinality Constraint) over a set of variables is defined by three arrays called
values,
lowerBound, and upperBound.This class creates a X >= C constraint.
Example :This class creates a X >= Y + C constraint
Example :This class creates an implication on two constraints `C1 ==> C2`
Example :This class represents a solution of a relaxation solver, that is, a mapping
from variables (KNumVar and/or KAuxVar) to their value.
Example :This class implements a variable selector that selects the first uninstantiated variable in the input order.
Example :This class implements an array of integers
Example :An OptimalityToleranceChecker to use with integer objective only.Branching scheme for splitting float variables into a set of intervals.
This branching scheme split the domain of a float variable into interval
of length `gap`.This class implements an matrix of integersThis class implements an integer variable with enumerated (finite) domain.
Decision variables are the variable quantities that we are trying to
instantiate in order to satisfy the constraints of our problem.
In this version, Artelys Kalis works with integer variables : decision
variables which are constrained to take only integer values.
These integer variables are represented by instances of the class KIntVar.
Example :This class implements an array of KIntVar with enumerated (finite) domains
Example :Abstract class for Branching scheme.This class implements an matrix of KIntVar
Example :This class implements a variable selector that selects the first uninstantiated variable with the smallest domain.
Example :Largest domain duration task selection heuristicLargest Earliest Completion time task selection heuristicLargest Earliest Start time task selection heuristicLargest Latest Completion time task selection heuristicLargest Latest Start time task selection heuristicThis class implements a variable selector that selects first the variable
with the largest upperbound in its domain.
Example:This class implements a variable selector that selects first the variable
with the largest lower bound.
Example:This variable selector selects the variable with biggest reduced cost in current LP solution
of the provided linear relaxation solver.
Note that it does NOT call the solve() method of the solver automatically.
The current LP solution is simply read as it is.
This class creates a X <= C constraint.This class creates a Sum(ai.Xi) { <= , !This class represents a linear relaxation of a domain.
A linear relaxation consists of the following.
 A set of involved variables
 A type for each variable (either continuous or global).This class is intended as a superclass for linear relaxation solvers.
Such a solver must be provided with
 a linear relaxation (KLinearRelaxation)
 an objective variable (KNumVar)
 a sense for optimization (KProblem::Sense).
It relies on a LP/MIP solver to provide the following information:
 a value (a bound for the relaxed problem, cf method getBound())
 a solution, possibly not feasible for the original problem, but which can be used to guide the search for a feasible solution
 if the problem is LP, reduced costs (that can be used for instance in the "reduced cost fixing" procedure).
Resolution algorithmsThis class represents a linear relation (equality or inequality) between variables.
Variables involved in the KLinRel object can be a mix of KNumVar and KAuxVar.This class represent a linear term of the form Sum(coeffs[i].lvars[i]) + cst
Example :This class creates a vMax = max(X1,X2,...This class implements a variable selector that selects first the variable
involved in the maximum number of constraints.
Example :This class implements a variable selector that selects first the variable with maximum regret on its lowerbound.
Example :This class implements a variable selector that selects first the variable
with maximum regret on its upperbound.
Example :This class implements a value selector that returns values in decreasing
order.
Example :This class implements a value selector that selects the nearest value from
the middle value in the domain of the variable.
Example :This class creates a vMin = min(X1,X2,...Value selector that selects the value of a variable that implies the best
problem size reduction when instantiated.
For each possible value of the domain of the variable, the variable is
instantiated and the problem size reduction is evaluated.This class implements a value selector that returns values in increasing
order.
Example :This variable selector selects the variable with biggest fractional part in
the current solution held by the provided linear relaxation solver.
Note that it does NOT call the "solve" method of the solver, so if you want
the relaxation to be resolved at each node, you must use method
KSolver::setOtherNodesRelaxationSolver.
A nearest neighboor branching scheme based on a distance matrix.This value selector chooses the value closest to the relaxed solution
contained in the provided solver.
This class implements a value selector that selects the nearest value from
target in the domain of the variable.
Example :This class represent a non linear term.
Example :This class creates a X !This class creates a X <> Y + C constraint
Example :This class creates a abs(XY) == C constraint
Example :This class creates a `abs(XY) >= C` constraint
Example :This class creates a `abs(XY) <= C` constraint
Example :This class creates a `X == C` constraint
Example :This class creates a `X == Y + C` constraint
Example :This class creates a `X == Y + Z` constraint
Example :This class creates a `X >= C` constraint
Example :This class creates a `X >= Y + C` constraint
Example :This class implements a variable selector that selects the first uninstantiated variable in the input order.
Example :This variable selector selects the variable with biggest reduced cost in
current LP solution of the provided linear relaxation solver.
This class creates a `X <= C` constraint
Example :This class creates a Sum(ai.Xi) { <= , !This class creates a `X <= Y + C` constraint
Example :This class implements a value selector that selects the nearest value from
the middle value in the domain of the variable.
Example :This value selector chooses the value closest to the relaxed solution
contained in the provided solver.
If the relaxed value for a KFloatVar variable is within its bounds, the
selected value is simply the relaxed value.This class implements a value selector that selects the nearest value from target in the domain of the variable .
Example :This class represents a constraint to propagate any non linear constraint of
the form KNonLinearTerm COMPARATOR KNonLinearTerm.
Available operators for the constraintAn OptimalityToleranceChecker to use with any type of
KNumVar objective, which use both a relative and absolute
difference criteria.Smallest domain variable selectorAbstract interface class for value selection heuristicSuperclass of decision variablesVariable typesThis class implements an array of KNumVar.
Example :Abstract interface class for variable selection heuristic.
This class creates a `X = Y` constraint
Example :This class creates a X = atan2(Y, Z) constraint.
Atan2(Y, Z) is defined as follow :
 atan(Y/Z) if Z > 0
 atan(Y/Z) + PI if Z < 0 and Y >= 0
 atan(Y/Z)  PI if Z < 0 and Y < 0
 (+ PI / 2) if Z = 0 and Y > 0
 ( PI / 2) if Z = 0 and Y < 0
 undefined if Z = 0 and Y = 0
Domain of X variable is at least (PI, PI].
Example :This class creates a X = ln(Y) constraint
Example :This class creates a X = Y ^ C constraint
Example :This class creates a `X = Y^2` constraint
Example :This class creates a `X = Y * C` constraint
Example :This class creates a `X == Y * Z` constraint
Example :This class creates a X {==,<=,>=} acos(Y) constraint
Example :This class creates a X {==,<=,>=} asin(Y) constraint
Example :This class creates a X {==,<=,>=} atan(Y) constraint
Example :This class creates a X {==,<=,>=} cos(Y) constraint
Example :This class creates a X {==,<=,>=} exp(Y) constraint
Example :This class creates a X {==,<=,>=} ln(Y) constraint
Example :This class creates a X {==,<=,>=} sin(Y) constraint
Example :This class creates a X {==,<=,>=} tan(Y) constraint
Example :This class creates an occurence constraint of a value in a list of variables
Example :This class represent an expression of type occur(target,lvars) where target
is the value for wich we want to restrict the number of occurence(s) in the
lVars array of variables.
Example :This interface sets a framework for objects providing method to check if the
current solution is close enough to the optimum, and, if not, to give a new
bound to set on the objective variable.Parallel branching scheme
Example:A variable selector based on a path order.
The initial successor is chosen randomly.Probe branching scheme
ProbeDisjunction branching scheme
Constraint satisfaction and optimization problems include variables,
constraints ( modeling entities ) and might have solutions after search.
Such problems are represented in Artelys Kalis by objects of the class
KProblem.Constraint classes for which an automatic relaxation is availableOuput log levelSense for optimizationThis class implements a value selector that selects a value at random in the domain of the variable.
Example :This class implements a variable selector that selects an uninstantiated
variable at random.
Example :A relation term between an expression and constants.An OptimalityToleranceChecker to use with any type of
KNumVar objective, which use a relative difference criteria.This class is intended as a superclass for linear relaxation solvers.
Such a solver must be provided with
 a linear relaxation (KLinearRelaxation)
 an objective variable (KNumVar)
 a sense for optimization (KProblem::Sense).
It relies on a LP/MIP solver to provide the following information:
 a value (a bound for the relaxed problem, cf method getBound())
 a solution, possibly not feasible for the original problem, but which can be used to guide the search for a feasible solution
 if the problem is LP, reduced costs (that can be used for instance in the "reduced cost fixing" procedure).
Resources (machines, raw material etc) can be of two different types :
 Disjunctive when the resource can process only one task at a time (represented by the class KUnaryResource).
 Cumulative when the resource can process several tasks at the same time (represented by the class KDiscreteResource).
Traditional examples of disjunctive resources are Jobshop problems,
cumulative resources are heavily used for the ResourceConstrained Project
Scheduling Problem (RCPSP).This class implements an array of KResource
Example :Resource selection heuristicA KResourceUsage object can be used to describe the a specific usage of a
given resource.Utility container for storing a list of KResourceUsage
Scheduling and planning problems are concerned with determining a plan for
the execution of a given set of tasks.
The objective may be to generate a feasible schedule that satisfies the given
constraints (such as sequence of tasks or limited resource availability) or
to optimize a given criterion such as the makespan of the schedule.
ArtelysKalis defines several aggregate modeling objects to simplify the
formulation of standard scheduling problems like tasks,resources and schedule
objects. by the types KUnaryResource and KDiscreteResource.Nothing can be done in Artelys Kalis outside a KSession object.KSettleDisjunction branching scheme
Example :This class implements a variable selector that selects the first uninstantiated variable with the smallest domain.
Example :This class implements a variable selector that selects first the variable with the smallest ratio domain size / degree in the constraint graph.
Example :Smallest Earliest Completion time task selection heuristicSmallest Earliest Start time task selection heuristicSmallest Latest Completion time task selection heuristicSmallest Latest Start time task selection heuristicThis class implements a variable selector that selects first the variable
with the smallest upperbound.
Example:This class implements a variable selector that selects the first uninstantiated variable with the smallest value in its domain.
Example :Smallest Target Start time task selection heuristicThis class represents a solution of a KProblem.
Example :An array of KSolution objectsThis class represent a pool of solution of a KProblem.
Example:KSolver is the main class for solving problems defined in a KProblem instance.
Once the problem has been fully built, we can begin to look for solutions.
For this, the main class to be used is KSolver, which allows us to :
look for one solution
look for all solutions
look for another solution when we already know some of them
look for the optimal solution according to the problem objective
A KSolver object must be associated to a specific problem.Double attributesDouble controlsInteger attributesInteger controlsSearch limit attributesTolerance limits attributesCallbacks for a KSolver events.SplitDomain Branching scheme
Example :SplitDomain Branching scheme
Example :Tasks (processing operations, activities) are represented by the class KTask.This class implements an array of KTask
Example :Tasks input order selection heuristicTasks random order selection heuristicAbstract interface class for task selection heuristic
A custom scheduling optimization strategy can be specified by using the
KTaskSerializer branching scheme to select the task to be scheduled and value
choice heuristics for its start and duration variables.
Abstract interface class for task selection heuristic
A custom scheduling optimization strategy can be specified by using the
KTaskSerializer branching scheme to select the task to be scheduled and value
choice heuristics for its start and duration variables.
Variable branching orders for each taskConstraint linking tasks and rank variables for unary scheduling.Superclass of KUnTerm and KBinTermTimetable object for timedependant resource usage constraint.This class implements an array of tuples of fixed arity
Example :Unary Resource
Unary resources can process only one task at a time.
The following schema shows an example with three tasks A,B and C executing
on a disjunctive resource and on a cumulative resource with resource usage 3
for task A, 1 for task B and 1 for task C :
Tasks may require, provide, consume and produce resources :
 A task requires a resource if some amount of the resource capacity must be made available for the execution of the activity.Propagation Hint AttributesThis constraint states that some tasks are not overlapping chronologically.
Resources (machines, raw material etc) can be of two different types :
 Disjunctive when the resource can process only one task at a time (represented by the class KUnaryResource).
 Cumulative when the resource can process several tasks at the same time (represented by the class
KDiscreteResource).
Traditional examples of disjunctive resources are Jobshop problems, cumulative resources are heavily used for the
ResourceConstrained Project Scheduling Problem (RCPSP).Differents level of propagation for the constraintsThis class represent an expression of the form X + cste where X is a variable
and cste , an integer constant
Abstract interface class for definition of user constraints
To create your own constraints in Artelys Kalis, you must create a specific
class that inherits from the KUserConstraint class.Return values for `askIfEntailed`The KUserNumConstraint is the generic counterpart to the KUserConstraint for
implementing user constraints when using numeric variables.askIfEntailed return valuesAbstract interface class for value selection heuristic
Abstract interface class for variable selection heuristic
This class implements a variable selector that selects the first
uninstantiated variable with the widest domain.
Example :This class creates a X == Y  Z constraint
Example :