Download Solver For Mac

  1. Excel Solver Mac
  2. Download Solver For Excel Mac

Getting the source code¶

You can start with the latest stable release . Or if you wantthe latest version, you can clone the git repository

  1. Soulver is a notepad calculator app for Mac. It's a notepad that gives instant answers to calculations in your text. Soulver is a better way to work things out than a classic calculator, and a more lightweight tool than a spreadsheet.
  2. Solver for Excel 2011 1.0 for Mac is available as a free download on our software library. Our built-in antivirus checked this Mac download and rated it as virus free. Solver for Excel 2011 for Mac lies within Business Tools, more precisely General.
  3. Solver for Excel 2011 for Mac downloads and installs directly onto the Excel program without any problems or user input required. After opening Excel, the user must go to the add-in area and select. Analytic Solver Desktop won't work with Excel for Mac. Analytic Solver Cloud will work with Excel for Mac, but an Office 365 subscription is required.

Solver Tutorial: Excel 2011 (Mac) Summary: This tutorial will show how you can activate Solver and the Analysis ToolPa k in Excel 2011 for Mac. Note, Solver was added back into Excel 2011 with. The Solver add-in from Frontline Systems isn't currently available for Excel on mobile devices. Solver is a free add-in for Excel 2013 with SP1 and later. For more information, search for Solver in the Office Store.

Dependencies¶

Download Solver For MacDownload Solver For Mac

Note

Starting with v2.0 Ceres requires a fully C++14-compliantcompiler. In versions <= 1.14, C++11 was an optional requirement.

Ceres relies on a number of open source libraries, some of which areoptional. For details on customizing the build process, seeCustomizing the build .

  • Eigen3.3 or later required.

    Note

    Ceres can also use Eigen as a sparse linear algebralibrary. Please see the documentation for EIGENSPARSE formore details.

  • CMake 3.5 or later required.

  • glog 0.3.1 orlater. Recommended

    glog is used extensively throughout Ceres for logging detailedinformation about memory allocations and time consumed in variousparts of the solve, internal error conditions etc. The Ceresdevelopers use it extensively to observe and analyze Ceres’sperformance. glog allows you tocontrol its behaviour from the command line. Starting with-logtostderr you can add -v=N for increasing values of Nto get more and more verbose and detailed information about Ceresinternals.

    Ceres also ships with a minimal replacement of glog calledminiglog that can be enabled with the MINIGLOG build option.miniglog is supplied for platforms which do not support the fullversion of glog.

    In an attempt to reduce dependencies, it may be tempting to useminiglog on platforms which already support glog. Whilethere is nothing preventing the user from doing so, we stronglyrecommend against it. miniglog has worse performance thanglog and is much harder to control and use.

    Note

    If you are compiling glog from source, please note thatcurrently, the unit tests for glog (which are enabled bydefault) do not compile against a default build of gflags 2.1as the gflags namespace changed from google:: togflags::. A patch to fix this is available from here.

  • gflags. Needed to buildexamples and tests and usually a dependency for glog.

  • SuiteSparse. Needed forsolving large sparse linear systems. Optional; strongly recomendedfor large scale bundle adjustment

    Note

    If SuiteSparseQR is found, Ceres attempts to find the IntelThread Building Blocks (TBB) library. If found, Ceres assumesSuiteSparseQR was compiled with TBB support and will link to thefound TBB version. You can customize the searched TBB locationwith the TBB_ROOT variable.

  • CXSparse.Similar to SuiteSparse but simpler and slower. CXSparse hasno dependencies on LAPACK and BLAS. This makes for a simplerbuild process and a smaller binary. Optional

  • Apple’s Accelerate sparse solvers.As of Xcode 9.0, Apple’s Accelerate framework includes support forsolving sparse linear systems across macOS, iOS et al. Optional

  • BLAS and LAPACK routines are needed bySuiteSparse, and optionally used by Ceres directly for someoperations.

    On UNIX OSes other than macOS we recommend ATLAS, which includes BLAS andLAPACK routines. It is also possible to use OpenBLAS . However, one needs to becareful to turn off the threadinginside OpenBLAS as it conflicts with use of threads in Ceres.

    MacOS ships with an optimized LAPACK and BLASimplementation as part of the Accelerate framework. The Ceresbuild system will automatically detect and use it.

    For Windows things are much more complicated. LAPACK ForWindowshas detailed instructions..

    Optional but required forSuiteSparse.

Linux¶

We will use Ubuntu as our example linuxdistribution.

Note

These instructions are for Ubuntu 18.04 and newer. On Ubuntu 16.04you need to manually get a more recent version of Eigen, such as3.3.7.

