Package org.ojalgo.optimisation.service
Class OptimisationService
java.lang.Object
org.ojalgo.optimisation.service.OptimisationService
Basic usage:
- Put optimisation problems on the solve queue by calling
putOnQueue(Sense, byte[], FileFormat)
- Check the status of the optimisation by calling
getStatus(String)
– is itOptimisationService.Status.DONE
or stillOptimisationService.Status.PENDING
? - Get the result of the optimisation by calling
getResult(String)
– whenOptimisationService.Status.DONE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
static enum
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Optimisation.Result
private final int
private final Optimisation.Options
private final ProcessingService
private final BlockingQueue
<OptimisationService.Problem> private final ForgetfulMap
<String, Optimisation.Result> private final ForgetfulMap
<String, OptimisationService.Status> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Optimisation.Result
doOptimise
(Optimisation.Sense sense, byte[] contents, ExpressionsBasedModel.FileFormat format) private void
doOptimise
(OptimisationService.Problem problem) private static String
static ServiceIntegration
newIntegration
(String host) optimise
(Optimisation.Sense sense, byte[] contents, ExpressionsBasedModel.FileFormat format) putOnQueue
(Optimisation.Sense sense, byte[] contents, ExpressionsBasedModel.FileFormat format)
-
Field Details
-
FAILED
-
myNumberOfWorkers
private final int myNumberOfWorkers -
myOptimisationOptions
-
myProcessingService
-
myQueue
-
myResultCache
-
myStatusCache
-
-
Constructor Details
-
OptimisationService
public OptimisationService()
-
-
Method Details
-
newIntegration
-
doOptimise
private static Optimisation.Result doOptimise(Optimisation.Sense sense, byte[] contents, ExpressionsBasedModel.FileFormat format) throws RecoverableCondition - Throws:
RecoverableCondition
-
generateKey
-
getResult
-
getStatus
-
optimise
public Optimisation.Result optimise(Optimisation.Sense sense, byte[] contents, ExpressionsBasedModel.FileFormat format) -
putOnQueue
public String putOnQueue(Optimisation.Sense sense, byte[] contents, ExpressionsBasedModel.FileFormat format) throws RecoverableCondition - Throws:
RecoverableCondition
-
doOptimise
-