Package org.ddolib.examples.nolayer.knapsack
package org.ddolib.examples.nolayer.knapsack
This package implements the acs and astar models for the Knapsack Problem (KS) using the
unlayered API. 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.
-
ClassDescriptionKnapsack Problem (KS) with ACS, using the no-layer modeling API.Knapsack Problem (KS) with A*, using the no-layer modeling API.Knapsack Problem (KS) with DDO, using the no-layer modeling API.Fast lower bound for the Knapsack Problem (KS), using the no-layer modeling API.Base model for the Knapsack Problem (KS), using the no-layer modeling API.Knapsack Problem (KS), using the no-layer modeling API.State for the NoLayer formulation of the Knapsack Problem.