#include "xbt/ex.h"
#include "xbt/dict.h"
-#include "workstation_KCCFLN05_private.h"
+#include "surf_private.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_workstation, surf,
"Logging specific to the SURF workstation module (KCCFLN05)");
+typedef enum {
+ SURF_WORKSTATION_RESOURCE_CPU,
+ SURF_WORKSTATION_RESOURCE_LINK,
+} e_surf_workstation_model_type_t;
+
+
+/**************************************/
+/********* router object **************/
+/**************************************/
+typedef struct router_KCCFLN05 {
+ char *name;
+ unsigned int id;
+} s_router_KCCFLN05_t, *router_KCCFLN05_t;
+
+
+/**************************************/
+/********* cpu object *****************/
+/**************************************/
+typedef struct cpu_KCCFLN05 {
+ surf_model_t model;
+ e_surf_workstation_model_type_t type; /* Do not move this field */
+ char *name; /* Do not move this field */
+ lmm_constraint_t constraint;
+ lmm_constraint_t bus;
+ double power_scale;
+ double power_current;
+ double interference_send;
+ double interference_recv;
+ double interference_send_recv;
+ tmgr_trace_event_t power_event;
+ e_surf_cpu_state_t state_current;
+ tmgr_trace_event_t state_event;
+ int id; /* cpu and network card are a single object... */
+ xbt_dynar_t incomming_communications;
+ xbt_dynar_t outgoing_communications;
+} s_cpu_KCCFLN05_t, *cpu_KCCFLN05_t;
+
+/**************************************/
+/*********** network object ***********/
+/**************************************/
+
+typedef struct network_link_KCCFLN05 {
+ surf_model_t model;
+ e_surf_workstation_model_type_t type; /* Do not move this field */
+ char *name; /* Do not move this field */
+ lmm_constraint_t constraint;
+ double lat_current;
+ tmgr_trace_event_t lat_event;
+ double bw_current;
+ tmgr_trace_event_t bw_event;
+ e_surf_network_link_state_t state_current;
+ tmgr_trace_event_t state_event;
+} s_network_link_KCCFLN05_t, *network_link_KCCFLN05_t;
+
+
+typedef struct s_route_KCCFLN05 {
+ double impact_on_src;
+ double impact_on_dst;
+ double impact_on_src_with_other_recv;
+ double impact_on_dst_with_other_send;
+ network_link_KCCFLN05_t *links;
+ int size;
+} s_route_KCCFLN05_t, *route_KCCFLN05_t;
+
+/**************************************/
+/*************** actions **************/
+/**************************************/
+typedef struct surf_action_workstation_KCCFLN05 {
+ s_surf_action_t generic_action;
+ double latency;
+ double lat_current;
+ lmm_variable_t variable;
+ double rate;
+ int suspended;
+ cpu_KCCFLN05_t src; /* could be avoided */
+ cpu_KCCFLN05_t dst; /* could be avoided */
+} s_surf_action_workstation_KCCFLN05_t,
+ *surf_action_workstation_KCCFLN05_t;
+
+
+
static int nb_workstation = 0;
static s_route_KCCFLN05_t *routing_table = NULL;
#define ROUTE(i,j) routing_table[(i)+(j)*nb_workstation]
}
lmm_update_variable_latency(maxmin_system, action->variable,
- action->latency);
+ action->latency); /* Should be useless */
for (i = 0; i < route_size; i++)
lmm_expand(maxmin_system, route->links[i]->constraint,
xbt_dict_new_ext(workstation_nb * workstation_nb * 10);
}
- /* Compute the number of affected models... */
+ /* Compute the number of affected resources... */
for (i = 0; i < workstation_nb; i++) {
for (j = 0; j < workstation_nb; j++) {
cpu_KCCFLN05_t card_src = workstation_list[i];