-
Notifications
You must be signed in to change notification settings - Fork 0
Description
We are changing the way we represent constraints:
Before a SoftwareConfiguration had hasConstraint to specify a constraint as string.
Now a SoftwareConfiguration uses hasConstraint to link a new resource called "sd:Constraint" <https://w3id.org/okn/o/sd#Constraint>.
This new resource has the following properties:
rdfs:label: Name of the constraint (string)sd:description: Description of the constraint (string)sd:hasRule: Store a rule (string)sd:hasVariable: Link to asd:VariablePresentation
My original idea was to let the configurations had as many constraints as necessary but link each one to a specific variable.
As example, in a Constraint with hasRule as follows:
ModelExecution(?ex),
hasModelInput(?ex, ?i),
hasLabel(?i, "cycles_weather_soil"),
hasDataBinding(?i, ?ds),
hasVariable(?ds, ?v),
hasLabel(?v, "average_wind_speed"),
hasValue(?v, ?val),
greaterThanOrEqual(?val, 20)
->
isValid(?ex, true),
hasValidityReason(?ex, "Average Wind Speed is >= 20")
we could infer the variable label using the hasVariable property.
But after some meetings I'm not sure if this is enough to fully support constraints.
I can see that the rules use inputs and variables in the code but I'm not sure if we want to link it to the Constraint object.
What do you think @dgarijo @varunratnakar ?
Should I add/remove some property?