Skip to content

Commit

Permalink
Squashed 'scipy/optimize/_highs/' changes from 7cb7b58a9..65f382011 (#27
Browse files Browse the repository at this point in the history
)

65f382011 Merge remote-tracking branch 'upstream/master'
981c85fec Merge pull request scipy#387 from ERGO-Code/restore_getObjectiveValue_getIterationCount
811f617f1 Restored getObjectiveValue and getIterationCount to the C API. Also added (equivalent, but unambiguous) getSimplexIterationCount
0b4cb7f88 Merge pull request scipy#386 from ERGO-Code/tidyHFactor
4423919f8 Passes unit test with singular initial basis: formatted
387a98532 Reintroduced handling of rank deficiency
40c822043 Refined the debug level required for post-solve error analysis
0d8087722 AnIterNumCostlyDseIt now always initialsed to zero
8c4a090a8 Corrected check for primal infeasibilities after Phase 2 primal simplex clean-up
3f392a67c Added fix if  Phase 2 primal simplex solver creates primal infeasibilities - and formatted
5f71a0ce5 Fixed error in assert and reformatted
969edfddf Removed debug check and formatting
edadd1083 Fixed bug in transition after postsolve
d27a1f0cc Introduced correctDual to shift minor dual infeasibilities in transition()
df687891d Merge pull request scipy#384 from ERGO-Code/createDebugHighsSolve
74cc2064a Merge pull request scipy#385 from ERGO-Code/fix-install
d811de1a1 Removed redundant identifier from HSimplex
d45bf1c57 Removed a load of analysis code from HSimplex that is now redundant due to HSimplexDebug
171fd1fb2 About to remove analyseSimplexBasicSolution
9cc382ae0 Ctest passes and formatted
b330c837e Moved isSimplexInfoOk and its printfs from HSimplex to HSimplexDebug
2863c1c4b Introduced debugSimplexBasicSolution into HighsSolutionDebug, but needs to be in HighsSimplexDebug
1c4874553 missing header added
d1efa46a6 Rename pyHiGHS -> cython; remove uneeded coverage tests
046bf9f4e use correct num of args in dummy function
f3d5fa6b2 dummy function for testing in case module is not compiled
c06941986 Remove module status from tests
06fefa884 fix test import from within scipy
eef5c75a7 Merge branch 'master' into createDebugHighsSolve
7cdeb4603 Tidied up comments and formatted
017fbae9e Reduced getPrimalDualInfeasibilities in HighsSolution by not finding errors
88fee4dc0 Now stripping error detection from getPrimalDualInfeasibilitiesFromHighsBasicSolution in HighsSolution.cpp
cb4262834 About to remove analyseHighsBasicSolution from HighsSolution
4085669c3 flake8-ify
e6ca5175d Add simple coverage tests and fixes for bad input
f5a28af16 Merge remote-tracking branch 'upstream/master'
39eed8cf4 Testing all models for errors after postsolve
54997e1fb Now analysing PrimalDualErrors
77321f18d EqualSolutionParams now replaced by debugEqualSolutionParams and returns HighsDebugStatus
df0662aea Introduced debugHighsBasicSolution
fcd5db4da Removed change_update_method
b47673c03 Set up HighsSolutionDebug with equalSolutionParams checks
115ab4857 Merge pull request scipy#383 from ERGO-Code/kkt-chk
6ac1d1267 Merge branch 'kkt-chk' into tidyHFactor
c973a530e Update README.md
79809a51d Update README.md
3d65abe0a build GA
74722b409 ga fix
ac1d070e1 GA name
7f4b90798 Eliminated highs.run() from singularStartingBasis Unit test
bada2022e link
2109f2463 Deleted .travis.yml
18aa77c71 removed travis
8b55a0725 formatting
377a5a94d fix bug
1718c94c8 as before, kxx to be added again
f45ee71f6 only greenbea failing one rule of kkt check
19b528a55 old checker removed
f5ea69a86 Merge branch 'master' into kkt-new
64d357722 checkers identical on small
d8ed22799 presolvers on
f8c435186 fixed bug afiro
4c46cf8d6 Removed commented-out (unused) int* hint entries in update* parameter lists, but too scared to replace the integer pointers to references
1a3556289 Started debugging rank deficiency
48b1b58a4 Frigged singularStartingBasis unit test for now and formatted
ed60be7b5 Removed getNoPv* from HFactor.h
834add0cc Uncovered inability to handle rank deficiency
9c9ff0992 unchanged perf
7b6202764 Reporting checkInvert errors as HSimplexDebug
d7628c1a4 Added random solution test to debugCheckInvert and just working with inf-norm
36834d827 Created HFactorDebug.cpp
7bf5cf3f1 Removed HiGHSDEV from HFactor - completely!
c810dad05 Removed HiGHSDEV from HFactor
7df64d320 Moved checkInvert to HFactorDebug.h, after creating getBaseIndex, getAstart/index/value
d80fb6df5 Removed more printf statements from HFactor.cpp
5b07b013a Removed major printf statments from HFactor
476d257c5 compare master
ee311c9a6 clean up
b5cbe2fa4 fixed checker bug
3764178ee bug fix in checkKkt() @
0628eff1c printRow working OK, ctest passing with it in checker, see particular row 61 for e226 now
c35e9a817 calling print row from postsolve fail spot
bf19ff809 clean up and print row / col presolve util methods added
bf35fce39 debug e226 single failure isolated
dfeb091b6 both checkers in, leave them both until consistent
1bff3b4ba old checker bug fix, now failing new checker on 25fv
3d8762f86 more rLowes
7eb779ec9 kk
d7218e41c both checkers: old one working
80244523e rs-only
6c5d72a80 doubleton eq off
f2846b676 Merge pull request #47 from ERGO-Code/master
7d93d001a Add ipm_optimality_tolerance; improve message_level and primal/dual_feasibility_tolerance docs
d38efc9a9 ctest passing
058ef6c0e bug on 80bau fixed dual postsolve of singleton row triggered by very special case (4+ rules in order)
09bc02a2a triggering bug: single occurrence after a combination of at least four rules
654970cf3 next rule 80bau
08608d670 reordered col sing a bit
853bb421a Merge pull request scipy#381 from ERGO-Code/minorModsForUsers
f714be3a9 Added ipm_optimality_tolerance to allow IPX to be run approximately when crossover is not used
4961bb148 Added Highs_runQuiet to C  API
bb9407835 Merge pull request #46 from ERGO-Code/master
6a0f8f69c Add integer checks for integer options
c5e736e4a Return fun=None when solution is unavailable
9a6219c80 fixed, tricky
57a4d0f32 removed last of stray ijs
694cd4353 one more bug fixed but still get the same error
074aac212 a few fixed but none fixed the St of L error message
1e9e226ec mix up with Julia branch, debugging 80bau
f47c12ec1 checker tol set to 1e-7, not so relevant but needs to be consistent. first look into small ctest and 80bau3b issues, then extended ctest
f1b1f0f7d merge with master
a3c6c364b Merge pull request scipy#380 from ERGO-Code/presolveNumerics
a82b3bd6a Merge pull request scipy#379 from ERGO-Code/kkt-check
58c9dee0d Reinstated the iPrint condition for reporting clocks and numerics
9636520d6 Removed two print statements in HMPSIO.cpp; tidied compiler warning in HighsLp::equalButForNames - which was useless; renamed reportAllNumericsRecord reportNumericsRecords; Formatted
2e77d5c7d Formatted
09fd31bcb Removed commented-out code and comments for discussion, plus implemented conclusions
e5e2dc050 wip
fb29edf67 Comment out openmp pragma statments
afae7bbaa remove uneeded interface
eb7aad4ec Fix merge conflicts
f67d678ff Merge remote-tracking branch 'upstream/master'
b8535efc1 Assigning eps tolerance to fixed_column_tolerance to avoid positive tolerance assert
415c44a51 Added analysis of fixed column numerics in presolve
798b84cee Merged kkt-check into this branch
1259aaa9c Merge branch 'master' into presolveNumerics
c7335db52 Added model name to results summary
23662ad92 formatting
62fccfb11 Merge branch 'master' into kkt-check
ed73f349d bug in new checker fixed. PR before dev of presolve
4c3f6f999 removeFixed* methods in Presolve class
0fac66922 removeFixed method and new checker bug fix. inconsistency in Fixed Cols rule
dbf663603 checkKkt() method added to the Presolve class@
2a7c0630b merge with master
5a6b5b422 Merge pull request scipy#377 from ERGO-Code/bug-presolve
50a8dbd3b Merge pull request scipy#378 from ERGO-Code/parser
c7c7b729a empty mps file
ef70118f6 formatting
4287eb3a8 fix
d1a1069a8 formatting
6404d5aef Fixed Windows build error :-)
36d09bfed Formatted
9bfba4856 Added analysis of inconsistent bounds test in removeRowSingletons
b5aea5a5f Generalised presolve numerics records as enum of indices into vector of records
b7cb195bb Removed duplicate rule definitions due to merge
619468ac6 Resolved conflicts after merging master into this branch
d8802a91d Formatted
5ee66483b Added analysis of two more numerical tolerances in presolve
4687bd5e4 Analysing and reporting the first four uses of tol in presolve
c1d62c651 Split the if-statement in removeDoubletonEquations
82695b7ec Formatted
b7526e770 Restored protection of call to timer.reportClocks();
31093c2e3 regular ctest pass with both kkt checks enabled.
694959bd4 Looked at first few uses of tol in Presolve.cpp. Substituted specific identifiers in each case, and considered what the value should be
48af287ca compiling, segfaulting
22cc24f18 second half of checker, problems cleared
493d9196f Merge pull request scipy#375 from ERGO-Code/gams-interface-fixup
beef381c6 negate row duals obtained from HiGHS
3285bdd62 do not pass invalid basis to HiGHS anymore
2dd53313c update copyright year
d103672c8 use gmoCompleteSolution instead of gmoCompleteObjective
c180bfe59 need to call HighsSetIO now to make it actually use callbacks, ref #105
710fdff3c make the GAMS interface compile again
9dadda21a fix checks in assert
51e6b31d5 fix one of the compiler warnings
d9f28507f Merge pull request scipy#374 from ERGO-Code/presolveTimerEfficiency
7a4ee97eb Added  timer.recordFinish(SING_ROW); before status return
6d4ef9a96 Formatted
352d76917 Removed (redundant) start_time from HighsTimer.h
bc22fffa6 Reduced frequency of timeout test
42446efed Removed high-volume clock start/finish calls from presolve
4956678be With high-call clocks commented out
02dac71b7 Added timing locks to start looking for missing 40% of presolve
27341ae9d halfway through checks, new checker
d37e582b7 all of ctest passing within tolerances (0 simplex iter). Old checker identifies failures wrong
d2e31361c old checker printing pass vs fail on postsolved solution before passing back to HiGHS.
773e9afc8 test files reverted
f35dc7574 clean up
85b515994 ctest passes with and without check
51595fb04 ctest passing
fca847451 fail. debug adlittle
f6e8a1f60 clearing and basis in postsolve
eb7e53883 destuctors added, one more special LP passing check
f9c073325 bug in tests fixed, now unit test fails as expected in checker where clock has not been finished. New KKT checker class test/DevKkt added.
c73683cef leak fixed, double free still failing
eebe3471b 280 passing, valgrind next fal
56017e817 issue 280 special case
8ef4409cf valgrind OK plus tidy up
b8b771115 valgrind
982a0dc4a Revert back to earlier upstream commit
a600b38e4 Add note about cmake files; change single ticks to double back ticks in cython docstring; change byte-strings to python strings; remove uneeded commented-out code; clarify some comments
3dc432a10 Merge remote-tracking branch 'upstream/master'
69739a8a5 Remove unneeded files
46640196d More unneeded files
dc701d7d8 Remove uneeded files
dd7c8b480 Merge pull request scipy#371 from ERGO-Code/no-delete-JAJH
c008b7760 Refined timing reporting
85db78f6d Added some missing timer.recordFinish(rule) calls
0c9699aa0 deleted dev print
d17510e0a hw solving
e07521ea8 ctest passing
3eeac3c46 Merge pull request scipy#370 from ERGO-Code/matrix-copy
260643015 small ctest passing
dd6ef0551 formatting
aaf1aacf2 formatting
9f4b9fe82 previous
c6d26cfd6 back to list
ded0248f1 Merge branch 'master' into matrix-copy
7c9639bfa ctest passing but presolve reduction counts changed
adfbbb02c Merge pull request scipy#369 from ERGO-Code/openmp-version-cmake
94da4a2ac valgrind etamacro
837c5de2c presolve singleton lists changed into hash maps
04db154ce Merge branch 'master' into matrix-copy
01fa72dd1 Merge branch 'master' into matrix-copy
cf38c6074 newline of
184c2ff59 reverted typo in comment
086b075aa target_link_libraries
addd1f281 linking after defining lib cmake
6bb52c385 Merge pull request scipy#368 from ERGO-Code/dev-option
1c66fc894 setting OPENMP value
ba25299b8 cmake openmp version required: more modern cmake
75215f320 openmp only using if available
eebb4a7df update with master
53b4ace91 Merge branch 'master' into dev-option
6fed11c1f Merge pull request scipy#366 from ERGO-Code/dev-presolve
2c7e5b05e matrix-copy
3c0b5ee21 CMakeLists commented out scaffold subdir add
4b0ebee53 scaffold out
b7e7a23cc adding dev-presolve to scaffold GA
a53ff1b70 Merge pull request scipy#367 from ERGO-Code/CHUZC3
a9ed1c640 CHUZC sort strategy now controlled by option dual_chuzc_sort_strategy
fb1ef5de2 Adding CHUZC3 option
228f8d0a3 Tidied up HDualRow and reformatted
8b22df683 Moved debug code from HDualRow to HSimplexDebug
d08a669ee Moving the debug code from HDualRow
5d0eeebe0 experiments linux
5eacc5071 About to allow heap or quad
68432bdd4 Created metods for chooseFinalWorkGroupQuad() and chooseFinalLargeAlpha
e9e827252 After cleaning up printing and commenting out checking
7ea716b16 Before cleaning up after identifying why groups have different sizes with quad and heap
3ad48e421 formatting
4f899821d scaffold out
87bb623a9 dev option and other working as expected
177b910de About to add array for checking group equivalence
b733f091b boost po exception commented out
40f3352a5 Heap identification of breakpoint groups may be correct
92caf3e4c option dev added
962ca1891 Recognised that groups have to be filled using inner loop, but too tired to debug
0c82c9f9b Same workData and workGroup for adlittle with both methods
63f16f637 Found workGroup discrepancy
68a3e2a1c About to rename some new identifiers
d6497317b Memory proboem: ask Ivet
66516d76d About to create chooseWorkGroupHeap
e6928afac formatting
0fb9da3ad presolve time_limit works
46c3790f8 Fixed bug in permuteSimplexLp when LP is not scaled
538f2efcf debugDualChuzcFail now analyses and reports on dual CHUZC failure
88d8eb356 formatting
414998743 timeout returning
03e07cdeb Added timing and reporting to identify inefficiency in CHUZC3
d30f93867 Added analyse_lp = true with HiGHSDEV=on
f992d54ee removed function: do in separate CL since this one has grown
034fa18af added chrono
56c75804d unit test fixed
9ad6fa14f clean up
430b45331 scaffold out
338af92c9 options tests pass
453eb30f6 mps parser timeout works:
1e2ef6728 parser stopping on timeout but simplex running anyway
2d6e70f71 ctest passing, now add timeout and iteration tests to dev-presolve
257b62632 CL growing, added timeout to parser, linking dev with call backs
8153e9489 Switched on full reporting when HiGHSDEV=on, and eliminates time reporting when no calls have been made
1365960c2 time limit added, not tested yet
6e69c6635 link the modern cmake way
118c46ef4 enabled openmp in windows tests

