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.DONEor 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 classstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Optimisation.Resultprivate final intprivate final Optimisation.Optionsprivate final ProcessingServiceprivate 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.ResultdoOptimise(Optimisation.Sense sense, byte[] contents, ExpressionsBasedModel.FileFormat format) private voiddoOptimise(OptimisationService.Problem problem) private static Stringstatic ServiceIntegrationnewIntegration(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
-