Skip to content

OptimizationDateTimeParameter.Step

property · OptimizationDateTimeParameter · cAlgo.API Since 5.9

DesktopCLICloud

Gets the step of the range, as a time span.

Environment behaviour

CLI — not supported. Available to plugins only, and plugins cannot run in the CLI.

Cloud — not supported. Available to plugins only, and plugins cannot run in the cloud.

Definition

public TimeSpan Step {get;}
optimizationDateTimeParameter.Step: TimeSpan

Returns TimeSpan

Examples

var parameter = new OptimizationDateTimeParameter("SessionStart", new DateTime(2025, 1, 1, 6, 0, 0), new DateTime(2025, 1, 1, 12, 0, 0), TimeSpan.FromHours(1));
Print("Range step: {0} hours", parameter.Step.TotalHours);
from System import DateTime, TimeSpan
parameter = OptimizationDateTimeParameter("SessionStart", DateTime(2025, 1, 1, 6, 0, 0), DateTime(2025, 1, 1, 12, 0, 0), TimeSpan.FromHours(1))
api.Print(f"Range step: {parameter.Step.TotalHours} hours")