Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/scenario-form-default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@hashintel/petrinaut": patch
"@hashintel/petrinaut-core": patch
---

Makes the scenario form the only scenario form and removes the Ad-hoc scenarios setting.
4 changes: 2 additions & 2 deletions libs/@hashintel/petrinaut-core/src/ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ export const petrinautDocSummaries: Record<PetrinautDocName, string> = {
simulation:
"Single-run simulation: initial state, simulation settings (scenario picker, dt, ODE solver, parameters), running, frame computation, deadlock, playback controls, timeline, locked editing.",
scenarios:
"Named simulation configurations: scenario parameters, parameter bindings, per-place vs code-mode initial state, running and switching scenarios.",
"Named simulation configurations authored through the scenario form: Variables exposed as scenario parameters, parameter overrides, per-place initial state blocks, running and switching scenarios, the expression language, scenarios stored per place or as code by files, the AI or earlier versions.",
"ad-hoc-scenarios":
"Inline initial state + parameters without saving a scenario: the shared form (scenario.<name> variables, fixed/dynamic/swept-count rows chosen from the row gutter's menu, shared columns, phantom row, place totals, live type checking), its surfaces (quick simulation, experiments, scenario creation), and Sweep selections with generated adhoc_* parameter names.",
"Inline initial state + parameters without saving a scenario: the shared form (scenario.<name> variables, fixed/dynamic/swept-count rows chosen from the row gutter's menu, shared columns, phantom row, place totals, live type checking), its three surfaces (quick simulation, experiments, scenario creation and editing with Scenario Parameter toggles), Sweep selections with generated adhoc_* parameter names, saved scenarios shown in run mode.",
experiments:
"Monte Carlo batches: configuration (runs, seed, dt, max time, scenario), parameter sweeps, constraints (parameter and state, pass threshold), optimizing a sweep from its Parameters card (in-browser optimizer, steps, Stop), lifecycle/statuses, cancel/remove, header columns (Steps, Steps clear), metric charts, the Constraints and Sensitivity analysis cards, the steps table, Objective by step, compute backend, active-experiments popover.",
"actual-mode":
Expand Down
4 changes: 4 additions & 0 deletions libs/@hashintel/petrinaut-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,10 @@ export {
initialMarkingToAdHocPlaces,
type TruncatedPlace,
} from "./simulation/authoring/scenario/ad-hoc/materialize-run-state";
export {
adHocStateFromScenario,
type AdHocStateFromScenario,
} from "./simulation/authoring/scenario/ad-hoc/scenario-to-ad-hoc-state";
export { adHocScenarioStateSchema } from "./simulation/authoring/scenario/ad-hoc/ad-hoc-state-schema";
export { createHirMetricEvaluator } from "./simulation/frames/hir-metric";
export {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ export type TruncatedPlace = {
total: number;
};

function literalExpression(value: number | boolean | bigint | string): string {
export function literalExpression(
value: number | boolean | bigint | string,
): string {
switch (typeof value) {
case "number":
return String(value);
Expand Down
Loading
Loading