nenupy.schedule.constraints.NightTimeCnst
- class nenupy.schedule.constraints.NightTimeCnst(sun_elevation_max=0.0, scale_elevation=True, weight=1)[source]
Bases:
Constraint- __call__(*arg)
Evaluate the constraint against the schedule properties.
- Returns:
The constraint score evaluated at each time step.
- Return type:
ndarray- Raises:
AttributeError – If the constraint does not have an
_evaluate()method.
Methods
__init__([sun_elevation_max, ...])get_score(indices)plot([fig, ax])Plot the constraint's score previously evaluated.
Attributes
Relative weight associated to the constraint.
- plot(fig=None, ax=None, **kwargs)
Plot the constraint’s score previously evaluated.
- Parameters:
fig (
Figure) – Figure instance to re-use for plotting purposes, by defaultNone(i.e., a newFigurewill be created)ax (
Axes) – Ax instance to re-use for plotting purposes, by defaultNone(i.e., a newAxeswill be created)figsize ([
float,float]) – Size of the figure, by default(10, 5)figname (
str) – Name of the figure to be saved, by default''(i.e., the figure is only displayed)marker (
str) – Plot marker type (seematplotlib.pyplot.plot()), by default'.'linestyle (
str) – Plot line style (seematplotlib.pyplot.plot()), by default':'linewidth (
int) – Plot line width (seematplotlib.pyplot.plot()), by default1
- property weight
Relative weight associated to the constraint. The constraint score of an observation block within a given schedule is ultimately taken at the weighted mean among all the constraints associated to this observaiton request.