All Classes and Interfaces

Class
Description
Abstract superclass for Acceptor.
Deprecated, for removal: This API element is subject to removal in a future version.
Implement IBendableScore instead.
 
 
 
 
Abstract superclass that combines multiple Terminations.
Implements the concat operation.
 
A config class is a user-friendly, validating configuration class that maps XML input.
 
 
 
FP streams implementation of ScoreDirectorFactory.
 
Abstract superclass for CountableValueRange (and therefore ValueRange).
It is expected that if two instances share the same properties, they are equal to one another.
Abstract superclass for EntityPlacer.
 
Abstract superclass for FinalistPodium.
 
Filtering nodes are expensive.
 
 
This and its subclasses exist so that Gizmo only needs to generate code where it is necessary for it to be generated.
 
This class has two direct children: AbstractIndexedIfExistsNode and AbstractUnindexedIfExistsNode.
 
There is a strong likelihood that any change to this class, which is not related to indexing, should also be made to AbstractUnindexedIfExistsNode.
There is a strong likelihood that any change to this class, which is not related to indexing, should also be made to AbstractUnindexedJoinNode.
 
This class has two direct children: AbstractIndexedJoinNode and AbstractUnindexedJoinNode.
Abstract superclass for LocalSearchForager.
 
 
Abstract superclass for Move, requiring implementation of undo moves.
 
Abstract superclass for MoveSelector.
 
 
 
 
 
 
 
 
 
 
 
 
 
Deprecated, for removal: This API element is subject to removal in a future version.
Implement Score instead.
Abstract superclass for ScoreDefinition.
Abstract superclass for ScoreDirector.
Abstract superclass for ScoreDirectorFactory.
Keeps track of the working score and constraint matches for a single constraint session.
 
Abstract superclass for Selector.
 
This is an alternative to AbstractMove, allowing to trade some performance for less boilerplate.
Common code between DefaultSolver and child solvers.
 
Abstract superclass for all Tabu Acceptors.
 
 
A tuple is an out tuple in exactly one node and an in tuple in one or more nodes.
Deprecated, for removal: This API element is subject to removal in a future version.
Uncountable value ranges were never fully supported in many places throughout the solver and therefore never gained traction.
Abstract superclass for Move, suggested starting point to implement undo moves when not using AbstractSimplifiedMove.
There is a strong likelihood that any change made to this class should also be made to AbstractIndexedIfExistsNode.
There is a strong likelihood that any change made to this class should also be made to AbstractIndexedJoinNode.
 
Some Demand implementation classes are defined by their VariableDescriptor and nothing else.
Common ancestor for specialized planning variable listeners.
A LocalSearchForager which forages accepted moves and ignores unaccepted moves.
An Acceptor accepts or rejects a selected Move.
 
 
 
Specifies that a bean property (or a field) is the anchor of a chained PlanningVariable, which implies it's a shadow variable.
 
 
 
Only supported for chained variables.
 
Only selects values from the child value selector that are initialized.
Determines if and how to automatically presume ConstraintWeightOverrides, ProblemFactCollectionProperty, ProblemFactProperty, PlanningEntityCollectionProperty, PlanningEntityProperty and PlanningScore annotations on PlanningSolution members based on the member type.
Concurrency notes: Condition predicate on (BasicPlumbingTermination.problemFactChangeQueue is not empty or BasicPlumbingTermination.terminatedEarly is true).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
The type is public to make it easier for Bavet-specific minimal bug reproducers to be created.
 
FP streams implementation of ScoreDirector, which only recalculates the Score of the part of the working solution that changed, instead of the going through the entire PlanningSolution.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
This Score is based on n levels of BigDecimal constraints.
 
This Score is based on n levels of long constraints.
 
 
This Score is based on n levels of int constraints.
 
 
 
 
Delivered when the best solution changes during solving.
 
Remembers the best solution that a Solver encounters.
 
Used to build a Constraint out of a BiConstraintStream, applying optional configuration.
 
As described by UniConstraintCollector, only for BiConstraintStream.
 
