score.h 724 Bytes
Newer Older
Robert Ricci's avatar
Robert Ricci committed
1 2 3 4 5
/*
 * EMULAB-COPYRIGHT
 * Copyright (c) 2000-2003 University of Utah and the Flux Group.
 * All rights reserved.
 */
Mac Newbold's avatar
Mac Newbold committed
6 7 8 9 10 11 12 13 14 15

#ifndef _SCORE_H
#define _SCORE_H

typedef struct {
  int unassigned;
  int pnode_load;
  int no_connection;
  int link_users;
  int bandwidth;
16
  int desires;
17
  int vclass;
18 19
  int delay;
  int incorrect_endpoints;
Mac Newbold's avatar
Mac Newbold committed
20 21
} violated_info;

22
extern double score;
Mac Newbold's avatar
Mac Newbold committed
23 24
extern int violated;
extern violated_info vinfo;
25
extern bool allow_trivial_links;
Mac Newbold's avatar
Mac Newbold committed
26 27

void init_score();
28 29 30
void remove_node(vvertex vv);
int add_node(vvertex vv,pvertex pv,bool deterministic);
double get_score();
Christopher Alfeld's avatar
 
Christopher Alfeld committed
31
double fd_score(tb_vnode &vnoder,tb_pnode &pnoder,int *fd_violated);
32 33
pvertex make_lan_node(vvertex vv);
void delete_lan_node(pvertex pv);
Mac Newbold's avatar
Mac Newbold committed
34 35

#endif