# Submission format

> The instance files you get and the solution files you send.

Source: <https://frontieror-challenge.com/docs/self-hosted/submission-format>

## Instance files

Each instance you start comes as a JSON file named `<slug>-<name>.json`, in the problem's instance schema. It has the same format as the problem's public instances, so a solver that reads those reads these. See [Reading the schemas](https://frontieror-challenge.com/docs/problems#reading-the-schemas).

## The solution file

Upload one file per instance:

- a JSON object, encoded as UTF-8;
- following the problem's **solution schema**, shown on each problem page;
- with a numeric `objective_value`, which the checker recomputes from your decisions;
- at most 4 MB.

`solution.json · barnhart2000`

```json
{
  "objective_value": 111,
  "commodities": [
    { "commodity_id": 0, "rejected": true, "path_arcs": [] }
  ]
}
```

On the dashboard, choose the file in the instance's row. Over the API, send it as the raw request body of [`PUT …/solution`](https://frontieror-challenge.com/docs/self-hosted/api#upload-a-solution).

## What is checked when

| When                        | What                                                                        | If it fails                                                         |
| --------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| At upload                   | The file is valid JSON, a JSON object, and has a numeric `objective_value`. | The upload is refused and you can upload again before the deadline. |
| After the submission closes | The checker verifies every constraint and recomputes the objective.         | The instance scores 0 with the reason.                              |

A solution that passes the upload check is final, even if the checker later rejects it. Run the problem's [checker](https://frontieror-challenge.com/docs/problems#checkers) on it before uploading; where the checker is not published, as in Stage 2, verify feasibility yourself.

## Uploads are final

Each instance takes one solution. Once uploaded, it cannot be replaced.
