-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from SinclairGurny/0.6_improvements
reorganized files and updated instructions
- Loading branch information
Showing
91 changed files
with
389 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Detailed PILOTS README (for PILOTS users) | ||
|
||
## Changelog | ||
|
||
In version 0.6, we added the following new features to the PILOTS grammar: | ||
* Support for supervised machine learning with `trainer` grammar. | ||
* Support for adding new machine learning algorithms. | ||
* Introduction of a new compiler flag to compile `trainer` (.trn) files. | ||
* Take-off weight estimation examples. | ||
|
||
In version 0.5, we added the following new features to the PILOTS grammar: | ||
* Support for multiple models of analytical redundancy (for details, see our [DASC2019 paper](http://wcl.cs.rpi.edu/papers/DASC2019_imai.pdf)). Example programs to support this feature are available under [examples/multi_redundancy](./examples/multi_redundancy) directory. | ||
- Support for multiple error values under the `errors` section. | ||
- Support for multiple `estimate` clauses under the `signatures`and `modes` sections | ||
(as a side effect of this new feature, the `when` clause is now deprecated). | ||
- Enhancement of the `modes` section to support general boolean expressions. | ||
- Scoped naming for output variables using the `namespace` command line option (e.g., output variable `x` from a child program with `--namespace A` option can be referred to as `A.x` in the parent program). | ||
Example is available [here](./examples/multi_redundancy/aoaspeedcheck3/run_speedcheck). | ||
* Reserved `mode` variable to store the estimated mode. | ||
* Introduction of `constants` section to declare constant values. | ||
* Support for `x^n` expression to denote the n-th power of x. | ||
|
||
In version 0.5, there are some new features to the PILOTS runtime system and its utilities: | ||
* Arguments to PILOTS programs are now handled by argparse4j. | ||
* Log messaging with Java Logging APIs. Logging levels are configurable through | ||
[`logging.properties`](logging.properties). | ||
* [`MultiChartsServer`](./pilots/util/MultiChartsServer.java) to show multiple plots in one window. Settings for multiple plots can be configured through a single yaml file ([example yaml file](./examples/airfrancesim/charts_conf.yaml)). Due to this functionality, JFreeChart and JCommon must be updated to v1.0.19 and v1.0.23 respectively. | ||
|
||
|
||
## Limitations | ||
|
||
* Language only supports error signatures that are a constant, or a linear function. Examples are: | ||
- S: e = 100; | ||
- S(K): e = K, abs(K) > 25; | ||
- S(K): e = 2*t + K, K < 0, k > -100; | ||
|
||
* The `when` clause introduced in our [Cluster Computing journal article](http://wcl.cs.rpi.edu/papers/pilots-cluster.pdf) is deprecated due to the support for multiple `estimate` clauses under the `signatures` and `modes` sections in v0.5. The previous implementation of the `when` clause assumed that there is only one `estimate` clause per signature, but we decided to give priority to the support for multiple `estimate` clauses in v0.5. | ||
|
||
|
||
## Future Work | ||
|
||
* Examples of potential additions for federated learning and methods to create ensemble models can be seen in the [future work](https://github.com/RPI-WCL/pilots/tree/master/examples/future_work) example | ||
|
||
* Types of error signatures we would like to support eventually: | ||
- S(K): e = K | ||
- S(K): e = K*t^2 | ||
- S: e = t | ||
- S(K1,K2): e = K1*t + K2, K1 != 0, K2 > threshold | ||
|
||
* Better syntax support for intervals (in signature constraints) | ||
- i.e., K in (0,10) or K not in (-10,10) | ||
|
||
* Simulation mode with support for dynamic simulation inputs | ||
- Multiple files, each corresponding to a particular input | ||
- Different directories for the different times | ||
- Forecast data | ||
|
||
* Enhanced error analysis accuracy | ||
- Different interpolation methods | ||
- More types of error signatures | ||
|
||
* Resolve the limitation for the `when` clause described above |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
trainer weight_model_exp; | ||
data | ||
/* N4207P_less.csv is another file with less training data, | ||
* using N4207P_less.csv model must interpolate from data that | ||
* less resembles current conditions | ||
*/ | ||
v_a, prs, tmp, alt, curr_w using | ||
file("TakeoffWeightExperiment/N4207P.csv", | ||
vind_kias,prs,tmp,alt_msl,curr_w ); | ||
model | ||
features: v_a, prs, tmp, alt; | ||
labels: curr_w; | ||
algorithm: | ||
WeightEstimator(verbose: false, cutoff: 0.0, da_close: 0.1, w_close: 0.1); | ||
/* verbose - progress messages (default: false), | ||
* cutoff - ignore all datapoints with airspeed less than cutoff (default: 0.0) | ||
* [used to ignore slow starting acceleration] | ||
* da_close - percent difference in values to estimate delta_acc (default: 0.1%) | ||
* [used to improve ability to account for changes in weight, | ||
* larger values means dataset is less uniform] | ||
* w_close - perfect difference in values to estimate delta_da (default: 0.1%) | ||
* [used to improve ability to account for changes in density altitude | ||
* larger values means dataset is less uniform] | ||
*/ | ||
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import java.util.*; | ||
import java.util.logging.*; | ||
import java.text.*; | ||
import java.net.Socket; | ||
import pilots.runtime.*; | ||
import pilots.runtime.errsig.*; | ||
|
||
public class Squared extends PilotsRuntime { | ||
private static Logger LOGGER = Logger.getLogger(Squared.class.getName()); | ||
private int currentMode; | ||
private int currentModeCount; | ||
private Timer timer; | ||
private long[] nextSendTimes; | ||
|
||
|
||
public Squared(String args[]) { | ||
super(args); | ||
|
||
timer = new Timer(); | ||
nextSendTimes = new long[1]; | ||
Arrays.fill(nextSendTimes, 0L); | ||
} | ||
|
||
public void produceOutputs() { | ||
try { | ||
openOutput(0, "o"); | ||
} catch (Exception ex) { | ||
ex.printStackTrace(); | ||
} | ||
|
||
final int interval = 1000; | ||
Map<String, Double> data = new HashMap<>(); | ||
timer.scheduleAtFixedRate(new TimerTask() { | ||
public void run() { | ||
// Inputs | ||
data.put("x", getData("x", new Method(Method.CLOSEST, "t"))); | ||
LOGGER.fine("Inputs: " + "x=" + data.get("x")); | ||
|
||
// Outputs computation | ||
data.put("o", data.get("x")*data.get("x")); | ||
|
||
// Data transfer | ||
Date now = getTime(); | ||
try { | ||
sendData(0, data.get("o")); | ||
LOGGER.info("Outputs: " + now + " " + "o=" + data.get("o") + " "); | ||
} catch (Exception ex) { | ||
ex.printStackTrace(); | ||
} | ||
|
||
} | ||
}, 0, interval); | ||
} | ||
|
||
public static void main(String[] args) { | ||
Squared app = new Squared(args); | ||
app.startServer(); | ||
app.produceOutputs(); | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
examples/future_work/ensemble_methods.plt → examples/future_work/Ensemble_methods.plt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
program ensemble; | ||
program ensemble_methods; | ||
constants | ||
w1 = 0.2; | ||
w2 = 0.5; | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.