devs-eval-2026/DEVS-Eval huggingface dataset:
Task (Elaboration / Additional Code): Implemente deletionOperator: remove o constituinte e seu gerador de estímulos, atualiza listas e sincroniza o modelo.
Solution: add additional code
<%
	public void deletionOperator(AtomicModel toRemove) {
		connections.clear();
		for(Coupling e : getParent().getCouplings()) {
			if(!e.getSource().getName().contains("StimuliGenerator") && !e.getDestination().getName().contains("DRC"))
				connections.add(new Connection((AtomicModelImpl) e.getSource(), e.getSourcePort(), (AtomicModelImpl)e.getDestination(), e.getDestinationPort()));
		}	
		constituents = initializeConstituents();
		this.toRemove = (AtomicModelImpl) toRemove;
		removeConstituent((AtomicModelImpl) toRemove);
		if(toRemove instanceof Mediator4)
			transmitters.remove(toRemove);
		if(toRemove instanceof CrowdGateway1)
			crowdGateways.remove(toRemove);
		if(toRemove instanceof Mediator3)
			transmitters.remove(toRemove);
		if(toRemove instanceof Drone4)
			drones.remove(toRemove);
		if(toRemove instanceof Drone3)
			drones.remove(toRemove);
		if(toRemove instanceof Drone2)
			drones.remove(toRemove);
		if(toRemove instanceof Drone1)
			drones.remove(toRemove);
		if(toRemove instanceof CrowdMediator1)
			crowdTransmitters.remove(toRemove);
		if(toRemove instanceof CrowdMediator2)
			crowdTransmitters.remove(toRemove);
		if(toRemove instanceof Crowd1)
			crowds.remove(toRemove);
		if(toRemove instanceof Crowd2)
			crowds.remove(toRemove);
		if(toRemove instanceof Sensor4)
			sensors.remove(toRemove);
		if(toRemove instanceof DroneMediator1)
			droneTransmitters.remove(toRemove);
		if(toRemove instanceof DroneMediator2)
			droneTransmitters.remove(toRemove);
		if(toRemove instanceof Sensor2)
			sensors.remove(toRemove);
		if(toRemove instanceof DroneBasis1)
			droneBasiss.remove(toRemove);
		if(toRemove instanceof Sensor3)
			sensors.remove(toRemove);
		if(toRemove instanceof DroneBasis2)
			droneBasiss.remove(toRemove);
		if(toRemove instanceof Mediator2)
			transmitters.remove(toRemove);
		if(toRemove instanceof Sensor1)
			sensors.remove(toRemove);
		if(toRemove instanceof Mediator1)
			transmitters.remove(toRemove);
		if(toRemove instanceof Gateway)
			gateways.remove(toRemove);
		if(toRemove instanceof DroneMediator3)
			droneTransmitters.remove(toRemove);
		if(toRemove instanceof DroneMediator4)
			droneTransmitters.remove(toRemove);
		
		AtomicModel sg = null;
		for(AtomicModel e : getParent().getChildren()) {
			if(e.getName().equals("StimuliGenerator" + toRemove.getName())) {
				sg = e;
				break;
			}
		}
		if(sg != null) {
			getParent().removeChildModel(sg);
			mS4MESimulationInterface.finalizeConstituent((AtomicModelImpl) sg);
		}	
		syncModel();
	}
