Echtzeitsysteme / Echtzeitsysteme/gips

`selectType([...])`: introduce changes to allow operator on references with `[0..1]` multiplicities

Closed
#362 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
7
Forks
4
Avg merge
5d 11h
Merged PRs (30d)
10

Description

Currently, the `selectType([...])` operator can only be used on collections.

It would be nice to have it adapted such that it can also be used on references with `[0..1]` multiplicities.

```
context.nodes.w.next.next->selectType(Workload)->sum(context.value * element.minNurseSkill)
// alternative
context.value * ((Workload) context.nodes.w.next.next).minNurseSkill
```

Example was taken from: https://github.com/Echtzeitsysteme/gips-examples/blob/c2b98e3741ea9b0349d0e9b3a84b002740e3bbc4/ihtcvirtualgipssolution/src/ihtcvirtualgipssolution/Model.gipsl#L698

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.