Skip to content

possible bug #494

Closed
Closed
@Gh0l4

Description

@Gh0l4

Hello!
As instructed by @Dekker1 I'm posting what I could come up as the smallest example possible:

%%  dataset 1
T = 10;
E = 40;
G = 2;
score = [5,10];

/* 
%% NOTE: for this input data it works!
%%  dataset 9
T = 12;
E = 30;
G = 4;
score = [5,4,2,3];
*/

int: T;
int: E;
int: G;
set of int: ELEMENTS = 0..E;
set of int: TIME  = 1..T;
set of int: ACTOR  =  1..G;
array[ACTOR] of ELEMENTS: score;
%%%%
var TIME: end; 
array[ACTOR,TIME] of var    -1..1000         : act;
array[ACTOR,TIME] of var    {0, 5, 10}       : max_act;
array[ACTOR] of set of -1..1000 : possible_positive_FIXED = [{0, 5},{0, 10}];               % data set 2
%array[ACTOR] of set of -1..1000 : possible_positive_FIXED = [{0, 5},{0, 4},{0, 2},{0, 3}]; % data set 9
constraint forall([ array2set(row(max_act,a)) subset possible_positive_FIXED[a] | a in ACTOR ]); % original

% but if instead we use the following, it doesn't break anything:
%constraint forall([act[a,t] in possible_positive_FIXED[a]| t in 1..end-1, a in ACTOR]);
%%%%
%either one of the following gives the error:
%constraint forall([act[a,end] <= max_act[a,end] |a in ACTOR where  act[a,end] > 0]);
constraint forall([act[a,end] <= max_act[a,end] |a in ACTOR]);
%%%%
solve minimize end;

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugresolvedIssue is resolved and the feature or fix will be part of next release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions