{"data":{"markdownRemark":{"html":"<h2 id=\"overview\"><a href=\"#overview\" aria-hidden=\"true\" class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Overview</h2>\n<p>Modelling is an iterative process. Often you will find yourself making many small tweaks during the building and calibrating process. Restarting your server multiple times in a short space of time can be a slow and cumbersome process. The Simudyne auto-compiler allows models to be automatically compiled when changes are made.</p>\n<h2 id=\"set-up\"><a href=\"#set-up\" aria-hidden=\"true\" class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Set up</h2>\n<p>Enabling auto-compilation is as simple as seting a property in the simudyneSDK.properties file.</p>\n<p class=\"code-header\">simudyneSDK.properties</p>\n<div class=\"gatsby-highlight\" data-language=\"properties\"><pre class=\"language-properties\"><code class=\"language-properties\"><span class=\"token attr-name\">nexus-server.autocompile-root</span><span class=\"token punctuation\">=</span><span class=\"token attr-value\">&lt;root-to-models></span></code></pre></div>\n<div class=\"ui segment warning message\">\n<h4>Model duplicate</h4>\nThe path specified here is the location to your model directories. This will cause models to be searched for in this directory automatically. It is, therefore, unnecessary to manually register your models with the server, doing so will mean duplicate models will appear in the console, half of which will not auto-compile.\n</div>\n<p class=\"code-header\">Directory structure</p>\n<div class=\"gatsby-highlight\" data-language=\"java\"><pre class=\"language-java\"><code class=\"language-java\">src<span class=\"token operator\">/</span>\n    main<span class=\"token operator\">/</span>\n        java<span class=\"token operator\">/</span>\n            models<span class=\"token operator\">/</span>\n                mortgagemodel<span class=\"token operator\">/</span>\n                    MortgageModel<span class=\"token punctuation\">.</span>java\n                tradingmodel<span class=\"token operator\">/</span>\n                    TradingModel<span class=\"token punctuation\">.</span>java\n                CreditCardModel<span class=\"token punctuation\">.</span>java    \n            Main<span class=\"token punctuation\">.</span>java</code></pre></div>\n<p>If you set the autocompile root to the path <b>src/main/java/models</b>, the autocompiler will search each sub folder, (mortgagemodel, tradingmodel) for models. It will find the MortgageModel and the TradingModel which will both be autocompiled. The CreditCardModel, which is not in a folder will not be found.</p>\n<p>Each sub folder inside the autocompile root path is treated as a group. Therefore, if you have multiple models in one subfolder, a change in one of them will cause all of the models in that folder to be recompiled and restarted.</p>\n<p class=\"code-header\">Directory structure</p>\n<div class=\"gatsby-highlight\" data-language=\"java\"><pre class=\"language-java\"><code class=\"language-java\">src<span class=\"token operator\">/</span>\n    main<span class=\"token operator\">/</span>\n        java<span class=\"token operator\">/</span>\n            models<span class=\"token operator\">/</span>\n                mortgagemodel<span class=\"token operator\">/</span>\n                    MortgageModel<span class=\"token punctuation\">.</span>java\n                    TradingModel<span class=\"token punctuation\">.</span>java\n                    HelpfulClass<span class=\"token punctuation\">.</span>java\n                credit<span class=\"token operator\">/</span>\n                    CreditCardModel<span class=\"token punctuation\">.</span>java  </code></pre></div>\n<p><code class=\"language-text\">nexus-server.autocompile-root=src/main/java/models</code></p>\n<p>If any of the three classes (MortgageModel.java, TradingModel.java or HelpfulClass.java) are changed, both MortgageModel and TradingModel will be recompiled and restared, but CreditCardModel will not be recompiled.</p>","headings":[{"value":"Overview","depth":2},{"value":"Set up","depth":2}],"frontmatter":{"title":"Auto-compiler","toc":null,"experimental":true}},"site":{"siteMetadata":{"title":"Simudyne Docs","latestVersion":"2.6"}}},"pageContext":{"absolutePath":"/home/vsts/work/1/s/content/2.5/reference/experimental/auto-compiler.md","versioned":true,"version":"2.5","kind":"reference","pagePath":"/reference/experimental/auto-compiler","chronology":{"prev":{"name":"Akka Distributed Graph","path":"/reference/experimental/akka"},"next":{"name":"Model Scaffolding","path":"/reference/experimental/scaffolding"}},"lastUpdated":"2026-04-21T13:56:54.861Z"}}