A ConstraintStream that matches two facts.
 
 
Created with Joiners.
Combs an array of BiJoiner instances into a mergedJoiner and a mergedFiltering.
 
 
Investigate nodes layer by layer: investigate shallower nodes first.
Represents a gap between two sequences.
This Iterator does not shuffle and is never ending.
A EntitySelector that caches the result of its child EntitySelector.
A MoveSelector that caches the result of its child MoveSelector.
A ValueSelector that caches the result of its child ValueSelector.
A CompositeMoveSelector that Cartesian products 2 or more MoveSelectors.
 
 
Specifies that a field may be updated by the target method when any of its variables change, genuine or shadow.
 
 
 
 
 
 
 
 
 
Exists so that particular user-provided classes, which are instantiated by Timefold from SolverConfig, only ever have one instance.
 
 
 
Sorts a selection List based on a Comparator.
Combines several acceptors into one.
 
A CompositeMove is composed out of multiple other moves.
Abstract superclass for every composite MoveSelector.
 
A thread-safe memoization that caches a calculation.
 
Represents a collection of ranges that are connected, meaning the union of all the ranges results in the range [ConnectedRange.getStart(), ConnectedRange.getEnd()) without gaps.
Contains info regarding ConnectedRanges and RangeGaps for a collection of ranges.
 
 
 
A ConsecutiveSetTree determines what values are consecutive.
A class that holds common lambdas that are guaranteed to be the same across method calls.
This represents a single constraint in the ConstraintStream API that impacts the Score.
Note: Users should never create instances of this type directly.
 
Deprecated, for removal: This API element is subject to removal in a future version.
Deprecated, for removal: This API element is subject to removal in a future version.
Deprecated, for removal: This API element is subject to removal in a future version.
 
The factory to create every ConstraintStream (for example with ConstraintFactory.forEach(Class)) which ends in a Constraint returned by ConstraintProvider.defineConstraints(ConstraintFactory).
Marker interface for constraint justifications.
Allows a IncrementalScoreCalculator to report ConstraintMatchTotals for explaining a score (= which score constraints match for how much) and also for score corruption analysis.
Allows creating ConstraintMatch instances lazily if and only if they are required by the end user.
Explains the Score of a PlanningSolution, from the opposite side than Indictment.
Provides information about the known constraints.
Used by Constraint Streams' Score calculation.
Represents a unique identifier of a constraint.
A constraint stream is a declaration on how to match one, two or more objects.
 
Deprecated, for removal: This API element is subject to removal in a future version.
Used to override constraint weights defined in Constraint Streams, e.g., in UniConstraintStream.penalize(Score).
 
 
 
 
 
 
A ConstructionHeuristicPhase is a Phase which uses a construction heuristic algorithm, such as First Fit, First Fit Decreasing, Cheapest Insertion, ...
 
 
 
 
 
 
A ValueRange that is ending.
Used for converting selector size to some other value.
 
Runs a custom algorithm as a Phase of the Solver that changes the planning variables.
 
 
Deprecated, for removal: This API element is subject to removal in a future version.
Workaround for annotation limitation in CustomShadowVariable.variableListenerClass().
 
 
 
Marks a problem fact class as being required to be deep planning cloned.
 
Default implementation of ConstraintJustification, returned by ConstraintMatch.getJustification() unless the user defined a custom justification mapping.
If possible, prefer using SolutionManager.analyze(Object) instead.
 
 
Default implementation of ConstructionHeuristicPhase.
 
 
 
Default implementation of ExhaustiveSearchPhase.
 
 
 
Default implementation of LocalSearchPhase.
 
 
 
 
 
 
 
 
 
Deprecated, for removal: This API element is subject to removal in a future version.
 
Deprecated, for removal: This API element is subject to removal in a future version.
 
Default implementation for Solver.
 
 
 
 
Similar to Executors's DefaultThreadFactory, but allows settings a namePrefix.
This is the common SubChainSelector implementation.
 
A subsystem submits a demand for a Supply.
Investigate deeper nodes first.
 
 
 
 
Determines how members (fields and methods) of the domain (for example the planner variable) are accessed.
Deprecated, for removal: This API element is subject to removal in a future version.
 
Used for easy java Score calculation.
Easy java implementation of ScoreDirector, which recalculates the Score of the working solution every time.
Easy implementation of ScoreDirectorFactory.
Linked list that allows to add and remove an element in O(1) time.
An entry of ElementAwareList
Selects destinations for list variable change moves.
A supertype for LocationInList and UnassignedLocation.
 
 
 
 
 
 
 
 
 
