Package org.ddolib.examples.knapsack


package org.ddolib.examples.knapsack
This package implements the acs, astar and ddo models for the Knapsack Problem (KS). The Knapsack problem is a classic optimization problem where the goal is to maximize the total value of items while staying within a given weight limit. The dynamic programming model is used to solve this problem is using the recurrence relation: KS(i, c) = max(KS(i-1, c), KS(i-1, c - w[i]) + p[i]) where KS(i, c) is the maximum value of the first i items with a knapsack capacity of c, p[i] is the profit of item i, w[i] is the weight of item i.
  • Classes
    Class
    Description
    Knapsack Problem (KS) with Acs.
    Utility class providing algorithms to solve the Knapsack Problem.
    Knapsack Problem (KS) with AsTar.
    Knapsack Problem (KS) with Ddo.
    Knapsack Problem (KS) with Ddo.
    Distance measure for states in a Knapsack (KS) problem.
    Dominance relation for the Knapsack Problem (KS).
    Fast lower bound heuristic for the Knapsack Problem (KS).
    Entry point for solving the 0/1 Knapsack Problem (KS) using a Large Neighborhood Search (LNS) approach combined with Decision Diagram Optimization (DDO).
    Represents an instance of the Knapsack Problem (KS).
    State ranking for the Knapsack Problem (KS).
    Relaxation for the Knapsack Problem (KS).