lib/solve/gecode_solver.rb
# Runs the solver with the set of demands given. If any DepSelector
# exceptions are raised, they are rescued and re-raised
Runs the solver with the set of demands given. If any DepSelector
exceptions are raised, they are rescued and re-raised
Runs the solver with the set of demands given . If any DepSelector exceptions are raised they are rescued and re - raised
def solve_demands(demands_as_constraints)
      selector = DepSelector::Selector.new(ds_graph, (timeout_ms / 1000.0))
      selector.find_solution(demands_as_constraints, all_artifacts)
    rescue DepSelector::Exceptions::InvalidSolutionConstraints => e
      report_invalid_constraints_error(e)
    rescue DepSelector::Exceptions::NoSolutionExists => e
      report_no_solution_error(e)
    rescue DepSelector::Exceptions::TimeBoundExceeded
      raise Solve::Errors::NoSolutionError.new(
        "The dependency constraints could not be solved in the time allotted."
      )
    rescue DepSelector::Exceptions::TimeBoundExceededNoSolution
      raise Solve::Errors::NoSolutionCauseUnknown.new(
        "There is a dependency conflict, but the solver could not determine the precise cause in the time allotted."
      )
    end
def solve_demands ( demands_as_constraints ) selector = DepSelector :: Selector . new ( ds_graph , ( timeout_ms / 1000.0 ) ) selector . find_solution ( demands_as_constraints , all_artifacts ) rescue DepSelector :: Exceptions :: InvalidSolutionConstraints => e report_invalid_constraints_error ( e ) rescue DepSelector :: Exceptions :: NoSolutionExists => e report_no_solution_error ( e ) rescue DepSelector :: Exceptions :: TimeBoundExceeded raise Solve :: Errors :: NoSolutionError . new ( "The dependency constraints could not be solved in the time allotted." ) rescue DepSelector :: Exceptions :: TimeBoundExceededNoSolution raise Solve :: Errors :: NoSolutionCauseUnknown . new ( "There is a dependency conflict, but the solver could not determine the precise cause in the time allotted." ) end
Runs the solver with the set of demands given.
Runs the solver with the set of demands given .
# DepSelector timed out trying to find the solution. There may or may # not be a solution. # DepSelector determined there wasn't a solution to the problem, then # timed out trying to determine which constraints cause the conflict.
demands_as_constraints
<not_specific>