Memory Issue due to 'java.lang.OutOfMemoryError: Java Heap Space' in Scenario with Extensive Code

Loading the simulation itself is unlikely to cause an excessive heap usage.
Either your heap is ridiculously small, or you’re loading a humongous amount of data in memory.

In any case, there’s no way to help you unless you follow the requirements for asking a question: How to Ask a Question.