Skip to content

Commit

Permalink
v0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
farzamfan committed Nov 15, 2018
1 parent 13d1e51 commit 2c3dd3a
Show file tree
Hide file tree
Showing 91 changed files with 521 additions and 310 deletions.
128 changes: 49 additions & 79 deletions conf/epos.properties
Original file line number Diff line number Diff line change
@@ -1,125 +1,95 @@
### Dataset ###
#The folder name in the datasets path.
#Make sure it has no spaces, tabs or newlines
#(alphanum and underscore combination preferred)
dataset=gaussian
#The folder name in the datasets path. Make sure it has no spaces, tabs or newlines (alphanum and underscore preferred)
dataset=gaussian


### Basic epos parameters ###
# number of simulations for whole epos experiments
### Basic epos properties ###
# any integer > 0
numSimulations=5

# maximum number of iterations per simulation
# any integer > 0
numIterations=40

# number of children per node in the EPOS
# tree. The tree is always symmetric and balanced
# any integer > 0
numChildren=2
numAgents=100

# number of agent used for the experiment
# if it is higher than available agents in
# dataset, the maximum available agents will
# be used.
# any integer > 0
numAgents=1000
numPlans=10

# number of plans used per agent
# if it is higher than the available plans
# per agent, the maximum number will be used
# any integer > 0
numPlans=500
numChildren=2

# number of plan dimensions used from the start
# of the plan. if more than available, the maximum
# available are used.
# any integer > 0
# exact dimensionality from the dataset
planDim=100


### Shuffle seeds ###

# initial agent structure before reorganization occurs
# any integer > 0
# initial agent structure before reorganization occurs, any integer > 0
shuffle=0

# path to a file containing permutation of indices
# file structure: one column integer index in each row
# path to a file containing permutation of indices, need its strucure: sphinx one column: integer index in each row
shuffle_file="permutation.csv"


### Weights of the global complex cost ###
numberOfWeights = 2
weightsString = "0.0,0.0"
# number of weights used in EPOS cost function
# weights are in string format, separated by ","

# weight1: in multiobjective EPOS, this is alpha (in this example 0.2)
# double from [0, 1], alpha + beta <= 1, unfairness
alpha=0.2

# weight2 in in multiobjective EPOS, this is beta (in this example 0.0)
# double from [0, 1], alpha + beta <= 1, local objective
beta=0

# alpha*unfairness + beta*local_cost + (1-alpha-beta)*global_costs


### Cost Functions ###

# Available cost function choices:
# NoGoal "MAX":max value, "VAR":variance, "STD":standard deviation,
# "INDEX": plan index value, "PREF": preference, "DISC": discomfort
# Goal Singal "SQR":square distance, "RMSE":root mean squared error,
# "RSS":residual sum of squares, "DOT":dot product, "XCORR":cross correlation

# Suggested values : "XCORR", VAR", "RSS", "RMSE"
globalCostFunction="VAR"

# Suggested values : "INDEX" "DISC", "PREF"
localCostFunction="INDEX"

# "MIN-MAX", "STD", "UNIT-LENGTH", only for "RSS" cost
scaling="MIN-MAX"


### Goal Signal ###

# filepath of the file containing the vector to be used as goal signal
# goal signal dimension are expected to be same as planDim,
# otherwise cropping or repetitive padding might occur
# if no path is provided, it will search for a “.target” file in the dataset folder
# if no file is found at all a zero valued goal signal will be generated
goalSignalPath=default
#a*unfairness + b*local_cost + (1-a-b)*global_costs
#avg local cost is local cost



### Reorganization strategy ###

# possible values: periodically, convergence, globalCostReduction, never.
strategy=periodically
# possible values: periodically, convergence, globalCostReduction, never. never_strategy: never does reorganization
strategy=never

# any integer > 0, if "periodically" strategy is chosen
periodically.reorganizationPeriod=3

# any positive integer > 0, if convergence strategy is chosen
# any positive integer (>0), if "convergence" strategy is chosen, the iteration at which the selections will be memorized to be sued after the following reorganization
convergence.memorizationOffset=5

# double from [0, 1]
globalCost.reductionThreshold=0.5

# any integer, keep same for reproducibility
# any integer. Keep the same seed to reproduce experiment results, what random permutations each strategy will explore, result reproducability
strategy.reorganizationSeed=0



#sphinx
goalSignalPath=default
#vector target for global response same dimensionality as plan
#filepath
globalCostFunction=VAR
# "VAR", "RSS", "RMSE", goal signal is ignored in funcitons with only global response as input, e.g. var
scaling="MIN-MAX"
# "STD", "UNIT-LENGTH", only for rss,
localCostFunction="INDEX"
# "COST", "PREF", # cost changes to discomfort


### Loggers ###
logger.GlobalCostLogger=true
logger.LocalCostMultiObjectiveLogger=true
logger.TerminationLogger=true
logger.SelectedPlanLogger=true
logger.GlobalResponseVectorLogger=true
logger.PlanFrequencyLogger=true
logger.UnfairnessLogger=true
logger.GlobalComplexCostLogger=true
logger.WeightsLogger=true
logger.ReorganizationLogger=true

# Code related logger for debugging and checks please check here:
# https://docs.oracle.com/javase/7/docs/api/java/util/logging/Level.html.
# For experiments "SEVERE" is preferred
logger.GlobalCostLogger = true
logger.LocalCostMultiObjectiveLogger = true
logger.TerminationLogger = true
logger.SelectedPlanLogger = true
logger.GlobalResponseVectorLogger = true
logger.PlanFrequencyLogger = true
logger.UnfairnessLogger = true
logger.GlobalComplexCostLogger = true
logger.WeightsLogger = true
logger.ReorganizationLogger = true
logger.VisualizerLogger = true

