Skip to content

Commit 070e5a4

Browse files
committed
updated README
1 parent c2e471a commit 070e5a4

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

README.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,14 @@ If you don't use our hosted version of the MDPvis web application, you will need
2828

2929
# Bridging MDPvis and Your Domain
3030

31-
MDPvis interfaces with any MDP simulator+optimizer that is callable by a web server. We have a few read-to-go
31+
MDPvis interfaces with any MDP simulator+optimizer that is callable by a web server.
3232

33-
Your domain web server is responsible for serving four HTTP requests from the visualization, transforms the query parameters to those expected by the simulator or optimizer, invokes the simulator or optimizer, then returns the results to MDPvis. There are four distinct requests that the bridge should support. We detail these requests below
33+
Your domain web server is responsible for serving four HTTP requests from the visualization, transforms the query parameters to those expected by the simulator or optimizer, invokes the simulator or optimizer, then returns the results to MDPvis. There are four distinct requests that the bridge should support. We detail these requests below.
3434

35-
The visualization expects your code to support the following requests. If your domain is written in Python, we recommend porting one of the example `domain_bridge.py` files to your domain.
3635

3736
## /initialize
3837

39-
The `/initialize` endpoint provides a set of parameters that will be sent to the simulator or optimizer on future requests. Here your responsibility is to return a [JSON](http://www.copterlabs.com/blog/json-what-it-is-how-it-works-how-to-use-it/) object listing the:
38+
The `/initialize` endpoint provides a set of parameters that will be sent to the simulator or optimizer on future requests. Here your responsibility is to return a [JSON](http://www.copterlabs.com/blog/json-what-it-is-how-it-works-how-to-use-it/) object listing these properties:
4039

4140
* Name
4241
* Description
@@ -46,7 +45,7 @@ The `/initialize` endpoint provides a set of parameters that will be sent to the
4645
* Step (How fast the value changes when pressing a button)
4746
* Units
4847

49-
of each parameter. An example of this data structure in Python is:
48+
An example of this data structure in Python is:
5049

5150
return {
5251

@@ -89,32 +88,33 @@ of each parameter. An example of this data structure in Python is:
8988
]
9089
}
9190

92-
In the MDPvis user interface, each control will be grouped into panels under the `panel_title`.
91+
In the MDPvis user interface, each control will be grouped into panels under the `panel_title`
92+
and display the [icon](http://getbootstrap.com/components/#glyphicons) specified by `panel_icon`.
9393

9494
## /trajectories?QUERY
9595

9696
When requesting Monte Carlo trajectories, MDPvis will send the current set of parameters as defined in the initialization and assigned in the user interface. The job of the web server is to map the parameters of the user interface into parameters to invoke the simulator. After simulations have completed, the data should be JSON serialized. An example of the data in Python is:
9797

98-
return [
98+
return {"trajectories": [
9999
[
100100
{"Burn Time": 4.261, "Timber Harvested": 251}, {"Burn Time": 40.261, "Timber Harvested": 0}
101101
],
102102
[
103103
{"Burn Time": 0.0, "Timber Harvested": 342}, {"Burn Time": 45.261, "Timber Harvested": 20}
104104
]
105-
]
105+
]}
106106

107107
These data are two trajectories of two states each. An additional special state variable, `image row`, gives
108108
an array of images or videos that should be displayed when selecting a trajectory. For example:
109109

110-
return [
110+
return {"trajectories": [
111111
[
112112
{"Burn Time": 4.261, "Timber Harvested": 251, "image row": ["traj1-1.png"]}, {"Burn Time": 40.261, "Timber Harvested": 0, , "image row": ["traj1-2.png"]}
113113
],
114114
[
115115
{"Burn Time": 0.0, "Timber Harvested": 342, "image row": ["traj2-1.mp4"]}, {"Burn Time": 45.261, "Timber Harvested": 20, "image row": ["traj2-1.mp4"]}
116116
]
117-
]
117+
]}
118118

119119
will attempt to display the images `traj1-1.png` and `traj1-1.png` when the user clicks the associated trajectory.
120120

@@ -158,4 +158,3 @@ Maintainer Mailing Address: PO Box 79, Corvallis, OR 97339, United States of Ame
158158

159159
Implementation by: Sean McGregor
160160
With: Hailey Buckingham, Thomas G. Dietterich, Rachel Houtman, Claire Montgomery, and Ronald Metoyer
161-

0 commit comments

Comments
 (0)