Skip to content

Creating a simulation, part 5. simulate monitoring

vitorsouza edited this page Nov 14, 2012 · 3 revisions

In the [previous part](Creating a simulation, part 4. Simulation initialization), we implemented proper initialization of our simulations, which means that now Zanshin already knows the requirements of our target system. In this step, we will simulate the monitoring part of the feedback loop.

Imagine someone is using our system, attempts to satisfy some requirement but the system fails. This information is somehow sent to Zanshin (the target system has probes to detect this) and the framework can, thus, conclude when one of the system's AwReqs have failed, which should trigger some kind of adaptation (we will deal with the adaptation part of the loop [later](Creating a simulation, part 6. Simulate adaptation)).

Let's see how we can simulate this for the Meeting Scheduler. Recalling our simulation cases, described in [part 2](Creating a simulation, part 2. The model) of the tutorial:

  1. AR1 specifies that task Characterize Meeting should never fail. At runtime, this task fails and AR1's adaptation strategies are to retry the task in 5 seconds (applicable at most twice per user session) or, if that fails, abort;

  2. AR4 is also a "never fail" AwReq, but targeting goal Find a suitable room. At runtime, one of its descendant leaf elements fails, propagating the failure also to the goal. AR4's adaptation strategy is to use reconfiguration.

First simulation: AR1 and task Characterize meeting

For the monitoring part of this simulation to work, we make some changes in class SchedulerAR1FailureSimulation, specifically in the first part of the simulation. In the listing below, we show the part of the code (inside method doInit(), right after the target system is registered) that has been changed:

		// Adds the first part of the simulation to the list.
		parts.add(new SimulationPart() {
			@Override
			public boolean shouldWait() {
				return false;
			}
			
			@Override
			public void run() throws Exception {
				// Creates a user session, as if someone were using the Meeting Scheduler.
				sessionId = zanshin.createUserSession(targetSystemId);
				log.info("Created a new user session with id: {0}", sessionId); //$NON-NLS-1$

				// Simulates a failure in task "Characterize meeting".
				log.info("Meeting organizer tries to Characterize meeting but it fails!"); //$NON-NLS-1$
				zanshin.logRequirementStart(targetSystemId, sessionId, T_CHARACT_MEET);
				zanshin.logRequirementFailure(targetSystemId, sessionId, T_CHARACT_MEET);
			}
		});

Notice that we refer to an attribute that doesn't yet exist: log. This is supposed to be the specific logger for this class, which can be created very easily with the following code (to be added as a class attribute): private static final Logger log = new Logger(SchedulerAR1FailureSimulation.class);.

Moreover, notice also that inside the run() method of the simulation part (to be called by the Simulation Manager when this simulation is executed), we use the instance of the ZanshinRemote class (explained [previously](Creating a simulation, part 4. Simulation initialization)) to create a user session and send logging information about the task Characterize meeting: it was started by the user, but then it failed.

To refer to this particular class, we use the constant T_CHARACT_MEET. The use of string constants instead of repeating the string whenever necessary helps reducing the amount of errors because of typos. Since multiple simulations might refer to the same requirements, it makes sense to define these constants in the superclass, i.e., AbstractSchedulerSimulation:

/** Beginning of the class... */

public abstract class AbstractSchedulerSimulation extends AbstractSimulation {
	/** Some attributes... */

	protected static final String T_CHARACT_MEET = "T_CharactMeet"; //$NON-NLS-1$
	
	/** Rest of the class... */
}

When Zanshin receives this logging information from the target system about changes of state in the life-cycle of one of the system's requirements (associated with a particular user session), it checks if that change of state results in an AwReq failure (actually, an AwReq change of state, success is also monitored) and, in this case, activates the adaptation procedure. If you run the simulation after you make these changes, you might see something like this in Zanshin's log:

