hdbeukel / james-core

Core module of the JAMES framework
Apache License 2.0
6 stars 5 forks source link

Question on cache library #44

Open huanfachen opened 7 years ago

huanfachen commented 7 years ago

I am working on a districting problem, which aims at the optimal segmentation of an area into several parts. The evaluation of each part is very time-consuming, so I want to use a cache to speed up the evaluation, which is different from EvaluateMoveCache. What I want is a cache from a List to a double value, and another cache from a List to an integer value. The capacity of the cache should be no more than 2000.

I am using jamesframework to solve this problem. I have two questions here: 1. should the caches be associated with the problem-specific Objective class, as the evaluation is part of the Objective class? 2. do you have any suggestion on the usable cache library? Thanks.

hdbeukel commented 7 years ago

You should add a delta evaluation to your Objective. Examples are found on the website. E.g. take a look at example 1B and 1C. If you can give me more details about the precise objective function I would be happy to take a look and share my ideas for implementing an efficient delta evaluation.

huanfachen commented 7 years ago

Hi @hdbeukel . Please find attached the full paper of the districting problem.

Briefly, this problem is to divide a set of nodes into k subsets. Each subset has three attributes, namely area, risk, and diameter. Each subset also has a center. The evaluation of a division plan is dependent on the attributes of subsets and the distance between subsets.

The most time-consuming steps in evaluating a new solution involve calculation of the diameter and center of the subsets. I think using delta evaluation is a good way to save time. My plan is to create a Evaluation class to store the area, risk, diameter and center of each subsets, which can be used in the delta evaluation. I will update you if I get any progress. Camacho-Collados, Liberatore, Angulo - 2015 - A multi-criteria Police Districting Problem for the efficient and effective design of patr.pdf