Items (click to toggle selection)

Knapsack State

Capacity 0 / 15
0
Total Value
0
Total Weight

Optimal Solution

Items: A + B + D
Weight: 15 | Value: 38

Weight Flow (capacity consumption over time)

Value Flow (value accumulation over time)

Strategic Analysis

Run ODE simulation to see analysis

How It Works

The 0/1 Knapsack Problem is modeled as a Petri net where:

  • Places represent item availability and knapsack capacity
  • Transitions represent taking each item
  • Arc weights encode item weights as capacity consumption

The ODE simulation uses mass-action kinetics:

flux = rate × [item] × [capacity]^weight

Items with higher efficiency (value/weight) have higher rates, causing them to flow faster into the knapsack. The continuous approximation reveals which items compete most effectively for limited capacity.