[zanshin.controller       ] DEBUG: Received remote request to create a new user session for target system scheduler...
[zanshin.core             ] DEBUG: Reading a (meta-)model file from location: file:/Applications/eclipse-rcp-4.2/Eclipse.app/Contents/MacOS/workspace/scheduler/model/model.scheduler
[zanshin.controller       ] INFO: Successfully created a new user session for target system scheduler: 1,352,905,022,110
[zanshin.controller       ] DEBUG: Received log for life-cycle method call in session scheduler/1,352,905,022,110: T_CharactMeet.START()
[zanshin.core             ] DEBUG: Requirement started: T_CharactMeet (it.unitn.disi.zanshin.model.scheduler.impl.T_CharactMeetImpl@49c2ebcc (refinementType: and) (time: null, state: undefined) (startTime: null))
[zanshin.core             ] DEBUG: Requirement started: G_SchedMeet (it.unitn.disi.zanshin.model.scheduler.impl.G_SchedMeetImpl@1c06c3e9 (refinementType: and) (time: null, state: undefined) (startTime: null))
[zanshin.monitoring       ] INFO: Processing method call: start / T_CharactMeet
[zanshin.monitoring       ] INFO: Processing method call: start / G_SchedMeet
[zanshin.controller       ] DEBUG: Received log for life-cycle method call in session scheduler/1,352,905,022,110: T_CharactMeet.FAIL()
[zanshin.core             ] DEBUG: Requirement failed: T_CharactMeet (it.unitn.disi.zanshin.model.scheduler.impl.T_CharactMeetImpl@49c2ebcc (refinementType: and) (time: null, state: started) (startTime: null))
[zanshin.core             ] DEBUG: Requirement ended: T_CharactMeet (it.unitn.disi.zanshin.model.scheduler.impl.T_CharactMeetImpl@49c2ebcc (refinementType: and) (time: null, state: failed) (startTime: null))
[zanshin.monitoring       ] INFO: Processing method call: fail / T_CharactMeet
[zanshin.core             ] DEBUG: Requirement failed: G_SchedMeet (it.unitn.disi.zanshin.model.scheduler.impl.G_SchedMeetImpl@1c06c3e9 (refinementType: and) (time: null, state: started) (startTime: null))
[zanshin.core             ] DEBUG: Requirement ended: G_SchedMeet (it.unitn.disi.zanshin.model.scheduler.impl.G_SchedMeetImpl@1c06c3e9 (refinementType: and) (time: null, state: failed) (startTime: null))
[zanshin.monitoring       ] INFO: Requirement T_CharactMeet has 1 AwReqs referring to it. Assuming all AwReqs are NeverFail and reporting AwReq state change: fail
[zanshin.adaptation       ] INFO: Processing state change: AR1 (ref. T_CharactMeet) -> failed
[zanshin.adaptation       ] INFO: (Session: AR1 / 2012-11-14 15:57:02.113) Created new session for AR1
[zanshin.adaptation       ] INFO: (Session: AR1 / 2012-11-14 15:57:02.113) The problem has not yet been solved...
[zanshin.core             ] INFO: (Session: AR1 / 2012-11-14 15:57:02.113) Strategy RetryStrategy is applicable.
[zanshin.adaptation       ] INFO: (Session: AR1 / 2012-11-14 15:57:02.113) Selected adaptation strategy: RetryStrategy
[zanshin.core             ] INFO: (Session: AR1 / 2012-11-14 15:57:02.113) Applying strategy RetryStrategy(true; 5000)...
[zanshin.controller       ] DEBUG: RMI Target System Controller forwarding instruction: copy-data(iT_CharactMeet, iT_CharactMeet)
[zanshin.core             ] DEBUG: Replacing requirement instances of class T_CharactMeet (it.unitn.disi.zanshin.model.scheduler.impl.T_CharactMeetImpl@49c2ebcc (refinementType: and) (time: null, state: failed) (startTime: null) -> it.unitn.disi.zanshin.model.scheduler.impl.T_CharactMeetImpl@28045f (refinementType: and) (time: null, state: undefined) (startTime: null))
[zanshin.controller       ] DEBUG: RMI Target System Controller forwarding instruction: terminate(iT_CharactMeet)
[zanshin.controller       ] DEBUG: RMI Target System Controller forwarding instruction: rollback(iT_CharactMeet)
[zanshin.controller       ] DEBUG: RMI Target System Controller forwarding instruction: wait(5,000)
[zanshin.controller       ] DEBUG: RMI Target System Controller forwarding instruction: initiate(iT_CharactMeet)
[zanshin.adaptation       ] INFO: (Session: AR1 / 2012-11-14 15:57:02.113) The problem has not yet been solved...
[zanshin.core             ] DEBUG: Replacing requirement instances of class AR1 (it.unitn.disi.zanshin.model.scheduler.impl.AR1Impl@d103dac (refinementType: and) (time: null, state: failed) (incrementCoefficient: 1.0) -> it.unitn.disi.zanshin.model.scheduler.impl.AR1Impl@313f1351 (refinementType: and) (time: null, state: undefined) (incrementCoefficient: 1.0))
[zanshin.core             ] DEBUG: The status of G_SchedMeet has been reset to undefined
[zanshin.core             ] DEBUG: Method AdaptationStrategyImpl.updateReferences() has been called, indicating it has not been overridden by the subclass RetryStrategy. Make sure this is on purpose...
[zanshin.monitoring       ] INFO: Processing method call: end / T_CharactMeet
[zanshin.monitoring       ] INFO: Processing method call: fail / G_SchedMeet
[zanshin.monitoring       ] INFO: Processing method call: end / G_SchedMeet

