Then, we specify a time point and a world and create nodes, attributes, and relations for this world at this time.

long timepoint_0 = 0;
long world_0 = 0; //identifies the main world 0;
Node sensor0 = g.newNode(world_0, timepoint_0); //the first param is the world
sensor0.set("id", Type.STRING, "4494F");
sensor0.set("name", Type.STRING, "sensor0");
sensor0.set("value", Type.DOUBLE, 0.5); //set the value of the sensor

In this example, node sensor0 is created in world_0. Let's say we want to do a simulation to test what will happen to the system if we have the value of the sensor equal to 4.6.
So first, we fork the current world as following:

long world_1 = g.fork(world_0);

Then we ask the node sensor0 to travel to this world_1 and set its results to 4.6

At time 10, sensor0 still have the value 0.5 in the original world_0, but it has the value of 4.6 in the world_1. This many-world option allows us to simulate a large number of alternatives when searching for an optimal solution without stopping the data collection.