%>!
Task (Elaboration / Additional Code): Implement reorganizationOperator: remove mediators and randomly redistribute constituents among gateways/bases.
Solution: add additional code
<%
	public void reorganizationOperator() {
		connections.clear();
		for(Coupling e : getParent().getCouplings()) {
			if(!e.getSource().getName().contains("StimuliGenerator") && !e.getDestination().getName().contains("DRC"))
				connections.add(new Connection((AtomicModelImpl) e.getSource(), e.getSourcePort(), (AtomicModelImpl)e.getDestination(), e.getDestinationPort()));
		}	
		constituents = initializeConstituents();
		if(flagAddData) {
			constituents = initializeConstituents();
			if(originalConstituents == null) {
				originalConstituents = initializeConstituents();
			}
			connections = initializeConnections();
			flagAddData = false;
			
		}
		removeMediators();
		ArrayList<AtomicModelImpl> aux = new ArrayList<AtomicModelImpl>();
		Random rand = new Random();
		connections.clear();
		int s;
		
		aux.clear();
		for(AtomicModelImpl e : sensors)
			if(!aux.contains(e))
				aux.add(e);
		s = gateways.size();
		for(AtomicModelImpl e : gateways) {
			if(aux.size() == 0) {
				break;
			}
			int i = ((aux.size() - s)  > 0) ? (rand.nextInt(aux.size() - s--) + 1) : 1;
			if(i == 0)
				i = 1;
			for(; i > 0; i--) {
				int j = rand.nextInt(aux.size());
				recConnectionAdd(aux.get(j), e);
				aux.remove(aux.get(j));
			}
		}
		while(aux.size() > 0) {
			int j = rand.nextInt(aux.size());
			addConstituentSensor(aux.get(j), false);
			aux.remove(aux.get(j));
		}
		aux.clear();
		for(AtomicModelImpl e : crowds)
			if(!aux.contains(e))
				aux.add(e);
		s = crowdGateways.size();
		for(AtomicModelImpl e : crowdGateways) {
			if(aux.size() == 0) {
				break;
			}
			int i = ((aux.size() - s)  > 0) ? (rand.nextInt(aux.size() - s--) + 1) : 1;
			if(i == 0)
				i = 1;
			for(; i > 0; i--) {
				int j = rand.nextInt(aux.size());
				recConnectionAdd(aux.get(j), e);
				aux.remove(aux.get(j));
			}
		}
		while(aux.size() > 0) {
			int j = rand.nextInt(aux.size());
			addConstituentCrowd(aux.get(j), false);
			aux.remove(aux.get(j));
		}
		aux.clear();
		for(AtomicModelImpl e : drones)
			if(!aux.contains(e))
				aux.add(e);
		s = droneBasiss.size();
		for(AtomicModelImpl e : droneBasiss) {
			if(aux.size() == 0) {
				break;
			}
			int i = ((aux.size() - s)  > 0) ? (rand.nextInt(aux.size() - s--) + 1) : 1;
			if(i == 0)
				i = 1;
			for(; i > 0; i--) {
				int j = rand.nextInt(aux.size());
				recConnectionAdd(aux.get(j), e);
				aux.remove(aux.get(j));
			}
		}
		while(aux.size() > 0) {
			int j = rand.nextInt(aux.size());
			addConstituentDrone(aux.get(j), false);
			aux.remove(aux.get(j));
		}
		syncModel();
	}
%>!
Task (Elaboration / Additional Code): Implement verifyToConnectModel: validates if the pair of types (e.g., Sensor-Gateway) is compatible for connection.
Solution: add additional code 
<%
	private boolean verifyToConnectModel(AtomicModelImpl a1, AtomicModelImpl a2) {
		if(a1 == null || a2 == null)
			return false;
		if(getTypeCons(a1).equals("Sensor")&&getTypeCons(a2).equals("Sensor")) {
			return true;
		}
		else if(getTypeCons(a1).equals("Sensor")&&getTypeCons(a2).equals("Gateway")) {
			return true;
		}
		else if(getTypeCons(a1).equals("Gateway")&&getTypeCons(a2).equals("Sensor")) {
			return true;
		}
		else if(getTypeCons(a1).equals("Drone")&&getTypeCons(a2).equals("DroneBasis")) {
			return true;
		}
		else if(getTypeCons(a1).equals("DroneBasis")&&getTypeCons(a2).equals("Drone")) {
			return true;
		}
		else if(getTypeCons(a1).equals("Crowd")&&getTypeCons(a2).equals("CrowdGateway")) {
			return true;
		}
		else if(getTypeCons(a1).equals("CrowdGateway")&&getTypeCons(a2).equals("Crowd")) {
			return true;
		}
		return false;
	}
