juliencegarra / OpenMATB

OpenMATB: A Multi-Attribute Task Battery promoting task customization, software extendability and experiment replicability
Other
43 stars 32 forks source link

question about stoping a task #36

Closed mattonna closed 6 months ago

mattonna commented 6 months ago

Hi!

Is it possible to stop a task and to restart it within the same scenario ? I tried but apparently it doesn't work.

I wanted to do so because I wanted to restart the RESMAN task and not to continue will the state of the task at the end of the familiarisation phase of this task.

benoitvalery commented 6 months ago

Hi @mattonna, Currently there’s no way to do that the simple way, though there are two workarounds that you can use to achieve this :

  1. The first thing that you can do is to split the scenario into two scenarios. So you would have, say, one familiarization scenario, and one testing scenario. This alternative might seem a bit sub-optimal, but it ensures that once you pass to the second (testing) scenario, all the tasks have been properly reset.
  2. If for some reasons you don’t want to split your scenario, and that the only thing that matters is to take back the Resman tanks and pumps in their initial status, you can do this manually by adding the following just before you start the testing session :

So for instance suppose you want to "reset" the Resman at 00:12:20 (note that I used those default values that are implemented in the code, but you might have defined other default values (e.g., other initial tank levels) in your scenario.)

00:12:20;resman;tank-a-level;2500
00:12:20;resman;tank-b-level;2500
00:12:20;resman;tank-c-level;1000
00:12:20;resman;tank-d-level;1000
00:12:20;resman;tank-e-level;3000
00:12:20;resman;tank-f-level;3000
00:12:20;resman;pump-1-state;off
00:12:20;resman;pump-2-state;off
00:12:20;resman;pump-3-state;off
00:12:20;resman;pump-4-state;off
00:12:20;resman;pump-5-state;off
00:12:20;resman;pump-6-state;off
00:12:20;resman;pump-7-state;off
00:12:20;resman;pump-8-state;off

Maybe you could try one of these approaches and let me know if it satisfies you.

mattonna commented 6 months ago

Many thanks ! I tested the 2nd option and it worked fine !

(I didn't want to split the scenario because I'm still in a training phase. I wanted to train for the resman as a single task and to train for the resman in a dual-task environement.)