15.2 Functions grouped by topic¶
Callback
clearcallbackfunc
– Clears callbacks.clearstreamfunc
– Clears a stream callback.putcallbackfunc
– Receive callbacks with solver status and information during optimization.putstreamfunc
– Directs all output from a task stream to a callback function.
Environment and task management
makeenv
– Creates a new environment.maketask
– Creates a new task.puttaskname
– Assigns a new name to the task.Infrequent:
commitchanges
,deletesolution
,putmaxnumacc
,putmaxnumafe
,putmaxnumanz
,putmaxnumbarvar
,putmaxnumcon
,putmaxnumdjc
,putmaxnumdomain
,putmaxnumqnz
,putmaxnumvar
,resizetask
Deprecated:
putmaxnumcone
Infeasibility diagnostic
getinfeasiblesubproblem
– Obtains an infeasible subproblem.infeasibilityreport
– Prints the infeasibility report to an output stream.primalrepair
– Repairs a primal infeasible optimization problem by adjusting the bounds on the constraints and variables.
Information items and statistics
getdouinf
– Obtains a double information item.getintinf
– Obtains an integer information item.getlintinf
– Obtains a long integer information item.updatesolutioninfo
– Update the information items related to the solution.Infrequent:
getinfname
,getnadouinf
,getnaintinf
Input/Output
writedata
– Writes problem data to a file.writesolution
– Write a solution to a file.Infrequent:
readbsolution
,readdata
,readdataformat
,readjsonsol
,readjsonstring
,readlpstring
,readopfstring
,readparamfile
,readptfstring
,readsolution
,readsolutionfile
,readsummary
,readtask
,writebsolution
,writedatastream
,writejsonsol
,writeparamfile
,writesolutionfile
,writetask
Inspecting the task
analyzeproblem
– Analyze the data of a task.getnumcon
– Obtains the number of constraints.getnumvar
– Obtains the number of variables.Infrequent:
analyzesolution
,getaccafeidxlist
,getaccb
,getaccbarfnumblocktriplets
,getaccdomain
,getaccfnumnz
,getaccftrip
,getaccgvector
,getaccn
,getaccname
,getaccnamelen
,getaccntot
,getaccs
,getacol
,getacolnumnz
,getacolslice
,getacolslicenumnz
,getacolslicetrip
,getafebarfnumblocktriplets
,getafebarfnumrowentries
,getafebarfrow
,getafebarfrowinfo
,getafefnumnz
,getafefrow
,getafefrownumnz
,getafeftrip
,getafeg
,getafegslice
,getaij
,getapiecenumnz
,getarow
,getarownumnz
,getarowslice
,getarowslicenumnz
,getarowslicetrip
,getatrip
,getbarablocktriplet
,getbaraidx
,getbaraidxij
,getbaraidxinfo
,getbarasparsity
,getbarcblocktriplet
,getbarcidx
,getbarcidxinfo
,getbarcidxj
,getbarcsparsity
,getbarvarname
,getbarvarnameindex
,getbarvarnamelen
,getc
,getcfix
,getcj
,getclist
,getconbound
,getconboundslice
,getconname
,getconnameindex
,getconnamelen
,getcslice
,getdimbarvarj
,getdjcafeidxlist
,getdjcb
,getdjcdomainidxlist
,getdjcname
,getdjcnamelen
,getdjcnumafe
,getdjcnumafetot
,getdjcnumdomain
,getdjcnumdomaintot
,getdjcnumterm
,getdjcnumtermtot
,getdjcs
,getdjctermsizelist
,getdomainn
,getdomainname
,getdomainnamelen
,getdomaintype
,getlenbarvarj
,getmaxnumanz
,getmaxnumbarvar
,getmaxnumcon
,getmaxnumqnz
,getmaxnumvar
,getnumacc
,getnumafe
,getnumanz
,getnumanz64
,getnumbarablocktriplets
,getnumbaranz
,getnumbarcblocktriplets
,getnumbarcnz
,getnumbarvar
,getnumdjc
,getnumdomain
,getnumintvar
,getnumparam
,getnumqconknz
,getnumqobjnz
,getnumsymmat
,getobjname
,getobjnamelen
,getpowerdomainalpha
,getpowerdomaininfo
,getprobtype
,getqconk
,getqobj
,getqobjij
,getsparsesymmat
,getsymmatinfo
,gettaskname
,gettasknamelen
,getvarbound
,getvarboundslice
,getvarname
,getvarnameindex
,getvarnamelen
,getvartype
,getvartypelist
,printparam
,probtypetostr
,readsummary
Deprecated:
getcone
,getconeinfo
,getconename
,getconenameindex
,getconenamelen
,getmaxnumcone
,getnumcone
,getnumconemem
License system
checkoutlicense
– Check out a license feature from the license server ahead of time.putlicensedebug
– Enables debug information for the license system.putlicensepath
– Set the path to the license file.putlicensewait
– Control whether mosek should wait for an available license if no license is available.Infrequent:
checkinall
,checkinlicense
,expirylicenses
,licensecleanup
,putlicensecode
,resetexpirylicenses
Linear algebra
Infrequent:
computesparsecholesky
,sparsetriangularsolvedense
Logging
clearcallbackfunc
– Clears callbacks.clearstreamfunc
– Clears a stream callback.linkfiletostream
– Directs all output from a task stream to a file.onesolutionsummary
– Prints a short summary of a specified solution.optimizersummary
– Prints a short summary with optimizer statistics from last optimization.putstreamfunc
– Directs all output from a task stream to a callback function.solutionsummary
– Prints a short summary of the current solutions.Infrequent:
echointro
,linkfiletostream
,printparam
Names
getcodedesc
– Obtains a short description of a response code.putaccname
– Sets the name of an affine conic constraint.putbarvarname
– Sets the name of a semidefinite variable.putconname
– Sets the name of a constraint.putdjcname
– Sets the name of a disjunctive constraint.putdomainname
– Sets the name of a domain.putobjname
– Assigns a new name to the objective.puttaskname
– Assigns a new name to the task.putvarname
– Sets the name of a variable.Infrequent:
analyzenames
,bktostr
,callbackcodetostr
,dinfitemtostr
,getaccname
,getaccnamelen
,getbarvarname
,getbarvarnameindex
,getbarvarnamelen
,getconname
,getconnameindex
,getconnamelen
,getdjcname
,getdjcnamelen
,getdomainname
,getdomainnamelen
,getinfname
,getnastrparam
,getobjname
,getobjnamelen
,getparamname
,getstrparam
,getstrparamlen
,gettaskname
,gettasknamelen
,getvarname
,getvarnameindex
,getvarnamelen
,iinfitemtostr
,isdouparname
,isintparname
,isstrparname
,liinfitemtostr
,probtypetostr
,prostatostr
,rescodetostr
,strtosk
Deprecated:
conetypetostr
,getconename
,getconenameindex
,getconenamelen
,putconename
,strtoconetype
Optimization
optimize
– Optimizes the problem.optimizebatch
– Optimize a number of tasks in parallel using a specified number of threads.
Parameters
putdouparam
– Sets a double parameter.putintparam
– Sets an integer parameter.putparam
– Modifies the value of parameter.putstrparam
– Sets a string parameter.setdefaults
– Resets all parameter values.Infrequent:
getatruncatetol
,getdouparam
,getintparam
,getnadouparam
,getnaintparam
,getnastrparam
,getnumparam
,getparamname
,getstrparam
,getstrparamlen
,isdouparname
,isintparname
,isstrparname
,putnadouparam
,putnaintparam
,putnastrparam
,readparamfile
,writeparamfile
Problem data - affine conic constraints
appendacc
– Appends an affine conic constraint to the task.getaccdoty
– Obtains the doty vector for an affine conic constraint.putaccname
– Sets the name of an affine conic constraint.Infrequent:
appendaccs
,appendaccseq
,appendaccsseq
,evaluateacc
,evaluateaccs
,getaccafeidxlist
,getaccb
,getaccbarfnumblocktriplets
,getaccdomain
,getaccdotys
,getaccfnumnz
,getaccftrip
,getaccgvector
,getaccn
,getaccname
,getaccnamelen
,getaccntot
,getaccs
,getnumacc
,putacc
,putaccb
,putaccbj
,putaccdoty
,putacclist
,putmaxnumacc
Problem data - affine expressions
appendafes
– Appends a number of empty affine expressions to the optimization task.putafebarfentry
– Inputs one entry in barF.putafebarfentrylist
– Inputs a list of entries in barF.putafebarfrow
– Inputs a row of barF.putafefcol
– Replaces all elements in one column of the F matrix in the affine expressions.putafefentry
– Replaces one entry in F.putafefentrylist
– Replaces a list of entries in F.putafefrow
– Replaces all elements in one row of the F matrix in the affine expressions.putafefrowlist
– Replaces all elements in a number of rows of the F matrix in the affine expressions.putafeg
– Replaces one element in the g vector in the affine expressions.putafegslice
– Modifies a slice of the vector g.Infrequent:
emptyafebarfrow
,emptyafebarfrowlist
,emptyafefcol
,emptyafefcollist
,emptyafefrow
,emptyafefrowlist
,getaccbarfblocktriplet
,getafebarfblocktriplet
,getafebarfnumrowentries
,getafebarfrow
,getafebarfrowinfo
,getafefnumnz
,getafefrow
,getafefrownumnz
,getafeftrip
,getafeg
,getafegslice
,getnumafe
,putafebarfblocktriplet
,putafeglist
,putmaxnumafe
Problem data - bounds
putconbound
– Changes the bound for one constraint.putconboundslice
– Changes the bounds for a slice of the constraints.putvarbound
– Changes the bounds for one variable.putvarboundslice
– Changes the bounds for a slice of the variables.Infrequent:
chgconbound
,chgvarbound
,getconbound
,getconboundslice
,getvarbound
,getvarboundslice
,inputdata
,putconboundlist
,putconboundlistconst
,putconboundsliceconst
,putvarboundlist
,putvarboundlistconst
,putvarboundsliceconst
Problem data - cones (deprecated)
Deprecated:
appendcone
,appendconeseq
,appendconesseq
,getcone
,getconeinfo
,getconename
,getconenameindex
,getconenamelen
,getmaxnumcone
,getnumcone
,getnumconemem
,putcone
,putconename
,putmaxnumcone
,removecones
Problem data - constraints
appendcons
– Appends a number of constraints to the optimization task.getnumcon
– Obtains the number of constraints.putconbound
– Changes the bound for one constraint.putconboundslice
– Changes the bounds for a slice of the constraints.putconname
– Sets the name of a constraint.removecons
– Removes a number of constraints.Infrequent:
chgconbound
,getconbound
,getconboundslice
,getconname
,getconnameindex
,getconnamelen
,getmaxnumcon
,getnumqconknz
,getqconk
,inputdata
,putconboundlist
,putconboundlistconst
,putconboundsliceconst
,putmaxnumcon
Problem data - disjunctive constraints
appenddjcs
– Appends a number of empty disjunctive constraints to the task.putdjc
– Inputs a disjunctive constraint.putdjcname
– Sets the name of a disjunctive constraint.putdjcslice
– Inputs a slice of disjunctive constraints.Infrequent:
getdjcafeidxlist
,getdjcb
,getdjcdomainidxlist
,getdjcname
,getdjcnamelen
,getdjcnumafe
,getdjcnumafetot
,getdjcnumdomain
,getdjcnumdomaintot
,getdjcnumterm
,getdjcnumtermtot
,getdjcs
,getdjctermsizelist
,getnumdjc
,putmaxnumdjc
Problem data - domain
appenddualexpconedomain
– Appends the dual exponential cone domain.appenddualgeomeanconedomain
– Appends the dual geometric mean cone domain.appenddualpowerconedomain
– Appends the dual power cone domain.appendprimalexpconedomain
– Appends the primal exponential cone domain.appendprimalgeomeanconedomain
– Appends the primal geometric mean cone domain.appendprimalpowerconedomain
– Appends the primal power cone domain.appendquadraticconedomain
– Appends the n dimensional quadratic cone domain.appendrdomain
– Appends the n dimensional real number domain.appendrminusdomain
– Appends the n dimensional negative orthant to the list of domains.appendrplusdomain
– Appends the n dimensional positive orthant to the list of domains.appendrquadraticconedomain
– Appends the n dimensional rotated quadratic cone domain.appendrzerodomain
– Appends the n dimensional 0 domain.appendsvecpsdconedomain
– Appends the vectorized SVEC PSD cone domain.putdomainname
– Sets the name of a domain.Infrequent:
getdomainn
,getdomainname
,getdomainnamelen
,getdomaintype
,getnumdomain
,getpowerdomainalpha
,getpowerdomaininfo
,putmaxnumdomain
Problem data - linear part
appendcons
– Appends a number of constraints to the optimization task.appendvars
– Appends a number of variables to the optimization task.getnumcon
– Obtains the number of constraints.putacol
– Replaces all elements in one column of the linear constraint matrix.putacolslice
– Replaces all elements in a sequence of columns the linear constraint matrix.putaij
– Changes a single value in the linear coefficient matrix.putaijlist
– Changes one or more coefficients in the linear constraint matrix.putarow
– Replaces all elements in one row of the linear constraint matrix.putarowslice
– Replaces all elements in several rows the linear constraint matrix.putcfix
– Replaces the fixed term in the objective.putcj
– Modifies one linear coefficient in the objective.putconbound
– Changes the bound for one constraint.putconboundslice
– Changes the bounds for a slice of the constraints.putconname
– Sets the name of a constraint.putcslice
– Modifies a slice of the linear objective coefficients.putobjname
– Assigns a new name to the objective.putobjsense
– Sets the objective sense.putvarbound
– Changes the bounds for one variable.putvarboundslice
– Changes the bounds for a slice of the variables.putvarname
– Sets the name of a variable.removecons
– Removes a number of constraints.removevars
– Removes a number of variables.Infrequent:
chgconbound
,chgvarbound
,getacol
,getacolnumnz
,getacolslice
,getacolslicenumnz
,getacolslicetrip
,getaij
,getapiecenumnz
,getarow
,getarownumnz
,getarowslice
,getarowslicenumnz
,getarowslicetrip
,getatrip
,getatruncatetol
,getc
,getcfix
,getcj
,getclist
,getconbound
,getconboundslice
,getconname
,getconnameindex
,getconnamelen
,getcslice
,getmaxnumanz
,getmaxnumcon
,getmaxnumvar
,getnumanz
,getnumanz64
,getobjsense
,getvarbound
,getvarboundslice
,getvarname
,getvarnameindex
,getvarnamelen
,inputdata
,putacollist
,putarowlist
,putatruncatetol
,putclist
,putconboundlist
,putconboundlistconst
,putconboundsliceconst
,putmaxnumanz
,putvarboundlist
,putvarboundlistconst
,putvarboundsliceconst
Problem data - objective
putbarcj
– Changes one element in barc.putcfix
– Replaces the fixed term in the objective.putcj
– Modifies one linear coefficient in the objective.putcslice
– Modifies a slice of the linear objective coefficients.putobjname
– Assigns a new name to the objective.putobjsense
– Sets the objective sense.putqobj
– Replaces all quadratic terms in the objective.putqobjij
– Replaces one coefficient in the quadratic term in the objective.Infrequent:
putclist
Problem data - quadratic part
putqcon
– Replaces all quadratic terms in constraints.putqconk
– Replaces all quadratic terms in a single constraint.putqobj
– Replaces all quadratic terms in the objective.putqobjij
– Replaces one coefficient in the quadratic term in the objective.Infrequent:
getmaxnumqnz
,getnumqconknz
,getnumqobjnz
,getqconk
,getqobj
,getqobjij
,putmaxnumqnz
Problem data - semidefinite
appendbarvars
– Appends semidefinite variables to the problem.appendsparsesymmat
– Appends a general sparse symmetric matrix to the storage of symmetric matrices.appendsparsesymmatlist
– Appends a general sparse symmetric matrix to the storage of symmetric matrices.putafebarfentry
– Inputs one entry in barF.putafebarfentrylist
– Inputs a list of entries in barF.putafebarfrow
– Inputs a row of barF.putbaraij
– Inputs an element of barA.putbaraijlist
– Inputs list of elements of barA.putbararowlist
– Replace a set of rows of barAputbarcj
– Changes one element in barc.putbarvarname
– Sets the name of a semidefinite variable.Infrequent:
emptyafebarfrow
,emptyafebarfrowlist
,getaccbarfblocktriplet
,getaccbarfnumblocktriplets
,getafebarfblocktriplet
,getafebarfnumblocktriplets
,getafebarfnumrowentries
,getafebarfrow
,getafebarfrowinfo
,getbarablocktriplet
,getbaraidx
,getbaraidxij
,getbaraidxinfo
,getbarasparsity
,getbarcblocktriplet
,getbarcidx
,getbarcidxinfo
,getbarcidxj
,getbarcsparsity
,getdimbarvarj
,getlenbarvarj
,getmaxnumbarvar
,getnumbarablocktriplets
,getnumbaranz
,getnumbarcblocktriplets
,getnumbarcnz
,getnumbarvar
,getnumsymmat
,getsparsesymmat
,getsymmatinfo
,putafebarfblocktriplet
,putbarablocktriplet
,putbarcblocktriplet
,putmaxnumbarvar
,removebarvars
Problem data - variables
appendvars
– Appends a number of variables to the optimization task.getnumvar
– Obtains the number of variables.putvarbound
– Changes the bounds for one variable.putvarboundslice
– Changes the bounds for a slice of the variables.putvarname
– Sets the name of a variable.putvartype
– Sets the variable type of one variable.removevars
– Removes a number of variables.Infrequent:
chgvarbound
,getc
,getcj
,getmaxnumvar
,getnumintvar
,getvarbound
,getvarboundslice
,getvarname
,getvarnameindex
,getvarnamelen
,getvartype
,getvartypelist
,putclist
,putmaxnumvar
,putvarboundlist
,putvarboundlistconst
,putvarboundsliceconst
,putvartypelist
Remote optimization
asyncgetresult
– Request a solution from a remote job.asyncoptimize
– Offload the optimization task to a solver server in asynchronous mode.asyncpoll
– Requests information about the status of the remote job.asyncstop
– Request that the job identified by the token is terminated.optimizermt
– Offload the optimization task to a solver server and wait for the solution.putoptserverhost
– Specify an OptServer for remote calls.
Responses, errors and warnings
getcodedesc
– Obtains a short description of a response code.Infrequent:
getlasterror
Sensitivity analysis
dualsensitivity
– Performs sensitivity analysis on objective coefficients.primalsensitivity
– Perform sensitivity analysis on bounds.sensitivityreport
– Creates a sensitivity report.
Solution - dual
getaccdoty
– Obtains the doty vector for an affine conic constraint.getdualobj
– Computes the dual objective value associated with the solution.gety
– Obtains the y vector for a solution.getyslice
– Obtains a slice of the y vector for a solution.Infrequent:
getaccdotys
,getreducedcosts
,getslc
,getslcslice
,getslx
,getslxslice
,getsnx
,getsnxslice
,getsolution
,getsolutionnew
,getsolutionslice
,getsuc
,getsucslice
,getsux
,getsuxslice
,putaccdoty
,putconsolutioni
,putslc
,putslcslice
,putslx
,putslxslice
,putsnx
,putsnxslice
,putsolution
,putsolutionnew
,putsolutionyi
,putsuc
,putsucslice
,putsux
,putsuxslice
,putvarsolutionj
,putyslice
Solution - primal
getprimalobj
– Computes the primal objective value for the desired solution.getxx
– Obtains the xx vector for a solution.getxxslice
– Obtains a slice of the xx vector for a solution.putxx
– Sets the xx vector for a solution.putxxslice
– Sets a slice of the xx vector for a solution.Infrequent:
evaluateacc
,evaluateaccs
,getsolution
,getsolutionnew
,getsolutionslice
,getxc
,getxcslice
,putconsolutioni
,putsolution
,putsolutionnew
,putvarsolutionj
,putxc
,putxcslice
,puty
Solution - semidefinite
getbarsj
– Obtains the dual solution for a semidefinite variable.getbarsslice
– Obtains the dual solution for a sequence of semidefinite variables.getbarxj
– Obtains the primal solution for a semidefinite variable.getbarxslice
– Obtains the primal solution for a sequence of semidefinite variables.
Solution information
getdualobj
– Computes the dual objective value associated with the solution.getprimalobj
– Computes the primal objective value for the desired solution.getprosta
– Obtains the problem status.getpviolcon
– Computes the violation of a primal solution associated to a constraint.getpviolvar
– Computes the violation of a primal solution for a list of scalar variables.getsolsta
– Obtains the solution status.getsolutioninfo
– Obtains information about of a solution.getsolutioninfonew
– Obtains information about of a solution.onesolutionsummary
– Prints a short summary of a specified solution.solutiondef
– Checks whether a solution is defined.solutionsummary
– Prints a short summary of the current solutions.Infrequent:
analyzesolution
,deletesolution
,getdualsolutionnorms
,getdviolacc
,getdviolbarvar
,getdviolcon
,getdviolvar
,getprimalsolutionnorms
,getpviolacc
,getpviolbarvar
,getpvioldjc
,getskc
,getskcslice
,getskn
,getskx
,getskxslice
,getsolution
,getsolutionnew
,getsolutionslice
,prostatostr
,putconsolutioni
,putskc
,putskcslice
,putskx
,putskxslice
,putsolution
,putsolutionnew
,putsolutionyi
,putvarsolutionj
Deprecated:
getdviolcones
,getpviolcones
Solving systems with basis matrix
Infrequent:
basiscond
,initbasissolve
,solvewithbasis
System, memory and debugging
Infrequent:
checkmem
,getmemusage
Versions
getversion
– Obtains MOSEK version information.