Skip to content

Commit

Permalink
package routing!
Browse files Browse the repository at this point in the history
  • Loading branch information
Danil0F committed Oct 18, 2012
1 parent cc426f7 commit 2d4c503
Show file tree
Hide file tree
Showing 20 changed files with 349 additions and 189 deletions.
57 changes: 20 additions & 37 deletions Files/SimTemp/network.net
Original file line number Diff line number Diff line change
@@ -1,42 +1,25 @@
//
without conversion
1;1;0;232;114
2;1;0;185;228
3;1;0;325;381
4;1;0;526;453
5;1;0;794;420
6;1;0;504;74
7;1;0;547;176
8;1;0;334;201
9;1;0;738;84
10;1;0;1069;83
11;1;0;1029;301
6;1;0;908;393
5;1;0;805;309
4;1;0;760;441
3;1;0;590;310
2;1;0;589;444
1;1;0;443;372
links
1;2;1.0;40
1;8;1.0;40
2;1;1.0;40
2;8;1.0;40
2;3;1.0;40
3;4;1.0;40
3;2;1.0;40
4;5;1.0;40
6;5;1.0;40
6;4;1.0;40
5;6;1.0;40
5;3;1.0;40
4;6;1.0;40
4;3;1.0;40
4;7;1.0;40
5;11;1.0;40
5;4;1.0;40
6;7;1.0;40
6;9;1.0;40
7;8;1.0;40
7;6;1.0;40
7;4;1.0;40
8;1;1.0;40
8;7;1.0;40
8;2;1.0;40
9;6;1.0;40
9;10;1.0;40
10;9;1.0;40
10;11;1.0;40
11;10;1.0;40
11;5;1.0;40
4;2;1.0;40
3;5;1.0;40
3;4;1.0;40
3;1;1.0;40
2;4;1.0;40
2;1;1.0;40
1;3;1.0;40
1;2;1.0;40
map
-11.295220780118349;-53.57613932291667;10
-11.295220780118349;-53.57613932291667;10
31 changes: 31 additions & 0 deletions Files/SimTemp/pairs.prs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

