Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor fix: globalconstraint.py and python_buildins.py #337

Merged
merged 7 commits into from
Sep 8, 2023
Merged

Conversation

363734
Copy link
Contributor

@363734 363734 commented Jun 1, 2023

In python_buildins.py: minor fixes to comply with Pep 8
In globalconstraint.py: minor fixes to comply with Pep 8, some typos, one refactoring in the cumulative constraint to use numpy array operation instead of for loops

else:
demand_at_t += demand[job] * ((start[job] <= t) & (t < end[job]))
cons += [capacity >= demand_at_t]
for t in range(lb, ub+1):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should work but it doesn't... Our tests decomposing Cumulative are now failing.
It exposes another issue related to our implementation of numpy arrays.
I'll open a separate issue for that, but until that is fixed, we should revert this.

@IgnaceBleukx IgnaceBleukx added the blocked Pull request blocked by another pull request/issue. label Jun 5, 2023
@363734
Copy link
Contributor Author

363734 commented Jun 23, 2023

I revert the numpy formulation that was blocking. I'm opening an issue for it, so it can be fixed later. The rest can be pushed now

@Wout4
Copy link
Collaborator

Wout4 commented Sep 8, 2023

Lost track of this one, merging now

# Conflicts:
#	cpmpy/expressions/globalconstraints.py
@Wout4 Wout4 merged commit 0b6d7c5 into master Sep 8, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Pull request blocked by another pull request/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants