# SCIPPlan
SCIPPlan [1,2,3] is a SCIP-based [4] hybrid planner for domains with i) mixed (i.e., real and/or discrete valued) state and action spaces, ii) nonlinear state transitions (which can be specified as ODEs or directly as solution equations) that are functions of time, and iii) general reward functions. SCIPPlan iteratively i) finds violated constraints (i.e., zero-crossings) by simulating the state transitions, and ii) adds the violated (symbolic) constraints back to its underlying optimisation model, until a valid plan is found.
## Example Domain: Navigation
<img src=./visualisation/scipplan_navigation_1.gif width="32%" height="32%"> <img src=./visualisation/scipplan_navigation_2.gif width="32%" height="32%"> <img src=./visualisation/scipplan_navigation_3.gif width="32%" height="32%">
Figure 1: Visualisation of different plans generated by SCIPPlan [1,2,3] for example navigation domains where the red square represents the agent, the blue shapes represent the obstacles, the gold star represents the goal location and the delta represents time. The agent can control its acceleration and the duration of its control input to modify its speed and location in order to navigate in a two-dimensional maze. The purpose of the domain is to find a path for the agent with minimum makespan such that the agent reaches its the goal without colliding with the obstacles.
Note that SCIPPlan does not linearise or discretise the domain to find a valid plan.
## Dependencies
i) Solver: SCIP (the current implementation uses the python interface to the SCIP solver, i.e., PySCIPOpt [5]). This version of SCIPPlan has only been tested on PySCIOpt>=4.0.0 using earlier an version of pyscipopt may result in unintended behaviour.
ii) Symbolic Mathematics: SymPy [6].
## Installing and Running SCIPPlan
In order to Install SCIPPlan you need to ensure you have a working version of the SCIP optimisation suite on your system which can be installed from [the SCIP website](https://www.scipopt.org). For more information about SCIP and PySCIPOpt refer to this [installation guide](https://github.com/scipopt/PySCIPOpt/blob/master/INSTALL.md).
After installing SCIP you will be able to install SCIPPlan using
```bash
pip install scipplan
```
Now you will be able to run some of the example domains which include
- Navigation (3 instances)
To run one of these examples all you need to do is run
```bash
scipplan -D navigation -I 1
```
which will run the 1st instance of the navigation domain using the ODEs as the transition function with the help of SymPy [6]. Similarly, the command
```bash
scipplan -D navigation -I 1 --provide-sols
```
will run the the 1st instance of the navigation domain using the solution equations as the transition function. For more information regarding the available tags and what they mean run `scipplan --help`.
Alternatively you can import scipplan classes to run it using python.
```py
from scipplan.scipplan import SCIPPlan
from scipplan.config import Config
from scipplan.helpers import write_to_csv
```
this will import the only two classes and function needed to run SCIPPlan. Then to set the configuration either create an instance of the Config class by setting the params or by retrieving the cli input
```py
# Set params
config = Config(domain="navigation", instance=1)
# Retrieve cli args
config = Config.get_config()
```
after which you are able to solve problem by either using the solve or optimize methods
```py
# The optimize method just optimises the problem for the given horizon
plan = SCIPPlan(config)
plan.optimize()
# Class method which takes input the config, solves the problem
# with auto incrementing the horizon until a solution is found then
# returns the plan as well as the time taken to solve the problem
plan, solve_time = SCIPPlan.solve(config)
```
In order to save the generated constraints for the horizon solved as well as the results, use the following code
```py
write_to_csv("new_constraints", plan.new_constraints, config)
write_to_csv("results", plan.results_table, config)
```
## Citation
If you are using SCIPPlan, please cite the papers [1,2,3] and the underlying SCIP solver [4].
## References
[1] Buser Say and Scott Sanner. [Metric Nonlinear Hybrid Planning with Constraint Generation](http://icaps18.icaps-conference.org/fileadmin/alg/conferences/icaps18/workshops/workshop06/docs/proceedings.pdf#page=23). In PlanSOpt, pages 19-25, 2018.
[2] Buser Say and Scott Sanner. [Metric Hybrid Factored Planning in Nonlinear Domains with Constraint Generation](https://link.springer.com/chapter/10.1007/978-3-030-19212-9_33). In CPAIOR, pages 502-518, 2019.
[3] Buser Say. [Robust Metric Hybrid Planning in Stochastic Nonlinear Domains Using Mathematical Optimization](https://ojs.aaai.org/index.php/ICAPS/article/view/27216). In ICAPS, pages 375-383, 2023.
[4] [SCIP](https://www.scipopt.org/)
[5] [PySCIPOpt](https://github.com/SCIP-Interfaces/PySCIPOpt)
[6] [SymPy](https://www.sympy.org/en/index.html)
Raw data
{
"_id": null,
"home_page": null,
"name": "scipplan",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "scip, automated planner",
"author": "Ari Gestetner, Buser Say",
"author_email": "ari.gestetner@monash.edu, buser.say@monash.edu",
"download_url": "https://files.pythonhosted.org/packages/98/90/90725c53516b27ea1f6f7a4371e4e3511f15a9de547ab92159e1a26a0190/scipplan-0.2.2a0.tar.gz",
"platform": null,
"description": "# SCIPPlan\n\nSCIPPlan [1,2,3] is a SCIP-based [4] hybrid planner for domains with i) mixed (i.e., real and/or discrete valued) state and action spaces, ii) nonlinear state transitions (which can be specified as ODEs or directly as solution equations) that are functions of time, and iii) general reward functions. SCIPPlan iteratively i) finds violated constraints (i.e., zero-crossings) by simulating the state transitions, and ii) adds the violated (symbolic) constraints back to its underlying optimisation model, until a valid plan is found.\n\n## Example Domain: Navigation\n\n<img src=./visualisation/scipplan_navigation_1.gif width=\"32%\" height=\"32%\"> <img src=./visualisation/scipplan_navigation_2.gif width=\"32%\" height=\"32%\"> <img src=./visualisation/scipplan_navigation_3.gif width=\"32%\" height=\"32%\">\n\n\nFigure 1: Visualisation of different plans generated by SCIPPlan [1,2,3] for example navigation domains where the red square represents the agent, the blue shapes represent the obstacles, the gold star represents the goal location and the delta represents time. The agent can control its acceleration and the duration of its control input to modify its speed and location in order to navigate in a two-dimensional maze. The purpose of the domain is to find a path for the agent with minimum makespan such that the agent reaches its the goal without colliding with the obstacles. \n\nNote that SCIPPlan does not linearise or discretise the domain to find a valid plan.\n\n## Dependencies\n\ni) Solver: SCIP (the current implementation uses the python interface to the SCIP solver, i.e., PySCIPOpt [5]). This version of SCIPPlan has only been tested on PySCIOpt>=4.0.0 using earlier an version of pyscipopt may result in unintended behaviour. \n\nii) Symbolic Mathematics: SymPy [6].\n\n## Installing and Running SCIPPlan\nIn order to Install SCIPPlan you need to ensure you have a working version of the SCIP optimisation suite on your system which can be installed from [the SCIP website](https://www.scipopt.org). For more information about SCIP and PySCIPOpt refer to this [installation guide](https://github.com/scipopt/PySCIPOpt/blob/master/INSTALL.md).\n\nAfter installing SCIP you will be able to install SCIPPlan using\n```bash\npip install scipplan\n```\nNow you will be able to run some of the example domains which include \n- Navigation (3 instances)\n\nTo run one of these examples all you need to do is run\n```bash\nscipplan -D navigation -I 1\n```\nwhich will run the 1st instance of the navigation domain using the ODEs as the transition function with the help of SymPy [6]. Similarly, the command\n```bash\nscipplan -D navigation -I 1 --provide-sols\n```\nwill run the the 1st instance of the navigation domain using the solution equations as the transition function. For more information regarding the available tags and what they mean run `scipplan --help`.\n\nAlternatively you can import scipplan classes to run it using python.\n```py\nfrom scipplan.scipplan import SCIPPlan\nfrom scipplan.config import Config\nfrom scipplan.helpers import write_to_csv\n```\nthis will import the only two classes and function needed to run SCIPPlan. Then to set the configuration either create an instance of the Config class by setting the params or by retrieving the cli input\n```py\n# Set params\nconfig = Config(domain=\"navigation\", instance=1)\n# Retrieve cli args\nconfig = Config.get_config()\n```\nafter which you are able to solve problem by either using the solve or optimize methods\n```py\n# The optimize method just optimises the problem for the given horizon\nplan = SCIPPlan(config)\nplan.optimize()\n# Class method which takes input the config, solves the problem \n# with auto incrementing the horizon until a solution is found then \n# returns the plan as well as the time taken to solve the problem\nplan, solve_time = SCIPPlan.solve(config) \n```\nIn order to save the generated constraints for the horizon solved as well as the results, use the following code\n```py\nwrite_to_csv(\"new_constraints\", plan.new_constraints, config)\nwrite_to_csv(\"results\", plan.results_table, config)\n```\n\n## Citation\n\nIf you are using SCIPPlan, please cite the papers [1,2,3] and the underlying SCIP solver [4].\n\n## References\n[1] Buser Say and Scott Sanner. [Metric Nonlinear Hybrid Planning with Constraint Generation](http://icaps18.icaps-conference.org/fileadmin/alg/conferences/icaps18/workshops/workshop06/docs/proceedings.pdf#page=23). In PlanSOpt, pages 19-25, 2018.\n\n[2] Buser Say and Scott Sanner. [Metric Hybrid Factored Planning in Nonlinear Domains with Constraint Generation](https://link.springer.com/chapter/10.1007/978-3-030-19212-9_33). In CPAIOR, pages 502-518, 2019.\n\n[3] Buser Say. [Robust Metric Hybrid Planning in Stochastic Nonlinear Domains Using Mathematical Optimization](https://ojs.aaai.org/index.php/ICAPS/article/view/27216). In ICAPS, pages 375-383, 2023.\n\n[4] [SCIP](https://www.scipopt.org/)\n\n[5] [PySCIPOpt](https://github.com/SCIP-Interfaces/PySCIPOpt)\n\n[6] [SymPy](https://www.sympy.org/en/index.html)\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Metric Hybrid Factored Planning in Nonlinear Domains with Constraint Generation in Python.",
"version": "0.2.2a0",
"project_urls": null,
"split_keywords": [
"scip",
" automated planner"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "240f23996fdec43164998c41d2515a8c2d4eded48bd87b4a9851a1602dc6b29d",
"md5": "1d502a3063f51d4b2ca061ac906bcbfd",
"sha256": "eff603d2fc3b1472ac5169c4493e1891ab04380fce5d3e78201e52e85633936b"
},
"downloads": -1,
"filename": "scipplan-0.2.2a0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "1d502a3063f51d4b2ca061ac906bcbfd",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 34484,
"upload_time": "2025-07-25T04:04:52",
"upload_time_iso_8601": "2025-07-25T04:04:52.154892Z",
"url": "https://files.pythonhosted.org/packages/24/0f/23996fdec43164998c41d2515a8c2d4eded48bd87b4a9851a1602dc6b29d/scipplan-0.2.2a0-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "989090725c53516b27ea1f6f7a4371e4e3511f15a9de547ab92159e1a26a0190",
"md5": "a15b87a24c0dbbff6a88dc6958462ad4",
"sha256": "27d0a1c3fc1a6dfa59f2cc8dda82f67b31d7c2cd002dd96228e21cdb56179ba9"
},
"downloads": -1,
"filename": "scipplan-0.2.2a0.tar.gz",
"has_sig": false,
"md5_digest": "a15b87a24c0dbbff6a88dc6958462ad4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 18712,
"upload_time": "2025-07-25T04:04:54",
"upload_time_iso_8601": "2025-07-25T04:04:54.563601Z",
"url": "https://files.pythonhosted.org/packages/98/90/90725c53516b27ea1f6f7a4371e4e3511f15a9de547ab92159e1a26a0190/scipplan-0.2.2a0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-25 04:04:54",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "scipplan"
}