Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Public Member Functions | |
KnapsackItemWithEfficiency (int _id, int64_t _profit, int64_t _weight, int64_t _profit_max) | |
Public Attributes | |
int | id |
int64_t | profit |
int64_t | weight |
double | efficiency |
--— KnapsackItemWithEfficiency --— KnapsackItem is a small struct to pair an item weight with its corresponding profit. This struct is used by Knapsack64ItemsSolver. As this solver deals only with one dimension, that's more efficient to store 'efficiency' than computing it on the fly.
Definition at line 668 of file knapsack_solver.cc.
|
inline |
Definition at line 669 of file knapsack_solver.cc.
double operations_research::KnapsackItemWithEfficiency::efficiency |
Definition at line 681 of file knapsack_solver.cc.
int operations_research::KnapsackItemWithEfficiency::id |
Definition at line 678 of file knapsack_solver.cc.
int64_t operations_research::KnapsackItemWithEfficiency::profit |
Definition at line 679 of file knapsack_solver.cc.
int64_t operations_research::KnapsackItemWithEfficiency::weight |
Definition at line 680 of file knapsack_solver.cc.