Skip to content

Simulation parameters

kyrcha edited this page Jun 27, 2012 · 6 revisions

Simulation

READ

Entity containing the simulation parameters of the scenario i.e. Calendar, location information, number of runs etc. Each scenario can have many Simulations.

/{usrnm}/prj/{prj-id}/scn/{scn-id}/sim | GET /{usrnm}/prj/{prj-id}/scn/{scn-id}/sim | index

Fetches all the Simulations inside the scenario.

Consumes: Route

Produces: JSON

{
  simulations: [
    {id=1, name: "Summer simulation"},
    {id=2, name: "Winter simulation"}
  ]
}

--

/{usrnm}/prj/{prj-id}/scn/{scn-id}/sim/{sim-id} | GET /{usrnm}/prj/{prj-id}/scn/{scn-id}/sim/{sim-id} | show

Fetches the properties (simulation parameters) of a Simulation.

Consumes: Route

Produces: JSON

{
  id=1,
  name="Summer simulation",
  calendar: {
    dayOfMonth: ...,
    dayOfWeek: ...,
    month: ...,
    year: ...
  },
  locationInfo: {
    lat: ...,
    lng: ...
  },
  numberOfRuns: {
     n = 10
  }
}

--

/{usrnm}/prj/{prj-id}/scn/{scn-id}/sim/new | GET /{usrnm}/prj/{prj-id}/scn/{scn-id}/sim/new | new

Prepares for editing a new Simulation. Can be though as of loading an empty Simulation (empty form).

Consumes: Route

Produces: JSON

--

/{usrnm}/prj/{prj-id}/scn/{scn-id}/sim/{sim-id}/edit | GET /{usrnm}/prj/{prj-id}/scn/{scn-id}/sim/{sim-id}/edit | edit

Fetches the properties of the Simulation for editing.

Consumes: Route

Produces: JSON

CREATE

/{usrnm}/prj/{prj-id}/scn/{scn-id}/sim | POST /{usrnm}/prj/{prj-id}/scn/{scn-id}/sim | create

Creates a new _Simulation for the given Scenario, based on the properties filled up by the user when creating a new Simulation.

Consumes: Route, JSON

Produces: Create status

UPDATE

/{usrnm}/prj/{prj-id}/scn/{scn-id}/sim/{sim-id} | PUT /{usrnm}/prj/{prj-id}/scn/{scn-id}/sim/{sim-id} | update

Updates the properties of the Simulation after editing.

Consumes: Route, JSON

Produces: Update status

DELETE

/{usrnm}/prj/{prj-id}/scn/{scn-id}/sim | DELETE /{usrnm}/prj/{prj-id}/scn/{scn-id}/sim/{sim-id} | delete

Deletes the existing Simulation.

Consumes: Route

Produces: Delete status


Clone this wiki locally