﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2528	block activationCon does not work properly	Lennart Ochel	Lennart Ochel	"The following model is not working properly. {{{activation.active}}} should switch from {{{true}}} to {{{false}}} at time = 1/2. But it stays {{{true}}} for all the time …

{{{#!mo
model test
block activationCon
  parameter input Integer nIn ""number of input places"";
  parameter input Integer nOut ""number of output places"";
  input Real tIn[:] ""marking of input places"";
  input Real tOut[:] ""marking of output places"";
  input Real arcWeightIn[:] ""arc weights of input places"";
  input Real arcWeightOut[:] ""arc weights of output places"";
  input Real minTokens[:] ""minimum capacities of input places"";
  input Real maxTokens[:] ""maximum capacities of output places"";
  input Boolean fed[:] ""input places are fed?"";
  input Boolean emptied[:] ""output places are emptied?"";
  output Boolean active ""activation of transition"";
  output Boolean weaklyInputActiveVec[nIn] 
      ""places that causes weakly input activation"";
  output Boolean weaklyOutputActiveVec[nOut] 
      ""places that causes weakly output activation"";
algorithm 
  active:=true;
  weaklyInputActiveVec:=fill(false, nIn);
  weaklyOutputActiveVec:=fill(false, nOut);

  for i in 1:nIn loop
      if not (tIn[i] > minTokens[i] or tIn[i] <= minTokens[i] and fed[i]) then
      active:=false;
    elseif tIn[i] <= minTokens[i] and fed[i] then
      weaklyInputActiveVec[i]:=true;
    else

    end if;
  end for;

  for i in 1:nOut loop
      if not (tOut[i] < maxTokens[i] or tOut[i] >= maxTokens[i] and emptied[i]) then
      active:=false;
    elseif tOut[i] >= maxTokens[i] and emptied[i] then
      weaklyOutputActiveVec[i]:=true;
    else

    end if;
  end for;
end activationCon;

  activationCon activation(nIn=1, nOut=1, tIn={1-time}, tOut={time}, minTokens = {0.5}, maxTokens={10}, fed = {false}, emptied={false}, arcWeightIn={1.0}, arcWeightOut={1.0});
end test;
}}}
"	defect	closed	high	1.9.1	Code Generation	trunk	fixed		