As you can see above, Zanshin will (again, this is just if you're curious, no need to know this to implement simulations):

  1. Create a new user session, loading an instance of the target system's model from its internal project;
  2. Receive the notification about change of state of one of the requirements, retrieve that requirement from the model that was just loaded and call the appropriate life-cycle method in that requirement instance;
  3. The life-cycle method call notifies the monitoring service, which checks if there was an AwReq failure because of it (currently, only never fail AwReqs are supported);
  4. If an AwReq does fail, the monitoring service notifies the adaptation service, which runs the ECA-based adaptation procedure looking for applicable strategies;
  5. Finding one, it executes the applicable strategy, which results in sending adaptation instructions back to the target system.

On the other side of the remote invocation, our target system should acknowledge having received the adaptation instructions, as below:

INFO: Running simulation: Meeting Scheduler Simulation - AR1 Failure - "Characterize meeting", instance
INFO: Created a new user session with id: 1,352,905,022,110
INFO: Meeting organizer tries to Characterize meeting but it fails!
INFO: Simulated target system received EvoReq operation from Zanshin: copy-data(T_CharactMeet, T_CharactMeet) [session: 1,352,905,022,110]
INFO: Simulated target system received EvoReq operation from Zanshin: terminate(T_CharactMeet) [session: 1,352,905,022,110]
INFO: Simulated target system received EvoReq operation from Zanshin: rollback(T_CharactMeet) [session: 1,352,905,022,110]
INFO: Simulated target system received EvoReq operation from Zanshin: wait(5,000) [session: 1,352,905,022,110]
INFO: Simulated target system received EvoReq operation from Zanshin: initiate(T_CharactMeet) [session: 1,352,905,022,110]
INFO: (Meeting Scheduler Simulation - AR1 Failure - "Characterize meeting", instance) Simulation has finished (no more parts to run).

Responding to such instructions is the topic of the [next part](Creating a simulation, part 6. Simulate adaptation) of the tutorial. Before, however, let's take a look at our other simulation.

Second simulation: AR4 and goal Find a suitable room

If you analyzed Zanshin's log for the previous simulation, you may have noticed that when we notified the framework that a task (in our case, T_CharactMeet) has been started, Zanshin propagated the start to its parent (G_SchedMeet). The framework's base meta-model (the gore package) contains rules for propagating all life-cycle methods, including verifying if a goal has been satisfied or denied depending on its refinement type ( AND or OR ).

In this next simulation, we will see that in action again in a more interesting setting. The goal that is the target of our AwReq AR4 has a somewhat large subtree, being AND-refined into a sub-goal and two tasks. To make this goal fail, we will need to make all of its children fail. This is accomplished by the following code (again, we show only the part of the doInit() method of class SchedulerAR4FailureSimulation after the system has been registered):

		// Adds the first part of the simulation to the list.
		parts.add(new SimulationPart() {
			@Override
			public boolean shouldWait() {
				return false;
			}
			
			@Override
			public void run() throws Exception {
				// Creates a user session, as if someone were using the A-CAD.
				sessionId = zanshin.createUserSession(targetSystemId);
				log.info("Created a new user session with id: {0}", sessionId); //$NON-NLS-1$

				// Simulates a failure of goal "Find a suitable room".
				log.info("No rooms available and both partner and hotels fail!"); //$NON-NLS-1$
				zanshin.logRequirementStart(targetSystemId, sessionId, D_LOCAL_AVAIL);
				zanshin.logRequirementFailure(targetSystemId, sessionId, D_LOCAL_AVAIL);
				zanshin.logRequirementStart(targetSystemId, sessionId, T_CALL_PARTNER);
				zanshin.logRequirementFailure(targetSystemId, sessionId, T_CALL_PARTNER);
				zanshin.logRequirementStart(targetSystemId, sessionId, T_CALL_HOTEL);
				zanshin.logRequirementFailure(targetSystemId, sessionId, T_CALL_HOTEL);
				
				// Ends the user session.
				zanshin.disposeUserSession(targetSystemId, sessionId);
			}
		});
		
		// Adds the second part of the simulation to the list.
		parts.add(new SimulationPart() {
			@Override
			public boolean shouldWait() {
				return false;
			}
			
			@Override
			public void run() throws Exception {
				// Creates a user session, as if someone were using the A-CAD.
				sessionId = zanshin.createUserSession(targetSystemId);
				log.info("Created a new user session with id: {0}", sessionId); //$NON-NLS-1$

				// Simulates a failure of goal "Find a suitable room".
				log.info("No rooms available and both partner and hotels fail!"); //$NON-NLS-1$
				zanshin.logRequirementStart(targetSystemId, sessionId, D_LOCAL_AVAIL);
				zanshin.logRequirementFailure(targetSystemId, sessionId, D_LOCAL_AVAIL);
				zanshin.logRequirementStart(targetSystemId, sessionId, T_CALL_PARTNER);
				zanshin.logRequirementFailure(targetSystemId, sessionId, T_CALL_PARTNER);
				zanshin.logRequirementStart(targetSystemId, sessionId, T_CALL_HOTEL);
				zanshin.logRequirementFailure(targetSystemId, sessionId, T_CALL_HOTEL);
				
				// Ends the user session.
				zanshin.disposeUserSession(targetSystemId, sessionId);
			}
		});

By stating that the domain assumption Local rooms available failed, the failure is propagated up to its parent, the goal Use local room because that goal is AND-refined. It doesn't immediately propagate to Find a suitable room because it's OR-refined, but after both of its other children ( Call partner institution and Call hotels and convention centers ) also fail, the failure is propagated up, finally triggering AwReq AR4. Check below in the Meeting Scheduler's goal model that this should be the case and verify in the example log below that it is, in fact, the case:

Requirements model of the Meeting Scheduler system after the Zanshin approach was applied.

[zanshin.controller       ] DEBUG: Received remote request to create a new user session for target system scheduler...
[zanshin.core             ] DEBUG: Reading a (meta-)model file from location: file:/Applications/eclipse-rcp-4.2/Eclipse.app/Contents/MacOS/workspace/scheduler/model/model.scheduler
[zanshin.controller       ] INFO: Successfully created a new user session for target system scheduler: 1,352,907,025,641
[zanshin.controller       ] DEBUG: Received log for life-cycle method call in session scheduler/1,352,907,025,641: D_LocalAvail.START()
[zanshin.core             ] DEBUG: Requirement started: D_LocalAvail (it.unitn.disi.zanshin.model.scheduler.impl.D_LocalAvailImpl@7e8bb6c4 (refinementType: and) (time: null, state: undefined))
[zanshin.core             ] DEBUG: Requirement started: G_UseLocal (it.unitn.disi.zanshin.model.scheduler.impl.G_UseLocalImpl@616cb937 (refinementType: and) (time: null, state: undefined) (startTime: null))
[zanshin.core             ] DEBUG: Requirement started: G_FindRoom (it.unitn.disi.zanshin.model.scheduler.impl.G_FindRoomImpl@28f3fbd9 (refinementType: or) (time: null, state: undefined) (startTime: null))
[zanshin.core             ] DEBUG: Requirement started: G_SchedMeet (it.unitn.disi.zanshin.model.scheduler.impl.G_SchedMeetImpl@2a1b7890 (refinementType: and) (time: null, state: undefined) (startTime: null))
[zanshin.monitoring       ] INFO: Processing method call: start / D_LocalAvail
[zanshin.monitoring       ] INFO: Processing method call: start / G_UseLocal
[zanshin.monitoring       ] INFO: Processing method call: start / G_FindRoom
[zanshin.monitoring       ] INFO: Processing method call: start / G_SchedMeet
[zanshin.controller       ] DEBUG: Received log for life-cycle method call in session scheduler/1,352,907,025,641: D_LocalAvail.FAIL()
[zanshin.core             ] DEBUG: Requirement failed: D_LocalAvail (it.unitn.disi.zanshin.model.scheduler.impl.D_LocalAvailImpl@7e8bb6c4 (refinementType: and) (time: null, state: started))
[zanshin.core             ] DEBUG: Requirement ended: D_LocalAvail (it.unitn.disi.zanshin.model.scheduler.impl.D_LocalAvailImpl@7e8bb6c4 (refinementType: and) (time: null, state: failed))
[zanshin.monitoring       ] INFO: Processing method call: fail / D_LocalAvail
[zanshin.core             ] DEBUG: Requirement failed: G_UseLocal (it.unitn.disi.zanshin.model.scheduler.impl.G_UseLocalImpl@616cb937 (refinementType: and) (time: null, state: started) (startTime: null))
[zanshin.core             ] DEBUG: Requirement ended: G_UseLocal (it.unitn.disi.zanshin.model.scheduler.impl.G_UseLocalImpl@616cb937 (refinementType: and) (time: null, state: failed) (startTime: null))
[zanshin.monitoring       ] INFO: Processing method call: end / D_LocalAvail
[zanshin.monitoring       ] INFO: Processing method call: fail / G_UseLocal
[zanshin.monitoring       ] INFO: Processing method call: end / G_UseLocal
[zanshin.controller       ] DEBUG: Received log for life-cycle method call in session scheduler/1,352,907,025,641: T_CallPartner.START()
[zanshin.core             ] DEBUG: Requirement started: T_CallPartner (it.unitn.disi.zanshin.model.scheduler.impl.T_CallPartnerImpl@71884b88 (refinementType: and) (time: null, state: undefined) (startTime: null))
[zanshin.monitoring       ] INFO: Processing method call: start / T_CallPartner
[zanshin.controller       ] DEBUG: Received log for life-cycle method call in session scheduler/1,352,907,025,641: T_CallPartner.FAIL()
[zanshin.core             ] DEBUG: Requirement failed: T_CallPartner (it.unitn.disi.zanshin.model.scheduler.impl.T_CallPartnerImpl@71884b88 (refinementType: and) (time: null, state: started) (startTime: null))
[zanshin.core             ] DEBUG: Requirement ended: T_CallPartner (it.unitn.disi.zanshin.model.scheduler.impl.T_CallPartnerImpl@71884b88 (refinementType: and) (time: null, state: failed) (startTime: null))
[zanshin.monitoring       ] INFO: Processing method call: fail / T_CallPartner
[zanshin.monitoring       ] INFO: Processing method call: end / T_CallPartner
[zanshin.controller       ] DEBUG: Received log for life-cycle method call in session scheduler/1,352,907,025,641: T_CallHotel.START()
[zanshin.core             ] DEBUG: Requirement started: T_CallHotel (it.unitn.disi.zanshin.model.scheduler.impl.T_CallHotelImpl@2b1707f3 (refinementType: and) (time: null, state: undefined) (startTime: null))
[zanshin.monitoring       ] INFO: Processing method call: start / T_CallHotel
[zanshin.controller       ] DEBUG: Received log for life-cycle method call in session scheduler/1,352,907,025,641: T_CallHotel.FAIL()
[zanshin.core             ] DEBUG: Requirement failed: T_CallHotel (it.unitn.disi.zanshin.model.scheduler.impl.T_CallHotelImpl@2b1707f3 (refinementType: and) (time: null, state: started) (startTime: null))
[zanshin.core             ] DEBUG: Requirement ended: T_CallHotel (it.unitn.disi.zanshin.model.scheduler.impl.T_CallHotelImpl@2b1707f3 (refinementType: and) (time: null, state: failed) (startTime: null))
[zanshin.monitoring       ] INFO: Processing method call: fail / T_CallHotel
[zanshin.core             ] DEBUG: Requirement failed: G_FindRoom (it.unitn.disi.zanshin.model.scheduler.impl.G_FindRoomImpl@28f3fbd9 (refinementType: or) (time: null, state: started) (startTime: null))
[zanshin.monitoring       ] INFO: Processing method call: end / T_CallHotel
[zanshin.core             ] DEBUG: Requirement ended: G_FindRoom (it.unitn.disi.zanshin.model.scheduler.impl.G_FindRoomImpl@28f3fbd9 (refinementType: or) (time: null, state: failed) (startTime: null))
[zanshin.monitoring       ] INFO: Processing method call: fail / G_FindRoom
[zanshin.core             ] DEBUG: Requirement failed: G_SchedMeet (it.unitn.disi.zanshin.model.scheduler.impl.G_SchedMeetImpl@2a1b7890 (refinementType: and) (time: null, state: started) (startTime: null))
[zanshin.core             ] DEBUG: Requirement ended: G_SchedMeet (it.unitn.disi.zanshin.model.scheduler.impl.G_SchedMeetImpl@2a1b7890 (refinementType: and) (time: null, state: failed) (startTime: null))
[zanshin.monitoring       ] INFO: Requirement G_FindRoom has 1 AwReqs referring to it. Assuming all AwReqs are NeverFail and reporting AwReq state change: fail
[zanshin.adaptation       ] INFO: Processing state change: AR4 (ref. G_FindRoom) -> failed
[zanshin.adaptation       ] INFO: (Session: AR4 / 2012-11-14 16:30:25.654) Created new session for AR4
[zanshin.adaptation       ] INFO: (Session: AR4 / 2012-11-14 16:30:25.654) The problem has not yet been solved...
[zanshin.adaptation.qualia] DEBUG: Creating a default algorithm...
[zanshin.adaptation       ] INFO: (Session: AR4 / 2012-11-14 16:30:25.654) Selected adaptation strategy: ReconfigurationStrategy
[zanshin.core             ] INFO: (Session: AR4 / 2012-11-14 16:30:25.654) Applying strategy ReconfigurationStrategy(qualia; class-level)...
[zanshin.adaptation.qualia] DEBUG: Creating a default algorithm...
[zanshin.adaptation.qualia] INFO: Parameters chosen: [CV_RfM]
[zanshin.adaptation.qualia] INFO: Values to inc/decrement in the chosen parameters: [1.00000]
[zanshin.adaptation.qualia] INFO: Produced new configuration with 1 changed parameter(s)
[zanshin.controller       ] DEBUG: RMI Target System Controller forwarding instruction: apply-config(SchedulerGoalModel, it.unitn.disi.zanshin.model.gore.impl.ConfigurationImpl@5f320e76, class-level)
[zanshin.adaptation.qualia] DEBUG: Creating a default algorithm...
[zanshin.adaptation.qualia] INFO: (Session: AR4 / 2012-11-14 16:30:25.654) Indicator AR4 has been evaluated to false
[zanshin.adaptation.qualia] INFO: (Session: AR4 / 2012-11-14 16:30:25.654) Evaluating resolution: false
[zanshin.adaptation       ] INFO: (Session: AR4 / 2012-11-14 16:30:25.654) The problem has not yet been solved...
[zanshin.core             ] DEBUG: Replacing requirement instances of class AR4 (it.unitn.disi.zanshin.model.scheduler.impl.AR4Impl@1acb285d (refinementType: and) (time: null, state: failed) (incrementCoefficient: 1.0) -> it.unitn.disi.zanshin.model.scheduler.impl.AR4Impl@44e286c6 (refinementType: and) (time: null, state: undefined) (incrementCoefficient: 1.0))
[zanshin.core             ] DEBUG: Method AdaptationStrategyImpl.updateReferences() has been called, indicating it has not been overridden by the subclass ReconfigurationStrategy. Make sure this is on purpose...
[zanshin.monitoring       ] INFO: Processing method call: end / G_FindRoom
[zanshin.monitoring       ] INFO: Processing method call: fail / G_SchedMeet
[zanshin.monitoring       ] INFO: Processing method call: end / G_SchedMeet
[zanshin.controller       ] DEBUG: Received remote request to create a new user session for target system scheduler...
[zanshin.controller       ] INFO: Successfully created a new user session for target system scheduler: 1,352,907,026,657
[zanshin.controller       ] DEBUG: Received log for life-cycle method call in session scheduler/1,352,907,026,657: D_LocalAvail.START()
[zanshin.core             ] DEBUG: Requirement started: D_LocalAvail (it.unitn.disi.zanshin.model.scheduler.impl.D_LocalAvailImpl@71141f2f (refinementType: and) (time: null, state: undefined))
[zanshin.core             ] DEBUG: Requirement started: G_UseLocal (it.unitn.disi.zanshin.model.scheduler.impl.G_UseLocalImpl@600b80a8 (refinementType: and) (time: null, state: undefined) (startTime: null))
[zanshin.core             ] DEBUG: Requirement started: G_FindRoom (it.unitn.disi.zanshin.model.scheduler.impl.G_FindRoomImpl@132bc6db (refinementType: or) (time: null, state: undefined) (startTime: null))
[zanshin.monitoring       ] INFO: Processing method call: start / D_LocalAvail
[zanshin.core             ] DEBUG: Requirement started: G_SchedMeet (it.unitn.disi.zanshin.model.scheduler.impl.G_SchedMeetImpl@1f0c5db2 (refinementType: and) (time: null, state: undefined) (startTime: null))
[zanshin.monitoring       ] INFO: Processing method call: start / G_UseLocal
[zanshin.monitoring       ] INFO: Processing method call: start / G_FindRoom
[zanshin.monitoring       ] INFO: Processing method call: start / G_SchedMeet
[zanshin.controller       ] DEBUG: Received log for life-cycle method call in session scheduler/1,352,907,026,657: D_LocalAvail.FAIL()
[zanshin.core             ] DEBUG: Requirement failed: D_LocalAvail (it.unitn.disi.zanshin.model.scheduler.impl.D_LocalAvailImpl@71141f2f (refinementType: and) (time: null, state: started))
[zanshin.core             ] DEBUG: Requirement ended: D_LocalAvail (it.unitn.disi.zanshin.model.scheduler.impl.D_LocalAvailImpl@71141f2f (refinementType: and) (time: null, state: failed))
[zanshin.core             ] DEBUG: Requirement failed: G_UseLocal (it.unitn.disi.zanshin.model.scheduler.impl.G_UseLocalImpl@600b80a8 (refinementType: and) (time: null, state: started) (startTime: null))
[zanshin.monitoring       ] INFO: Processing method call: fail / D_LocalAvail
[zanshin.core             ] DEBUG: Requirement ended: G_UseLocal (it.unitn.disi.zanshin.model.scheduler.impl.G_UseLocalImpl@600b80a8 (refinementType: and) (time: null, state: failed) (startTime: null))
[zanshin.monitoring       ] INFO: Processing method call: end / D_LocalAvail
[zanshin.monitoring       ] INFO: Processing method call: fail / G_UseLocal
[zanshin.monitoring       ] INFO: Processing method call: end / G_UseLocal
[zanshin.controller       ] DEBUG: Received log for life-cycle method call in session scheduler/1,352,907,026,657: T_CallPartner.START()
[zanshin.core             ] DEBUG: Requirement started: T_CallPartner (it.unitn.disi.zanshin.model.scheduler.impl.T_CallPartnerImpl@64db610a (refinementType: and) (time: null, state: undefined) (startTime: null))
[zanshin.monitoring       ] INFO: Processing method call: start / T_CallPartner
[zanshin.controller       ] DEBUG: Received log for life-cycle method call in session scheduler/1,352,907,026,657: T_CallPartner.FAIL()
[zanshin.core             ] DEBUG: Requirement failed: T_CallPartner (it.unitn.disi.zanshin.model.scheduler.impl.T_CallPartnerImpl@64db610a (refinementType: and) (time: null, state: started) (startTime: null))
[zanshin.core             ] DEBUG: Requirement ended: T_CallPartner (it.unitn.disi.zanshin.model.scheduler.impl.T_CallPartnerImpl@64db610a (refinementType: and) (time: null, state: failed) (startTime: null))
[zanshin.monitoring       ] INFO: Processing method call: fail / T_CallPartner
[zanshin.monitoring       ] INFO: Processing method call: end / T_CallPartner
[zanshin.controller       ] DEBUG: Received log for life-cycle method call in session scheduler/1,352,907,026,657: T_CallHotel.START()
[zanshin.core             ] DEBUG: Requirement started: T_CallHotel (it.unitn.disi.zanshin.model.scheduler.impl.T_CallHotelImpl@7ec00b40 (refinementType: and) (time: null, state: undefined) (startTime: null))
[zanshin.monitoring       ] INFO: Processing method call: start / T_CallHotel
[zanshin.controller       ] DEBUG: Received log for life-cycle method call in session scheduler/1,352,907,026,657: T_CallHotel.FAIL()
[zanshin.core             ] DEBUG: Requirement failed: T_CallHotel (it.unitn.disi.zanshin.model.scheduler.impl.T_CallHotelImpl@7ec00b40 (refinementType: and) (time: null, state: started) (startTime: null))
[zanshin.core             ] DEBUG: Requirement ended: T_CallHotel (it.unitn.disi.zanshin.model.scheduler.impl.T_CallHotelImpl@7ec00b40 (refinementType: and) (time: null, state: failed) (startTime: null))
[zanshin.monitoring       ] INFO: Processing method call: fail / T_CallHotel
[zanshin.core             ] DEBUG: Requirement failed: G_FindRoom (it.unitn.disi.zanshin.model.scheduler.impl.G_FindRoomImpl@132bc6db (refinementType: or) (time: null, state: started) (startTime: null))
[zanshin.monitoring       ] INFO: Processing method call: end / T_CallHotel
[zanshin.core             ] DEBUG: Requirement ended: G_FindRoom (it.unitn.disi.zanshin.model.scheduler.impl.G_FindRoomImpl@132bc6db (refinementType: or) (time: null, state: failed) (startTime: null))
[zanshin.monitoring       ] INFO: Processing method call: fail / G_FindRoom
[zanshin.core             ] DEBUG: Requirement failed: G_SchedMeet (it.unitn.disi.zanshin.model.scheduler.impl.G_SchedMeetImpl@1f0c5db2 (refinementType: and) (time: null, state: started) (startTime: null))
[zanshin.core             ] DEBUG: Requirement ended: G_SchedMeet (it.unitn.disi.zanshin.model.scheduler.impl.G_SchedMeetImpl@1f0c5db2 (refinementType: and) (time: null, state: failed) (startTime: null))
[zanshin.monitoring       ] INFO: Requirement G_FindRoom has 1 AwReqs referring to it. Assuming all AwReqs are NeverFail and reporting AwReq state change: fail
[zanshin.adaptation       ] INFO: Processing state change: AR4 (ref. G_FindRoom) -> failed
[zanshin.adaptation       ] INFO: (Session: AR4 / 2012-11-14 16:30:25.654) Retrieved existing session for AR4, one event already in the timeline
[zanshin.adaptation.qualia] DEBUG: Creating a default algorithm...
[zanshin.adaptation.qualia] INFO: (Session: AR4 / 2012-11-14 16:30:25.654) Indicator AR4 has been evaluated to false
[zanshin.adaptation.qualia] INFO: (Session: AR4 / 2012-11-14 16:30:25.654) Evaluating resolution: false
[zanshin.adaptation       ] INFO: (Session: AR4 / 2012-11-14 16:30:25.654) The problem has not yet been solved...
[zanshin.adaptation.qualia] DEBUG: Creating a default algorithm...
[zanshin.adaptation       ] INFO: (Session: AR4 / 2012-11-14 16:30:25.654) Selected adaptation strategy: ReconfigurationStrategy
[zanshin.core             ] INFO: (Session: AR4 / 2012-11-14 16:30:25.654) Applying strategy ReconfigurationStrategy(qualia; class-level)...
[zanshin.adaptation.qualia] DEBUG: Creating a default algorithm...
[zanshin.adaptation.qualia] INFO: Parameters chosen: [CV_RfM]
[zanshin.adaptation.qualia] INFO: Values to inc/decrement in the chosen parameters: [1.00000]
[zanshin.adaptation.qualia] INFO: Produced new configuration with 1 changed parameter(s)
[zanshin.controller       ] DEBUG: RMI Target System Controller forwarding instruction: apply-config(SchedulerGoalModel, it.unitn.disi.zanshin.model.gore.impl.ConfigurationImpl@50f1847f, class-level)
[zanshin.adaptation.qualia] DEBUG: Creating a default algorithm...
[zanshin.adaptation.qualia] INFO: (Session: AR4 / 2012-11-14 16:30:25.654) Indicator AR4 has been evaluated to false
[zanshin.adaptation.qualia] INFO: (Session: AR4 / 2012-11-14 16:30:25.654) Evaluating resolution: false
[zanshin.adaptation       ] INFO: (Session: AR4 / 2012-11-14 16:30:25.654) The problem has not yet been solved...
[zanshin.core             ] DEBUG: Replacing requirement instances of class AR4 (it.unitn.disi.zanshin.model.scheduler.impl.AR4Impl@df24c4a (refinementType: and) (time: null, state: failed) (incrementCoefficient: 1.0) -> it.unitn.disi.zanshin.model.scheduler.impl.AR4Impl@33d80870 (refinementType: and) (time: null, state: undefined) (incrementCoefficient: 1.0))
[zanshin.core             ] DEBUG: Method AdaptationStrategyImpl.updateReferences() has been called, indicating it has not been overridden by the subclass ReconfigurationStrategy. Make sure this is on purpose...
[zanshin.monitoring       ] INFO: Processing method call: end / G_FindRoom
[zanshin.monitoring       ] INFO: Processing method call: fail / G_SchedMeet
[zanshin.monitoring       ] INFO: Processing method call: end / G_SchedMeet

Another interesting fact about this particular simulation: we use Qualia as reconfiguration algorithm at the class level, so even though we have two different users failing to find a suitable room, Qualia makes the second change on top of the first one that had already been made before. Since RfM is the only parameter registered in this example model, it is chosen twice by the reconfiguration algorithm and incremented first from its initial value 5 to 6, and then from 6 to 7. This is better observed in the log of the simulation:

INFO: Running simulation: Meeting Scheduler Simulation - AR4 Failure - "Find a suitable room", instance
INFO: Created a new user session with id: 1,352,907,025,641
INFO: No rooms available and both partner and hotels fail!
INFO: Simulated target system received EvoReq operation from Zanshin: apply-config({CV_RfM=6.00000}) [from now on]
INFO: Created a new user session with id: 1,352,907,026,657
INFO: No rooms available and both partner and hotels fail!
INFO: Simulated target system received EvoReq operation from Zanshin: apply-config({CV_RfM=7.00000}) [from now on]
INFO: (Meeting Scheduler Simulation - AR4 Failure - "Find a suitable room", instance) Simulation has finished (no more parts to run).

Next: [simulate the adaptation part](Creating a simulation, part 6. Simulate adaptation)