%>!
Task (Elaboration / Additional Code): Implement recConnectionAdd: creates bidirectional couplings between two models via a mediator and notifies the simulation.
Solution: add additional code <% private void recConnectionAdd(AtomicModelImpl a1, AtomicModelImpl a2) { AtomicModelImpl m = getCompatibleMediator(a1,a2); holdInInitialState(a1); holdInInitialState(a2); if(getTypeCons(a1).equals("Sensor")&&getTypeCons(a2).equals("Sensor")) { parent.addCoupling(a1.getOutputPort("outMeasure"), m.getInputPort("inMeasure")); mS4MESimulationInterface.newLink(...); connections.add(...); ... } ... } %>!
Task (Elaboration / Additional Code): Implement removeMediators: identifies mediator models, removes them from the system, and clears the transmitter lists.
Solution: add additional code <% private void removeMediators() { ArrayList<AtomicModelImpl> aux = new ArrayList<AtomicModelImpl>(); for(AtomicModelImpl e : constituents) { if(getIsMediator(a)) aux.add(a); } for(AtomicModelImpl e : aux) { constituents.remove(e); parent.removeChildModel(e); mS4MESimulationInterface.finalizeConstituent(e); } transmitters.clear(); crowdTransmitters.clear(); droneTransmitters.clear(); } %>!
Task (Elaboration / Additional Code): Implement initializeConstituents: it goes through the children of the parent model and catalogs all known atomic models.
Solution: add additional code <% private ArrayList initializeConstituents() { ... if(e instanceof Sensor1) ... } %>!
Task (Elaboration / Additional Code): Declare the private inner class Connection with four public fields (outClass, outPort, inClass, inPort) and a constructor that initializes them, to represent a coupling between two atomic models.
Solution: add additional code <% private class Connection { public AtomicModelImpl outClass; public Port<?> outPort; public AtomicModelImpl inClass; public Port<?> inPort; public Connection(AtomicModelImpl outClass, Port<?> outPort, AtomicModelImpl inClass, Port<?> inPort) { this.inPort = inPort; this.inClass = inClass; this.outPort = outPort; this.outClass = outClass; } } %>!
Task (Elaboration / Additional Code): Implement getTypeCons(AtomicModelImpl a) and getIsMediator(AtomicModelImpl a): for each of the 23 types of constituents, cast and return the value of the corresponding public field (typeCons or isMediator).
Solution: add additional code <% public String getTypeCons(AtomicModelImpl a) { if(a instanceof Sensor1) { Sensor1 b = (Sensor1) a; return b.typeCons; } ... return ""; } private Boolean getIsMediator(AtomicModelImpl a) { if(a instanceof Sensor1) { Sensor1 b = (Sensor1) a; return b.isMediator; } ... return false; } %>!
Task (Elaboration / Additional Code): Implement syncModel: generates .sosadl file with the updated architecture and increments the synchronization counter.
Solution: add additional code
<%
	private void syncModel() {
		try{
			ArrayList<Connection> aux = new ArrayList<Connection>();
			LinkedHashMap<String,String> map = aux3SyncModel();
			if(!new File("Model").exists()) {
				new File("Model").mkdir();
			}
			
			connections.clear();
			for(Coupling a : getParent().getCouplings()) {
				Connection e = new Connection((AtomicModelImpl)a.getSource(), a.getSourcePort(), (AtomicModelImpl)a.getDestination(), a.getDestinationPort());
				if ( !( e.inPort.getName().contains("Checked") || e.outClass.getName().contains("StimuliGenerator") || e.inPort.getName().contains("Remove"))) { 
					if(e != null && e.inClass != null && e.outClass != null && e.inPort != null && e.outPort != null) {
						connections.add(e);
					}
				} 
			}
			
			BufferedWriter writer = new BufferedWriter(new FileWriter(getModelsDirectory2().getAbsolutePath() + "/sosadl/"+ getName().replace("DRC","")+"REC"+Integer.toString(syncCount)+".sosadl"));
			
			writer.write(aux1SyncModel());
			writer.newLine();
			for(AtomicModel e : getParent().getChildren()) {
				if(!e.getName().contains("StimuliGenerator") && !e.getName().contains("DRC") && !e.getName().contains("ExOp") ) {
					writer.write("			" + e.getName() + " is " + getTypeCons((AtomicModelImpl)e));
					writer.newLine();
				}
			}
			
			writer.write("		}");
			writer.newLine();
			
			writer.write("		binding{");
			writer.newLine();
			writer.flush();
			for(Connection e : connections) {
				writer.write("			unify one{ " + e.outClass.getName()+((map.containsKey(getTypeCons(e.outClass).toUpperCase()+e.outPort.getName().replaceFirst("out","").toUpperCase()))?"::"+map.get(getTypeCons(e.outClass).toUpperCase()+e.outPort.getName().replaceFirst("out","").toUpperCase()):"")+"::"+e.outPort.getName().replaceFirst("out","") + "} to one {" + e.inClass.getName()+((map.containsKey(getTypeCons(e.inClass).toUpperCase()+e.inPort.getName().replaceFirst("in","").toUpperCase()))?"::"+map.get(getTypeCons(e.inClass).toUpperCase()+e.inPort.getName().replaceFirst("in","").toUpperCase()):"")+"::" + e.inPort.getName().replaceFirst("in","")+ "}" + ((connections.indexOf(e) != connections.size()-1)? " and": ""));
				writer.newLine();
				
			} 
			
			writer.write(aux2SyncModel());
			writer.newLine();
			
			connections.addAll(aux);
			writer.close();
			syncCount++;
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
Task (Elaboration / Additional Code): Implement aux3SyncModel: maps internal port types to semantic names (e.g., "SENSORSENSE" → "measurement").
Solution: 	private LinkedHashMap<String,String> aux3SyncModel() {
		LinkedHashMap<String,String> a = new LinkedHashMap<String,String>();
		a.put("SENSORSENSE","measurement");
		a.put("SENSORMEASURE","measurement");
		a.put("SENSORPOWERTHRESHOLD","energy");
		a.put("SENSORPOWERLEVEL","energy");
		a.put("SENSORCOORDINATE","location");
		a.put("GATEWAYMEASURE","notification");
		a.put("GATEWAYALERT","notification");
		a.put("GATEWAYCOORDINATE","location");
		a.put("GATEWAYDEPTH","request");
		a.put("CROWDPOWERLEVEL","battery");
		a.put("CROWDVISUALPERCEPTION","percept");
		a.put("CROWDCAPTURE","photo");
		a.put("CROWDCOORDINATE","location");
		a.put("CROWDGATEWAYVISUALPERCEPTION","percept");
		a.put("CROWDGATEWAYCAPTURE","photo");
		a.put("CROWDGATEWAYALERT","photo");
		a.put("DRONEWATER","measurement");
		a.put("DRONEPOWERLEVEL","battery");
		a.put("DRONERECHARGE","battery");
		a.put("DRONECOORDINATE","location");
		a.put("DRONECAPTURE","photo");
		a.put("DRONEBASISPOWERLEVEL","battery");
		a.put("DRONEBASISRECHARGE","battery");
		a.put("DRONEBASISCAPTURE","photo");
		a.put("DRONEBASISCOORDINATE","location");
		a.put("TRANSMITTERMEASURE","transmit");
		a.put("TRANSMITTERCOORDINATE","location");
		a.put("CROWDTRANSMITTERCAPTURE","transmit");
		a.put("CROWDTRANSMITTERVISUALPERCEPTION","transmit");
		a.put("DRONETRANSMITTERCAPTURE","transmit");
		a.put("DRONETRANSMITTERRECHARGE","transmit");
		return a;
	}
Task (Elaboration / External Event): Upon receiving WriteData: generates a CSV of results, calculates times, and ensures that each constituent saves its own data.
Solution: external event for w8AddOrRemove with WriteData
<%
	new File("Result").mkdir();
	try{
		BufferedWriter writer = new BufferedWriter(new FileWriter("Result/Result.csv",true));
		writer.write(" Sensor: "+ Integer.toString(contRecSensor-1+4)+";"+" Gateway: "+ Integer.toString(contRecGateway-1+1)+";"+" Crowd: "+ Integer.toString(contRecCrowd-1+2)+";"+" CrowdGateway: "+ Integer.toString(contRecCrowdGateway-1+1)+";"+" Drone: "+ Integer.toString(contRecDrone-1+4)+";"+" DroneBasis: "+ Integer.toString(contRecDroneBasis-1+2) + ";");
		simulationTime = System.currentTimeMillis() - simulationTime;
		writer.write("Simulation time in Millis: = " + Long.toString(simulationTime) + ";");
		simulationTime = System.currentTimeMillis();
		writer.newLine();
		writer.close();
	} catch(Exception e) {}
	for(AtomicModelImpl e : constituents) {
		if(e instanceof DroneBasis2) {
			DroneBasis2 aux = (DroneBasis2) e;
			aux.writeCountersData();
		}
		if(e instanceof DroneBasis1) {
			DroneBasis1 aux = (DroneBasis1) e;
			aux.writeCountersData();
		}
		if(e instanceof CrowdGateway1) {
			CrowdGateway1 aux = (CrowdGateway1) e;
			aux.writeCountersData();
		}
		if(e instanceof Gateway) {
			Gateway aux = (Gateway) e;
			aux.writeCountersData();
		}
		if(e instanceof Crowd1) {
			Crowd1 aux = (Crowd1) e;
			aux.writeCountersData();
		}
		if(e instanceof Crowd2) {
			Crowd2 aux = (Crowd2) e;
			aux.writeCountersData();
		}
		if(e instanceof Drone4) {
			Drone4 aux = (Drone4) e;
			aux.writeCountersData();
		}
		if(e instanceof Drone3) {
			Drone3 aux = (Drone3) e;
			aux.writeCountersData();
		}
		if(e instanceof Drone2) {
			Drone2 aux = (Drone2) e;
			aux.writeCountersData();
		}
		if(e instanceof Drone1) {
			Drone1 aux = (Drone1) e;
			aux.writeCountersData();
		}
		if(e instanceof Sensor4) {
			Sensor4 aux = (Sensor4) e;
			aux.writeCountersData();
		}
		if(e instanceof Sensor2) {
			Sensor2 aux = (Sensor2) e;
			aux.writeCountersData();
		}
		if(e instanceof Sensor3) {
			Sensor3 aux = (Sensor3) e;
			aux.writeCountersData();
		}
		if(e instanceof Sensor1) {
			Sensor1 aux = (Sensor1) e;
			aux.writeCountersData();
		}
	}
%>!
Task (Elaboration / Variables): Declare six integer counters: countpowerThreshold, countCoordinateReceived, countWaterReceived, countwaterThreshold, countCaptureReceived and countRechargeReceived.
Solution: use countpowerThreshold with type int!
use countCoordinateReceived with type int!
use countWaterReceived with type int!
use countwaterThreshold with type int!
use countCaptureReceived with type int!
use countRechargeReceived with type int!
use mS4MESimulationInterface with type MS4MESimulationInterface!
Task (Protocol / Port Configuration): Set up the drone to accept Water, PowerLevel, Recharge, Coordinate, Capture and generate output in Recharge and Capture.
Solution: accepts input on Water with type WaterDepth!							
accepts input on PowerLevel with type PowerLevel!							
generates output on Recharge with type PowerLevel!	        			
accepts input on Recharge with type PowerLevel!							
accepts input on Coordinate with type DroneCoordinate!							
accepts input on Capture with type Image!							
generates output on Capture with type Image!
Task (FDDEVS / Branching State Machine): Define s0→s1→s2→s3. s3 branches: true branch (Coordinate/Water at s4/s5) and false branch (Recharge at s10/s11), converging back to s2.
Solution: to start 
hold in s0 for time 1!
from s0 go to s1! //UNOBSERVABLE : FIXME: system/mediator/architecture parameters may change this guard! 	
hold in s1 for time 1!
from s1 go to s2! //UNOBSERVABLE : Valuing 	
hold in s2 for time 1!
from s2 go to s3! //UNOBSERVABLE :  	
hold in s3 for time 1!
from s3 go to s4! //UNOBSERVABLE : IfThenElseBehavior (true case) 	
passivate in s4!
when in s4 and receive Coordinate go to s5!
passivate in s5!
when in s5 and receive Water go to s6!
hold in s6 for time 1!
from s6 go to s7! //UNOBSERVABLE : IfThenElseBehavior (true case) 	
passivate in s7!
when in s7 and receive Capture go to s8!
hold in s8 for time 1!
after s8 output Capture!
from s8 go to s9!		
from s3 go to s10! //UNOBSERVABLE : IfThenElseBehavior (false case) 	
hold in s10 for time 1!
after s10 output Recharge!
from s10 go to s11!		
passivate in s11!
when in s11 and receive Recharge go to s12!
hold in s9 for time 1!
from s9 go to s2! //UNOBSERVABLE : Repeat loop 	
hold in s12 for time 1!
from s12 go to s2! //UNOBSERVABLE : Repeat loop
Task (Elaboration / Non-deterministic): In s3, if powerLevel > powerThreshold, increment the counter and go to s4; otherwise (explicit negation), go to s10.
Solution: internal event for s3
<%
if(powerLevel.getValue() > powerThreshold.getValue()) {
	countpowerThreshold++;
	passivateIn("s4");
}
if(!(powerLevel.getValue() > powerThreshold.getValue())) {
	holdIn("s10",1.0);
}
%>!
Task (Elaboration / Non-deterministic): In the internal event of s6, check waterDepth against waterThreshold: if greater, go to s7; otherwise, go to s9 for 1 unit.
Solution: internal event for s6
<%
if(waterDepth.getValue() > waterThreshold.getValue()) {
	countwaterThreshold++;
	passivateIn("s7");
}
else {
	holdIn("s9",1.0);
}
%>!
Task (Elaboration / Tagged Block (Init)): In the internal event of s1, instantiate the thresholds: PowerThreshold (20) and WaterThreshold (300).
Solution: internal event for s1 <% powerThreshold = new PowerThreshold(new Integer(20)); waterThreshold = new WaterThreshold(new Integer(300)); %>!
Task (Elaboration / External Event): In state s5, upon receiving Water, increment the counter, record the rendezvous using .value, and store the data.
Solution: external event for s5 with Water
<%
countWaterReceived++;
mS4MESimulationInterface.rendezvous(messageList.get(0).getMessageTrace().getPort(), 
	inWater,
	messageList.get(0).getData().value);
waterDepth = messageList.get(0).getData();
%>!
Task (Elaboration / External Event): In state s11, upon receiving Recharge, increment the counter, log the rendezvous using .value, and store the powerLevel.
Solution: external event for s11 with Recharge
<%
countRechargeReceived++;
mS4MESimulationInterface.rendezvous(messageList.get(0).getMessageTrace().getPort(), 
	inRecharge,
	messageList.get(0).getData().value);
powerLevel = messageList.get(0).getData();
%>!
Task (Elaboration / Tagged Block (Output)): In the exit event of state s10, add the powerLevel object to the outRecharge port.
Solution: output event for s10 <% output.add(outRecharge, powerLevel); %>!
Task (Elaboration / Additional Code): Declare the model metadata: isMediator = false and typeCons = "Drone".
Solution: add additional code <% public final boolean isMediator = false; public final String typeCons = "Drone"; %>!
Task (Elaboration / Additional Code): Implement writeCountersData() by writing the six counters to the CSV and resetting them individually after writing.
Solution: add additional code
<%
	private File getSrcModelsDirectory() {
		URI dirUri = null;
		File dir = null;
		try {
			dirUri = this.getClass().getResource(".").toURI();
			dir = new File(dirUri);
		} catch (URISyntaxException e) {
		}
		while (dir != null && dir.getParentFile() != null) {
			if (dir.getName().equalsIgnoreCase("bin")) {
				return new File(dir.getParentFile(), "src/Models");
			}
			dir = dir.getParentFile();
		}
		return null;
	}
	public void writeCountersData() {
		String dirPath = getSrcModelsDirectory().getAbsolutePath() + "/result";
		
		if(!new File(dirPath).exists()) {
		new File(dirPath).mkdir();
	}
	try{
		BufferedWriter writer = new BufferedWriter(new FileWriter(dirPath + "/Result.csv",true));
		writer.write(getName() + ";");
		writer.write("countCoordinateReceived = " + Integer.toString(countCoordinateReceived) + ";");
		countCoordinateReceived = 0;
		writer.write("countWaterReceived = " + Integer.toString(countWaterReceived) + ";");
		countWaterReceived = 0;
		writer.write("countCaptureReceived = " + Integer.toString(countCaptureReceived) + ";");
		countCaptureReceived = 0;
		writer.write("countRechargeReceived = " + Integer.toString(countRechargeReceived) + ";");
		countRechargeReceived = 0;
		writer.write("countpowerThreshold = " + Integer.toString(countpowerThreshold) + ";");
		countpowerThreshold = 0;
		writer.write("countwaterThreshold = " + Integer.toString(countwaterThreshold) + ";");
		countwaterThreshold = 0;
		writer.newLine();
		writer.close();
	}catch(Exception e) {}
	}
%>!
Task (FDDEVS / Dynamic Removal): Set the model to accept the Remove message in states s0 to s12, always transitioning to the RemoveC state.
Solution: when in s0 and receive Remove go to RemoveC!
when in s1 and receive Remove go to RemoveC!
when in s2 and receive Remove go to RemoveC!
when in s3 and receive Remove go to RemoveC!
when in s4 and receive Remove go to RemoveC!
when in s5 and receive Remove go to RemoveC!
when in s6 and receive Remove go to RemoveC!
when in s7 and receive Remove go to RemoveC!
when in s8 and receive Remove go to RemoveC!
when in s9 and receive Remove go to RemoveC!
when in s10 and receive Remove go to RemoveC!
when in s11 and receive Remove go to RemoveC!
when in s12 and receive Remove go to RemoveC!
Task (FDDEVS / Multi-Trigger State): Define state s5 as passive with two alternative external transitions: upon receiving Capture, go to s6; upon receiving Recharge, go to s7, emit output and proceed to s8.
Solution: passivate in s5!
when in s5 and receive Water go to s6!
hold in s6 for time 1!
from s6 go to s7! //UNOBSERVABLE : IfThenElseBehavior (true case)         
passivate in s7!
when in s7 and receive Capture go to s8!
hold in s8 for time 1!
after s8 output Capture!
Task (Elaboration / Data Type): Define a composite object MeasureData (coordinate and depth) and declare the corresponding variable, as well as a localBase list of type ArrayList<MeasureData>.
Solution: A MeasureData has coordinate and depth! the range of MeasureData's coordinate is SensorCoordinate! the range of MeasureData's depth is Depth! use measureData with type MeasureData! use localBase with type java.util.ArrayList<MeasureData>!