Start by installing all the dependencies.

We are now ready to build, test, and install Ceres.

You can also try running the command line bundling application with one of theincluded problems, which comes from the University of Washington’s BALdataset [Agarwal].

This runs Ceres for a maximum of 10 iterations using theDENSE_SCHUR linear solver. The output should look something likethis.

macOS¶

On macOS, you can either use Homebrew (recommended) or MacPorts to install Ceres Solver.

If using Homebrew, then

will install the latest stable version along with all the requireddependencies and

will install the latest version in the git repo.

If using MacPorts, then

will install the latest version.

You can also install each of the dependencies by hand using Homebrew. There is no need to installBLAS or LAPACK separately as macOS ships with optimizedBLAS and LAPACK routines as part of the vecLibframework.

We are now ready to build, test, and install Ceres.

Building with OpenMP on macOS¶

Up to at least Xcode 12, OpenMP support was disabled in Apple’s version ofClang. However, you can install the latest version of the LLVM toolchainfrom Homebrew which does support OpenMP, and thus build Ceres with OpenMPsupport on macOS. To do this, you must install llvm via Homebrew:

As the LLVM formula in Homebrew is keg-only, it will not be installed to/usr/local to avoid conflicts with the standard Apple LLVM toolchain.To build Ceres with the Homebrew LLVM toolchain you should do thefollowing:

Like the Linux build, you should now be able to runbin/simple_bundle_adjuster.

Windows¶

Note

If you find the following CMake difficult to set up, then you maybe interested in a Microsoft Visual Studio wrapper for Ceres Solver by TalBen-Nun.

On Windows, we support building with Visual Studio 2015.2 of newer. Notethat the Windows port is less featureful and less tested than theLinux or macOS versions due to the lack of an officially supportedway of building SuiteSparse and CXSparse. There are however a numberof unofficial ways of building these libraries. Building on Windowsalso a bit more involved since there is no automated way to installdependencies.

Note

Using google-glog & miniglog with windows.h.

The windows.h header if used with GDI (Graphics Device Interface)defines ERROR, which conflicts with the definition of ERRORas a LogSeverity level in google-glog and miniglog. Thereare at least two possible fixes to this problem:

  1. Use google-glog and define GLOG_NO_ABBREVIATED_SEVERITIESwhen building Ceres and your own project, as documented here.Note that this fix will not work for miniglog, but use ofminiglog is strongly discouraged on any platform for whichgoogle-glog is available (which includes Windows).

  2. If you do not require GDI, then define NOGDIbeforeincluding windows.h. This solution should work for bothgoogle-glog and miniglog and is documented forgoogle-gloghere.

ExcelDownload Solver For Mac
  1. Make a toplevel directory for deps & build & src somewhere: ceres/

  2. Get dependencies; unpack them as subdirectories in ceres/(ceres/eigen, ceres/glog, etc)

    1. Eigen 3.3 . Configure and optionally install Eigen. It should beexported into the CMake package registry by default as part of theconfigure stage so installation should not be necessary.

    2. google-glog Open up the Visual Studio solution and build it.

    3. gflags Open up the Visual Studio solution and build it.

    4. (Experimental) SuiteSparse Previously SuiteSparse was notavailable on Windows, recently it has become possible to buildit on Windows using the suitesparse-metis-for-windowsproject. If you wish to use SuiteSparse, follow theirinstructions for obtaining and building it.

    5. (Experimental) CXSparse Previously CXSparse was notavailable on Windows, there are now several ports that enable itto be, including: [1]and [2]. If youwish to use CXSparse, follow their instructions forobtaining and building it.

  3. Unpack the Ceres tarball into ceres. For the tarball, youshould get a directory inside ceres similar toceres-solver-2.0.0. Alternately, checkout Ceres via git toget ceres-solver.git inside ceres.

  4. Install CMake,

  5. Make a dir ceres/ceres-bin (for an out-of-tree build)

  6. Run CMake; select the ceres-solver-X.Y.Z orceres-solver.git directory for the CMake file. Then select theceres-bin for the build dir.

  7. Try running Configure. It won’t work. It’ll show a bunch of options.You’ll need to set:

    1. Eigen3_DIR (Set to directory containing Eigen3Config.cmake)

    2. GLOG_INCLUDE_DIR_HINTS

    3. GLOG_LIBRARY_DIR_HINTS

    4. (Optional) gflags_DIR (Set to directory containing gflags-config.cmake)

    5. (Optional) SUITESPARSE_INCLUDE_DIR_HINTS

    6. (Optional) SUITESPARSE_LIBRARY_DIR_HINTS

    7. (Optional) CXSPARSE_INCLUDE_DIR_HINTS

    8. (Optional) CXSPARSE_LIBRARY_DIR_HINTS

    to the appropriate directories where you unpacked/built them. Ifany of the variables are not visible in the CMake GUI, create anew entry for them. We recommend using the<NAME>_(INCLUDE/LIBRARY)_DIR_HINTS variables rather thansetting the <NAME>_INCLUDE_DIR & <NAME>_LIBRARY variablesdirectly to keep all of the validity checking, and to avoid havingto specify the library files manually.

  8. You may have to tweak some more settings to generate a MSVCproject. After each adjustment, try pressing Configure & Generateuntil it generates successfully.

  9. Open the solution and build it in MSVC

