summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Censi <AndreaCensi@users.noreply.github.com>2023-05-28 16:59:09 +0200
committerAndrea Censi <AndreaCensi@users.noreply.github.com>2023-05-28 16:59:09 +0200
commit652044d612ad225f58fafeb4259ae22b737af0cd (patch)
tree6d047385727ae259062999529a2d6b28774cd8f8
parentciskip (diff)
downloadact4e-mcdp-652044d612ad225f58fafeb4259ae22b737af0cd.tar.gz
act4e-mcdp-652044d612ad225f58fafeb4259ae22b737af0cd.zip
more
-rw-r--r--README.md70
1 files changed, 63 insertions, 7 deletions
diff --git a/README.md b/README.md
index 5f753c6..9fb2ec1 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,10 @@
Install Docker:
* (Mac, Linux) Follow the [installation instructions](https://docs.docker.com/get-docker/)
-* (Windows): Follow the manual installation steps for Windows Subsystem for Linux [here](https://docs.microsoft.com/en-us/windows/wsl/install). On step 1, follow the recommendation of updating to WSL 2. You do not necessarily need to install Windows Terminal. Now go [here](https://docs.docker.com/desktop/windows/install/) and follow the "Install Docker Desktop on Windows" instructions. You can then start Docker Desktop and follow the quick start quide.
+* (Windows): Follow the manual installation steps for Windows Subsystem for Linux [here](https://docs.microsoft.com/en-us/windows/wsl/install). On
+ step 1, follow the recommendation of updating to WSL 2. You do not necessarily need to install Windows Terminal. Now
+ go [here](https://docs.docker.com/desktop/windows/install/) and follow the "Install Docker Desktop on Windows" instructions. You can then start
+ Docker Desktop and follow the quick start quide.
Install VS Code [using the instructions online](https://code.visualstudio.com/download).
@@ -49,9 +52,9 @@ Use this command to download the test cases:
Then you have available a few test cases in the directory `downloaded/`.
-### Running the DP solver
+### Running the DP solver for a specific model and query
-This is the command you use to run the DP solver:
+`act4e-mcdp-solve-dp` is the command you use to run the DP solver:
act4e-mcdp-solve-dp \
--solver act4e_mcdp_solution.DPSolver \
@@ -64,7 +67,7 @@ In brief:
* `--solver act4e_mcdp_solution.DPSolver`: this selects the class for your solver;
* `--query FixFunMinRes`: this selects `FixFunMinRes` (other choice: `FixResMaxFun`);
* `--model downloaded/lib1-parts.e03_splitter1.primitivedps.mcdpr1.yaml`: this selects the model to use for optimization;
-* `--data '10'`: this selects the query to give.
+* `--data '10'`: this selects the query to give.
It is a YAML dictionary with a key for each functionality name.
@@ -77,9 +80,62 @@ INFO solution: Interval(pessimistic=UpperSet(minima=[]), optimistic=UpperSet(min
The template `act4e_mcdp_solution.MySolution` always returns an empty `UpperSet` (= infeasible).
+### Running the DP solver on a set of test cases
-### Running the MCDP solver
+`act4e-mcdp-solve-dp-queries` is the command you use to run the DP solver on a set of test cases:
+
+ act4e-mcdp-solve-dp-queries \
+ -d downloaded \
+ --solver act4e_mcdp_solution.DPSolver
+
+In brief:
+
+* `-d downloaded`: this selects the directory with the test cases to use;
+* `--solver act4e_mcdp_solution.DPSolver`: this selects the class for your solver.
+
+At the end of the processing, you will see an output similar to this:
+
+```
+Summary:
+
+comparison_not_implemented:
+- downloaded/lib1-parts.dp-queries.FixFunMinRes.e10_conversions2-0006.mcdpr1.yaml
+- downloaded/lib1-parts.dp-queries.FixResMaxFun.e05_sumf-0002.mcdpr1.yaml
+...
+failed:
+- downloaded/lib1-parts.dp-queries.FixResMaxFun.e03_splitter1-0006.mcdpr1.yaml
+- downloaded/lib1-parts.dp-queries.FixFunMinRes.e12_catalogue_true-0010.mcdpr1.yaml
+...
+succeeded:
+- downloaded/lib1-parts.dp-queries.FixResMaxFun.e12_catalogue_empty-0001.mcdpr1.yaml
+- downloaded/lib1-parts.dp-queries.FixFunMinRes.e12_catalogue-0001.mcdpr1.yaml
+...
+INFO Find the summary at 'output_summary.yaml'
+```
+For each query, the result is either `succeeded` or `failed`. (The status `comparison_not_implemented` means that we didn't implement yet
+the comparison between the result and the expected result.)
+
+In the file `output_summary.yaml` you will find details of the results.
+
+For example, one of the results could be:
+
+```yaml
+downloaded/lib1-simple.dp-queries.FixResMaxFun.all_together-0011.mcdpr1.yaml:
+ query: FixResMaxFun
+ value: Decimal('Infinity')
+ result_expected: Interval(pessimistic=LowerSet(maximals=[Decimal('Infinity')]),
+ optimistic=LowerSet(maximals=[Decimal('Infinity')]))
+ result_obtained: Interval(pessimistic=LowerSet(maximals=[]), optimistic=LowerSet(maximals=[]))
+ status: failed
+
+```
+
+This indicated the type of query (`FixResMaxFun`), the value of the query (`Decimal('Infinity')`), the expected result (`result_expected`) and the
+obtained result (`result_obtained`).
+This particular test case failed because the obtained result is empty ("infeasible"), while the expected result is not empty.
+
+### Running the MCDP solver
This is the command you use to run the MCDP solver:
@@ -98,6 +154,6 @@ You should see the output:
query: {'f': Decimal('42')}
solution: Interval(pessimistic=UpperSet(minima=[]), optimistic=UpperSet(minima=[]))
-## Next steps
+## Running the MCDP solver on a set of test cases
-TODO: exhaustive test case
+TODO: finish this part