+const char *SD_workstation_get_name(SD_workstation_t workstation)
+{
+ SD_CHECK_INIT_DONE();
+ xbt_assert(workstation != NULL, "Invalid parameter");
+ return surf_resource_name(workstation->surf_workstation);
+}
+
+/**
+ * \brief Returns the value of a given workstation property
+ *
+ * \param ws a workstation
+ * \param name a property name
+ * \return value of a property (or NULL if property not set)
+ */
+const char *SD_workstation_get_property_value(SD_workstation_t ws,
+ const char *name)
+{
+ return xbt_dict_get_or_null(SD_workstation_get_properties(ws), name);
+}
+
+
+/**
+ * \brief Returns a #xbt_dict_t consisting of the list of properties assigned to this workstation
+ *
+ * \param workstation a workstation
+ * \return the dictionary containing the properties associated with the workstation
+ */
+xbt_dict_t SD_workstation_get_properties(SD_workstation_t workstation)
+{
+ SD_CHECK_INIT_DONE();
+ xbt_assert((workstation != NULL), "Invalid parameters");
+
+ return surf_workstation_model->extension.
+ workstation.get_properties(workstation->surf_workstation);
+
+}
+
+
+/**
+ * \brief Returns the route between two workstations
+ *
+ * Use SD_route_get_size() to know the array size.
+ *
+ * \param src a workstation
+ * \param dst another workstation
+ * \return a new array of \ref SD_link_t representating the route between these two workstations
+ * \see SD_route_get_size(), SD_link_t
+ */
+const SD_link_t *SD_route_get_list(SD_workstation_t src,
+ SD_workstation_t dst)
+{
+ void *surf_src;
+ void *surf_dst;
+ xbt_dynar_t surf_route;
+ const char *link_name;
+ void *surf_link;
+ unsigned int cpt;
+
+ SD_CHECK_INIT_DONE();
+
+ if (sd_global->recyclable_route == NULL) {
+ /* first run */
+ sd_global->recyclable_route = xbt_new(SD_link_t, SD_link_get_number());
+ }
+
+ surf_src = src->surf_workstation;
+ surf_dst = dst->surf_workstation;
+ surf_route =
+ surf_workstation_model->extension.workstation.get_route(surf_src,
+ surf_dst);
+
+ xbt_dynar_foreach(surf_route, cpt, surf_link) {
+ link_name = surf_resource_name(surf_link);
+ sd_global->recyclable_route[cpt] =
+ xbt_lib_get_or_null(link_lib, link_name, SD_LINK_LEVEL);
+ }
+ return sd_global->recyclable_route;
+}
+
+/**
+ * \brief Returns the number of links on the route between two workstations
+ *
+ * \param src a workstation
+ * \param dst another workstation
+ * \return the number of links on the route between these two workstations
+ * \see SD_route_get_list()
+ */
+int SD_route_get_size(SD_workstation_t src, SD_workstation_t dst)
+{
+ SD_CHECK_INIT_DONE();
+ return xbt_dynar_length(surf_workstation_model->extension.
+ workstation.get_route(src->surf_workstation,
+ dst->surf_workstation));
+}
+
+/**
+ * \brief Returns the total power of a workstation
+ *
+ * \param workstation a workstation
+ * \return the total power of this workstation
+ * \see SD_workstation_get_available_power()
+ */
+double SD_workstation_get_power(SD_workstation_t workstation)
+{
+ SD_CHECK_INIT_DONE();
+ xbt_assert(workstation != NULL, "Invalid parameter");
+ return surf_workstation_model->extension.workstation.
+ get_speed(workstation->surf_workstation, 1.0);
+}
+
+/**
+ * \brief Returns the proportion of available power in a workstation
+ *
+ * \param workstation a workstation
+ * \return the proportion of power currently available in this workstation (normally a number between 0 and 1)
+ * \see SD_workstation_get_power()
+ */
+double SD_workstation_get_available_power(SD_workstation_t workstation)
+{
+ SD_CHECK_INIT_DONE();
+ xbt_assert(workstation != NULL, "Invalid parameter");
+ return surf_workstation_model->extension.
+ workstation.get_available_speed(workstation->surf_workstation);
+}
+
+/**
+ * \brief Returns an approximative estimated time for the given computation amount on a workstation
+ *
+ * \param workstation a workstation
+ * \param computation_amount the computation amount you want to evaluate (in flops)
+ * \return an approximative astimated computation time for the given computation amount on this workstation (in seconds)
+ */
+double SD_workstation_get_computation_time(SD_workstation_t workstation,
+ double computation_amount)
+{
+ SD_CHECK_INIT_DONE();
+ xbt_assert(workstation != NULL, "Invalid parameter");
+ xbt_assert(computation_amount >= 0,
+ "computation_amount must be greater than or equal to zero");
+ return computation_amount / SD_workstation_get_power(workstation);