LEMS / LEMS/jLEMS

EventPorts without EventOut not regarded

Open
#86 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
11
Forks
11
Avg merge
8h 6m
Merged PRs (30d)
1

Description

I am not quite sure if it is a bug or intended behavior, but whenever we utilize an out EventPort in our model without the corresponding EventOut directive, this port seems not to be further regarded during the simulation. For example, if we define an explicit input (e.g. ), it is required to have an output port in the target model. If this model provides an out-port, but without a corresponding eventout directive, this port can not be further used. By debugging jLEMS I somehow tried to locate the problem: In core/run/WithBuilder, there is a method called postBuild() which is used to retrieve the source and target by the path. However, the component returned as source/target does not contain any output ports (if no out directive is stated), therefore the overall process stops with an nullpoint exception given the fact, that no output port can be found.

I am fully aware that we can avoid this problem by simply stating an event-out directive, but this can result in other problems, e.g. when components communicate between each other.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in core/run/WithBuilder.postBuild() and trace how the source and target are retrieved for an explicitInput targeting a model with an out EventPort but no eventout directive. Reproduce the null-pointer failure with that model arrangement, then verify that the port remains usable during simulation without requiring an eventout directive.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.