#Code related logger for debugging and checks
# please check here https://docs.oracle.com/javase/7/docs/api/java/util/logging/Level.html. For experiments "SEVERE" is preferred
logLevel="SEVERE"
Empty file modified license.txt
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion pom.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
<!-- add Main-Class to manifest file -->
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>experiment.ReorganizationExperiment</mainClass>
<mainClass>experiment.IEPOSExperiment</mainClass>
</transformer>
</transformers>
</configuration>
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: experiment.IEPOSExperiment

Empty file modified src/main/java/agent/Agent.java
100644 → 100755
Empty file.
Empty file modified src/main/java/agent/IterativeTreeAgent.java
100644 → 100755
Empty file.
Empty file modified src/main/java/agent/ModifiableIeposAgent.java
100644 → 100755
Empty file.
1 change: 0 additions & 1 deletion src/main/java/agent/MultiObjectiveIEPOSAgent.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ void processDownMessageMore(DownMessage parentMsg) { }

private void aggregateExtended() {
// System.out.println("EXTENDED!");

if (this.isIterationAfterReorganization()) {
for (int i = 0; i < this.children.size(); i++) {
approvals.add(true);
Expand Down
Empty file modified src/main/java/agent/Optimization.java
100644 → 100755
Empty file.
Empty file modified src/main/java/agent/PlanSelector.java
100644 → 100755
Empty file.
Empty file modified src/main/java/agent/TreeAgent.java
100644 → 100755
Empty file.
Empty file modified src/main/java/agent/dataset/Dataset.java
100644 → 100755
Empty file.
Empty file modified src/main/java/agent/dataset/DatasetDescriptor.java
100644 → 100755
Empty file.
9 changes: 4 additions & 5 deletions src/main/java/agent/dataset/DatasetShuffler.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
public class DatasetShuffler {

public static int row = -1;
public static Logger log = Logger.getLogger(DatasetShuffler.class.getName());

/**
* Default mapping is 0->0, 1->1, 2->2, ..
Expand Down Expand Up @@ -62,8 +61,8 @@ public static Map<Integer, Integer> getMappingByShuffling(Configuration config)

long timeAfter = System.currentTimeMillis();

log.info("Permuting time: " + ((timeAfter-timeBefore)/1000) + " seconds.");
log.info(Configuration.mapping.toString());
System.out.println("Permuting time: " + ((timeAfter-timeBefore)/1000) + " seconds.");
System.out.println(Configuration.mapping.toString());

return Configuration.mapping;
}
Expand All @@ -81,7 +80,7 @@ public static Map<Integer, Integer> getMappingForRepetitiveExperiments(Configura

long timeAfter = System.currentTimeMillis();

log.info("Permuting time: " + ((timeAfter-timeBefore)/1000) + " seconds.");
System.out.println("Permuting time: " + ((timeAfter-timeBefore)/1000) + " seconds.");

return Configuration.mapping;
}
Expand Down Expand Up @@ -131,7 +130,7 @@ public static Map<Integer, Integer> getMappingFromFile() {
Logger.getLogger(DatasetShuffler.class.getName()).log(Level.SEVERE, null, e);
}

//System.out.println(mapping.toString());
System.out.println(mapping.toString());
return mapping;
}

Expand Down
Empty file modified src/main/java/agent/dataset/FileVectorDataset.java
100644 → 100755
Empty file.
Empty file modified src/main/java/agent/dataset/GaussianDataset.java
100644 → 100755
Empty file.
Empty file modified src/main/java/agent/logging/AgentLogger.java
100644 → 100755
Empty file.
Empty file modified src/main/java/agent/logging/AgentLoggingProvider.java
100644 → 100755
Empty file.
Empty file modified src/main/java/agent/logging/GlobalComplexCostLogger.java
100644 → 100755
Empty file.
Empty file modified src/main/java/agent/logging/GlobalCostLogger.java
100644 → 100755
Empty file.
Empty file modified src/main/java/agent/logging/GlobalResponseVectorLogger.java
100644 → 100755
Empty file.
Empty file modified src/main/java/agent/logging/LocalCostMultiObjectiveLogger.java
100644 → 100755
Empty file.
Empty file modified src/main/java/agent/logging/LoggingProvider.java
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion src/main/java/agent/logging/PlanFrequencyLogger.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ private String internalFetching(MeasurementLog log) {
allTokens.addAll(log.getTagsOfType(Token.class));
Iterator<Object> iter = allTokens.iterator();

//System.out.println("Size is: " + allTokens.size());
// System.out.println("Size is: " + allTokens.size());

HashMap<Integer, HashMap<Integer, ArrayList<Token>>> perRun =
new HashMap<Integer, HashMap<Integer, ArrayList<Token>>>(); // <run, <idx, list>>
Expand Down
Empty file modified src/main/java/agent/logging/ReorganizationLogger.java
100644 → 100755
Empty file.
Empty file modified src/main/java/agent/logging/SelectedPlanLogger.java
100644 → 100755
Empty file.
Empty file modified src/main/java/agent/logging/TerminationLogger.java
100644 → 100755
Empty file.
Empty file modified src/main/java/agent/logging/UnfairnessLogger.java
100644 → 100755
Empty file.
Loading

0 comments on commit 2c3dd3a

Please sign in to comment.