anchor.diff:  %%
   %%  FSM State: waiting
   %%
  -waiting({solve, Model}, _From, StateData) ->
  -    {ok, NewStateData} = start_solver(Model, StateData),
  +waiting({solve, Simulation}, _From, StateData) ->
  +    {ok, NewStateData} = start_solver(Simulation, StateData),
       {reply, ok, solving, NewStateData}.
   
   
   %%
   %%  FSM State: solving
   %%
  -solving({solve, _Model}, _From, StateData) ->
  +solving({solve, _Simulation}, _From, StateData) ->
       {reply, {error, bussy}, solving, StateData}.
   
   
  
positive.code:     ]),
      NewStateData = StateData#state{
          port = Port,
          model = Model
      },
      {ok, NewStateData}.
  
  
  handle_solver_response(ResponseLine, #model{ref = ModelRef}) ->
      [Status | Other] = string:tokens(ResponseLine, "\t\n "),
      case Status of
          "DONE" ->
              [TimeStr, _StepCountStr, CurrentDensityStr] = Other,
              ok = ebi_store:simulation_done(             % TODO
                  ModelRef,
                  {file, ModelRef ++ ".tar.gz"},
                  to_number(TimeStr),
                  to_number(CurrentDensityStr)
              );
          "ERROR" ->
              ok = ebi_store:simulation_failed(ModelRef)  % TODO
      end.
  
  
  
negative.code: %%
  %%
  %%
  -spec solve(pid(), #simulation{})
          -> ok | {error, Reason :: term()}.
  
  solve(Pid, Simulation) ->
      gen_fsm:sync_send_event(Pid, {solve, Simulation}).
  
  
  
  