2 This file is part of GNUnet.
3 (C) 2011 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
22 * @file ats/gnunet-service-ats-solver_ril.c
23 * @brief ATS reinforcement learning solver
24 * @author Fabian Oehlmann
25 * @author Matthias Wachs
29 #include "gnunet_util_lib.h"
30 #include "gnunet-service-ats_addresses.h"
31 #include "gnunet_statistics_service.h"
33 #define RIL_DEFAULT_STEP_TIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 3000)
34 #define RIL_DEFAULT_DISCOUNT_FACTOR 0.5
35 #define RIL_DEFAULT_GRADIENT_STEP_SIZE 0.4
36 #define RIL_DEFAULT_TRACE_DECAY 0.6
37 #define RIL_EXPLORE_RATIO 0.1
40 * ATS reinforcement learning solver
51 //TODO add the rest of the actions
59 enum RIL_E_Modification
68 * Global learning parameters
70 struct RIL_Learning_Parameters
73 * The TD-algorithm to use
75 enum RIL_Algorithm algorithm;
78 * Learning discount factor in the TD-update
83 * Gradient-descent step-size
88 * Trace-decay factor for eligibility traces
96 * Next agent in solver's linked list
98 struct RIL_Peer_Agent *next;
101 * Previous agent in solver's linked list
103 struct RIL_Peer_Agent *prev;
108 struct GAS_RIL_Handle *envi;
113 struct GNUNET_PeerIdentity peer;
116 * Whether the agent is active or not
121 * Number of performed time-steps
123 unsigned long long step_count;
126 * Experience matrix W
131 * Number of rows of W / Number of state-vector features
136 * Number of columns of W / Number of actions
141 * Last perceived state feature vector
151 * Eligibility trace vector
158 struct ATS_Address * address;
169 * Network description
174 * Total available inbound bandwidth
176 unsigned long long bw_in_available;
179 * Total assigned outbound bandwidth
181 unsigned long long bw_in_assigned;
184 * Total available outbound bandwidth
186 unsigned long long bw_out_available;
189 * Total assigned outbound bandwidth
191 unsigned long long bw_out_assigned;
197 * Bandwidth changed callback
199 GAS_bandwidth_changed_cb bw_changed;
202 * Bandwidth changed callback cls
204 void *bw_changed_cls;
207 * ATS function to get preferences
209 GAS_get_preferences get_preferences;
212 * Closure for ATS function to get preferences
214 void *get_preferences_cls;
217 * ATS function to get properties
219 GAS_get_properties get_properties;
222 * Closure for ATS function to get properties
224 void *get_properties_cls;
228 * A handle for the reinforcement learning solver
230 struct GAS_RIL_Handle
235 struct GNUNET_STATISTICS_Handle *stats;
238 * Hashmap containing all valid addresses
240 const struct GNUNET_CONTAINER_MultiHashMap *addresses;
243 * Callbacks for the solver
245 struct RIL_Callbacks callbacks;
253 * Number of changes while solver was locked
258 * Number of performed time-steps
260 unsigned long long step_count;
263 * Interval time between steps in milliseconds //TODO put in agent
265 struct GNUNET_TIME_Relative step_time;
268 * Task identifier of the next time-step to be executed //TODO put in agent
270 GNUNET_SCHEDULER_TaskIdentifier next_step;
273 * Learning parameters
275 struct RIL_Learning_Parameters parameters;
278 * Array of networks with global assignment state
280 struct RIL_Network * network_entries;
285 unsigned int networks_count;
288 * List of active peer-agents
290 struct RIL_Peer_Agent * agents_head;
291 struct RIL_Peer_Agent * agents_tail;
299 * ---------------------------
303 * Estimate the current action-value for state s and action a
304 * @param agent agent performing the estimation
307 * @return estimation value
310 agent_estimate_q (struct RIL_Peer_Agent *agent,
317 for (i = 0; i < agent->m; i++)
319 result += state[i] * (agent->W)[agent->m][action];
326 * Decide whether to do exploration (i.e. taking a new action) or exploitation (i.e. taking the
327 * currently estimated best action) in the current step
328 * @param agent agent performing the step
329 * @return yes, if exploring
332 agent_decide_exploration (struct RIL_Peer_Agent *agent)
334 double r = (double) GNUNET_CRYPTO_random_u32(GNUNET_CRYPTO_QUALITY_WEAK, UINT32_MAX) / (double) UINT32_MAX;
336 if (r < RIL_EXPLORE_RATIO)
344 * Gets the action, with the maximal estimated Q-value (i.e. the one currently estimated to bring the
345 * most reward in the future)
346 * @param agent agent performing the calculation
347 * @param state the state from which to take the action
348 * @return the action promising most future reward
351 agent_get_action_best (struct RIL_Peer_Agent *agent,
357 double max_q = DBL_MIN;
359 for (i = 0; i < agent->m; i++)
361 cur_q = agent_estimate_q (agent, state, i);
369 GNUNET_assert(-1 != max_i);
375 * Gets any action, to explore the action space from that state
376 * @param agent agent performing the calculation
377 * @param state the state from which to take the action
381 agent_get_action_explore (struct RIL_Peer_Agent *agent,
384 return GNUNET_CRYPTO_random_u32(GNUNET_CRYPTO_QUALITY_WEAK, agent->n);
388 * Updates the weights (i.e. coefficients) of the weight vector in matrix W for action a
389 * @param agent the agent performing the update
390 * @param reward the reward received for the last action
391 * @param s_next the new state, the last step got the agent into
392 * @param a_prime the new
395 agent_update_weights (struct RIL_Peer_Agent *agent,
402 double *theta = (agent->W)[agent->a_old];
404 delta = reward + agent_estimate_q (agent, s_next, a_prime) -
405 agent_estimate_q (agent, agent->s_old, agent->a_old);
406 for (i = 0; i < agent->m; i++)
408 theta[i] += agent->envi->parameters.alpha * delta * (agent->e)[i];
413 * Changes the eligibility trace vector e in various manners:
414 * RIL_E_ACCUMULATE - adds 1 to each component as in accumulating eligibility traces
415 * RIL_E_REPLACE - resets each component to 1 as in replacing traces
416 * RIL_E_SET - multiplies e with gamma and lambda as in the update rule
417 * RIL_E_ZERO - sets e to 0 as in Watkin's Q-learning algorithm when exploring and when initializing
422 agent_modify_eligibility (struct RIL_Peer_Agent *agent,
423 enum RIL_E_Modification mod)
426 double *e = agent->e;
427 double gamma = agent->envi->parameters.gamma;
428 double lambda = agent->envi->parameters.lambda;
430 for (i = 0; i < agent->m; i++)
434 case RIL_E_ACCUMULATE:
441 e[i] = gamma * lambda;
451 * Allocates a state vector and fills it with the features present
452 * @param solver the solver handle
453 * @return pointer to the state vector
456 envi_get_state (struct GAS_RIL_Handle *solver)
459 struct RIL_Network *net;
460 double *state = GNUNET_malloc (sizeof (double) * solver->networks_count * 4);
462 for (i = 0; i < solver->networks_count; i += 4)
464 net = (&solver->network_entries)[i];
465 state[i] = (double) net->bw_in_assigned;
466 state[i+1] = (double) net->bw_in_available;
467 state[i+2] = (double) net->bw_out_assigned;
468 state[i+3] = (double) net->bw_out_available;
475 * Gets the reward of the last performed step
476 * @param solver solver handle
480 envi_get_reward (struct GAS_RIL_Handle *solver)
483 return (double) GNUNET_CRYPTO_random_u32(GNUNET_CRYPTO_QUALITY_WEAK, UINT32_MAX) / (double) UINT32_MAX;
487 * Puts the action into effect
488 * @param solver solver handle
489 * @param action action to perform by the solver
492 envi_do_action (struct GAS_RIL_Handle *solver,
499 * Performs one step of the Markov Decision Process. Other than in the literature the step starts
500 * after having done the last action a_old. It observes the new state s_next and the reward
501 * received. Then the coefficient update is done according to the SARSA or Q-learning method. The
502 * next action is put into effect.
503 * @param agent the agent performing the step
506 agent_step (struct RIL_Peer_Agent *agent)
512 s_next = envi_get_state(agent->envi);
513 reward = envi_get_reward(agent->envi);
515 switch (agent->envi->parameters.algorithm)
518 agent_modify_eligibility (agent, RIL_E_SET);
519 if (agent_decide_exploration (agent))
521 a_next = agent_get_action_explore (agent, s_next);
525 a_next = agent_get_action_best (agent, s_next);
527 agent_update_weights (agent, reward, s_next, a_next); //update weights with next action
531 a_next = agent_get_action_best (agent, s_next); //update weights with best action
532 agent_update_weights (agent, reward, s_next, a_next);
533 if (agent_decide_exploration (agent))
535 a_next = agent_get_action_explore (agent, s_next);
536 agent_modify_eligibility(agent, RIL_E_ZERO);
540 a_next = agent_get_action_best (agent, s_next);
541 agent_modify_eligibility(agent, RIL_E_SET);
546 GNUNET_assert (-1 != a_next);
548 agent_modify_eligibility (agent, RIL_E_ACCUMULATE);
550 envi_do_action(agent->envi, a_next);
552 GNUNET_free(agent->s_old);
553 agent->s_old = s_next;
554 agent->a_old = a_next;
556 agent->step_count += 1;
560 * Cycles through all agents and lets the active ones do a step. Schedules the next step.
561 * @param solver the solver handle
562 * @param tc task context for the scheduler
565 ril_periodic_step (void *cls,
566 const struct GNUNET_SCHEDULER_TaskContext *tc)
568 struct GAS_RIL_Handle *solver = cls;
569 struct RIL_Peer_Agent *cur;
571 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "RIL step number %d\n", solver->step_count);
573 for (cur = solver->agents_head; NULL != cur; cur = cur->next)
581 solver->step_count += 1;
582 solver->next_step = GNUNET_SCHEDULER_add_delayed (
589 * Initialize an agent without addresses and its knowledge base
590 * @param s ril solver
591 * @param peer the one in question
592 * @return handle to the new agent
594 struct RIL_Peer_Agent *
596 const struct GNUNET_PeerIdentity *peer)
599 struct GAS_RIL_Handle * solver = s;
600 struct RIL_Peer_Agent * agent = GNUNET_malloc (sizeof (struct RIL_Peer_Agent));
602 agent->envi = solver;
604 agent->step_count = 0;
605 agent->active = GNUNET_NO;
607 agent->n = solver->networks_count * 4;
608 agent->m = RIL_NUM_ACTIONS;
609 agent->W = (double **) GNUNET_malloc (sizeof (double) * agent->n);
610 for (i = 0; i < agent->n; i++)
612 (agent->W)[i] = (double *) GNUNET_malloc (sizeof (double) * agent->m);
615 agent->e = (double *) GNUNET_malloc (sizeof (double) * agent->m);
616 agent_modify_eligibility (agent, RIL_E_ZERO);
618 GNUNET_CONTAINER_DLL_insert (solver->agents_head, solver->agents_tail, agent);
625 * @param s solver handle
626 * @param agent the agent to retire
629 agent_die (struct GAS_RIL_Handle *solver,
630 struct RIL_Peer_Agent *agent)
636 * Returns the agent for a peer
637 * @param s solver handle
638 * @param peer identity of the peer
641 struct RIL_Peer_Agent *
642 ril_get_agent (struct GAS_RIL_Handle *solver,
643 const struct GNUNET_PeerIdentity *peer)
645 struct RIL_Peer_Agent *cur;
647 for (cur = solver->agents_head; NULL != cur; cur = cur->next)
649 if (0 == GNUNET_CRYPTO_hash_cmp (&peer->hashPubKey, &cur->peer.hashPubKey))
655 return agent_init (solver, peer);
659 * Iterator, which allocates one agent per peer
662 * @param key peer identity
663 * @param value address
664 * @return whether iterator should continue
667 init_agents_it (void *cls,
668 const struct GNUNET_HashCode *key,
671 struct GAS_RIL_Handle *solver = cls;
672 struct ATS_Address *address = value;
673 struct RIL_Peer_Agent *agent;
675 agent = ril_get_agent (solver, &address->peer);
677 GNUNET_assert (agent != NULL);
679 if (NULL == agent->address)
681 agent->address = address;
690 * Solver API functions
691 * ---------------------------
695 * Changes the preferences for a peer in the problem
697 * @param solver the solver handle
698 * @param peer the peer to change the preference for
699 * @param kind the kind to change the preference
700 * @param pref_rel the normalized preference value for this kind over all clients
703 GAS_ril_address_change_preference (void *s,
704 const struct GNUNET_PeerIdentity *peer,
705 enum GNUNET_ATS_PreferenceKind kind,
708 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
709 "Preference `%s' for peer `%s' changed to %.2f \n",
710 GNUNET_ATS_print_preference_type (kind),
714 * Nothing to do here. Preferences are considered during reward calculation.
720 * Init the reinforcement learning problem solver
723 * network[i] contains the network type as type GNUNET_ATS_NetworkType[i]
724 * out_quota[i] contains outbound quota for network type i
725 * in_quota[i] contains inbound quota for network type i
728 * network = {GNUNET_ATS_NET_UNSPECIFIED, GNUNET_ATS_NET_LOOPBACK, GNUNET_ATS_NET_LAN, GNUNET_ATS_NET_WAN, GNUNET_ATS_NET_WLAN}
729 * network[2] == GNUNET_ATS_NET_LAN
730 * out_quota[2] == 65353
731 * in_quota[2] == 65353
733 * @param cfg configuration handle
734 * @param stats the GNUNET_STATISTICS handle
735 * @param network array of GNUNET_ATS_NetworkType with length dest_length
736 * @param addresses hashmap containing all addresses
737 * @param out_quota array of outbound quotas
738 * @param in_quota array of outbound quota
739 * @param dest_length array length for quota arrays
740 * @param bw_changed_cb callback for changed bandwidth amounts
741 * @param bw_changed_cb_cls cls for callback
742 * @param get_preference callback to get relative preferences for a peer
743 * @param get_preference_cls cls for callback to get relative preferences
744 * @param get_properties_cls for callback to get relative properties
745 * @param get_properties_cls cls for callback to get relative properties
746 * @return handle for the solver on success, NULL on fail
749 GAS_ril_init (const struct GNUNET_CONFIGURATION_Handle *cfg,
750 const struct GNUNET_STATISTICS_Handle *stats,
751 const struct GNUNET_CONTAINER_MultiHashMap *addresses,
753 unsigned long long *out_quota,
754 unsigned long long *in_quota,
756 GAS_bandwidth_changed_cb bw_changed_cb,
757 void *bw_changed_cb_cls,
758 GAS_get_preferences get_preference,
759 void *get_preference_cls,
760 GAS_get_properties get_properties,
761 void *get_properties_cls)
765 unsigned long long tmp;
766 struct RIL_Network * cur;
767 struct GAS_RIL_Handle *solver = GNUNET_malloc (sizeof (struct GAS_RIL_Handle));
768 char * net_str[GNUNET_ATS_NetworkTypeCount] = GNUNET_ATS_NetworkTypeString;
770 GNUNET_assert (NULL != cfg);
771 GNUNET_assert (NULL != stats);
772 GNUNET_assert (NULL != network);
773 GNUNET_assert (NULL != bw_changed_cb);
774 GNUNET_assert (NULL != get_preference);
775 GNUNET_assert (NULL != get_properties);
777 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_time(cfg, "ats", "RIL_STEP_TIME", &solver->step_time))
779 solver->step_time = RIL_DEFAULT_STEP_TIME;
781 if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_size(cfg, "ats", "RIL_DISCOUNT_FACTOR", &tmp))
783 solver->parameters.gamma = (double) tmp / 100;;
787 solver->parameters.gamma = RIL_DEFAULT_DISCOUNT_FACTOR;
789 if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_size(cfg, "ats", "RIL_GRADIENT_STEP_SIZE", &tmp))
791 solver->parameters.alpha = (double) tmp / 100;;
795 solver->parameters.alpha = RIL_DEFAULT_GRADIENT_STEP_SIZE;
797 if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_size(cfg, "ats", "RIL_TRACE_DECAY", &tmp))
799 solver->parameters.lambda = (double) tmp / 100;;
803 solver->parameters.lambda = RIL_DEFAULT_TRACE_DECAY;
806 solver->stats = (struct GNUNET_STATISTICS_Handle *) stats;
807 solver->callbacks.bw_changed = bw_changed_cb;
808 solver->callbacks.bw_changed_cls = bw_changed_cb_cls;
809 solver->callbacks.get_preferences = get_preference;
810 solver->callbacks.get_preferences_cls = get_preference_cls;
811 solver->callbacks.get_properties = get_properties;
812 solver->callbacks.get_properties_cls = get_properties_cls;
813 solver->networks_count = dest_length;
814 solver->network_entries = GNUNET_malloc (dest_length * sizeof (struct RIL_Network));
815 solver->bulk_lock = GNUNET_NO;
816 solver->addresses = addresses;
817 solver->step_count = 0;
819 for (c = 0; c < dest_length; c++)
821 cur = &solver->network_entries[c];
822 cur->type = network[c];
823 cur->bw_in_available = in_quota[c];
824 cur->bw_in_assigned = 0;
825 cur->bw_out_available = out_quota[c];
826 cur->bw_out_assigned = 0;
827 cur->desc = net_str[c];
830 c = GNUNET_CONTAINER_multihashmap_iterate (addresses, &init_agents_it, solver);
832 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ril_init() has been called\n");
833 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "RIL number of addresses: %d\n", c);
835 solver->next_step = GNUNET_SCHEDULER_add_delayed (
836 GNUNET_TIME_relative_multiply (GNUNET_TIME_relative_get_millisecond_ (), 1000),
844 * Shutdown the reinforcement learning problem solver
846 * @param solver the respective handle to shutdown
849 GAS_ril_done (void * solver)
853 * dealloc: agents, learning parameters, callbacks
855 struct GAS_RIL_Handle *s = solver;
857 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ril_done() has been called\n");
859 GNUNET_SCHEDULER_cancel (s->next_step);
860 GNUNET_free (s->network_entries);
866 * Add a single address within a network to the solver
868 * @param solver the solver Handle
869 * @param address the address to add
870 * @param network network type of this address
873 GAS_ril_address_add (void *solver,
874 struct ATS_Address *address,
880 * initialize new agent
882 * increase state vector
886 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ril_address_add() has been called\n");
890 * Remove an address from the solver
892 * @param solver the solver handle
893 * @param address the address to remove
894 * @param session_only delete only session not whole address
897 GAS_ril_address_delete (void *solver,
898 struct ATS_Address *address,
904 * if (last address of peer)
907 * decrease state vector
908 * decrease knowledge matrix
909 * decrease action vector
911 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ril_address_delete() has been called\n");
915 * Transport properties for this address have changed
917 * @param solver solver handle
918 * @param address the address
919 * @param type the ATSI type in HBO
920 * @param abs_value the absolute value of the property
921 * @param rel_value the normalized value
924 GAS_ril_address_property_changed (void *solver,
925 struct ATS_Address *address,
930 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
931 "Property `%s' for peer `%s' address %p changed to %.2f \n",
932 GNUNET_ATS_print_property_type (type),
933 GNUNET_i2s (&address->peer),
936 * Nothing to do here, properties are considered in every reward calculation
942 * Transport session for this address has changed
944 * NOTE: values in addresses are already updated
946 * @param solver solver handle
947 * @param address the address
948 * @param cur_session the current session
949 * @param new_session the new session
952 GAS_ril_address_session_changed (void *solver,
953 struct ATS_Address *address,
954 uint32_t cur_session,
955 uint32_t new_session)
959 * Potentially add session activity as a feature in state vector
961 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ril_address_session_changed() has been called\n");
966 * Usage for this address has changed
968 * NOTE: values in addresses are already updated
970 * @param solver solver handle
971 * @param address the address
972 * @param in_use usage state
975 GAS_ril_address_inuse_changed (void *solver,
976 struct ATS_Address *address,
981 * See matthias' email
983 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ril_address_inuse_changed() has been called\n");
987 * Network scope for this address has changed
989 * NOTE: values in addresses are already updated
991 * @param solver solver handle
992 * @param address the address
993 * @param current_network the current network
994 * @param new_network the new network
997 GAS_ril_address_change_network (void *solver,
998 struct ATS_Address *address,
999 uint32_t current_network,
1000 uint32_t new_network)
1006 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ril_address_change_network() has been called\n");
1010 * Get application feedback for a peer
1012 * @param solver the solver handle
1013 * @param application the application
1014 * @param peer the peer to change the preference for
1015 * @param scope the time interval for this feedback: [now - scope .. now]
1016 * @param kind the kind to change the preference
1017 * @param score the score
1020 GAS_ril_address_preference_feedback (void *solver,
1022 const struct GNUNET_PeerIdentity *peer,
1023 const struct GNUNET_TIME_Relative scope,
1024 enum GNUNET_ATS_PreferenceKind kind,
1028 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ril_address_preference_feedback() has been called\n");
1032 * Start a bulk operation
1034 * @param solver the solver
1037 GAS_ril_bulk_start (void *solver)
1041 * bulk counter up, but not really relevant, because there is no complete calculation of the
1042 * bandwidth assignment triggered anyway. Therefore, changes to addresses can come and go as
1043 * they want. Consideration: Step-pause during bulk-start-stop period...
1045 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ril_bulk_start() has been called\n");
1050 * Bulk operation done
1053 GAS_ril_bulk_stop (void *solver)
1057 * bulk counter down, see bulk_start()
1059 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ril_bulk_stop() has been called\n");
1063 * Get the preferred address for a specific peer
1065 * @param solver the solver handle
1066 * @param peer the identity of the peer
1068 const struct ATS_Address *
1069 GAS_ril_get_preferred_address (void *solver,
1070 const struct GNUNET_PeerIdentity *peer)
1072 //TODO implement, gets only the first address for now
1075 * connect-only for requested peers, move agent to active list
1077 struct GAS_RIL_Handle *s = solver;
1078 struct RIL_Peer_Agent *agent;
1080 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ril_get_preferred_address() has been called\n");
1082 agent = ril_get_agent(s, peer);
1083 agent->active = GNUNET_YES;
1085 if (0 == GNUNET_CONTAINER_multihashmap_contains(s->addresses, &peer->hashPubKey))
1087 return GNUNET_CONTAINER_multihashmap_get(s->addresses, &peer->hashPubKey);
1090 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "No address for peer in addresses\n");
1095 * Stop notifying about address and bandwidth changes for this peer
1097 * @param solver the solver handle
1098 * @param peer the peer
1101 GAS_ril_stop_get_preferred_address (void *solver,
1102 const struct GNUNET_PeerIdentity *peer)
1106 * connect-only for requested peers, move agent to paused list
1108 struct GAS_RIL_Handle *s = solver;
1109 struct RIL_Peer_Agent *agent;
1111 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ril_stop_get_preferred_address() has been called\n");
1113 agent = ril_get_agent(s, peer);
1114 agent->active = GNUNET_NO;
1117 /* end of gnunet-service-ats-solver_ril.c */