To run the tests, select the RUN_TESTS target and hit BuildRUN_TESTS from the build menu.

Like the Linux build, you should now be able to runbin/simple_bundle_adjuster.

Notes:

  1. The default build is Debug; consider switching it to release mode.

  2. Currently system_test is not working properly.

  3. CMake puts the resulting test binaries in ceres-bin/examples/Debugby default.

  4. The solvers supported on Windows are DENSE_QR, DENSE_SCHUR,CGNR, and ITERATIVE_SCHUR.

  5. We’re looking for someone to work with upstream SuiteSparse toport their build system to something sane like CMake, and get afully supported Windows port.

Android¶

Note

You will need Android NDK r15 or higher to build Ceres solver.

To build Ceres for Android, we need to force CMake to findthe toolchains from the Android NDK instead of using the standardones. For example, assuming you have specified $NDK_DIR:

You can build for any Android STL or ABI, but the c++_shared STLand the armeabi-v7a or arm64-v8a ABI are recommended for 32bitand 64bit architectures, respectively. Several API levels maybe supported, but it is recommended that you use the highestlevel that is suitable for your Android project.

Note

You must always use the same API level and STL library foryour Android project and the Ceres binaries.

After building, you get a libceres.so library, which you canlink in your Android build system by using aPREBUILT_SHARED_LIBRARY target in your build script.

If you are building any Ceres samples and would like to verifyyour library, you will need to place them in an executable publicdirectory together with libceres.so on your Android device(e.g. in /data/local/tmp) and ensure that the STL library fromyour NDK is present in that same directory. You may then executethe sample by running for example:

Note that any solvers or other shared dependencies you include inyour project must also be present in your android build config andyour test directory on Android.

iOS¶

Note

You need iOS version 7.0 or higher to build Ceres Solver.

To build Ceres for iOS, we need to force CMake to find thetoolchains from the iOS SDK instead of using the standard ones. Forexample:

PLATFORM can be: OS, SIMULATOR or SIMULATOR64. You canbuild for OS (armv7, armv7s, arm64), SIMULATOR(i386) or SIMULATOR64 (x86_64) separately and use lipoto merge them into one static library. See cmake/iOS.cmake formore options.

Note

iOS version 11.0+ requires a 64-bit architecture, so you cannotbuild for armv7/armv7s with iOS 11.0+ (only arm64 is supported).

After building, you will get a libceres.a library, which you willneed to add to your Xcode project.

The default CMake configuration builds a bare bones version of CeresSolver that only depends on Eigen (MINIGLOG is compiled into Ceresif it is used), this should be sufficient for solving small tomoderate sized problems (No SPARSE_SCHUR,SPARSE_NORMAL_CHOLESKY linear solvers and no CLUSTER_JACOBIand CLUSTER_TRIDIAGONAL preconditioners).

If you decide to use LAPACK and BLAS, then you also need toadd Accelerate.framework to your Xcode project’s linkingdependency.

Customizing the build¶

It is possible to reduce the libraries needed to build Ceres andcustomize the build process by setting the appropriate options inCMake. These options can either be set in the CMake GUI, orvia -D<OPTION>=<ON/OFF> when running CMake from the commandline. In general, you should only modify these options from theirdefaults if you know what you are doing.

Note

If you are setting variables via -D<VARIABLE>=<VALUE> whencalling CMake, it is important to understand that this forciblyoverwrites the variable <VARIABLE> in the CMake cache atthe start of every configure.

