Build & Compile UCEF Simulations - SCU-Smart-Grid-CPS/smart-grid-energy-simulation-research GitHub Wiki

Each time the java code is edited for a federate, the code needs to be "built" or "compiled". If multiple federates have been modified, it is easiest to build all. If a single federate is changed, it is faster to build that one only. Inside the UCEF VM,

Compile all federates:

Open the terminal inside the projectName_generated folder. The easiest way is from file manager in the folder right click, select Open in Terminal. It can also be done using cd.

Type in bash build-all.sh

Compile one federate:

Open the terminal inside that projectName_generated/federateName.

Type bash build.sh

Build output

Wait for it to run. It may take a few minutes. For each federate, one after the other, in the terminal it will return a lot of random code, then say either BUILD SUCCESS or BUILD FAILURE.

If it says BUILD FAILURE, look above at the code and read the error messages closely, looking for familiar sounding variables from the Java code. It may provide hints as to how to fix it.

You must get BUILD SUCCESS for every federate before running the simulation.