github.com/fardream/gmsk (go): gmsk is an unofficial wrapper for MOSEK, the conic optimizer from MOSEK ApS.  gmsk is based on mosek's C api, which must be installed and configured before using gmsk.  Most routines of mosek's C api returns a response code ResCode (whic is an enum/uint32) to indicate if the routine is successful or not (MSK_RES_OK or RES_OK indicates success). Check mosek documentation for more information.  Almost all float point numbers in MOSEK are IEEE-754 64-bit float point number, or double in C/C++/float64 in go.  Most indices associated with variables and A (constraints) matrix are signed 32-bit integers, int32_t in C/C++ and int32 in go. However, indices associated with affine expression (afe) are 64-bit, or int64_t in C/C++ and int64 in go.  Besides response code, MOSEK sometimes needs to return some other information (for example, index of newly created domain). This is achieved in C/C++ by passing in a "destination" pointer. This is not done in go because go supports multiple return values.  For majority of pointer inputs to MOSEK calls (such as below), the pointers can be obtained by take the address of the desired element in a slice/array in golang  The input to val can be `&val[0]`.  Wrappers for routines accepting C string (or "const char *" type) instead accept go's string. However, this will create a new C.CString (destroy it once it is copied over by mosek).  Note that there is always overhead of calling c functions from go.  Affine conic constraints example 1, reproduced from acc1.c in MOSEK C Api.  Purpose :   Tutorial example for affine conic constraints.  Models the problem:  maximize c^T x  subject to  sum(x) = 1  gamma >= |Gx+h|_2   Affine conic constraints example 2, reproduced from acc2.c in MOSEK C Api.  Purpose :   Tutorial example for affine conic constraints.  Models the problem:  maximize c^T x  subject to  sum(x) = 1  gamma >= |Gx+h|_2  This version inputs the linear constraint as an affine conic constraint.   Example on how to use included BLAS/LAPACK routines in MOSEK, reproduced from blas_lapack.c in MOSEK C api.   Conic exponential optimization, reproduced from ceo1.c in MOSEK C api.   Conic Quadratic Optimization, reproduced from cqo1.c in MOSEK example.   Optimization with disjunctive constraints, reproduced from djc1.c in MOSEK C api.   Example of geometric program with exponential cones and log-sum-exp, reproduced from gp1.c in MOSEK C api.   This is reproduced from MOSEK C example hellowworld.c However, the response code is checked here.   Linear programming example 1, reproduced from mosek c api example lo1.c   Logistic regression example with MOSEK, reproduced from logistic.c in MOSEK C api.   Example of mixed integer linear optimization, reproduced from milo1.c in MOSEK C api.   Mixed integer conic optimization example, reproduced from mico1.c from MOSEK C api.   Mixed integer programming with initial solution, reproduced from mioinitsol.c in MOSEK C api.   Portfolio optimization example, reproduced from portfolio_1_basic.c in MOSEK C api example.   Portfolio frontier optimization, reproduced from portfolio_2_frontier.c in MOSEK C api.   Portfolio optimization example with 3/2 impact. Reproduced from portfolio_3_impact.c in MOSEK C api.   Portfolio optimization fixed setup costs and transaction costs as a mixed integer problem, reproduced from portfolio_4_transcost.c in MOSEK C api.   Portfolio optimization with cardinality constraints on the number of assets traded, reproduced from portfolio_5_card.c in MOSEK C api.   Portfolio optimization example with factor model, reproduced from portfolio_6_factor.c in MOSEK C api.   Purpose: Demonstrates how to solve the problem   Quadratic optimization example with quadratic objective and constraints, reproduced from qcqo1.c in MOSEK C api.   Quadratic optimization example, reproduced from qo1.c in MOSEK C api.   Reoptimization example, reproduced from reoptimization.c in MOSEK C api.   Semidefinite optimization example, reproduced from sdo1.c in MOSEK C api.   Semidefinite optimization, reproduced from sdo2.c in MOSEK C api.   Example of semidefinite matrix with linear matrix inequality, reproduced from sdo_lmi.c in MOSEK C api.
Keywords: go|golang|mathematical-modelling|optimization|optimization-tools