Skip to content
This repository has been archived by the owner on Sep 11, 2019. It is now read-only.

Commit

Permalink
Fix ai commenti e alle spaziature
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxelweb committed Aug 6, 2019
1 parent d61cc80 commit 14592f7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
8 changes: 5 additions & 3 deletions qcloud.dat
Expand Up @@ -12,6 +12,7 @@ set I := H D V1 V2 V3 V4 V5 V6 V7 V8;
set J := 1 2 3 4 5 6;
set NotVirt := D;


# Popolamento vettori per i tipi di server

param : Peso Costo :=
Expand All @@ -38,7 +39,7 @@ param : Risorse Posizione Virtual :=
6 28 1 1 ;


# Quantita' dei servizi che l'azienda deve evadere
# Richieste effettuate all'azienda

param : Richieste :=
H 18
Expand All @@ -52,6 +53,7 @@ V6 1
V7 3
V8 1 ;


# Parametri costanti

param CostoWattMese := 0.054;
Expand All @@ -62,7 +64,7 @@ param MinVendita := 0.75;
# Attivazione dei parametri bonus

param BonusProporzione := 0;
param BonusIncremento := 1;
param FuturaOttimizzazioneEnergia := 1;
param BonusIncremento := 0;
param FuturaOttimizzazioneEnergia := 0;

/*---- EOF ----*/
2 changes: 1 addition & 1 deletion qcloud.mod
Expand Up @@ -132,7 +132,7 @@ s.t. Proporzione_ded :
==> y[2] = y[3];


# BONUS) Incremento dal piu' grande al piu' piccolo
# BONUS) Incremento lasco dal piu' grande al piu' piccolo

s.t. Incremento1 :
BonusIncremento == 1
Expand Down
6 changes: 6 additions & 0 deletions qcloud.run
Expand Up @@ -13,6 +13,7 @@ solve;
printf "--------------------------------\n";
printf " Risultati - qCloud \n";
printf "--------------------------------\n";

printf "Tempo di esecuzione: %.3f s\n", _total_solve_time;
printf "Numero di richieste (N): %i \n", N;
printf "Richieste soddisfatte (k): %i/%i (%.1f\%) \n", k, N, (k*100)/N;
Expand All @@ -27,9 +28,11 @@ printf "- Spesa energia elettrica e penali: EUR %.2f \n",
)) - 20*(w) + sum{j in J} z[j];
printf "= Guadagni mensili totali (f.o.): EUR %.2f \n",
GuadagniMensili;

printf "\n--------------------------------\n";
printf "- Parametri bonus in uso \n";
printf "--------------------------------\n";

printf "Proporzione: %s \n",
if BonusProporzione==1
then "ATTIVO"
Expand All @@ -42,14 +45,17 @@ printf "Futura ottim. energia: %s \n",
if FuturaOttimizzazioneEnergia==1
then "ATTIVO"
else "-";

printf "\n--------------------------------\n";
printf "- Variabili del problema \n";
printf "--------------------------------\n";

printf "ECCESSO PUNTI RISORSA NEI NODI HARDWARE \n";
display z;
printf "DISPOSIZIONE DEI SERVIZI PER NODO \n";
display x;
printf "CONSUMO IN WATT NEI NODI\n";
display y;

printf "------------- FINE -------------\n\n";

0 comments on commit 14592f7

Please sign in to comment.