{
  "title": "estimate_cost",
  "public_path": "flex_rf.web.estimate_cost",
  "lookup_path": "tidy3d.web.estimate_cost",
  "slug": "flex_rf/web/estimate_cost",
  "public_url": "/rf/latest/autogenerated/flex_rf/web/estimate_cost/",
  "object_kind": "function",
  "introduction": "Compute the maximum FlexCredit charge for a given task.",
  "notes": "We can get the cost estimate of running the task before actually running it. This prevents us from\naccidentally running large jobs that we set up by mistake. The estimated cost is the maximum cost\ncorresponding to running all the time steps.\n\nCost is calculated assuming the simulation runs for\nthe full `run_time`. If early shut-off is triggered, the cost is adjusted proportionately.\nA minimum simulation cost may also apply, which depends on the task details.",
  "examples": "Basic example:\n\n```python\n# initializes job, puts task on server (but doesn't run it)\njob = web.Job(simulation=sim, task_name=\"job\", verbose=verbose)\n\n# estimate the maximum cost\nestimated_cost = web.estimate_cost(job.task_id)\n\nprint(f'The estimated maximum cost is {estimated_cost:.3f} Flex Credits.')\n```",
  "references": "",
  "signature": "estimate_cost(task_id: str, verbose: bool = True, solver_version: str | None = None)",
  "source": {
    "path": "flex/public/tidy3d/tidy3d/web/api/webapi.py",
    "url": "",
    "lineno": 1655,
    "endlineno": 1769
  },
  "bases": [],
  "parameter_rows": [
    {
      "name": "task_id",
      "annotation": "str",
      "default": "",
      "description": "",
      "origin": "declared"
    },
    {
      "name": "verbose",
      "annotation": "bool",
      "default": "True",
      "description": "",
      "origin": "declared"
    },
    {
      "name": "solver_version",
      "annotation": "str | None",
      "default": "None",
      "description": "",
      "origin": "declared"
    }
  ],
  "members": [],
  "group": "flex_rf.web"
}
