Skip to content

Commit

Permalink
Fix/improve infeasible pb tests (#289)
Browse files Browse the repository at this point in the history
* Renaming infeasibility analyzer : renaming in class Constraint

* Renaming infeasibility analyzer : renaming in class InfeasibleProblemReport

* Simplifying infeasibility analyzer

* format

* New constraint to detect by infeasibility analyzer

* Infeasibility - to more changeability : simplification + renaming

* Infeasibility - to more changeability : simplifying function StringBetweenAngleBrackets

* Infeasibility - to more changeability : simplifying functions areaName() and timeStep()

* Infeasibility - to more changeability : renaming Constraint::getType() into type()

* Infeasibility - to more changeability : function STSName() ==> simplified and renamed into STSname()

* Infeasibility - to more changeability : remove unnecessary comments

* Infeasibility - to more changeability : simplifying function sortConstraintsByType()

Check on the current constraint's name number of components is useless : it cannot be null.

* Infeasibility - to more changeability : in unit tests, change misleading BC names

* Infeasibility - to more changeability : split constraints logs into 2 parts (suspicious constraints and infeasibility causes)

* Infeasibility - to more changeability : move call to sortConstraintsByType with his friends

* Infeasibility - to more changeability : run clang-format

* Make infeasibily more changeable : move sorting and trimming slack vars from report to analysis

* Make infeasibily more changeable : introducing constraints list to be detected by slack analysis

* Make infeasibily more changeable : use new list of constraint and remove old style

* Make infeasibily more changeable : remove old class Constraint (now useless) + move a header to the right location

* Make infeasibily more changeable : renaming - detected ==> watched (for variables, classes, files)

* Make infeasibily more changeable : split function addSlackVariables into 2 functions

* Make infeasibily more changeable : clang format

* Make infeasibily more changeable : correction due to review

* Make infeasibily more changeable : add use of a factory and remove the clone function

* [skip ci] Make infeasibily more changeable : renaming

* Make infeasibily more changeable : clang format

* Make infeasibily more changeable : avoid useless data member + avoid passing constraint factory

* [skip ci] Make infeasibily more changeable : correct function naming

* Make infeasibility more changeable : simplify constraint factory

* Make infeasibility more changeable : simplifying constraint classes

* Make infeasibility more changeable : fix compilation error on Linux + clang format

* [skip ci] Make infeasibility more changeable ; very small change

* Make infeasibility more changeable : use a std algorithm instead of a for loop

* [skip ci] Make infeasibility more changeable : renaming

* Make infeasibility more changeable : simplify constraint classes yet again

* Make infeasibility more changeable : replace a loop with the use of std::copy_if

* [skip ci] Make infeasibility more changeable : remove useless include

* Make infeasibility more changeable : use of ranges algorithm instead of classic std algorithm

* [skip ci] Make infeasibility more changeable : clang format

* Make infeasibility more changeable : simplifying constraint factory

* Make infeasibility more changeable : corrections due to review

* Fix Sonar issues on AntaresSimulatorTeam#2232 (AntaresSimulatorTeam#2257)

Fix Sonar issues on AntaresSimulatorTeam#2232

* Minor fixes, use std::unique_ptr, add safety (AntaresSimulatorTeam#2256)

- Use `std::unique_ptr` since we don't share objects
- Remove lambda functions (see
https://en.cppreference.com/w/cpp/memory/unique_ptr/make_unique)
- Use `const std::string&`
- Make check on `create`, add safety on no result found
- Remove unused variables in tests

* Make infeasibility more changeable : changing inner class constant into a static const

* Make infeasibility more changeable : trial to simplify method InfeasibleProblemReport :: filterConstraintsToOneByType()

* Make infeasibility more changeable : fix filterConstraintsToOneByType (used to fail on unit tests)

* Make infeasibility more changeable : simplify filterConstraintsToOneByType

* Make infeasibility more changeable : fix compilation error

* Make infeasibility more changeable : add comments to make code more understandable

* Use std::type_index (AntaresSimulatorTeam#2264)

* Formatting

* Make infeasibility more changeable : fix an error in infeasibility causes order in he report

* Fix linking

* Minor fixes, use std::unique_ptr

* Caller safer

* Revert

* Improve infeasible pb test : improve constraint violation detection

* Improve infeasible pb test : fix detection error detection + change report messages printings

* Improve infeasible pb test : fix bug in logging violated variables + add tests on report slack analysis

* Improve infeasible pb test : test slack analysis results (list of slack variables, ordered and trimmed)

* Improve infeasible pb test : make creation of a problem with infeasible constraints more generic

* Improve infeasible pb test : adding a test on limit of 10 to detected numbers of constraints

* Improve infeasible pb test : replace a simple loop on integers with a loop involving std::ranges::iota_view(...)

* Improve infeasible pb test : fixing a compilation error on Linux (<format> not available)

* Improve infeasible pb test : small improvements on unit tests

* Improve infeasible pb test : restore a wrong removal

* Improve infeasible pb test : add a new test on reporting infeasibility causes + preliminary work

* Improve infeasible pb test : removing a useless test

* Format

* [skip ci] Improve infeasible pb test : very small fix

* Improve infeasible pb test : simplify tests by simplifying infeasible problem construction

* Improve infeasible pb test : give a name to the (only) var of constraints we build for tests

Unlike what was done, the only var in the constraint should a name on its own : a name different from the constraint' name

* Improve infeasible pb test : cleaning due to review

* Improve infeasible pb test : renaming

* [skip ci] Improve infeasible pb test : remove useless include

* Remove manual dynamic allocations in Xcast (AntaresSimulatorTeam#2270)

AntaresSimulatorTeam#2244

---------

Co-authored-by: Guillaume PIERRE <[email protected]>
Co-authored-by: Florian OMNES <[email protected]>
Co-authored-by: Florian Omnès <[email protected]>
Co-authored-by: payetvin <[email protected]>
  • Loading branch information
5 people authored Aug 8, 2024
1 parent 748cd42 commit b19dd30
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit b19dd30

Please sign in to comment.