A notifiable listening for EntityNotifications.
 
 
 
 
Selects instances of 1 PlanningEntity annotated class.
 
 
The manner of sorting PlanningEntity instances.
 
The environment mode also allows you to detect common bugs in your implementation.
 
 
 
 
A ExhaustiveSearchPhase is a Phase which uses an exhaustive algorithm, such as Brute Force.
 
 
 
 
 
 
Alternative to AnchorVariableListener.
 
This class is thread-safe.
 
 
 
 
 
 
 
A podium gathers the finalists (the LocalSearchMoveScopes which might win) and picks the winner.
 
 
 
 
 
This is the common ValueSelector implementation.
This is the common EntitySelector implementation.
 
This is the common ValueSelector implementation.
 
Abstract superclass for every generic MoveSelector.
 
Loads a class if we have the Gizmo-generated bytecode for it, otherwise uses the current Thread's context ClassLoader.
 
 
Generates the bytecode for the MemberAccessor of a particular Member
Describe and provide simplified/unified access for Member.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
This Score is based on 3 levels of BigDecimal constraints: hard, medium and soft.
 
This Score is based on 3 levels of long constraints: hard, medium and soft.
 
This Score is based on 3 levels of int constraints: hard, medium and soft.
 
This Score is based on 2 levels of BigDecimal constraints: hard and soft.
 
This Score is based on 2 levels of long constraints: hard and soft.
 
This Score is based on 2 levels of int constraints: hard and soft.
 
 
 
Default implementation of FinalistPodium.
 
Bendable score is a Score whose IBendableScore.hardLevelsSize() and IBendableScore.softLevelsSize() are only known at runtime.
 
Used for incremental java Score calculation.
Incremental java implementation of ScoreDirector, which only recalculates the Score of the part of the working solution that changed, instead of the going through the entire PlanningSolution.
Incremental implementation of ScoreDirectorFactory.
An indexer for entity or fact X, maps a property or a combination of properties of X, denoted by indexProperties, to all instances of X that match those properties, depending on the the indexer type (equal, lower than, ...).
Indexers form a parent-child hierarchy, each child has exactly one parent.
Cached in tuples; each tuple carries its unique instance.
Specifies that a bean property (or a field) is an index of this planning value in another entity's PlanningListVariable.
 
 
 