git-subtree-dir: scipy/optimize/_highs
git-subtree-split: 65f382011b368bf2da0839775db79c6bea5c4fc0
  • Loading branch information
mckib2 committed Jul 29, 2020
1 parent 544628c commit 81c3a45
Show file tree
Hide file tree
Showing 28 changed files with 1,987 additions and 1,552 deletions.
26 changes: 15 additions & 11 deletions scipy/optimize/_highs/src/CMakeLists.txt
Expand Up @@ -87,6 +87,7 @@ set(sources
lp_data/HighsLpUtils.cpp
lp_data/HighsModelUtils.cpp
lp_data/HighsSolution.cpp
lp_data/HighsSolutionDebug.cpp
lp_data/HighsSolve.cpp
lp_data/HighsStatus.cpp
lp_data/HighsOptions.cpp
Expand All @@ -103,6 +104,7 @@ set(sources
simplex/HDualRow.cpp
simplex/HDualMulti.cpp
simplex/HFactor.cpp
simplex/HFactorDebug.cpp
simplex/HighsSimplexAnalysis.cpp
simplex/HighsSimplexInterface.cpp
simplex/HMatrix.cpp
Expand Down Expand Up @@ -143,6 +145,7 @@ set(headers
lp_data/HighsModelObjectUtils.h
lp_data/HighsOptions.h
lp_data/HighsSolution.h
lp_data/HighsSolutionDebug.h
lp_data/HighsSolve.h
lp_data/HighsStatus.h
mip/HighsMipSolver.h
Expand All @@ -154,14 +157,14 @@ set(headers
simplex/HDualRow.h
simplex/HDualRHS.h
simplex/HFactor.h
simplex/HFactorDebug.h
simplex/HighsSimplexAnalysis.h
simplex/HighsSimplexInterface.h
simplex/HMatrix.h
simplex/HPrimal.h
simplex/HQPrimal.h
# simplex/HRanging.h
simplex/HSimplex.h
simplex/HSimplexDebug.h
simplex/HSimplexReport.h
simplex/SimplexConst.h
presolve/Presolve.h
Expand All @@ -171,6 +174,7 @@ set(headers
presolve/HPreData.h
simplex/HVector.h
test/DevKkt.h
test/KktCh2.h
util/stringutil.h
util/HighsComponent.h
util/HighsRandom.h
Expand Down Expand Up @@ -207,7 +211,7 @@ endif()
if(${BUILD_SHARED_LIBS})
# put version information into shared library file
set_target_properties(libhighs PROPERTIES
VERSION
VERSION
${HIGHS_VERSION_MAJOR}.${HIGHS_VERSION_MINOR}.${HIGHS_VERSION_PATCH}
SOVERSION ${HIGHS_VERSION_MAJOR}.${HIGHS_VERSION_MINOR})
else()
Expand Down Expand Up @@ -270,7 +274,7 @@ if (OSI_FOUND)

if(${BUILD_SHARED_LIBS})
set_target_properties(OsiHighs PROPERTIES
VERSION
VERSION
${HIGHS_VERSION_MAJOR}.${HIGHS_VERSION_MINOR}.${HIGHS_VERSION_PATCH}
SOVERSION ${HIGHS_VERSION_MAJOR}.${HIGHS_VERSION_MINOR})
else()
Expand Down Expand Up @@ -320,7 +324,7 @@ else()
INCLUDES DESTINATION include)

# Add library targets to the build-tree export set
export(TARGETS libhighs
export(TARGETS libhighs
FILE "${HIGHS_BINARY_DIR}/highs-targets.cmake")
endif()

Expand All @@ -345,21 +349,21 @@ configure_file(${HIGHS_SOURCE_DIR}/highs.pc.in
# Install the targets of the highs export group, the config file so that other
# cmake-projects can link easily against highs, and the pkg-config flie so that
# other projects can easily build against highs
install(EXPORT highs-targets FILE highs-targets.cmake DESTINATION
install(EXPORT highs-targets FILE highs-targets.cmake DESTINATION
lib/cmake/highs)
install(FILES "${HIGHS_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/highs-config.cmake"
install(FILES "${HIGHS_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/highs-config.cmake"
DESTINATION lib/cmake/highs)
install(FILES "${HIGHS_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/highs.pc"
install(FILES "${HIGHS_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/highs.pc"
DESTINATION lib/pkg-config)

else()
else()

# FAST_BUILD is set to on.
# At the moment used only for gradually updating the CMake targets build and install / export.
# Define library in modern CMake using target_*()
# No interfaces (apart from c); No ipx; New (short) ctest instances.
add_library(libhighs)
target_sources(libhighs PRIVATE
target_sources(libhighs PRIVATE
../external/filereaderlp/reader.cpp
io/Filereader.cpp
io/FilereaderLp.cpp
Expand Down Expand Up @@ -407,8 +411,8 @@ target_sources(libhighs PRIVATE
util/stringutil.cpp
interfaces/highs_c_api.cpp)

target_include_directories(libhighs PUBLIC . ipm/ io/ lp_data/ mip/ simplex/
target_include_directories(libhighs PUBLIC . ipm/ io/ lp_data/ mip/ simplex/
presolve/ util/ test/ interfaces/ ../external/)
target_include_directories(libhighs PUBLIC ${HIGHS_BINARY_DIR})

endif()
endif()
11 changes: 11 additions & 0 deletions scipy/optimize/_highs/src/Highs.h
Expand Up @@ -20,6 +20,7 @@
#include "lp_data/HighsLp.h"
#include "lp_data/HighsModelObject.h"
#include "lp_data/HighsOptions.h"
#include "lp_data/HighsSolutionDebug.h"
#include "lp_data/HighsStatus.h"
#include "presolve/PresolveComponent.h"
#include "util/HighsTimer.h"
Expand Down Expand Up @@ -190,6 +191,16 @@ class Highs {
*/
const HighsModelStatus& getModelStatus(const bool scaled_model = false) const;

/**
* @brief Returns the objective function value (if known)
*/
double getObjectiveValue() { return info_.objective_function_value; }

/**
* @brief Returns the simplex iteration count (if known)
*/
int getSimplexIterationCount() { return info_.simplex_iteration_count; }

// todo: getRangingInformation(..)

/**
Expand Down
12 changes: 12 additions & 0 deletions scipy/optimize/_highs/src/interfaces/highs_c_api.cpp
Expand Up @@ -206,6 +206,18 @@ int Highs_getModelStatus(void* highs, const int scaled_model) {
return (int)((Highs*)highs)->getModelStatus(scaled_model);
}

double Highs_getObjectiveValue(void* highs) {
return ((Highs*)highs)->getObjectiveValue();
}

int Highs_getIterationCount(void* highs) {
return Highs_getSimplexIterationCount(highs);
}

int Highs_getSimplexIterationCount(void* highs) {
return (int)((Highs*)highs)->getSimplexIterationCount();
}

int Highs_getBasicVariables(void* highs, int* basic_variables) {
return (int)((Highs*)highs)->getBasicVariables(basic_variables);
}
Expand Down
18 changes: 18 additions & 0 deletions scipy/optimize/_highs/src/interfaces/highs_c_api.h
Expand Up @@ -233,6 +233,24 @@ int Highs_getModelStatus(
const int scaled_model //!< 0 (nonzero) for status of (scaled) model
);

/**
* @brief Returns the objective function value (if known)
*/
double Highs_getObjectiveValue(void* highs //!< HiGHS object reference,
);

/**
* @brief Returns the simplex iteration count (if known)
*/
int Highs_getIterationCount(void* highs //!< HiGHS object reference,
);

/**
* @brief Returns the simplex iteration count (if known)
*/
int Highs_getSimplexIterationCount(void* highs //!< HiGHS object reference,
);

/**
* @brief Gets the basic variables in the order corresponding to
* calls to getBasisInverseRow, getBasisInverseCol, getBasisSolve,
Expand Down
4 changes: 2 additions & 2 deletions scipy/optimize/_highs/src/ipm/IpxWrapper.h
Expand Up @@ -768,8 +768,8 @@ HighsStatus solveLpIpx(const HighsOptions& options, HighsTimer& timer,
highs_solution.col_value[iCol] * lp.colCost_[iCol];
unscaled_solution_params.objective_function_value = objective_function_value;
if (highs_basis.valid_)
getPrimalDualInfeasibilitiesFromHighsBasicSolution(
lp, highs_basis, highs_solution, unscaled_solution_params);
getPrimalDualInfeasibilities(lp, highs_basis, highs_solution,
unscaled_solution_params);
return return_status;
}
#endif
2 changes: 1 addition & 1 deletion scipy/optimize/_highs/src/lp_data/HConst.h
Expand Up @@ -40,8 +40,8 @@ enum class HighsDebugStatus {
OK,
SMALL_ERROR,
LARGE_ERROR,
WARNING,
LOGICAL_ERROR,
WARNING
};

enum HighsPrintMessageLevel {
Expand Down
33 changes: 27 additions & 6 deletions scipy/optimize/_highs/src/lp_data/Highs.cpp
Expand Up @@ -650,8 +650,13 @@ basis_.valid_, hmos_[0].basis_.valid_);
hmos_[original_hmo].basis_.row_status =
presolve_.data_.recovered_basis_.row_status;

analyseHighsBasicSolution(options_.logfile, hmos_[original_hmo],
"after returning from postsolve");
int save_highs_debug_level = options_.highs_debug_level;
options_.highs_debug_level = HIGHS_DEBUG_LEVEL_COSTLY;
debugHighsBasicSolution("After returning from postsolve", options_,
lp_, hmos_[original_hmo].basis_,
hmos_[original_hmo].solution_);
options_.highs_debug_level = save_highs_debug_level;

// Now hot-start the simplex solver for the original_hmo
solved_hmo = original_hmo;
// Save the options to allow the best simplex strategy to
Expand Down Expand Up @@ -836,6 +841,19 @@ const HighsModelStatus& Highs::getModelStatus(const bool scaled_model) const {
}
}

/*
double Highs::getObjectiveValue() {
double objective_value = 0;
if (hmos_.size() == 0)
return 0;
}
int Highs::getSimplexIterationCount() {
int = 0;
return 0;
}
*/

HighsStatus Highs::getBasicVariables(int* basic_variables) {
if (hmos_.size() == 0) return HighsStatus::Error;
if (!hmos_[0].simplex_lp_status_.has_basis) {
Expand Down Expand Up @@ -1921,11 +1939,14 @@ void Highs::beforeReturnFromRun(HighsStatus& return_status) {
}
}
if (have_solution) assert(isSolutionConsistent(lp_, solution_));
bool have_basis = false;
if (basis_.valid_) {
if (!isBasisConsistent(lp_, basis_)) {
printf("Basis not consistent when it should be\n");
}
assert(isBasisConsistent(lp_, basis_));
have_basis = isBasisConsistent(lp_, basis_);
assert(have_basis);
}
if (have_solution && have_basis) {
debugHighsBasicSolution("Before return from run()", options_, lp_, basis_,
solution_, info_, model_status_);
}
}

Expand Down

0 comments on commit 81c3a45

Please sign in to comment.