> For the complete documentation index, see [llms.txt](https://doc.loadmaster.biz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.loadmaster.biz/4-ui-and-terminologies/4.3-cargo/4.3.3-attributes-of-the-cargoes/4.3.3.12-stack-code.md).

# 4.3.3.12 Stack Code

The stack code can be used to limit the total number of layers when different cargoes are stacked on each other. If we set the same stack code and the same max stack for different cargoes, LoadMaster can treat them as the same kind of cargoes to calculate the number of stacking layers.

For example: It is required that Cargo 1 and Cargo 2 should not stack more than 4 layers, whether stacked on their own or on each other.

If we only set the max stack of cargoes 1, 2 to “4”, the effect is that the cargoes 1, 2 stack themselves no more than 4 layers, but they will stack each other, the number of total layers will exceed 4 layers. LoadMaster calculates the number of stacking layers only for each cargo, as shown in the figure

![](/files/-MDrTRGwkeBSJQBT9WGl)

So we need to set the stack code:

(1) Set a same “stack code” for cargoes 1 and 2 (the stack code can be numbers or letters or Chinese characters, as long as they are the same), and set “max stack” of each cargo to “4”.

(2)On the page of \[Loading Rules], select the \[Methods for calculate max stack] as \[Cargoes with the same stacking code is used as the same type to calculate the max stack].

![](/files/-MDrTTJxwd0ncj0u7k2c)

The partial result of loading plan is shown in the figure: Cargo 1 and Cargo 2 are stacked no more than 4 layers, no matter on their own or on each other.

![](/files/-MDrTV0FlHyJJOCuqX-Z)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://doc.loadmaster.biz/4-ui-and-terminologies/4.3-cargo/4.3.3-attributes-of-the-cargoes/4.3.3.12-stack-code.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
