Find flip
find_flipFinds where an outcome changes, and gives the run on each side. request is a run_trajectory or solve request written out, its domain and card or its solver by the name find_model or the lists give, with no from, readout or example; vary is the place of the one number to change, such as "segments[0].load.current_a", "initial.soc", "dt_s" or "parameters.load_n"; low and high are the two ends of the span, in either order: the smaller is taken as low. The span is halved to the place where the outcome or the stop name changes or, with level, where a published quantity of the final state (of a solve: of result) crosses a value or a flag turns. When both ends give the same, 7 values between them (3 for solves) are run to find a band, and the answer says so. The answer gives the run on each side as a request ready to send again, with its outcome, its stop name and sentence and the run_seal or solution_seal that request has when sent alone, the two values in decimals and exact hex, and the width between them. A side that stops before computing has no proof. The same request gives the same pair. A search is bounded, and names the bound that stops it: 64 runs (FLIP_MAX_RUNS), 1000000 steps in all (FLIP_MAX_STEPS), or 64 solves (FLIP_MAX_SOLVES), the ends included, and no new solve once those made are counted at 20 s (FLIP_MAX_SECONDS); the pair it gives, sent back as the span, narrows it further. On this open connection a search is long work whenever it varies a solve or its runs may take more than 10000 steps together. One address holds at most 1 physics permit at a time, and long work (a solve, a plan of runs or of solves, a run of more than 10000 steps, or a verification that computes one again) runs 1 at a time. A call that finds no permit or no place is answered "Too many concurrent physics tasks." and nothing waits: the same call sent later is answered once one is free. An answer is waited for 60 seconds, and long work is stopped there.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| low | Yes | One end of the span. low and high may come in either order; the smaller is taken as low. | |
| high | Yes | The other end. | |
| vary | Yes | The place of the one number to vary: "segments[0].load.current_a", "segments[*].load.current_a" for every segment, "initial.soc", "dt_s", "segments[0].steps", "parameters.load_n". A count is varied in whole numbers. | |
| level | No | Optional. {"quantity": <a published quantity>, "value": <number>}: the span is halved to where that quantity of the final state (of a solve: of result) crosses the value. {"quantity": <a flag>}: to where a true-or-false value of it turns. | |
| request | Yes | A run_trajectory or solve request as that tool takes it. A search of solves makes no new solve once those made are counted at 20 s (FLIP_MAX_SECONDS), each at the time describe_solver states for one solve of its solver (open_connection), and always makes at least 3, both ends and one value between them: a count, not a clock, so the same request stops at the same solve on any machine. A search of runs is held by its steps (FLIP_MAX_STEPS). |