Commit 510304a9 authored by Mac Newbold's avatar Mac Newbold

moved to ../assign/

parent 1c7a53f0
#ifndef _SCORE_H
#define _SCORE_H
// Cost of a direct link
const float SCORE_DIRECT_LINK = 0.01;
// Cost of overusing a direct link
const float SCORE_DIRECT_LINK_PENALTY = 0.5;
// Cost of an intraswitch link
const float SCORE_INTRASWITCH_LINK = 0.02;
// Cost of an interswitch link
const float SCORE_INTERSWITCH_LINK = 0.05;
// Cost of being unable to fulfill a virtual link
const float SCORE_NO_CONNECTION = 0.5;
// Cost of using a pnode
const float SCORE_PNODE = 0.05;
// Cost of overusing a pnode
const float SCORE_PNODE_PENALTY = 0.5;
// Cost of using a switch.
const float SCORE_SWITCH = 0.5;
// Cost of an unassigned node
const float SCORE_UNASSIGNED = 1;
// Cost of going over bandwidth
const float SCORE_OVER_BANDWIDTH = 0.5;
typedef struct {
int unassigned;
int pnode_load;
int no_connection;
int link_users;
int bandwidth;
} violated_info;
extern float score;
extern int violated;
extern violated_info vinfo;
void init_score();
void remove_node(node n);
int add_node(node n,int loc);
float get_score();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment