# Set-up

## Introduction

In this tutorial, you will use Rembrandt to model the scenario of a last mile delivery service and optimize the assignment of parcels to drivers. For this purpose, pre-filled databases are provided, and you will be guided step by step through the preparation and usage of the scenario in Rembrandt.

The [resource types](/docs/concepts/resource-modeling-and-management.md#resource-types-and-their-hierarchy) in this use case are *Microdepots*, *Receivers*, *Deliverers*, and *Tours*. Receivers represent single parcels, including information on destination address, size, and so on. These parcels have to be delivered from a Microdepot to the actual recipient by a deliverer. For this, receivers have information on their so-called wish-timeframes stored, i.e., information in which time window the shipment is to be delivered by the deliverer. The resource allocation and optimization goal in this scenario is assigning all parcels to deliverers and tours so that these are as efficient as possible.

## Getting Started

For following this tutorial, you can use a local installation by following the steps below.

1. We will use Docker for deploying Rembrandt, but extend the provided set-up by the pre-filled database, so make sure you have Docker installed and running.
2. Now, please create a `docker-compose.yml` file with the following content:

```yaml
version: '3'
services:
    rembrandt:
        image: bptlab/rembrandt:latest
        ports:
            - 3000:3000
        environment:
            - MONGO_HOST=mongo
        volumes:
            - /var/run/docker.sock:/var/run/docker.sock
            - data-exchange:/usr/src/rembrandt/dataExchange
    smile-data:
        image: bptlab/rembrandt-smile-data:recipe
        links:
            - mongo
    mongo:
        image: mongo:latest
volumes:
    data-exchange:
```

{% hint style="info" %}
&#x20;This docker-compose file has the same content as the regular [deployment file](/docs/deployment.md#using-docker) but contains an additional service *smile-data*. This service runs at start up and adds scenario-specific data into Rembrandt's database. The tag *recipe* determines the degree of prefilling, where as *recipe* already contains the most possible data. See the [DockerHub page](https://hub.docker.com/repository/docker/bptlab/rembrandt-smile-data) of this image to check out the other tags and their contents.
{% endhint %}

3\. To make the exemplary optimization algorithms known to your system, please run the following commands:

```bash
$ docker pull bptlab/rembrandt-smile-opal:munkres
$ docker pull bptlab/rembrandt-smile-opal:rule
```

{% hint style="info" %}
These commands will download two docker images containing optimization algorithms for the last mile delivery use case. They contain the logic for the actual resource allocation. See the [DockerHub page ](https://hub.docker.com/repository/docker/bptlab/rembrandt-smile-opal/general)for more details.
{% endhint %}

4\. Now, you can [start Rembrandt](/docs/deployment.md#using-docker) (see step 2), using either Docker Compose or Docker Stack, and go to the webpage of your local Rembrandt instance: <http://localhost:3000>.

5\. Proceed to the next page, [Resource Management](/docs/use-case-guide/use-case-resources.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://rembrandt.gitbook.io/docs/use-case-guide/set-up.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