This can lead to confusion if you are invoking the CMakecurses terminal GUI(via ccmake, e.g. `ccmake-D<VARIABLE>=<VALUE><PATH_TO_SRC>). In this case, even if you change the value of<VARIABLE> in the CMake GUI, your changes will beoverwritten with the value passed via -D<VARIABLE>=<VALUE>(if one exists) at the start of each configure.

As such, it is generally easier not to pass values to CMake via-D and instead interactively experiment with their values in theCMake GUI. If they are not present in the Standard View,toggle to the Advanced View with <t>.

Modifying default compilation flags¶

The CMAKE_CXX_FLAGS variable can be used to define additionaldefault compilation flags for all build types. Any flags specifiedin CMAKE_CXX_FLAGS will be used in addition to the defaultflags used by Ceres for the current build type.

For example, if you wished to build Ceres with -march=native which is notenabled by default (even if CMAKE_BUILD_TYPE=Release) you would invokeCMake with:

Note

The use of -march=native will limit portability, as it will tune theimplementation to the specific CPU of the compiling machine (e.g. use ofAVX if available). Run-time segfaults may occur if you then tried torun the resulting binaries on a machine with a different processor, evenif it is from the same family (e.g. x86) if the specific options availableare different. Note that the performance gains from the use of-march=native are not guaranteed to be significant.

Options controlling Ceres configuration¶

  1. LAPACK[Default:ON]: If this option is enabled, and the BLAS andLAPACK libraries are found, Ceres will enable direct use ofLAPACK routines (i.e. Ceres itself will call them). If this option isdisabled, then Ceres will not require LAPACK or BLAS. It ishowever still possible that Ceres may call LAPACK routines indirectlyvia SuiteSparse if LAPACK=OFF and SUITESPARSE=ON. Finallynote that if LAPACK=ON and SUITESPARSE=ON, the LAPACK andBLAS libraries used by SuiteSparse and Ceres should be the same.

  2. SUITESPARSE[Default:ON]: By default, Ceres will link toSuiteSparse if it and all of its dependencies are present. Turnthis OFF to build Ceres without SuiteSparse.

    Note

    SuiteSparse is licensed under a mixture of GPL/LGPL/Commercialterms. Ceres requires some components that are only licensed underGPL/Commercial terms.

  3. CXSPARSE[Default:ON]: By default, Ceres will link toCXSparse if all its dependencies are present. Turn this OFFto build Ceres without CXSparse.

  4. ACCELERATESPARSE[Default:ON]: By default, Ceres will link toApple’s Accelerate framework directly if a version of it is detectedwhich supports solving sparse linear systems. Note that on Apple OSsAccelerate usually also provides the BLAS/LAPACK implementations andso would be linked against irrespective of the value of ACCELERATESPARSE.

  5. EIGENSPARSE[Default:ON]: By default, Ceres will not useEigen’s sparse Cholesky factorization.

  6. GFLAGS[Default:ON]: Turn this OFF to build Ceres withoutgflags. This will also prevent some of the example code frombuilding.

  7. MINIGLOG[Default:OFF]: Ceres includes a stripped-down,minimal implementation of glog which can optionally be used asa substitute for glog, thus removing glog as a requireddependency. Turn this ON to use this minimal glogimplementation.

  8. SCHUR_SPECIALIZATIONS[Default:ON]: If you are concerned aboutbinary size/compilation time over some small (10-20%) performancegains in the SPARSE_SCHUR solver, you can disable some of thetemplate specializations by turning this OFF.

  9. CERES_THREADING_MODEL[Default:CXX_THREADS>OPENMP>NO_THREADS]:Multi-threading backend Ceres should be compiled with. This willautomatically be set to only accept the available subset of threadingoptions in the CMake GUI.

  10. BUILD_SHARED_LIBS[Default:OFF]: By default Ceres is built asa static library, turn this ON to instead build Ceres as ashared library.

  11. EXPORT_BUILD_DIR[Default:OFF]: By default Ceres is configuredsolely for installation, and so must be installed in order forclients to use it. Turn this ON to export Ceres’ builddirectory location into the user’s local CMake package registrywhere it will be detected without requiring installation in aclient project using CMake when find_package(Ceres)is invoked.

  12. BUILD_DOCUMENTATION[Default:OFF]: Use this to enable buildingthe documentation, requires Sphinx andthe sphinx-better-theme packageavailable from the Python package index. In addition, makeceres_docs can be used to build only the documentation.

  13. MSVC_USE_STATIC_CRT[Default:OFF]Windows Only: By defaultCeres will use the Visual Studio default, shared C-Run Time (CRT)library. Turn this ON to use the static C-Run Time libraryinstead.

  14. LIB_SUFFIX[Default:'64'onnon-Debian/Archbased64-bitLinux,otherwise:']: The suffix to append to the library installdirectory, built from:${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}.

    The filesystem hierarchy standard recommends that 64-bit systemsinstall native libraries to lib64 rather than lib. Most Linuxdistributions follow this convention, but Debian and Arch baseddistros do not. Note that the only generally sensible values forLIB_SUFFIX are “” and “64”.

    Although by default Ceres will auto-detect non-Debian/Arch based64-bit Linux distributions and default LIB_SUFFIX to “64”, thiscan always be overridden by manually specifying LIB_SUFFIX using:-DLIB_SUFFIX=<VALUE> when invoking CMake.

Options controlling Ceres dependency locations¶

Ceres uses the CMakefind_packagefunction to find all of its dependencies. Dependencies that reliablyprovide config files on all supported platforms are expected to befound in “Config” mode of find_package (Eigen, gflags).This means you can use the standard CMake facilities to customizewhere these dependencies are found, such as CMAKE_PREFIX_PATH,the <DEPENDENCY_NAME>_DIR variables, or since CMake 3.12 the<DEPENDENCY_NAME>_ROOT variables.

Other dependencies are found usingFind<DEPENDENCY_NAME>.cmake scripts which are either included inCeres (for most dependencies) or are shipped as standard withCMake (for LAPACK & BLAS). These scripts will search allof the “standard” install locations for various OSs for eachdependency. However, particularly for Windows, they may fail to findthe library, in this case you will have to manually specify itsinstalled location. The Find<DEPENDENCY_NAME>.cmake scriptsshipped with Ceres support two ways for you to do this:

  1. Set the hints variables specifying the directories to search inpreference, but in addition, to the search directories in theFind<DEPENDENCY_NAME>.cmake script:

    • <DEPENDENCY_NAME(CAPS)>_INCLUDE_DIR_HINTS

    • <DEPENDENCY_NAME(CAPS)>_LIBRARY_DIR_HINTS

    These variables should be set via -D<VAR>=<VALUE>CMake arguments as they are not visible in the GUI.

  2. Set the variables specifying the explicit include directoryand library file to use:

    • <DEPENDENCY_NAME(CAPS)>_INCLUDE_DIR

    • <DEPENDENCY_NAME(CAPS)>_LIBRARY

    This bypasses all searching in theFind<DEPENDENCY_NAME>.cmake script, but validation is stillperformed.

    These variables are available to set in the CMake GUI. They arevisible in the Standard View if the library has not been found(but the current Ceres configuration requires it), but are alwaysvisible in the Advanced View. They can also be set directly via-D<VAR>=<VALUE> arguments to CMake.

Building using custom BLAS & LAPACK installs¶

If the standard find package scripts for BLAS & LAPACK whichship with CMake fail to find the desired libraries on your system,try setting CMAKE_LIBRARY_PATH to the path(s) to the directoriescontaining the BLAS & LAPACK libraries when invoking CMaketo build Ceres via -D<VAR>=<VALUE>. This should result in thelibraries being found for any common variant of each.

Alternatively, you may also directly specify the BLAS_LIBRARIES andLAPACK_LIBRARIES variables via -D<VAR>=<VALUE> when invoking CMaketo configure Ceres.

Using Ceres with CMake¶

In order to use Ceres in client code with CMake using find_package()then either:

  1. Ceres must have been installed with makeinstall. If the

    install location is non-standard (i.e. is not in CMake’s defaultsearch paths) then it will not be detected by default, see:Local installations.

    Note that if you are using a non-standard install location youshould consider exporting Ceres instead, as this will not requireany extra information to be provided in client code for Ceres tobe detected.

  2. Or Ceres’ build directory must have been exported by enabling the

    EXPORT_BUILD_DIR option when Ceres was configured.

Solver

As an example of how to use Ceres, to compile examples/helloworld.ccin a separate standalone project, the following CMakeList.txt can beused:

Irrespective of whether Ceres was installed or exported, if multipleversions are detected, set: Ceres_DIR to control which is used.If Ceres was installed Ceres_DIR should be the path to thedirectory containing the installed CeresConfig.cmake file(e.g. /usr/local/lib/cmake/Ceres). If Ceres was exported, thenCeres_DIR should be the path to the exported Ceres builddirectory.

Note

You do not need to call include_directories(${CERES_INCLUDE_DIRS})as the exported Ceres CMake target already contains the definitionsof its public include directories which will be automaticallyincluded by CMake when compiling a target that links against Ceres.In fact, since v2.0 CERES_INCLUDE_DIRS is not even set.

Specify Ceres components¶

You can specify particular Ceres components that you require (in orderfor Ceres to be reported as found) when invokingfind_package(Ceres). This allows you to specify, for example,that you require a version of Ceres built with SuiteSparse support.By definition, if you do not specify any components when callingfind_package(Ceres) (the default) any version of Ceres detectedwill be reported as found, irrespective of which components it wasbuilt with.

The Ceres components which can be specified are:

  1. LAPACK: Ceres built using LAPACK (LAPACK=ON).

  2. SuiteSparse: Ceres built with SuiteSparse (SUITESPARSE=ON).

  3. CXSparse: Ceres built with CXSparse (CXSPARSE=ON).

  4. AccelerateSparse: Ceres built with Apple’s Accelerate sparse solvers (ACCELERATESPARSE=ON).

  5. EigenSparse: Ceres built with Eigen’s sparse Cholesky factorization(EIGENSPARSE=ON).

  6. SparseLinearAlgebraLibrary: Ceres built with at least one sparse linearalgebra library. This is equivalent to SuiteSparseORCXSparseORAccelerateSparseOREigenSparse.

  7. SchurSpecializations: Ceres built with Schur specializations(SCHUR_SPECIALIZATIONS=ON).

  8. OpenMP: Ceres built with OpenMP (CERES_THREADING_MODEL=OPENMP).

  9. Multithreading: Ceres built with a multithreading library.This is equivalent to (CERES_THREAD!=NO_THREADS).

To specify one/multiple Ceres components use the COMPONENTS argument tofind_package() like so:

Specify Ceres version¶

Additionally, when CMake has found Ceres it can optionally check the packageversion, if it has been specified in the find_package()call. For example:

Local installations¶

If Ceres was installed in a non-standard path by specifying-DCMAKE_INSTALL_PREFIX='/some/where/local', then the user shouldadd the PATHS option to the find_package() command, e.g.,

Note that this can be used to have multiple versions of Ceresinstalled. However, particularly if you have only a single version ofCeres which you want to use but do not wish to install to a systemlocation, you should consider exporting Ceres using theEXPORT_BUILD_DIR option instead of a local install, as exportedversions of Ceres will be automatically detected by CMake,irrespective of their location.

Understanding the CMake Package System¶

Although a full tutorial on CMake is outside the scope of this guide,here we cover some of the most common CMake misunderstandings thatcrop up when using Ceres. For more detailed CMake usage, thefollowing references are very useful:

  • The official CMake tutorial

  • ProjectConfig tutorialand the cmake-packages documentation

    Cover how to write a ProjectConfig.cmake file, discussed below,for your own project when installing or exporting it using CMake.It also covers how these processes in conjunction withfind_package() are actually handled by CMake. TheProjectConfig tutorialis the older style, currently used by Ceres for compatibility witholder versions of CMake.

    Note

    Targets in CMake.

    All libraries and executables built using CMake are represented astargets created using add_library()and add_executable().Targets encapsulate the rules and dependencies (which can be othertargets) required to build or link against an object. This allowsCMake to implicitly manage dependency chains. Thus it issufficient to tell CMake that a library target: B depends on apreviously declared library target A, and CMake willunderstand that this means that B also depends on all of thepublic dependencies of A.

When a project like Ceres is installed using CMake, or its builddirectory is exported into the local CMake package registry (seeInstalling a project with CMake vs Exporting its build directory), in addition to the public headersand compiled libraries, a set of CMake-specific project configurationfiles are also installed to: <INSTALL_ROOT>/lib/cmake/Ceres (if Ceresis installed), or created in the build directory (if Ceres’ builddirectory is exported). When find_package isinvoked, CMake checks various standard install locations (including/usr/local on Linux & UNIX systems), and the local CMake packageregistry for CMake configuration files for the project to be found(i.e. Ceres in the case of find_package(Ceres)). Specifically itlooks for:

  • <PROJECT_NAME>Config.cmake (or<lower_case_project_name>-config.cmake)

    Which is written by the developers of the project, and isconfigured with the selected options and installed locations whenthe project is built and imports the project targets and/or definesthe legacy CMake variables: <PROJECT_NAME>_INCLUDE_DIRS &<PROJECT_NAME>_LIBRARIES which are used by the caller.

The <PROJECT_NAME>Config.cmake typically includes a second fileinstalled to the same location:

  • <PROJECT_NAME>Targets.cmake

    Which is autogenerated by CMake as part of the install process and definesimported targets for the project in the caller’s CMake scope.

An imported target contains the same information about a libraryas a CMake target that was declared locally in the current CMakeproject using add_library(). However, imported targets refer toobjects that have already been built by a different CMake project.Principally, an imported target contains the location of the compiledobject and all of its public dependencies required to link against itas well as all required include directories. Any locally declared targetcan depend on an imported target, and CMake will manage the dependencychain, just as if the imported target had been declared locally by thecurrent project.

Crucially, just like any locally declared CMake target, an imported target isidentified by its name when adding it as a dependency to another target.

Since v2.0, Ceres has used the target namespace feature of CMake to prefixits export targets: Ceres::ceres. However, historically the Ceres targetdid not have a namespace, and was just called ceres.

Whilst an alias target called ceres is still provided in v2.0 for backwardscompatibility, it creates a potential drawback, if you failed to callfind_package(Ceres), and Ceres is installed in a default search path foryour compiler, then instead of matching the imported Ceres target, it willinstead match the installed libceres.so/dylib/a library. If this happens youwill get either compiler errors for missing include directories or linker errorsdue to missing references to Ceres public dependencies.

Note that this description applies both to projects that areinstalled using CMake, and to those whose build directory isexported using export() (insteadof install()). Ceressupports both installation and export of its build directory if theEXPORT_BUILD_DIR option is enabled, seeCustomizing the build.

Installing a project with CMake vs Exporting its build directory¶

When a project is installed, the compiled libraries and headersare copied from the source & build directory to the install location,and it is these copied files that are used by any client code. When aproject’s build directory is exported, instead of copying thecompiled libraries and headers, CMake creates an entry for the projectin the user’s local CMake package registry,<USER_HOME>/.cmake/packages on Linux & macOS, which contains thepath to the project’s build directory which will be checked by CMakeduring a call to find_package(). The effect of which is that anyclient code uses the compiled libraries and headers in the builddirectory directly, thus not requiring the project to be installedto be used.

Installing / Exporting a project that uses Ceres¶

As described in Understanding the CMake Package System, the contents ofthe CERES_LIBRARIES variable is the name of an imported target whichrepresents Ceres. If you are installing / exporting your own project whichuses Ceres, it is important to understand that:

Imported targets are not (re)exported when a project which imported them isexported.

Thus, when a project Foo which uses Ceres is exported, its list ofdependencies as seen by another project Bar which imports Foovia: find_package(FooREQUIRED) will contain: ceres. However,the definition of ceres as an imported target is not(re)exported when Foo is exported. Hence, without any additionalsteps, when processing Bar, ceres will not be defined as animported target. Thus, when processing Bar, CMake will assumethat ceres refers only to: libceres.a/so/dylib/lib (thecompiled Ceres library) directly if it is on the current list ofsearch paths. In which case, no CMake errors will occur, but Barwill not link properly, as it does not have the required public linkdependencies of Ceres, which are stored in the imported targetdefinition.

The solution to this is for Foo (i.e., the project that usesCeres) to invoke find_package(Ceres) in FooConfig.cmake, thusceres will be defined as an imported target when CMake processesBar. An example of the required modifications toFooConfig.cmake are show below:

Migration¶

The following includes some hints for migrating from previous versions.

Version 2.0¶

  • When using Ceres with CMake, the target name in v2.0 isCeres::ceres following modern naming convetions. The legacytarget ceres exists for backwards compatibility, but isdeprecated. CERES_INCLUDE_DIRS is not set any more, as theexported Ceres CMake target already contains the definitions of itspublic include directories which will be automatically included byCMake when compiling a target that links against Ceres.

  • When building Ceres, some dependencies (Eigen, gflags) are not foundusing custom Find<DEPENDENCY_NAME>.cmake modules anymore. Hence, instead of the custom variables (<DEPENDENCY_NAME(CAPS)>_INCLUDE_DIR_HINTS,<DEPENDENCY_NAME(CAPS)>_INCLUDE_DIR, …) you should use standardCMake facilities to customize where these dependencies are found, such asCMAKE_PREFIX_PATH, the <DEPENDENCY_NAME>_DIR variables, orsince CMake 3.12 the <DEPENDENCY_NAME>_ROOT variables.

  • While TBB is not used any more directly by Ceres, it might still tryto link against it, if SuiteSparseQR was found. The variable (environmentor CMake) to customize this is TBB_ROOT (used to be TBBROOT).For example, use cmake-DTBB_ROOT=/opt/intel/tbb... if you want tolink against TBB installed from Intel’s binary packages on Linux.

Welcome to OpenSolver, the Open Source linear, integer and non-linear optimizer for Microsoft Excel.

The latest stable version,OpenSolver 2.9.3(1 Mar 2020) is available for download; this adds support for using Gurobi 9.0 as a solver. OpenSolver 2.9.4 Beta Release version is now also available for download. Refer to the release blog for the new 2.7, 2.8, 2.8.3,2.8.4, 2.8.5, 2.8.6, 2.9.0 , 2.9.3 & 2.9.4 improvements. View all releases.

OpenSolver for Google Sheets; see our dedicated OpenSolver for Google Sheets page for more info on the Google Sheets versions of OpenSolver.

COIN-OR Cup Winner: We are pleased to announce that OpenSolver is the winner of the 2011 INFORMS COIN-OR Cupsponsored by IBM. Thanks, COIN-OR, for this honour.

OpenSolver is an Excel VBA add-in that extends Excel’s built-in Solver with more powerful solvers. It is developed and maintained by Andrew Mason and students at the Engineering Science department, University of Auckland, NZ. Recent developments are courtesy of Jack Dunn at MIT.

OpenSolver provides the following features:

  • OpenSolver offers a range of solvers for use in Excel, including the excellent, Open Source, COIN-ORCBC optimization engine which can quickly solve large Linear and Integer problems.
  • Compatible with your existing Solver models, so there is no need to change your spreadsheets
  • No artificial limits on the size of problem you can solve – have as many variables and constraints as your computer memory allows (but be aware that large problems can be slow to solve)
  • OpenSolver is free, open source software.

As well as providing replacement optimization engines, OpenSolver offers:

  • A built-in model visualizer that highlights your model’s decision variables, objective and constraints directly on your spreadsheet
  • A fast QuickSolve mode that makes it much faster to re-solve your model after making changes
  • An algorithm to build and update the model only using information present on the sheet
  • A modelling tool that we think improves on the built-in Solver window

OpenSolver has been developed for Excel 2007/2010/2013/2016 (including the 64bit versions) running on Windows, and supports Excel for Mac 2011 on Mac OS X, with limited support for Excel for Mac 2016. We currently test against Excel 2010/2013/2016 on Windows 7 and Windows 10, and Excel 2011/2016 on OS X 10.7 through 10.11. Note that we do not check our code against other versions of Excel or Windows/Mac than these. This means we cannot guarantee that the latest release will work on old versions. However, please give it a go and let us know of any problems so we can fix them.

Excel Solver Mac

You can download OpenSolver.zip (which is hosted on our Open Solver Source Forge site). Version details (and dates of updates) are shown on the blog page.

SolverStudio is a free alternative to OpenSolver that is better suited to larger problems. Available as a free download, SolverStudio lets you use Excel to edit, save and solve optimisation models built using modelling languages such as the Python-based PuLP, AMPL, GAMS, GMPL, COOPR/Pyomo and Gurobi’s Python interface. The latest release allows GAMS and AMPL modesl to be solved in the cloud using the excellent free NEOS servers. The SolverStudio interface is fully Excel-based, with the model being edited and run from Excel and stored inside the Excel file. This approach provides a much better modelling solution for complex optimisation problems. Check out the screen shots to see how it works. SolverStudio is much better and faster for large problems. However, OpenSolver is still a great tool for simpler models, or spreadsheets that must be compatible with the built-in Solver.

OpenSolver is being developed by Andrew Mason in the Department of Engineering Science at the University of Auckland, and Iain Dunning. Kat Gilbert also made valuable contributions to the code while working as a summer student. Current development is lead by Jack Dunn from MIT. Development of OpenSolver is made easier by the excellent Excel Name Manager which displays all the hidden worksheet names used to store an optimization model.

OpenSolver is released as open source code under the GPL. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. OpenSolver uses a range of solvers, information on these is available here.

Citing OpenSolver: Continued development of OpenSolver is only possible if we can demonstrate its impact. If you are publishing work that uses OpenSolver, please cite both this opensolver.org website and this paper:

Download Solver For Excel Mac

Mason, A.J., “OpenSolver – An Open Source Add-in to Solve Linear and Integer Progammes in Excel”, Operations Research Proceedings 2011, eds. Klatte, Diethard, Lüthi, Hans-Jakob, Schmedders, Karl, Springer Berlin Heidelberg
pp 401-406, 2012, http://dx.doi.org/10.1007/978-3-642-29210-1_64, http://opensolver.org

Latex Reference

@INCOLLECTION{OpenSolver,
author = {Mason, AndrewJ},
title = {OpenSolver – An Open Source Add-in to Solve Linear and Integer Progammes
in Excel},
booktitle = {Operations Research Proceedings 2011},
publisher = {Springer Berlin Heidelberg},
year = {2012},
editor = {Klatte, Diethard and Lathi, Hans-Jakob and Schmedders, Karl},
series = {Operations Research Proceedings},
pages = {401-406},
note = {http://opensolver.org},
doi = {10.1007/978-3-642-29210-1_64},
isbn = {978-3-642-29209-5},
language = {English},
url = {http://dx.doi.org/10.1007/978-3-642-29210-1_64}
}

Footnote

The Excel Solver is a product developed by Frontline Systems for Microsoft. OpenSolver has no affiliation with, nor is recommend by, Microsoft or Frontline Systems. All trademark terms are the property of their respective owners.