Only supported for list variables.
Explains the Score of a PlanningSolution, from the opposite side than ConstraintMatchTotal.
Prevents creating chains without an anchor.
Bounds the possible Scores for a PlanningSolution as more and more variables are initialized (while the already initialized variables don't change).
Bounds 1 score level of the possible Scores for a PlanningSolution as more and more variables are initialized (while the already initialized variables don't change).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Specifies that a bean property (or a field) is the inverse of a PlanningVariable, which implies it's a shadow variable.
 
 
 
 
 
 
 
Creates an BiJoiner, TriJoiner, ... instance for use in UniConstraintStream.join(Class, BiJoiner), ...
 
 
 
 
 
 
THIS CLASS IS EXPERIMENTAL AND UNSUPPORTED.
 
 
 
 
 
An ordered Set which is implemented as a ArrayList for a small Set.size() and a LinkedHashSet for a big Set.size().
Moves an element of a list variable.
 
 
 
An extension on the Iterable interface that supports ListIterable.listIterator() and ListIterable.listIterator(int).
 
 
 
 
 
Swaps two elements of a list variable.
 
 
 
 
 
 
 
 
 
A listener sourced on a PlanningListVariable.
 
 
 
Tracks variable listener events for a given PlanningListVariable.
Calculates the unfairness measure for a particular input.
 
 
 
Collects the moves and picks the next step from those for the LocalSearchDecider.
 
 
 
A LocalSearchPhase is a Phase which uses a Local Search algorithm, such as Tabu Search, Simulated Annealing, Late Acceptance, ...
 
 
 
 
 
 
Points to a list variable position specified by an entity and an index.
 
 
 
 
 
 
 
 
This class is thread-safe.
Deprecated, for removal: This API element is subject to removal in a future version.
When multi-threaded solving, ensure your domain classes use @PlanningId instead.
 
 
Note: Users should never create instances of this type directly.
 
Fast and easy access to a Member of a bean, which is a property (with a getter and optional setter Method) or a Field.
 
 
Supply whose value is pre-computed and cached the first time MemoizingSupply.read() is called.
 
 
 
 
 
 
 
 
 
 
A Move represents a change of 1 or more PlanningVariables of 1 or more PlanningEntitys in the working PlanningSolution.
 
 
An interface to generate an Iterator of custom Moves.
 
 
A simple interface to generate a List of custom Moves.
 
 
Generates Moves.
General superclass for ChangeMoveSelectorConfig, etc.
 
 
 
 
A mutable key-value tuple.
 
 
For move selectors that support Nearby Selection autoconfiguration.
Implementations are expected to be stateless.
 
 
 
Specifies that a bean property (or a field) references the next element in the same PlanningListVariable.
 
 
Points to a list variable next and previous elements position specified by an entity.
Makes no changes.
Makes no changes.
A NoChangePhase is a Phase which does nothing.
 
 
 
 
 
 
A notifiable’s purpose is to execute variable listener methods.
A notification represents some kind of change of a planning variable.
 
 
Investigate the nodes with a better optimistic bound first, then deeper nodes.
 
 
 
Investigate deeper nodes first, in order.
 
An immutable key-value tuple.
A PartitionedSearchPhase is a Phase which uses a Partition Search algorithm.
 
Represents a function that accepts five arguments and produces a result.
Created with Joiners.
Combs an array of PentaJoiner instances into a mergedJoiner and a mergedFiltering.
Represents a predicate (boolean-valued function) of five arguments.
A phase of a Solver.
 
 
 
An adapter for PhaseLifecycleListener.
Internal API.
 
 
 
Specifies that a bean property (or a field) is a custom shadow variable that is updated by another shadow variable's variable listener.
Workaround for annotation limitation in PiggybackShadowVariable.shadowEntityClass().
 
This Move is not cacheable.
 
 
 
 
A pillar is a List of entities that have the same planning value for each (or a subset) of their planning values.
 
 
This Move is not cacheable.
 
 
 
Decides on accepting or discarding a PlanningEntity.
 
Used to construct new instances of an object when there is no suitable constructor.
Specifies that the class is a planning entity.
Workaround for annotation limitation in PlanningEntity.difficultyComparatorClass().
Workaround for annotation limitation in PlanningEntity.difficultyWeightFactoryClass().
Workaround for annotation limitation in PlanningEntity.pinningFilter() ()}.
Specifies that a property (or a field) on a PlanningSolution class is a Collection of planning entities.
Specifies that a property (or a field) on a PlanningSolution class is a planning entity.
Specifies that a bean property (or a field) is the id to match when locating an externalObject (often from another Thread or JVM).
 
This interface is used to mark an object as immutable.
Specifies that a bean property (or a field) can be changed and should be optimized by the optimization algorithms.
Specifies that a boolean property (or field) of a PlanningEntity determines if the planning entity is pinned.
Specifies that an int property (or field) of a PlanningEntity determines how far a PlanningListVariable is pinned.
 
Specifies that a property (or a field) on a PlanningSolution class holds the Score of that solution.
Deprecated, for removal: This API element is subject to removal in a future version.
Specifies that the class is a planning solution.
Workaround for annotation limitation in PlanningSolution.solutionCloner().
Specifies that a bean property (or a field) can be changed and should be optimized by the optimization algorithms.
Workaround for annotation limitation in PlanningVariable.strengthComparatorClass().
Workaround for annotation limitation in PlanningVariable.strengthWeightFactoryClass().
 
A reference to a genuine PlanningVariable or a shadow variable.
Workaround for annotation limitation in PlanningVariableReference.entityClass().
 
 
 
Specifies that a bean property (or a field) references the previous element in the same PlanningListVariable.
 
 
 
 
 
A ProblemChange represents a change in one or more planning entities or problem facts of a PlanningSolution.
Provides a layer of abstraction over ProblemChange and the deprecated ProblemFactChange to preserve backward compatibility.
Allows external changes to the working solution.
Deprecated, for removal: This API element is subject to removal in a future version.
Specifies that a property (or a field) on a PlanningSolution class is a Collection of problem facts.
Specifies that a property (or a field) on a PlanningSolution class is a problem fact.
 
The statistics of a given problem submitted to a Solver.
A propagation queue is an ordered collection of items that need to be sent to the next node.
Propagator is an interface that exposes the PropagationQueue to BavetConstraintSession.
Used to build a Constraint out of a QuadConstraintStream, applying optional configuration.
 
As described by UniConstraintCollector, only for QuadConstraintStream.
 
A ConstraintStream that matches four facts.
Represents a function that accepts four arguments and produces a result.
Created with Joiners.
Combs an array of QuadJoiner instances into a mergedJoiner and a mergedFiltering.
Represents a predicate (boolean-valued function) of four arguments.
An immutable tuple of four values.
 
 
 
 
 
 
 
 
 
 
 
 
 
Defines the pseudo random number generator.
 
 
A RangeGap is a gap between two consecutive ConnectedRanges.
 
Represents the result of the Assignment Recommendation API, see SolutionManager.recommendFit(Object, Object, Function).
Deprecated, for removal: This API element is subject to removal in a future version.
Prefer RecommendedAssignment instead.
 
 
 
A MemberAccessor based on a getter and optionally a setter.
A MemberAccessor based on a field.
 
A MemberAccessor based on a single read Method.
Prevents reassigning of already initialized variables during Construction Heuristics and Exhaustive Search.
Determines the behavior of joins and conditional propagation based on whether they are coming off of a constraint stream started by either ConstraintFactory.from(Class) or ConstraintFactory.forEach(Class) family of methods.
 
 
 
 
 
 
A Score is result of the score function (AKA fitness function) on a single possible solution.
Represents the breakdown of a Score into individual ConstraintAnalysis instances, one for each constraint.
Determines the depth of score analysis.
 
 
 
A ScoreDefinition knows how to compare Scores and what the perfect maximum/minimum Score is.
 
 
The ScoreDirector holds the working solution and calculates the Score for it.
Builds a ScoreDirector.
 
 
Build by SolutionManager.explain(Object) to hold ConstraintMatchTotals and Indictments necessary to explain the quality of a particular Score.
Investigate the nodes with a better optimistic bound first, then deeper nodes.
 
Deprecated, for removal: This API element is subject to removal in a future version.
Use SolutionManager instead.
 
 
 
 
 
 
There is no INHERIT by design because 2 sequential caches provides no benefit, only memory overhead.
Decides on accepting or discarding a selection, which is either a PlanningEntity, a planning value, a Move or a Selector).
 
 
Defines in which order the elements or a selector are selected.
Create a probabilityWeight for a selection (which is a PlanningEntity, a planningValue, a Move or a Selector).
Decides the order of a List of selection (which is a PlanningEntity, a planningValue, a Move or a Selector).
 