6;5;1;1
6;4;1;1
6;3;1;1
6;2;1;1
6;1;1;100
5;6;1;1
5;4;1;1
5;3;1;1
5;2;1;1
5;1;1;1
4;6;1;1
4;5;1;1
4;3;1;1
4;2;1;1
4;1;1;1
3;6;1;1
3;5;1;1
3;4;1;1
3;2;1;1
3;1;1;1
2;6;1;1
2;5;1;1
2;4;1;1
2;3;1;1
2;1;1;1
1;6;1;100
1;5;1;1
1;4;1;1
1;3;1;1
1;2;1;1
246 changes: 143 additions & 103 deletions Files/SimTemp/results.res

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Files/SimTemp/simulation.sim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
1.0;0.0;100;0;First Fit
0.0;5;2
0;
1.0;10.0;100000;0;Least Used
5.0;10;2
2;
0.050000000000000044;
false;0.0;0.0
2 changes: 2 additions & 0 deletions Topologies/NSFNET/network.net
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,5 @@ links
10;9;1.0;40
10;5;1.0;40
10;14;1.0;40
map
-11.295220780118349;-53.57613932291667;10
22 changes: 11 additions & 11 deletions src/gui/Main.form
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="jTabbedPaneTelas" pref="574" max="32767" attributes="0"/>
<Component id="jTabbedPaneTelas" pref="578" max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace min="-2" pref="15" max="-2" attributes="0"/>
Expand All @@ -174,7 +174,7 @@
</Group>
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<EmptySpace pref="597" max="32767" attributes="0"/>
<EmptySpace pref="601" max="32767" attributes="0"/>
<Component id="jPanelGerarRelatorio" min="-2" max="-2" attributes="1"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
Expand Down Expand Up @@ -216,7 +216,7 @@
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jPanelDesenho" alignment="1" pref="537" max="32767" attributes="0"/>
<Component id="jPanelDesenho" alignment="1" pref="541" max="32767" attributes="0"/>
<Component id="jPanelFerramentas" alignment="0" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
Expand Down Expand Up @@ -401,7 +401,7 @@
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jScrollPaneTopologia" alignment="0" pref="533" max="32767" attributes="0"/>
<Component id="jScrollPaneTopologia" alignment="0" pref="537" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
Expand Down Expand Up @@ -788,7 +788,7 @@
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jScrollPaneTrafegoPar" alignment="0" pref="533" max="32767" attributes="0"/>
<Component id="jScrollPaneTrafegoPar" alignment="0" pref="537" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
Expand Down Expand Up @@ -906,7 +906,7 @@
<Component id="jCheckBoxSobrevivencia" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jPanelSobrevivencia" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="225" max="32767" attributes="0"/>
<EmptySpace pref="229" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
Expand Down Expand Up @@ -1214,7 +1214,7 @@
<Component id="jLabelPosConversores" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jPanelPosConversores" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="245" max="32767" attributes="0"/>
<EmptySpace pref="249" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
Expand Down Expand Up @@ -1443,7 +1443,7 @@
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="48" max="-2" attributes="0"/>
<Component id="jPanelParametrosSim" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="304" max="32767" attributes="0"/>
<EmptySpace pref="308" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
Expand Down Expand Up @@ -1595,7 +1595,7 @@
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="44" max="-2" attributes="0"/>
<Component id="jPanelAgenda" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="276" max="32767" attributes="0"/>
<EmptySpace pref="280" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
Expand Down Expand Up @@ -1760,7 +1760,7 @@
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jScrollPaneMetricas" alignment="0" pref="537" max="32767" attributes="0"/>
<Component id="jScrollPaneMetricas" alignment="0" pref="541" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
Expand All @@ -1781,7 +1781,7 @@
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="60" max="-2" attributes="0"/>
<Component id="jScrollPaneGraf" pref="477" max="32767" attributes="0"/>
<Component id="jScrollPaneGraf" pref="481" max="32767" attributes="0"/>
</Group>
</Group>
</Group>
Expand Down
16 changes: 8 additions & 8 deletions src/gui/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,7 @@ private void jToggleButtonGrafItemStateChanged(java.awt.event.ItemEvent evt) {//
BufferedReader in;
FileReader file;
try {
file = new FileReader("files/SimTemp/results.res");
file = new FileReader("Files/SimTemp/results.res");
in = new BufferedReader(file);
tmp = new JTextArea();
tmp.setText("");
Expand Down Expand Up @@ -2053,7 +2053,7 @@ public void showPropriedades(Topologia topologia, int indexOfLink, LinkGrf link)
this.pLink = new PropriedadesLink(topologia,indexOfLink);
this.pLink.setResizable(false);
this.pLink.setSize(280,177);
this.pLink.setLocation((link.getX1()+link.getX2())/2,(link.getY1()+link.getY2())/2);
this.pLink.setLocation((link.getX1()+link. getX2())/2,(link.getY1()+link.getY2())/2);
this.pLink.setVisible(true);
}

Expand Down Expand Up @@ -2111,10 +2111,10 @@ private void loadSimulation(File sourceLocation){
}

private void start(){
String net = "files/" + simTmpUrl+ "/network.net";
String sim = "files/" + simTmpUrl + "/simulation.sim";
String res = "files/" + simTmpUrl + "/results.res";
String pairs = "files/" + simTmpUrl +"/pairs.prs";
String net = "Files/" + simTmpUrl+ "/network.net";
String sim = "Files/" + simTmpUrl + "/simulation.sim";
String res = "Files/" + simTmpUrl + "/results.res";
String pairs = "Files/" + simTmpUrl +"/pairs.prs";

Vector config = new Vector(3);
Simulation simulacao = SimulationFileController.readFile(sim, config); //parametros da simulacao
Expand Down Expand Up @@ -2192,7 +2192,7 @@ private void initOtherComponents() throws FileNotFoundException {
mPanelDesenho.setLayout(null);
mPanelDesenho.setBackground(new Color(255,255,255));
mPanelDesenho.setOpaque(false);
mPanelDesenho.setPreferredSize(jLayeredPane1.getPreferredSize());
//mPanelDesenho.setPreferredSize(jLayeredPane1.getPreferredSize());

//jPanelDesenhoTop.add(mPanelDesenho);

Expand All @@ -2204,7 +2204,7 @@ private void initOtherComponents() throws FileNotFoundException {
jXMapKit1.setVisible(true);
jXMapKit1.setSize(400, 400);
jXMapKit1.setZoom(11);
jXMapKit1.setPreferredSize(mPanelDesenho.getPreferredSize());
//jXMapKit1.setPreferredSize(mPanelDesenho.getPreferredSize());
jLayeredPane1.add(jXMapKit1, new Integer(0), 0);
jLayeredPane1.add(mPanelDesenho, new Integer(1), 1);
mPanelDesenho.setMapa(jXMapKit1.getMainMap());
Expand Down
22 changes: 21 additions & 1 deletion src/request/Request.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
package request;

import java.util.ArrayList;
import java.util.List;
import network.*;
import routing.Route;
import simulator.EventMachine;

public class Request
extends RequestMother {


private List <Request> relatedRequests;
private Request endToEnd;

public Request(Pair p, Mesh mesh) {
super(p, mesh);
relatedRequests = new ArrayList<Request>();
}

public List<Request> getRelatedRequests(){
return relatedRequests;
}

void setEndToEndRequest(Request rEndToEnd) {
this.endToEnd = rEndToEnd;
}

public Request getEndToEndRequest(){
return endToEnd;
}

//------------------------------------------------------------------------------
Expand Down Expand Up @@ -93,4 +111,6 @@ public boolean requestAffected(Link link) {
return this.route.containThisLink(link);
}



}
Loading

0 comments on commit 2d4c503

Please sign in to comment.