Skip to content

Developer's Guide

H. Joe Lee edited this page Apr 20, 2022 · 20 revisions

Adding a New Adapter

  1. Create a new directory under the adapter directory.

Customizing Data Placement Engine

Data Placement Engine (DPE) is the heart of Hermes performance. Developers may want to replace the default engine using different optimization algorithms.

Codes for testing DPE

You can quickly check how DPE is tested.

Codes for calling Problem Solver

This is the code that you need to modify.

If you look at the line 206 Status result; in MinimizeIoTimePlacement(), the default value of result is always HERMES_SUCCESS as defined in src/hermes_status.h.

The goal is to assemble placement schema for BLOBs.

for (size_t i {0}; i < num_blobs; ++i) {
    PlacementSchema schema;
    // schema will have results from your problem solver.
    output.push_back(schema);
  }

Total Constraints

The -1 is for Placement Ratio constraint, which iterates 1 less than num_targets.

  const size_t total_constraints =
      num_blobs + (num_targets * constraints_per_target) - 1; 

Steps for replacing OR-Tools-based Problem Solver

  1. Replace the header file #include "ortools/linear_solver/linear_solver.h".
  2. Update CMakeLists.txt files to remove gortools dependendency.
Clone this wiki locally