Creates a weight to decide the order of a collections of selections (a selection is a PlanningEntity, a planningValue, a Move or a Selector).
General interface for MoveSelector, EntitySelector and ValueSelector which generates Moves or parts of them.
Represents a series of consecutive values.
 
Contains info regarding the consecutive sequences and breaks in a collection of points.
 
Specifies that a bean property (or a field) is a custom shadow variable of 1 or more source variables.
Defines several ShadowVariable annotations on the same element.
Workaround for annotation limitation in ShadowVariable.sourceEntityClass().
 
Serves for detecting shadow variables' corruption.
 
 
 
This Score is based on 1 level of BigDecimal constraints.
 
This Score is based on 1 level of long constraints.
 
This Score is based on 1 level of int constraints.
 
The time gradient implementation of simulated annealing.
 
 
Currently only supported for chained variables and list variables, which guarantee that no 2 entities use the same planningValue.
 
 
 
Clones a PlanningSolution during planning.
 
 
A stateless service to help calculate Score, ConstraintMatchTotal, Indictment, etc.
Splits one solution into multiple partitions.
 
To fully de-normalize a planning solution freshly loaded from persistent storage, two operations need to happen: Variable listeners need to run, reading the state of all entities and computing values for their shadow variables. Score needs to be calculated and stored on the planning solution.
A Solver solves a planning problem and returns the best solution found.
 
