Interface SolverWorkerFacade


public interface SolverWorkerFacade
Facade used by the REST layer to interact with dataset storage and the solver worker, without depending on storage or messaging internals directly.
  • Method Details

    • solveDataset

      <Score_> Metadata<Score_> solveDataset(String id)
      Starts solving an existing dataset identified by the given id.
      Parameters:
      id - the dataset identifier
      Returns:
      the Metadata associated with the dataset that will be solved
      Throws:
      ItemNotFoundException - if no dataset exists for the given id
    • createDataset

      <Score_, ModelConfigurationOverrides_ extends ModelConfigOverrides> Metadata<Score_> createDataset(String id, DatasetSelector select, String runName, Set<String> tags, Configuration<ModelConfigurationOverrides_> configuration)
      Creates a new dataset derived from an existing one (identified by id) without starting the solving process. The resulting dataset is validated and computed asynchronously.
      Parameters:
      id - the identifier of the source (parent) dataset.
      select - whether to derive from the unsolved input or the solved output of the parent
      runName - a human-readable name for the new run
      tags - the set of tags to attach to the new dataset
      configuration - the configuration to apply; if null, the parent's configuration is reused
      Returns:
      the Metadata of the newly created dataset
    • createAndSolveDataset

      <Score_, ModelConfigurationOverrides_ extends ModelConfigOverrides> Metadata<Score_> createAndSolveDataset(String id, DatasetSelector select, String runName, Set<String> tags, Configuration<ModelConfigurationOverrides_> configuration)
      Creates a new dataset derived from an existing one (identified by id) and immediately schedules it to be solved after validation/compute completes.
      Parameters:
      id - the identifier of the source (parent) dataset
      select - whether to derive from the unsolved input or the solved output of the parent
      runName - a human-readable name for the new run
      tags - the set of tags to attach to the new dataset
      configuration - the configuration to apply; if null, the parent's configuration is reused
      Returns:
      the Metadata of the newly created dataset
    • createDataset

      <Score_, ModelConfigurationOverrides_ extends ModelConfigOverrides> Metadata<Score_> createDataset(String runName, Set<String> tags, ModelInput modelInput, Configuration<ModelConfigurationOverrides_> configuration)
      Creates a new dataset from the provided ModelInput without starting the solving process. The resulting dataset is validated and computed asynchronously.
      Parameters:
      runName - a human-readable name for the new run
      tags - the set of tags to attach to the new dataset
      modelInput - the model input to store as the dataset problem
      configuration - the configuration to apply to the dataset
      Returns:
      the Metadata of the newly created dataset
    • createAndSolveDataset

      <Score_, ModelConfigurationOverrides_ extends ModelConfigOverrides> Metadata<Score_> createAndSolveDataset(String runName, Set<String> tags, ModelInput modelInput, Configuration<ModelConfigurationOverrides_> configuration)
      Creates a new dataset from the provided ModelInput and immediately schedules it to be solved after validation/compute completes.
      Parameters:
      runName - a human-readable name for the new run
      tags - the set of tags to attach to the new dataset
      modelInput - the model input to store as the dataset problem
      configuration - the configuration to apply to the dataset
      Returns:
      the Metadata of the newly created dataset
    • patchDataset

      <Score_, ModelConfigurationOverrides_ extends ModelConfigOverrides> Metadata<Score_> patchDataset(String id, DatasetSelector select, String runName, ModelInputPatchRequest<ModelConfigurationOverrides_> modelInputPatchRequest)
      Creates a new dataset by applying a JSON patch to an existing dataset's ModelInput, without starting the solving process. The resulting dataset is validated and computed asynchronously.
      Parameters:
      id - the identifier of the source (parent) dataset
      select - whether to derive from the unsolved input or the solved output of the parent
      runName - a human-readable name for the new run
      modelInputPatchRequest - the patch request containing the JSON patch operations and an optional Configuration override
      Returns:
      the Metadata of the newly created dataset
      Throws:
      ItemNotFoundException - if no dataset exists for the given id
    • patchAndSolveDataset

      <Score_, ModelConfigurationOverrides_ extends ModelConfigOverrides> Metadata<Score_> patchAndSolveDataset(String id, DatasetSelector select, String runName, ModelInputPatchRequest<ModelConfigurationOverrides_> modelInputPatchRequest)
      Creates a new dataset by applying a JSON patch to an existing dataset's ModelInput and immediately schedules it to be solved after validation/compute completes.
      Parameters:
      id - the identifier of the source (parent) dataset
      select - whether to derive from the unsolved input or the solved output of the parent
      runName - a human-readable name for the new run
      modelInputPatchRequest - the patch request containing the JSON patch operations and an optional Configuration override
      Returns:
      the Metadata of the newly created dataset
      Throws:
      ItemNotFoundException - if no dataset exists for the given id
    • terminate

      <Score_, ModelOutput_ extends ModelOutput, InputMetrics_ extends ModelInputMetrics, OutputMetrics_ extends ModelOutputMetrics> ModelResponse<Score_, ModelOutput_, InputMetrics_, OutputMetrics_> terminate(String id)
      Terminates the ongoing solve for the given dataset (if any) and returns the current model response
      Parameters:
      id - the dataset identifier
      Returns:
      the ModelResponse for the dataset after termination
    • getMetadata

      <Score_> Metadata<Score_> getMetadata(String id)
      Returns the Metadata for the given dataset, or null if none exists.
      Parameters:
      id - the dataset identifier
      Returns:
      the dataset metadata, or null if not found
    • getConfiguration

      <ModelConfigurationOverrides_ extends ModelConfigOverrides> Configuration<ModelConfigurationOverrides_> getConfiguration(String id)
      Returns the effective (processed) Configuration of the given dataset.
      Parameters:
      id - the dataset identifier
      Returns:
      the effective configuration, or null if not found
    • getUnprocessedConfiguration

      <ModelConfigurationOverrides_ extends ModelConfigOverrides> Configuration<ModelConfigurationOverrides_> getUnprocessedConfiguration(String id)
      Returns the original (unprocessed) Configuration of the given dataset, as it was supplied by the caller before any post-processing.
      Parameters:
      id - the dataset identifier
      Returns:
      the unprocessed configuration, or nullif not found
    • getModelInput

      ModelInput getModelInput(String id)
      Returns the ModelInput originally submitted for the given dataset.
      Parameters:
      id - the dataset identifier
      Returns:
      the model input, or null if not found
    • getSolvedModelInput

      ModelInput getSolvedModelInput(String id)
      Returns the ModelInput representing the solved state of the given dataset (i.e. planning entities updated with the best solution).
      Parameters:
      id - the dataset identifier
      Returns:
      the solved model input, or null if not available
    • listRuns

      <Score_> List<Metadata<Score_>> listRuns(int pageNumber, int pageSize)
      Returns a paginated list of dataset runs.
      Parameters:
      pageNumber - the zero-based page index
      pageSize - the number of runs per page
      Returns:
      the list of Metadata entries for the requested page
    • getModelResponse

      <Score_, ModelOutput_ extends ModelOutput, InputMetrics_ extends ModelInputMetrics, OutputMetrics_ extends ModelOutputMetrics> ModelResponse<Score_, ModelOutput_, InputMetrics_, OutputMetrics_> getModelResponse(String id)
      Returns the ModelResponse for the given dataset.
      Parameters:
      id - the dataset identifier
      Returns:
      the model response, or null if not available
    • getModelRequest

      <ModelInput_ extends ModelInput, ModelConfigurationOverrides_ extends ModelConfigOverrides> ModelRequest<ModelInput_, ModelConfigurationOverrides_> getModelRequest(String id)
      Returns the original ModelRequest for the given dataset.
      Parameters:
      id - the dataset identifier
      Returns:
      the model request, or null if not found
    • getLogs

      LogInfo getLogs(String id)
      Returns the solver logs associated with the given dataset. The result combines the currently running pod's log file (if present) with any previously persisted log content
      Parameters:
      id - the dataset identifier
      Returns:
      the aggregated LogInfo, or null if no logs are available