From 4d037a64e1973b1ae177ed80b7a613292e0e5a4d Mon Sep 17 00:00:00 2001 From: Andrea Censi Date: Sun, 10 Dec 2023 20:54:59 +0100 Subject: fall2023 --- extra_info.md | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 extra_info.md (limited to 'extra_info.md') diff --git a/extra_info.md b/extra_info.md new file mode 100644 index 0000000..2b2fb69 --- /dev/null +++ b/extra_info.md @@ -0,0 +1,71 @@ +# Extra information + +### Running the DP solver for a specific model and query + +`act4e-mcdp-solve-dp` is the command you use to run the DP solver +for a particular model and query: + + act4e-mcdp-solve-dp \ + --solver act4e_mcdp_solution.DPSolver \ + --query FixFunMinRes \ + --model downloaded/lib1-parts/lib1-parts.primitivedps.e03_splitter1.mcdpr1.yaml \ + --data '10' + +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/lib1-parts.primitivedps.e03_splitter1.mcdpr1.yaml`: this selects the model to use for optimization; +* `--data '10'`: this selects the query to give. + +You will see the result in the logs: + +``` +INFO query: 10 +INFO solution: Interval(pessimistic=UpperSet(minima=[]), optimistic=UpperSet(minima=[])) +``` + +The template `act4e_mcdp_solution.MySolution` always returns an empty `UpperSet` (= infeasible). + + + +# Creating more test cases + +The models are created using [this online environment][IDE] - very experimental! + +[IDE]: https://editor.zuper.ai/editor/gh/co-design-models/ACT4E-exercises-spring2023/main/view/ + +If you make an account you can play around. You can obtain the YAML file read by `ACT4E-mcdp` by selecting the "DP compiled YAML representation" option from the drop down menu. Some of the other visualizations might also be helpful. + +[Example: drone model](https://editor.zuper.ai/editor/gh/co-design-models/ACT4E-exercises-spring2023/main/view/libraries/lib2-simple/specs/models/things/drone1/) + + mcdpdrone + + + + -- cgit v1.2.1