Includes settings to override default Solver configuration.
 
Internal API.
Creates Solver instances.
Represents a problem that has been submitted to solve on the SolverManager.
Provides a fluent contract that allows customization and submission of planning problems to solve.
 
An adapter for SolverLifecycleListener.
Identifies which move thread, which phase, step and move/move tree the solver is currently executing.
A SolverManager solves multiple planning problems of the same domain, asynchronously without blocking the calling thread.
 
 
 
 
 
The status of problem submitted to the SolverManager.
 
 
 
 
Used to externalize data for a Supply from the domain model itself.
A SolverStatistic that has no state or event listener
The implementation moves tuples directly into an either retract, update or insert queue, without any option of moving between the queues.
 
Determines what increment the counter of Step Counting Hill Climbing.
 
Strategic oscillation, works well with Tabu search.
A subList out of a single chain.
 
 
 
 
 
This Move is not cacheable.
 
 
 
This Move is not cacheable.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Supplies something for 1 or multiple subsystems.
Provides a Supply for subsystems that submit a Demand.
 
 
 
 
 
Also known as a 2-opt move.
Also known as a 2-opt move selector.
Also known as a 2-opt move selector config.
 
 
A Termination determines when a Solver or a Phase should stop.
 
 
 
 
 
 
 
 
Represents a function that accepts four arguments and produces an int-valued result.
Represents a function that accepts three arguments and produces an int-valued result.
Represents a function that accepts four arguments and produces a long-valued result.
Represents a function that accepts three arguments and produces a long-valued result.
 
 
 
 
 
 
 
Used to build a Constraint out of a TriConstraintStream, applying optional configuration.
 
As described by UniConstraintCollector, only for TriConstraintStream.
 
A ConstraintStream that matches three facts.
Represents a function that accepts three arguments and returns no result.
Represents a function that accepts three arguments and produces a result.
Created with Joiners.
Combs an array of TriJoiner instances into a mergedJoiner and a mergedFiltering.
An immutable tuple of three values.
Represents a predicate (boolean-valued function) of three arguments.
 
 
 
 
A 2-opt move for list variables, which takes two edges and swap their endpoints.
Only selects values from the child value selector that are uninitialized.
 
 
A K-Opt move that does the list rotation before performing the flips instead of after, allowing it to act as the undo move of a K-Opt move that does the rotation after the flips.
An exception that is thrown in EnvironmentMode.TRACKED_FULL_ASSERT when undo score corruption is detected.
 
Used to build a Constraint out of a UniConstraintStream, applying optional configuration.
 
Usually created with ConstraintCollectors.
 
A ConstraintStream that matches one fact.
 
 
 
A CompositeMoveSelector that unions 2 or more MoveSelectors.
 
 
 
IMPORTANT: The constructor of any subclass of this abstract class, should never call any of its child Selector's Iterator.hasNext() or Iterator.next() methods, because that can cause descendant Selectors to be selected too early (which breaks MimicReplayingEntitySelector).
 
 
A ValueRange is a set of a values for a PlanningVariable.
 
Factory for ValueRange.
 
Provides the planning values that can be used for a PlanningVariable.
Selects values from the ValueRangeProvider for a PlanningVariable annotated property.
 
 
 
The manner of sorting values for a PlanningVariable.
 
 
 
Each before/after event needs to look up a variable descriptor.
A VariableId is an entity/variable of a given solution.
A listener sourced on a basic PlanningVariable.
This class is not thread-safe.
Holds a variable listener and all its source variable descriptors.
A VariableSnapshot is a snapshot of the value of a variable for a given entity.
Serves for detecting undo move corruption.
Tracks variable listener events for a given genuine or shadow variable (except PlanningListVariable).
There are several valid ways how an impacter could be called from a constraint stream: .penalize(..., (int) 1) .penalizeLong(..., (int) 1) .penalizeLong(..., (long) 1) .penalizeBigDecimal(..., (int) 1) .penalizeBigDecimal(..., (long) 1) .penalizeBigDecimal(..., BigDecimal.ONE) Plus reward variants of the above. An implementation of this interface can throw an UnsupportedOperationException for the method types it doesn't support.
 
 
 
Sorts a selection List based on a SelectionSorterWeightFactory.