Can I customize PenaltyManager and CostEvaluator? If so, how? #583
-
Hello All! I'm super excited to see this excellent work. I am currently doing research on constraint handling techniques in solving constrained optimization problems using metaheuristic algorithms. I would like to use PyVRP to test different constraint handling techniques, which involves reimplementation of penaltyManger and costEvaluation. I would like to ask if I can reimplement penaltyManger and costEvaluation. If possible, how can I do it? Thank you very much for your time. Best regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @kobeIsMyYouth, The |
Beta Was this translation helpful? Give feedback.
Hi @kobeIsMyYouth,
The
PenaltyManager
is defined inpyvrp/PenaltyManager.py
, and theCostEvaluator
inpyvrp/cpp/CostEvaluator.h
(and the corresponding source file). You can modify those in a fork and then install this forked version of PyVRP in your project. An example of how to install a modified version of PyVRP from git using poetry can be found here. Hope that helps.