casadi 3.6.4__cp310-none-manylinux2014_i686.whl → 3.6.6__cp310-none-manylinux2014_i686.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- casadi/_casadi.so +0 -0
- casadi/casadi.py +984 -500
- casadi/cbc +0 -0
- casadi/clp +0 -0
- casadi/cmake/casadi-config-version.cmake +1 -1
- casadi/cmake/highs/highs-config.cmake +6 -13
- casadi/cmake/highs/highs-targets-release.cmake +13 -13
- casadi/cmake/highs/highs-targets.cmake +13 -10
- casadi/highs +0 -0
- casadi/include/casadi/casadi.i +33 -15
- casadi/include/casadi/casadi_c.h +2 -0
- casadi/include/casadi/config.h +8 -8
- casadi/include/casadi/core/casadi_common.hpp +1 -0
- casadi/include/casadi/core/casadi_misc.hpp +13 -0
- casadi/include/casadi/core/casadi_types.hpp +3 -2
- casadi/include/casadi/core/code_generator.hpp +59 -2
- casadi/include/casadi/core/core.hpp +1 -0
- casadi/include/casadi/core/generic_expression.hpp +1 -1
- casadi/include/casadi/core/generic_type.hpp +25 -1
- casadi/include/casadi/core/global_options.hpp +2 -0
- casadi/include/casadi/core/matrix_decl.hpp +15 -0
- casadi/include/casadi/core/mx.hpp +13 -3
- casadi/include/casadi/core/optistack.hpp +23 -0
- casadi/include/casadi/core/runtime/casadi_nlp.hpp +133 -6
- casadi/include/casadi/core/runtime/casadi_ocp_block.hpp +55 -0
- casadi/include/casadi/core/runtime/casadi_oracle.hpp +44 -0
- casadi/include/casadi/core/runtime/casadi_oracle_callback.hpp +39 -0
- casadi/include/casadi/core/runtime/casadi_runtime.hpp +4 -1
- casadi/include/casadi/core/runtime/casadi_scaled_copy.hpp +31 -0
- casadi/include/casadi/core/runtime/casadi_sqpmethod.hpp +11 -1
- casadi/include/casadi/core/serializing_stream.hpp +2 -2
- casadi/include/casadi/core/sparsity.hpp +12 -3
- casadi/include/casadi/core/tools.hpp +67 -0
- casadi/include/casadi/doc.i +2283 -1491
- casadi/include/casadi/doc_merged.i +1522 -1065
- casadi/include/casadi/mem.h +1 -0
- casadi/include/coin-or/IpAlgBuilder.hpp +417 -0
- casadi/include/coin-or/IpAlgStrategy.hpp +201 -0
- casadi/include/coin-or/IpAlgTypes.hpp +64 -0
- casadi/include/coin-or/IpAugSystemSolver.hpp +212 -0
- casadi/include/coin-or/IpBlas.hpp +426 -0
- casadi/include/coin-or/IpCachedResults.hpp +897 -0
- casadi/include/coin-or/IpCompoundMatrix.hpp +423 -0
- casadi/include/coin-or/IpCompoundSymMatrix.hpp +348 -0
- casadi/include/coin-or/IpCompoundVector.hpp +395 -0
- casadi/include/coin-or/IpConvCheck.hpp +97 -0
- casadi/include/coin-or/IpDebug.hpp +167 -0
- casadi/include/coin-or/IpDenseVector.hpp +626 -0
- casadi/include/coin-or/IpDiagMatrix.hpp +158 -0
- casadi/include/coin-or/IpEqMultCalculator.hpp +76 -0
- casadi/include/coin-or/IpException.hpp +156 -0
- casadi/include/coin-or/IpExpansionMatrix.hpp +245 -0
- casadi/include/coin-or/IpGenTMatrix.hpp +290 -0
- casadi/include/coin-or/IpHessianUpdater.hpp +73 -0
- casadi/include/coin-or/IpIdentityMatrix.hpp +167 -0
- casadi/include/coin-or/IpIpoptAlg.hpp +257 -0
- casadi/include/coin-or/IpIpoptApplication.hpp +367 -0
- casadi/include/coin-or/IpIpoptCalculatedQuantities.hpp +1009 -0
- casadi/include/coin-or/IpIpoptData.hpp +966 -0
- casadi/include/coin-or/IpIpoptNLP.hpp +328 -0
- casadi/include/coin-or/IpIterateInitializer.hpp +68 -0
- casadi/include/coin-or/IpIteratesVector.hpp +840 -0
- casadi/include/coin-or/IpIterationOutput.hpp +78 -0
- casadi/include/coin-or/IpJournalist.hpp +573 -0
- casadi/include/coin-or/IpLapack.hpp +227 -0
- casadi/include/coin-or/IpLibraryLoader.hpp +76 -0
- casadi/include/coin-or/IpLineSearch.hpp +106 -0
- casadi/include/coin-or/IpLinearSolvers.h +46 -0
- casadi/include/coin-or/IpMatrix.hpp +434 -0
- casadi/include/coin-or/IpMuUpdate.hpp +77 -0
- casadi/include/coin-or/IpNLP.hpp +306 -0
- casadi/include/coin-or/IpNLPScaling.hpp +582 -0
- casadi/include/coin-or/IpObserver.hpp +422 -0
- casadi/include/coin-or/IpOptionsList.hpp +412 -0
- casadi/include/coin-or/IpOrigIpoptNLP.hpp +603 -0
- casadi/include/coin-or/IpPDSystemSolver.hpp +137 -0
- casadi/include/coin-or/IpReferenced.hpp +262 -0
- casadi/include/coin-or/IpRegOptions.hpp +1152 -0
- casadi/include/coin-or/IpReturnCodes.h +23 -0
- casadi/include/coin-or/IpReturnCodes.hpp +18 -0
- casadi/include/coin-or/IpReturnCodes.inc +71 -0
- casadi/include/coin-or/IpReturnCodes_inc.h +45 -0
- casadi/include/coin-or/IpScaledMatrix.hpp +291 -0
- casadi/include/coin-or/IpSearchDirCalculator.hpp +72 -0
- casadi/include/coin-or/IpSmartPtr.hpp +865 -0
- casadi/include/coin-or/IpSolveStatistics.hpp +210 -0
- casadi/include/coin-or/IpSparseSymLinearSolverInterface.hpp +260 -0
- casadi/include/coin-or/IpStdAugSystemSolver.cpp +555 -0
- casadi/include/coin-or/IpStdCInterface.h +428 -0
- casadi/include/coin-or/IpSumSymMatrix.hpp +186 -0
- casadi/include/coin-or/IpSymLinearSolver.hpp +141 -0
- casadi/include/coin-or/IpSymMatrix.hpp +167 -0
- casadi/include/coin-or/IpSymScaledMatrix.hpp +255 -0
- casadi/include/coin-or/IpSymTMatrix.hpp +275 -0
- casadi/include/coin-or/IpTNLP.hpp +820 -0
- casadi/include/coin-or/IpTNLPAdapter.hpp +648 -0
- casadi/include/coin-or/IpTNLPReducer.hpp +274 -0
- casadi/include/coin-or/IpTaggedObject.hpp +128 -0
- casadi/include/coin-or/IpTimedTask.hpp +218 -0
- casadi/include/coin-or/IpTimingStatistics.hpp +323 -0
- casadi/include/coin-or/IpTripletHelper.hpp +308 -0
- casadi/include/coin-or/IpTypes.h +81 -0
- casadi/include/coin-or/IpTypes.hpp +30 -0
- casadi/include/coin-or/IpUtils.hpp +166 -0
- casadi/include/coin-or/IpVector.hpp +892 -0
- casadi/include/coin-or/IpZeroSymMatrix.hpp +155 -0
- casadi/include/coin-or/IpoptConfig.h +45 -0
- casadi/include/coin-or/SensAlgorithm.hpp +114 -0
- casadi/include/coin-or/SensApplication.hpp +188 -0
- casadi/include/coin-or/SensBacksolver.hpp +36 -0
- casadi/include/coin-or/SensMeasurement.hpp +56 -0
- casadi/include/coin-or/SensPCalculator.hpp +137 -0
- casadi/include/coin-or/SensRegOp.hpp +21 -0
- casadi/include/coin-or/SensSchurData.hpp +182 -0
- casadi/include/coin-or/SensSchurDriver.hpp +118 -0
- casadi/include/coin-or/SensSimpleBacksolver.hpp +49 -0
- casadi/include/coin-or/SensStepCalc.hpp +85 -0
- casadi/include/coin-or/SensUtils.hpp +63 -0
- casadi/include/coin-or/metis/defs.h +161 -0
- casadi/include/coin-or/metis/macros.h +143 -0
- casadi/include/coin-or/metis/metis.h +37 -0
- casadi/include/coin-or/metis/proto.h +505 -0
- casadi/include/coin-or/metis/rename.h +418 -0
- casadi/include/coin-or/metis/struct.h +251 -0
- casadi/include/coin-or/mumps/dmumps_c.h +142 -0
- casadi/include/coin-or/mumps/mumps_c_types.h +72 -0
- casadi/include/coin-or/mumps/mumps_compat.h +27 -0
- casadi/include/coin-or/mumps/mumps_int_def.h +11 -0
- casadi/include/coin-or/mumps/mumps_mpi.h +67 -0
- casadi/include/daqp/api.h +46 -0
- casadi/include/daqp/auxiliary.h +29 -0
- casadi/include/daqp/bnb.h +32 -0
- casadi/include/daqp/codegen.h +18 -0
- casadi/include/daqp/constants.h +92 -0
- casadi/include/daqp/daqp.h +22 -0
- casadi/include/daqp/daqp_prox.h +18 -0
- casadi/include/daqp/factorization.h +18 -0
- casadi/include/daqp/types.h +161 -0
- casadi/include/daqp/utils.h +44 -0
- casadi/include/highs/HConfig.h +6 -5
- casadi/include/highs/Highs.h +93 -23
- casadi/include/highs/filereaderlp/def.hpp +19 -0
- casadi/include/highs/interfaces/highs_c_api.h +200 -24
- casadi/include/highs/io/Filereader.h +1 -1
- casadi/include/highs/io/FilereaderEms.h +1 -1
- casadi/include/highs/io/FilereaderLp.h +1 -1
- casadi/include/highs/io/FilereaderMps.h +1 -1
- casadi/include/highs/io/HMPSIO.h +1 -1
- casadi/include/highs/io/HMpsFF.h +5 -3
- casadi/include/highs/io/HighsIO.h +18 -8
- casadi/include/highs/io/LoadOptions.h +1 -1
- casadi/include/highs/ipm/IpxSolution.h +35 -0
- casadi/include/highs/ipm/IpxWrapper.h +1 -1
- casadi/include/highs/ipm/basiclu/basiclu.h +161 -0
- casadi/include/highs/ipm/basiclu/basiclu_factorize.h +247 -0
- casadi/include/highs/ipm/basiclu/basiclu_get_factors.h +108 -0
- casadi/include/highs/ipm/basiclu/basiclu_initialize.h +119 -0
- casadi/include/highs/ipm/basiclu/basiclu_obj_factorize.h +34 -0
- casadi/include/highs/ipm/basiclu/basiclu_obj_free.h +19 -0
- casadi/include/highs/ipm/basiclu/basiclu_obj_get_factors.h +34 -0
- casadi/include/highs/ipm/basiclu/basiclu_obj_initialize.h +46 -0
- casadi/include/highs/ipm/basiclu/basiclu_obj_solve_dense.h +29 -0
- casadi/include/highs/ipm/basiclu/basiclu_obj_solve_for_update.h +42 -0
- casadi/include/highs/ipm/basiclu/basiclu_obj_solve_sparse.h +32 -0
- casadi/include/highs/ipm/basiclu/basiclu_obj_update.h +31 -0
- casadi/include/highs/ipm/basiclu/basiclu_object.h +30 -0
- casadi/include/highs/ipm/basiclu/basiclu_solve_dense.h +75 -0
- casadi/include/highs/ipm/basiclu/basiclu_solve_for_update.h +169 -0
- casadi/include/highs/ipm/basiclu/basiclu_solve_sparse.h +112 -0
- casadi/include/highs/ipm/basiclu/basiclu_update.h +125 -0
- casadi/include/highs/ipm/basiclu/lu_def.h +39 -0
- casadi/include/highs/ipm/basiclu/lu_file.h +21 -0
- casadi/include/highs/ipm/basiclu/lu_internal.h +220 -0
- casadi/include/highs/ipm/basiclu/lu_list.h +168 -0
- casadi/include/highs/ipm/ipx/basiclu_kernel.h +20 -0
- casadi/include/highs/ipm/ipx/basiclu_wrapper.h +47 -0
- casadi/include/highs/ipm/ipx/basis.h +351 -0
- casadi/include/highs/ipm/ipx/conjugate_residuals.h +74 -0
- casadi/include/highs/ipm/ipx/control.h +163 -0
- casadi/include/highs/ipm/ipx/crossover.h +157 -0
- casadi/include/highs/ipm/ipx/diagonal_precond.h +45 -0
- casadi/include/highs/ipm/ipx/forrest_tomlin.h +102 -0
- casadi/include/highs/ipm/ipx/guess_basis.h +21 -0
- casadi/include/highs/ipm/ipx/indexed_vector.h +113 -0
- casadi/include/highs/ipm/ipx/info.h +27 -0
- casadi/include/highs/ipm/ipx/ipm.h +94 -0
- casadi/include/highs/ipm/ipx/ipx_c.h +47 -0
- casadi/include/highs/ipm/ipx/ipx_config.h +9 -0
- casadi/include/highs/ipm/ipx/ipx_info.h +111 -0
- casadi/include/highs/ipm/ipx/ipx_internal.h +88 -0
- casadi/include/highs/ipm/ipx/ipx_parameters.h +75 -0
- casadi/include/highs/ipm/ipx/ipx_status.h +57 -0
- casadi/include/highs/ipm/ipx/iterate.h +328 -0
- casadi/include/highs/ipm/ipx/kkt_solver.h +70 -0
- casadi/include/highs/ipm/ipx/kkt_solver_basis.h +66 -0
- casadi/include/highs/ipm/ipx/kkt_solver_diag.h +48 -0
- casadi/include/highs/ipm/ipx/linear_operator.h +26 -0
- casadi/include/highs/ipm/ipx/lp_solver.h +201 -0
- casadi/include/highs/ipm/ipx/lu_factorization.h +79 -0
- casadi/include/highs/ipm/ipx/lu_update.h +129 -0
- casadi/include/highs/ipm/ipx/maxvolume.h +54 -0
- casadi/include/highs/ipm/ipx/model.h +409 -0
- casadi/include/highs/ipm/ipx/multistream.h +52 -0
- casadi/include/highs/ipm/ipx/normal_matrix.h +44 -0
- casadi/include/highs/ipm/ipx/power_method.h +44 -0
- casadi/include/highs/ipm/ipx/sparse_matrix.h +195 -0
- casadi/include/highs/ipm/ipx/sparse_utils.h +58 -0
- casadi/include/highs/ipm/ipx/splitted_normal_matrix.h +63 -0
- casadi/include/highs/ipm/ipx/starting_basis.h +39 -0
- casadi/include/highs/ipm/ipx/symbolic_invert.h +29 -0
- casadi/include/highs/ipm/ipx/timer.h +24 -0
- casadi/include/highs/ipm/ipx/utils.h +39 -0
- casadi/include/highs/lp_data/HConst.h +20 -10
- casadi/include/highs/lp_data/HStruct.h +23 -1
- casadi/include/highs/lp_data/HighsAnalysis.h +1 -1
- casadi/include/highs/lp_data/HighsCallback.h +10 -3
- casadi/include/highs/lp_data/HighsCallbackStruct.h +31 -5
- casadi/include/highs/lp_data/HighsDebug.h +1 -1
- casadi/include/highs/lp_data/HighsInfo.h +20 -2
- casadi/include/highs/lp_data/HighsInfoDebug.h +1 -1
- casadi/include/highs/lp_data/HighsLp.h +17 -1
- casadi/include/highs/lp_data/HighsLpSolverObject.h +1 -1
- casadi/include/highs/lp_data/HighsLpUtils.h +19 -19
- casadi/include/highs/lp_data/HighsModelUtils.h +1 -1
- casadi/include/highs/lp_data/HighsOptions.h +237 -10
- casadi/include/highs/lp_data/HighsRanging.h +1 -1
- casadi/include/highs/lp_data/HighsRuntimeOptions.h +2 -2
- casadi/include/highs/lp_data/HighsSolution.h +2 -2
- casadi/include/highs/lp_data/HighsSolutionDebug.h +1 -1
- casadi/include/highs/lp_data/HighsSolve.h +3 -1
- casadi/include/highs/lp_data/HighsStatus.h +1 -1
- casadi/include/highs/mip/HighsCliqueTable.h +4 -4
- casadi/include/highs/mip/HighsConflictPool.h +1 -1
- casadi/include/highs/mip/HighsCutGeneration.h +1 -1
- casadi/include/highs/mip/HighsCutPool.h +2 -2
- casadi/include/highs/mip/HighsDebugSol.h +22 -29
- casadi/include/highs/mip/HighsDomain.h +10 -2
- casadi/include/highs/mip/HighsDomainChange.h +1 -1
- casadi/include/highs/mip/HighsDynamicRowMatrix.h +5 -3
- casadi/include/highs/mip/HighsGFkSolve.h +3 -3
- casadi/include/highs/mip/HighsImplications.h +3 -3
- casadi/include/highs/mip/HighsLpAggregator.h +1 -1
- casadi/include/highs/mip/HighsLpRelaxation.h +6 -1
- casadi/include/highs/mip/HighsMipSolver.h +4 -2
- casadi/include/highs/mip/HighsMipSolverData.h +47 -4
- casadi/include/highs/mip/HighsModkSeparator.h +2 -2
- casadi/include/highs/mip/HighsNodeQueue.h +5 -3
- casadi/include/highs/mip/HighsObjectiveFunction.h +1 -1
- casadi/include/highs/mip/HighsPathSeparator.h +2 -2
- casadi/include/highs/mip/HighsPrimalHeuristics.h +1 -1
- casadi/include/highs/mip/HighsPseudocost.h +35 -23
- casadi/include/highs/mip/HighsRedcostFixing.h +1 -1
- casadi/include/highs/mip/HighsSearch.h +2 -1
- casadi/include/highs/mip/HighsSeparation.h +1 -1
- casadi/include/highs/mip/HighsSeparator.h +1 -1
- casadi/include/highs/mip/HighsTableauSeparator.h +1 -1
- casadi/include/highs/mip/HighsTransformedLp.h +1 -1
- casadi/include/highs/model/HighsHessian.h +5 -0
- casadi/include/highs/model/HighsHessianUtils.h +2 -0
- casadi/include/highs/model/HighsModel.h +10 -1
- casadi/include/highs/parallel/HighsMutex.h +2 -1
- casadi/include/highs/parallel/HighsParallel.h +7 -2
- casadi/include/highs/parallel/HighsTask.h +1 -2
- casadi/include/highs/pdlp/CupdlpWrapper.h +93 -0
- casadi/include/highs/pdlp/cupdlp/cupdlp_cs.h +41 -0
- casadi/include/highs/pdlp/cupdlp/cupdlp_defs.h +423 -0
- casadi/include/highs/pdlp/cupdlp/cupdlp_linalg.h +183 -0
- casadi/include/highs/pdlp/cupdlp/cupdlp_proj.h +19 -0
- casadi/include/highs/pdlp/cupdlp/cupdlp_restart.h +31 -0
- casadi/include/highs/pdlp/cupdlp/cupdlp_scaling_cuda.h +28 -0
- casadi/include/highs/pdlp/cupdlp/cupdlp_solver.h +98 -0
- casadi/include/highs/pdlp/cupdlp/cupdlp_step.h +33 -0
- casadi/include/highs/pdlp/cupdlp/cupdlp_utils.c +1726 -0
- casadi/include/highs/pdqsort/pdqsort.h +532 -0
- casadi/include/highs/presolve/HPresolve.h +27 -14
- casadi/include/highs/presolve/HPresolveAnalysis.h +1 -1
- casadi/include/highs/presolve/HighsPostsolveStack.h +92 -68
- casadi/include/highs/presolve/HighsSymmetry.h +6 -5
- casadi/include/highs/presolve/ICrash.h +8 -2
- casadi/include/highs/presolve/ICrashUtil.h +1 -1
- casadi/include/highs/presolve/ICrashX.h +1 -1
- casadi/include/highs/presolve/PresolveComponent.h +1 -1
- casadi/include/highs/qpsolver/a_asm.hpp +23 -12
- casadi/include/highs/qpsolver/a_quass.hpp +8 -1
- casadi/include/highs/qpsolver/basis.hpp +150 -0
- casadi/include/highs/qpsolver/crashsolution.hpp +12 -0
- casadi/include/highs/qpsolver/dantzigpricing.hpp +72 -0
- casadi/include/highs/qpsolver/devexpricing.hpp +99 -0
- casadi/include/highs/qpsolver/eventhandler.hpp +23 -0
- casadi/include/highs/qpsolver/factor.hpp +400 -0
- casadi/include/highs/qpsolver/feasibility_bounded.hpp +105 -0
- casadi/include/highs/qpsolver/feasibility_highs.hpp +270 -0
- casadi/include/highs/qpsolver/gradient.hpp +39 -0
- casadi/include/highs/qpsolver/instance.hpp +63 -0
- casadi/include/highs/qpsolver/matrix.hpp +335 -0
- casadi/include/highs/qpsolver/pricing.hpp +15 -0
- casadi/include/highs/qpsolver/qpconst.hpp +27 -0
- casadi/include/highs/qpsolver/{vector.hpp → qpvector.hpp} +25 -25
- casadi/include/highs/qpsolver/quass.hpp +1 -1
- casadi/include/highs/qpsolver/ratiotest.hpp +19 -0
- casadi/include/highs/qpsolver/runtime.hpp +38 -0
- casadi/include/highs/qpsolver/settings.hpp +57 -0
- casadi/include/highs/qpsolver/snippets.hpp +29 -0
- casadi/include/highs/qpsolver/statistics.hpp +23 -0
- casadi/include/highs/qpsolver/steepestedgepricing.hpp +167 -0
- casadi/include/highs/simplex/HApp.h +1 -1
- casadi/include/highs/simplex/HEkk.h +52 -18
- casadi/include/highs/simplex/HEkkDual.h +1 -1
- casadi/include/highs/simplex/HEkkDualRHS.h +6 -7
- casadi/include/highs/simplex/HEkkDualRow.h +2 -2
- casadi/include/highs/simplex/HEkkPrimal.h +6 -1
- casadi/include/highs/simplex/HSimplex.h +1 -3
- casadi/include/highs/simplex/HSimplexDebug.h +1 -1
- casadi/include/highs/simplex/HSimplexNla.h +1 -1
- casadi/include/highs/simplex/HSimplexReport.h +1 -1
- casadi/include/highs/simplex/HighsSimplexAnalysis.h +228 -100
- casadi/include/highs/simplex/SimplexConst.h +1 -1
- casadi/include/highs/simplex/SimplexStruct.h +2 -2
- casadi/include/highs/simplex/SimplexTimer.h +1 -1
- casadi/include/highs/test/DevKkt.h +1 -1
- casadi/include/highs/test/KktCh2.h +1 -1
- casadi/include/highs/util/FactorTimer.h +1 -1
- casadi/include/highs/util/HFactor.h +35 -6
- casadi/include/highs/util/HFactorConst.h +1 -1
- casadi/include/highs/util/HFactorDebug.h +1 -1
- casadi/include/highs/util/HSet.h +1 -1
- casadi/include/highs/util/HVector.h +1 -1
- casadi/include/highs/util/HVectorBase.h +1 -1
- casadi/include/highs/util/HighsCDouble.h +3 -3
- casadi/include/highs/util/HighsComponent.h +1 -1
- casadi/include/highs/util/HighsDataStack.h +4 -4
- casadi/include/highs/util/HighsDisjointSets.h +1 -1
- casadi/include/highs/util/HighsHash.h +28 -21
- casadi/include/highs/util/HighsHashTree.h +63 -63
- casadi/include/highs/util/HighsInt.h +1 -1
- casadi/include/highs/util/HighsIntegers.h +8 -9
- casadi/include/highs/util/HighsLinearSumBounds.h +1 -1
- casadi/include/highs/util/HighsMatrixPic.h +1 -1
- casadi/include/highs/util/HighsMatrixSlice.h +9 -6
- casadi/include/highs/util/HighsMatrixUtils.h +1 -1
- casadi/include/highs/util/HighsMemoryAllocation.h +55 -0
- casadi/include/highs/util/HighsRandom.h +27 -15
- casadi/include/highs/util/HighsRbTree.h +2 -2
- casadi/include/highs/util/HighsSort.h +7 -7
- casadi/include/highs/util/HighsSparseMatrix.h +5 -2
- casadi/include/highs/util/HighsSparseVectorSum.h +2 -2
- casadi/include/highs/util/HighsSplay.h +1 -1
- casadi/include/highs/util/HighsTimer.h +18 -9
- casadi/include/highs/util/HighsUtils.h +15 -8
- casadi/include/highs/util/stringutil.h +9 -4
- casadi/include/highs/zstr/strict_fstream.hpp +237 -0
- casadi/include/highs/zstr/zstr.hpp +472 -0
- casadi/include/licenses/daqp-external/LICENSE +21 -0
- casadi/include/licenses/highs-external/{LICENSE → LICENSE.txt} +1 -1
- casadi/include/osqp/constants.h +2 -3
- casadi/include/osqp/version.h +9 -0
- casadi/lib/libtinyxml2.a +0 -0
- casadi/libCbc.so +0 -0
- casadi/libCbc.so.3 +0 -0
- casadi/libCbc.so.3.10.11 +0 -0
- casadi/libCbcSolver.so +0 -0
- casadi/libCbcSolver.so.3 +0 -0
- casadi/libCbcSolver.so.3.10.11 +0 -0
- casadi/libCgl.so +0 -0
- casadi/libCgl.so.1 +0 -0
- casadi/libCgl.so.1.10.8 +0 -0
- casadi/libClp.so +0 -0
- casadi/libClp.so.1 +0 -0
- casadi/libClp.so.1.14.9 +0 -0
- casadi/libClpSolver.so +0 -0
- casadi/libClpSolver.so.1 +0 -0
- casadi/libClpSolver.so.1.14.9 +0 -0
- casadi/libCoinUtils.so +0 -0
- casadi/libCoinUtils.so.3 +0 -0
- casadi/libCoinUtils.so.3.11.10 +0 -0
- casadi/libOsi.so +0 -0
- casadi/libOsi.so.1 +0 -0
- casadi/libOsi.so.1.13.9 +0 -0
- casadi/libOsiCbc.so +0 -0
- casadi/libOsiCbc.so.3 +0 -0
- casadi/libOsiCbc.so.3.10.11 +0 -0
- casadi/libOsiClp.so +0 -0
- casadi/libOsiClp.so.1 +0 -0
- casadi/libOsiClp.so.1.14.9 +0 -0
- casadi/libOsiCommonTests.so +0 -0
- casadi/libOsiCommonTests.so.1 +0 -0
- casadi/libOsiCommonTests.so.1.13.9 +0 -0
- casadi/libbonmin.so +0 -0
- casadi/libbonmin.so.4 +0 -0
- casadi/libbonmin.so.4.8.9 +0 -0
- casadi/libcasadi.so +0 -0
- casadi/libcasadi.so.3.7 +0 -0
- casadi/libcasadi_conic_cbc.so +0 -0
- casadi/libcasadi_conic_cbc.so.3.7 +0 -0
- casadi/libcasadi_conic_clp.so +0 -0
- casadi/libcasadi_conic_clp.so.3.7 +0 -0
- casadi/libcasadi_conic_daqp.so +0 -0
- casadi/libcasadi_conic_daqp.so.3.7 +0 -0
- casadi/libcasadi_conic_gurobi.so +0 -0
- casadi/libcasadi_conic_gurobi.so.3.7 +0 -0
- casadi/libcasadi_conic_highs.so +0 -0
- casadi/libcasadi_conic_highs.so.3.7 +0 -0
- casadi/libcasadi_conic_ipqp.so +0 -0
- casadi/libcasadi_conic_ipqp.so.3.7 +0 -0
- casadi/libcasadi_conic_nlpsol.so +0 -0
- casadi/libcasadi_conic_nlpsol.so.3.7 +0 -0
- casadi/libcasadi_conic_osqp.so +0 -0
- casadi/libcasadi_conic_osqp.so.3.7 +0 -0
- casadi/libcasadi_conic_proxqp.so +0 -0
- casadi/libcasadi_conic_proxqp.so.3.7 +0 -0
- casadi/libcasadi_conic_qpoases.so +0 -0
- casadi/libcasadi_conic_qpoases.so.3.7 +0 -0
- casadi/libcasadi_conic_qrqp.so +0 -0
- casadi/libcasadi_conic_qrqp.so.3.7 +0 -0
- casadi/libcasadi_conic_superscs.so +0 -0
- casadi/libcasadi_conic_superscs.so.3.7 +0 -0
- casadi/libcasadi_integrator_collocation.so +0 -0
- casadi/libcasadi_integrator_collocation.so.3.7 +0 -0
- casadi/libcasadi_integrator_cvodes.so +0 -0
- casadi/libcasadi_integrator_cvodes.so.3.7 +0 -0
- casadi/libcasadi_integrator_idas.so +0 -0
- casadi/libcasadi_integrator_idas.so.3.7 +0 -0
- casadi/libcasadi_integrator_rk.so +0 -0
- casadi/libcasadi_integrator_rk.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_alpaqa.so +0 -0
- casadi/libcasadi_nlpsol_alpaqa.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_ampl.so +0 -0
- casadi/libcasadi_nlpsol_ampl.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_blocksqp.so +0 -0
- casadi/libcasadi_nlpsol_blocksqp.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_bonmin.so +0 -0
- casadi/libcasadi_nlpsol_bonmin.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_feasiblesqpmethod.so +0 -0
- casadi/libcasadi_nlpsol_feasiblesqpmethod.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_ipopt.so +0 -0
- casadi/libcasadi_nlpsol_ipopt.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_knitro.so +0 -0
- casadi/libcasadi_nlpsol_knitro.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_madnlp.so +0 -0
- casadi/libcasadi_nlpsol_madnlp.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_qrsqp.so +0 -0
- casadi/libcasadi_nlpsol_qrsqp.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_scpgen.so +0 -0
- casadi/libcasadi_nlpsol_scpgen.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_sleqp.so +0 -0
- casadi/libcasadi_nlpsol_sleqp.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_snopt.so +0 -0
- casadi/libcasadi_nlpsol_snopt.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_sqpmethod.so +0 -0
- casadi/libcasadi_nlpsol_sqpmethod.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_worhp.so +0 -0
- casadi/libcasadi_nlpsol_worhp.so.3.7 +0 -0
- casadi/libcasadi_rootfinder_fast_newton.so +0 -0
- casadi/libcasadi_rootfinder_fast_newton.so.3.7 +0 -0
- casadi/libcasadi_rootfinder_kinsol.so +0 -0
- casadi/libcasadi_rootfinder_kinsol.so.3.7 +0 -0
- casadi/libcasadi_rootfinder_newton.so +0 -0
- casadi/libcasadi_rootfinder_newton.so.3.7 +0 -0
- casadi/libcasadi_rootfinder_nlpsol.so +0 -0
- casadi/libcasadi_rootfinder_nlpsol.so.3.7 +0 -0
- casadi/libcasadi_sundials_common.so +0 -0
- casadi/libcasadi_sundials_common.so.3.7 +0 -0
- casadi/libdaqp.so +0 -0
- casadi/libdaqpstat.a +0 -0
- casadi/libhighs.so +0 -0
- casadi/libhighs.so.1 +0 -0
- casadi/libhighs.so.1.7.2 +0 -0
- casadi/libindirect.a +0 -0
- casadi/libipopt.so +0 -0
- casadi/libipopt.so.3 +0 -0
- casadi/libipopt.so.3.14.11 +0 -0
- casadi/liblinsys.a +0 -0
- casadi/libmatlab_ipc.so +0 -0
- casadi/libosqp.a +0 -0
- casadi/libosqp.so +0 -0
- casadi/libqdldl.a +0 -0
- casadi/libsipopt.so +0 -0
- casadi/libsipopt.so.3 +0 -0
- casadi/libsipopt.so.3.14.11 +0 -0
- casadi/libsleqp.so +0 -0
- casadi/libsleqp.so.1.0.1 +0 -0
- casadi/libspral.a +0 -0
- casadi/libsuperscs.a +0 -0
- casadi/pkgconfig/casadi.pc +1 -1
- casadi/pkgconfig/highs.pc +1 -1
- casadi/tools/__init__.py +4 -0
- casadi/tools/bounds.py +3 -3
- {casadi-3.6.4.dist-info → casadi-3.6.6.dist-info}/METADATA +12 -4
- {casadi-3.6.4.dist-info → casadi-3.6.6.dist-info}/RECORD +490 -281
- casadi/include/highs/fortran/highs_fortran_api.mod +0 -0
- casadi/libFortranHighs.so +0 -0
- casadi/libhighs.so.1.6 +0 -0
- casadi/libhighs.so.1.6.0 +0 -0
- {casadi-3.6.4.dist-info → casadi-3.6.6.dist-info}/WHEEL +0 -0
@@ -0,0 +1,78 @@
|
|
1
|
+
// Copyright (C) 2004, 2011 International Business Machines and others.
|
2
|
+
// All Rights Reserved.
|
3
|
+
// This code is published under the Eclipse Public License.
|
4
|
+
//
|
5
|
+
// Authors: Andreas Waechter, Carl Laird IBM 2004-09-27
|
6
|
+
|
7
|
+
#ifndef __IPITERATIONOUTPUT_HPP__
|
8
|
+
#define __IPITERATIONOUTPUT_HPP__
|
9
|
+
|
10
|
+
#include "IpAlgStrategy.hpp"
|
11
|
+
#include "IpIpoptNLP.hpp"
|
12
|
+
#include "IpIpoptData.hpp"
|
13
|
+
#include "IpIpoptCalculatedQuantities.hpp"
|
14
|
+
|
15
|
+
namespace Ipopt
|
16
|
+
{
|
17
|
+
|
18
|
+
/** Base class for objects that do the output summary per iteration.
|
19
|
+
*/
|
20
|
+
class IPOPTLIB_EXPORT IterationOutput: public AlgorithmStrategyObject
|
21
|
+
{
|
22
|
+
public:
|
23
|
+
/**@name Constructors/Destructors */
|
24
|
+
///@{
|
25
|
+
/** Default Constructor */
|
26
|
+
IterationOutput()
|
27
|
+
{ }
|
28
|
+
|
29
|
+
/** Destructor */
|
30
|
+
virtual ~IterationOutput()
|
31
|
+
{ }
|
32
|
+
///@}
|
33
|
+
|
34
|
+
virtual bool InitializeImpl(
|
35
|
+
const OptionsList& options,
|
36
|
+
const std::string& prefix
|
37
|
+
) = 0;
|
38
|
+
|
39
|
+
/** Method to do all the summary output per iteration.
|
40
|
+
*
|
41
|
+
* This include the one-line summary output as well as writing the
|
42
|
+
* details about the iterates if desired.
|
43
|
+
*/
|
44
|
+
virtual void WriteOutput() = 0;
|
45
|
+
|
46
|
+
protected:
|
47
|
+
/** enumeration for different inf_pr output options */
|
48
|
+
enum InfPrOutput
|
49
|
+
{
|
50
|
+
INTERNAL = 0,
|
51
|
+
ORIGINAL
|
52
|
+
};
|
53
|
+
|
54
|
+
private:
|
55
|
+
/**@name Default Compiler Generated Methods (Hidden to avoid
|
56
|
+
* implicit creation/calling).
|
57
|
+
*
|
58
|
+
* These methods are not implemented
|
59
|
+
* and we do not want the compiler to implement them for us, so we
|
60
|
+
* declare them private and do not define them. This ensures that
|
61
|
+
* they will not be implicitly created/called.
|
62
|
+
*/
|
63
|
+
///@{
|
64
|
+
/** Copy Constructor */
|
65
|
+
IterationOutput(
|
66
|
+
const IterationOutput&
|
67
|
+
);
|
68
|
+
|
69
|
+
void operator=(
|
70
|
+
const IterationOutput&
|
71
|
+
);
|
72
|
+
///@}
|
73
|
+
|
74
|
+
};
|
75
|
+
|
76
|
+
} // namespace Ipopt
|
77
|
+
|
78
|
+
#endif
|
@@ -0,0 +1,573 @@
|
|
1
|
+
// Copyright (C) 2004, 2009 International Business Machines and others.
|
2
|
+
// All Rights Reserved.
|
3
|
+
// This code is published under the Eclipse Public License.
|
4
|
+
//
|
5
|
+
// Authors: Carl Laird, Andreas Waechter IBM 2004-08-13
|
6
|
+
|
7
|
+
#ifndef __IPJOURNALIST_HPP__
|
8
|
+
#define __IPJOURNALIST_HPP__
|
9
|
+
|
10
|
+
#include "IpoptConfig.h"
|
11
|
+
#include "IpTypes.hpp"
|
12
|
+
#include "IpReferenced.hpp"
|
13
|
+
#include "IpSmartPtr.hpp"
|
14
|
+
|
15
|
+
#include <cstdarg>
|
16
|
+
#include <cstdio>
|
17
|
+
#include <string>
|
18
|
+
#include <vector>
|
19
|
+
#include <ostream>
|
20
|
+
|
21
|
+
namespace Ipopt
|
22
|
+
{
|
23
|
+
|
24
|
+
// forward declarations
|
25
|
+
class Journal;
|
26
|
+
class FileJournal;
|
27
|
+
|
28
|
+
/**@name Journalist Enumerations. */
|
29
|
+
///@{
|
30
|
+
/** Print Level Enum. */
|
31
|
+
enum EJournalLevel
|
32
|
+
{
|
33
|
+
J_INSUPPRESSIBLE = -1,
|
34
|
+
J_NONE = 0,
|
35
|
+
J_ERROR,
|
36
|
+
J_STRONGWARNING,
|
37
|
+
J_SUMMARY,
|
38
|
+
J_WARNING,
|
39
|
+
J_ITERSUMMARY,
|
40
|
+
J_DETAILED,
|
41
|
+
J_MOREDETAILED,
|
42
|
+
J_VECTOR,
|
43
|
+
J_MOREVECTOR,
|
44
|
+
J_MATRIX,
|
45
|
+
J_MOREMATRIX,
|
46
|
+
J_ALL,
|
47
|
+
J_LAST_LEVEL
|
48
|
+
};
|
49
|
+
|
50
|
+
/** Category Selection Enum. */
|
51
|
+
enum EJournalCategory
|
52
|
+
{
|
53
|
+
J_DBG = 0,
|
54
|
+
J_STATISTICS,
|
55
|
+
J_MAIN,
|
56
|
+
J_INITIALIZATION,
|
57
|
+
J_BARRIER_UPDATE,
|
58
|
+
J_SOLVE_PD_SYSTEM,
|
59
|
+
J_FRAC_TO_BOUND,
|
60
|
+
J_LINEAR_ALGEBRA,
|
61
|
+
J_LINE_SEARCH,
|
62
|
+
J_HESSIAN_APPROXIMATION,
|
63
|
+
J_SOLUTION,
|
64
|
+
J_DOCUMENTATION,
|
65
|
+
J_NLP,
|
66
|
+
J_TIMING_STATISTICS,
|
67
|
+
J_USER_APPLICATION, /**< This can be used by the user's application*/
|
68
|
+
J_USER1, /**< This can be used by the user's application*/
|
69
|
+
J_USER2, /**< This can be used by the user's application*/
|
70
|
+
J_USER3, /**< This can be used by the user's application*/
|
71
|
+
J_USER4, /**< This can be used by the user's application*/
|
72
|
+
J_USER5, /**< This can be used by the user's application*/
|
73
|
+
J_USER6, /**< This can be used by the user's application*/
|
74
|
+
J_USER7, /**< This can be used by the user's application*/
|
75
|
+
J_USER8, /**< This can be used by the user's application*/
|
76
|
+
J_USER9, /**< This can be used by the user's application*/
|
77
|
+
J_USER10, /**< This can be used by the user's application*/
|
78
|
+
J_USER11, /**< This can be used by the user's application*/
|
79
|
+
J_USER12, /**< This can be used by the user's application*/
|
80
|
+
J_USER13, /**< This can be used by the user's application*/
|
81
|
+
J_USER14, /**< This can be used by the user's application*/
|
82
|
+
J_USER15, /**< This can be used by the user's application*/
|
83
|
+
J_USER16, /**< This can be used by the user's application*/
|
84
|
+
J_USER17, /**< This can be used by the user's application*/
|
85
|
+
J_LAST_CATEGORY
|
86
|
+
};
|
87
|
+
///@}
|
88
|
+
|
89
|
+
/** Class responsible for all message output.
|
90
|
+
*
|
91
|
+
* This class is responsible for all messaging and output.
|
92
|
+
* The "printing" code or "author" should send ALL messages to the
|
93
|
+
* Journalist, indicating an appropriate category and print level.
|
94
|
+
* The journalist then decides, based on reader specified
|
95
|
+
* acceptance criteria, which message is actually printed in which
|
96
|
+
* journals.
|
97
|
+
* This allows the printing code to send everything, while the
|
98
|
+
* "reader" can decide what they really want to see.
|
99
|
+
*
|
100
|
+
* Authors:
|
101
|
+
* Authors use the
|
102
|
+
* Journals: You can add as many Journals as you like to the
|
103
|
+
* Journalist with the AddJournal or the AddFileJournal methods.
|
104
|
+
* Each one represents a different printing location (or file).
|
105
|
+
* Then, you can call the "print" methods of the Journalist to output
|
106
|
+
* information to each of the journals.
|
107
|
+
*
|
108
|
+
* Acceptance Criteria: Each print message should be flagged
|
109
|
+
* appropriately with an EJournalCategory and EJournalLevel.
|
110
|
+
*
|
111
|
+
* The AddFileJournal
|
112
|
+
* method returns a pointer to the newly created Journal object
|
113
|
+
* (if successful) so you can set Acceptance criteria for that
|
114
|
+
* particular location.
|
115
|
+
*/
|
116
|
+
class IPOPTLIB_EXPORT Journalist: public ReferencedObject
|
117
|
+
{
|
118
|
+
public:
|
119
|
+
/**@name Constructor / Desructor. */
|
120
|
+
///@{
|
121
|
+
/** Constructor. */
|
122
|
+
Journalist();
|
123
|
+
|
124
|
+
/** Destructor... */
|
125
|
+
virtual ~Journalist();
|
126
|
+
///@}
|
127
|
+
|
128
|
+
/**@name Author Methods.
|
129
|
+
* These methods are used by authoring code, or code that wants
|
130
|
+
* to report some information.
|
131
|
+
*/
|
132
|
+
///@{
|
133
|
+
/** Method to print a formatted string */
|
134
|
+
#ifdef __GNUC__
|
135
|
+
__attribute__((format(printf, 4, 5)))
|
136
|
+
#endif
|
137
|
+
virtual void Printf(
|
138
|
+
EJournalLevel level,
|
139
|
+
EJournalCategory category,
|
140
|
+
const char* format,
|
141
|
+
...
|
142
|
+
) const;
|
143
|
+
|
144
|
+
/** Method to print a long string including indentation.
|
145
|
+
*
|
146
|
+
* The string is printed starting at the current position. If the
|
147
|
+
* position (counting started at the current position) exceeds
|
148
|
+
* max_length, a new line is inserted, and indent_spaces many
|
149
|
+
* spaces are printed before the string is continued. This is
|
150
|
+
* for example used during the printing of the option
|
151
|
+
* documentation.
|
152
|
+
*/
|
153
|
+
virtual void PrintStringOverLines(
|
154
|
+
EJournalLevel level,
|
155
|
+
EJournalCategory category,
|
156
|
+
Index indent_spaces,
|
157
|
+
Index max_length,
|
158
|
+
const std::string& line
|
159
|
+
) const;
|
160
|
+
|
161
|
+
/** Method to print a formatted string with indentation */
|
162
|
+
#ifdef __GNUC__
|
163
|
+
__attribute__((format(printf, 5, 6)))
|
164
|
+
#endif
|
165
|
+
virtual void PrintfIndented(
|
166
|
+
EJournalLevel level,
|
167
|
+
EJournalCategory category,
|
168
|
+
Index indent_level,
|
169
|
+
const char* format,
|
170
|
+
...
|
171
|
+
) const;
|
172
|
+
|
173
|
+
/** Method to print a formatted string using the va_list argument. */
|
174
|
+
virtual void VPrintf(
|
175
|
+
EJournalLevel level,
|
176
|
+
EJournalCategory category,
|
177
|
+
const char* pformat,
|
178
|
+
va_list ap
|
179
|
+
) const;
|
180
|
+
|
181
|
+
/** Method to print a formatted string with indentation, using the va_list argument. */
|
182
|
+
virtual void VPrintfIndented(
|
183
|
+
EJournalLevel level,
|
184
|
+
EJournalCategory category,
|
185
|
+
Index indent_level,
|
186
|
+
const char* pformat,
|
187
|
+
va_list ap
|
188
|
+
) const;
|
189
|
+
|
190
|
+
/** Method that returns true if there is a Journal that would
|
191
|
+
* write output for the given JournalLevel and JournalCategory.
|
192
|
+
*
|
193
|
+
* This is useful if expensive computation would be required for
|
194
|
+
* a particular output. The author code can check with this
|
195
|
+
* method if the computations are indeed required.
|
196
|
+
*/
|
197
|
+
virtual bool ProduceOutput(
|
198
|
+
EJournalLevel level,
|
199
|
+
EJournalCategory category
|
200
|
+
) const;
|
201
|
+
|
202
|
+
/** Method that flushes the current buffer for all Journalists.
|
203
|
+
*
|
204
|
+
* Calling this method after one optimization run helps to avoid
|
205
|
+
* cluttering output with that produced by other parts of the
|
206
|
+
* program (e.g. written in Fortran)
|
207
|
+
*/
|
208
|
+
virtual void FlushBuffer() const;
|
209
|
+
///@}
|
210
|
+
|
211
|
+
/**@name Reader Methods.
|
212
|
+
* These methods are used by the reader. The reader will setup the
|
213
|
+
* journalist with each output file and the acceptance
|
214
|
+
* criteria for that file.
|
215
|
+
*
|
216
|
+
* Use these methods to setup the journals (files or other output).
|
217
|
+
* These are the internal objects that keep track of the print levels
|
218
|
+
* for each category. Then use the internal Journal objects to
|
219
|
+
* set specific print levels for each category (or keep defaults).
|
220
|
+
*/
|
221
|
+
///@{
|
222
|
+
/** Add a new journal. */
|
223
|
+
virtual bool AddJournal(
|
224
|
+
const SmartPtr<Journal> jrnl
|
225
|
+
);
|
226
|
+
|
227
|
+
/** Add a new FileJournal.
|
228
|
+
*
|
229
|
+
* @return the Journal pointer so you can set specific acceptance criteria, or NULL if there was a problem creating a new Journal.
|
230
|
+
*/
|
231
|
+
virtual SmartPtr<Journal> AddFileJournal(
|
232
|
+
const std::string& location_name, /**< string identifier, which can be used to obtain the pointer to the new Journal at a later point using the GetJournal method */
|
233
|
+
const std::string& fname, /**< name of the file to which this Journal corresponds; use "stdout" for stdout and use "stderr" for stderr */
|
234
|
+
EJournalLevel default_level = J_WARNING /**< default journal level used to initialize the printing level for all categories */
|
235
|
+
);
|
236
|
+
|
237
|
+
/** Get an existing journal.
|
238
|
+
*
|
239
|
+
* You can use this method to change the acceptance criteria at runtime.
|
240
|
+
*/
|
241
|
+
virtual SmartPtr<Journal> GetJournal(
|
242
|
+
const std::string& location_name
|
243
|
+
);
|
244
|
+
|
245
|
+
/** Delete all journals currently known by the journalist. */
|
246
|
+
virtual void DeleteAllJournals();
|
247
|
+
///@}
|
248
|
+
|
249
|
+
private:
|
250
|
+
/**@name Default Compiler Generated Methods
|
251
|
+
* (Hidden to avoid implicit creation/calling).
|
252
|
+
*
|
253
|
+
* These methods are not implemented and
|
254
|
+
* we do not want the compiler to implement
|
255
|
+
* them for us, so we declare them private
|
256
|
+
* and do not define them. This ensures that
|
257
|
+
* they will not be implicitly created/called.
|
258
|
+
*/
|
259
|
+
///@{
|
260
|
+
/** Copy Constructor */
|
261
|
+
Journalist(
|
262
|
+
const Journalist&
|
263
|
+
);
|
264
|
+
|
265
|
+
/** Default Assignment Operator */
|
266
|
+
void operator=(
|
267
|
+
const Journalist&
|
268
|
+
);
|
269
|
+
///@}
|
270
|
+
|
271
|
+
//** Private Data Members. */
|
272
|
+
///@{
|
273
|
+
std::vector<SmartPtr<Journal> > journals_;
|
274
|
+
///@}
|
275
|
+
};
|
276
|
+
|
277
|
+
/** Journal class (part of the Journalist implementation.). This
|
278
|
+
* class is the base class for all Journals. It controls the
|
279
|
+
* acceptance criteria for print statements etc. Derived classes
|
280
|
+
* like the FileJournal - output those messages to specific locations
|
281
|
+
*/
|
282
|
+
class IPOPTLIB_EXPORT Journal: public ReferencedObject
|
283
|
+
{
|
284
|
+
public:
|
285
|
+
/** Constructor. */
|
286
|
+
Journal(
|
287
|
+
const std::string& name,
|
288
|
+
EJournalLevel default_level
|
289
|
+
);
|
290
|
+
|
291
|
+
/** Destructor. */
|
292
|
+
virtual ~Journal();
|
293
|
+
|
294
|
+
/** Get the name of the Journal */
|
295
|
+
virtual std::string Name();
|
296
|
+
|
297
|
+
/** Set the print level for a particular category. */
|
298
|
+
virtual void SetPrintLevel(
|
299
|
+
EJournalCategory category,
|
300
|
+
EJournalLevel level
|
301
|
+
);
|
302
|
+
|
303
|
+
/** Set the print level for all category. */
|
304
|
+
virtual void SetAllPrintLevels(
|
305
|
+
EJournalLevel level
|
306
|
+
);
|
307
|
+
|
308
|
+
/**@name Journal Output Methods.
|
309
|
+
*
|
310
|
+
* These methods are called by the
|
311
|
+
* Journalist who first checks if the output print level and category
|
312
|
+
* are acceptable.
|
313
|
+
* Calling the Print methods explicitly (instead of through the
|
314
|
+
* Journalist will output the message regardless of print level
|
315
|
+
* and category. You should use the Journalist to print & flush instead
|
316
|
+
*/
|
317
|
+
///@{
|
318
|
+
/** Ask if a particular print level/category is accepted by the journal. */
|
319
|
+
virtual bool IsAccepted(
|
320
|
+
EJournalCategory category,
|
321
|
+
EJournalLevel level
|
322
|
+
) const;
|
323
|
+
|
324
|
+
/** Print to the designated output location */
|
325
|
+
virtual void Print(
|
326
|
+
EJournalCategory category,
|
327
|
+
EJournalLevel level,
|
328
|
+
const char* str
|
329
|
+
)
|
330
|
+
{
|
331
|
+
PrintImpl(category, level, str);
|
332
|
+
}
|
333
|
+
|
334
|
+
/** Printf to the designated output location */
|
335
|
+
virtual void Printf(
|
336
|
+
EJournalCategory category,
|
337
|
+
EJournalLevel level,
|
338
|
+
const char* pformat,
|
339
|
+
va_list ap
|
340
|
+
)
|
341
|
+
{
|
342
|
+
PrintfImpl(category, level, pformat, ap);
|
343
|
+
}
|
344
|
+
|
345
|
+
/** Flush output buffer.*/
|
346
|
+
virtual void FlushBuffer()
|
347
|
+
{
|
348
|
+
FlushBufferImpl();
|
349
|
+
}
|
350
|
+
///@}
|
351
|
+
|
352
|
+
protected:
|
353
|
+
/**@name Implementation version of Print methods.
|
354
|
+
*
|
355
|
+
* Derived classes should overload the Impl methods.
|
356
|
+
*/
|
357
|
+
///@{
|
358
|
+
/** Print to the designated output location */
|
359
|
+
virtual void PrintImpl(
|
360
|
+
EJournalCategory category,
|
361
|
+
EJournalLevel level,
|
362
|
+
const char* str
|
363
|
+
) = 0;
|
364
|
+
|
365
|
+
/** Printf to the designated output location */
|
366
|
+
virtual void PrintfImpl(
|
367
|
+
EJournalCategory category,
|
368
|
+
EJournalLevel level,
|
369
|
+
const char* pformat,
|
370
|
+
va_list ap
|
371
|
+
) = 0;
|
372
|
+
|
373
|
+
/** Flush output buffer.*/
|
374
|
+
virtual void FlushBufferImpl() = 0;
|
375
|
+
///@}
|
376
|
+
|
377
|
+
private:
|
378
|
+
/**@name Default Compiler Generated Methods
|
379
|
+
* (Hidden to avoid implicit creation/calling).
|
380
|
+
*
|
381
|
+
* These methods are not implemented and
|
382
|
+
* we do not want the compiler to implement
|
383
|
+
* them for us, so we declare them private
|
384
|
+
* and do not define them. This ensures that
|
385
|
+
* they will not be implicitly created/called.
|
386
|
+
*/
|
387
|
+
///@{
|
388
|
+
/** Default Constructor */
|
389
|
+
Journal();
|
390
|
+
|
391
|
+
/** Copy Constructor */
|
392
|
+
Journal(
|
393
|
+
const Journal&
|
394
|
+
);
|
395
|
+
|
396
|
+
/** Default Assignment Operator */
|
397
|
+
void operator=(
|
398
|
+
const Journal&
|
399
|
+
);
|
400
|
+
///@}
|
401
|
+
|
402
|
+
/** Name of the output location */
|
403
|
+
std::string name_;
|
404
|
+
|
405
|
+
/** vector of integers indicating the level for each category */
|
406
|
+
Index print_levels_[J_LAST_CATEGORY];
|
407
|
+
};
|
408
|
+
|
409
|
+
/** FileJournal class.
|
410
|
+
*
|
411
|
+
* This is a particular Journal implementation that
|
412
|
+
* writes to a file for output. It can write to (stdout, stderr, or disk)
|
413
|
+
* by using "stdout" and "stderr" as filenames.
|
414
|
+
*/
|
415
|
+
class IPOPTLIB_EXPORT FileJournal: public Journal
|
416
|
+
{
|
417
|
+
public:
|
418
|
+
/** Constructor. */
|
419
|
+
FileJournal(
|
420
|
+
const std::string& name,
|
421
|
+
EJournalLevel default_level
|
422
|
+
);
|
423
|
+
|
424
|
+
/** Destructor. */
|
425
|
+
virtual ~FileJournal();
|
426
|
+
|
427
|
+
/** Open a new file for the output location.
|
428
|
+
*
|
429
|
+
* Special Names: stdout means stdout,
|
430
|
+
* : stderr means stderr.
|
431
|
+
*
|
432
|
+
* @return false only if the file with the given name could not be opened
|
433
|
+
*/
|
434
|
+
virtual bool Open(
|
435
|
+
const char* fname
|
436
|
+
);
|
437
|
+
|
438
|
+
protected:
|
439
|
+
/**@name Implementation version of Print methods
|
440
|
+
*
|
441
|
+
* Overloaded from Journal base class.
|
442
|
+
*/
|
443
|
+
///@{
|
444
|
+
/** Print to the designated output location */
|
445
|
+
virtual void PrintImpl(
|
446
|
+
EJournalCategory /*category*/,
|
447
|
+
EJournalLevel /*level*/,
|
448
|
+
const char* str
|
449
|
+
);
|
450
|
+
|
451
|
+
/** Printf to the designated output location */
|
452
|
+
virtual void PrintfImpl(
|
453
|
+
EJournalCategory /*category*/,
|
454
|
+
EJournalLevel /*level*/,
|
455
|
+
const char* pformat,
|
456
|
+
va_list ap
|
457
|
+
);
|
458
|
+
|
459
|
+
/** Flush output buffer.*/
|
460
|
+
virtual void FlushBufferImpl();
|
461
|
+
///@}
|
462
|
+
|
463
|
+
private:
|
464
|
+
/**@name Default Compiler Generated Methods
|
465
|
+
* (Hidden to avoid implicit creation/calling).
|
466
|
+
*
|
467
|
+
* These methods are not implemented and
|
468
|
+
* we do not want the compiler to implement
|
469
|
+
* them for us, so we declare them private
|
470
|
+
* and do not define them. This ensures that
|
471
|
+
* they will not be implicitly created/called.
|
472
|
+
*/
|
473
|
+
///@{
|
474
|
+
/** Default Constructor */
|
475
|
+
FileJournal();
|
476
|
+
|
477
|
+
/** Copy Constructor */
|
478
|
+
FileJournal(
|
479
|
+
const FileJournal&
|
480
|
+
);
|
481
|
+
|
482
|
+
/** Default Assignment Operator */
|
483
|
+
void operator=(
|
484
|
+
const FileJournal&
|
485
|
+
);
|
486
|
+
///@}
|
487
|
+
|
488
|
+
/** FILE pointer for the output destination */
|
489
|
+
FILE* file_;
|
490
|
+
};
|
491
|
+
|
492
|
+
/** StreamJournal class.
|
493
|
+
*
|
494
|
+
* This is a particular Journal implementation that writes to a stream for output.
|
495
|
+
*/
|
496
|
+
class IPOPTLIB_EXPORT StreamJournal: public Journal
|
497
|
+
{
|
498
|
+
public:
|
499
|
+
/** Constructor. */
|
500
|
+
StreamJournal(
|
501
|
+
const std::string& name,
|
502
|
+
EJournalLevel default_level
|
503
|
+
);
|
504
|
+
|
505
|
+
/** Destructor. */
|
506
|
+
virtual ~StreamJournal()
|
507
|
+
{ }
|
508
|
+
|
509
|
+
/** Setting the output stream pointer */
|
510
|
+
void SetOutputStream(
|
511
|
+
std::ostream* os
|
512
|
+
);
|
513
|
+
|
514
|
+
protected:
|
515
|
+
/**@name Implementation version of Print methods
|
516
|
+
*
|
517
|
+
* Overloaded from Journal base class.
|
518
|
+
*/
|
519
|
+
///@{
|
520
|
+
/** Print to the designated output location */
|
521
|
+
virtual void PrintImpl(
|
522
|
+
EJournalCategory /*category*/,
|
523
|
+
EJournalLevel /*level*/,
|
524
|
+
const char* str
|
525
|
+
);
|
526
|
+
|
527
|
+
/** Printf to the designated output location */
|
528
|
+
virtual void PrintfImpl(
|
529
|
+
EJournalCategory /*category*/,
|
530
|
+
EJournalLevel /*level*/,
|
531
|
+
const char* pformat,
|
532
|
+
va_list ap
|
533
|
+
);
|
534
|
+
|
535
|
+
/** Flush output buffer.*/
|
536
|
+
virtual void FlushBufferImpl();
|
537
|
+
///@}
|
538
|
+
|
539
|
+
private:
|
540
|
+
/**@name Default Compiler Generated Methods
|
541
|
+
* (Hidden to avoid implicit creation/calling).
|
542
|
+
*
|
543
|
+
* These methods are not implemented and
|
544
|
+
* we do not want the compiler to implement
|
545
|
+
* them for us, so we declare them private
|
546
|
+
* and do not define them. This ensures that
|
547
|
+
* they will not be implicitly created/called.
|
548
|
+
*/
|
549
|
+
///@{
|
550
|
+
/** Default Constructor */
|
551
|
+
StreamJournal();
|
552
|
+
|
553
|
+
/** Copy Constructor */
|
554
|
+
StreamJournal(
|
555
|
+
const StreamJournal&
|
556
|
+
);
|
557
|
+
|
558
|
+
/** Default Assignment Operator */
|
559
|
+
void operator=(
|
560
|
+
const StreamJournal&
|
561
|
+
);
|
562
|
+
///@}
|
563
|
+
|
564
|
+
/** pointer to output stream for the output destination */
|
565
|
+
std::ostream* os_;
|
566
|
+
|
567
|
+
/** buffer for sprintf. Being generous in size here... */
|
568
|
+
char buffer_[32768];
|
569
|
+
};
|
570
|
+
|
571
|
+
} // namespace
|
572
|
+
|
573
|
+
#endif
|