mosek/lib.rs
1/*
2Copyright (c) 2021 MOSEK ApS. All rights reserved.
3
4Redistribution and use in source and binary forms, with or without modification,
5are permitted provided that the following conditions are met:
6
71. Redistributions of source code must retain the above copyright notice,
8this list of conditions and the following disclaimer.
9
102. Redistributions in binary form must reproduce the above copyright notice,
11this list of conditions and the following disclaimer in the documentation
12and/or other materials provided with the distribution.
13
143. All advertising materials mentioning features or use of this software must
15display the following acknowledgement:
16This product includes software developed by the the organization.
17
184. Neither the name of the copyright holder nor the names of its contributors
19may be used to endorse or promote products derived from this software without
20specific prior written permission.
21
22THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER "AS IS" AND ANY EXPRESS OR IMPLIED
23WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
24AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT
25HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
26OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
27GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
31DAMAGE.
32*/
33
34
35/// MOSEK Solver API for Rust.
36///
37/// Most functionality is provided through the [Task] object and it's
38/// member functions.
39
40// Generted for MOSEK v[11, 1, 5]
41
42extern crate libc;
43use std::ffi::CString;
44use std::ffi::CStr;
45use libc::c_void;
46use std::convert::TryInto;
47use std::default::Default;
48use std::marker::Send;
49
50//#[link(name = "mosek64")]
51extern {
52 fn MSK_linkfunctotaskstream(task : * const u8,
53 whichstream : i32,
54 handle : * const c_void,
55 func : extern fn (handle : * const c_void, msg : * const libc::c_char)) -> i32;
56
57 fn MSK_putcallbackfunc(task : * const u8,
58 func : extern fn (task : * const u8, handle : * const c_void, caller : i32, douinf : * const f64, intinf : * const i32, lintinf : * const i64) -> i32,
59 handle : * const c_void) -> i32;
60 #[link_name = "MSK_putcallbackfunc"]
61 #[allow(clashing_extern_declarations)]
62 fn MSK_putcallbackfunc_ptr(task : * const u8,
63 func : * const u8,
64 handle : * const c_void) -> i32;
65 fn MSK_getcallbackfunc(task : * const u8,
66 func : * mut * const u8,
67 handle : * mut * const c_void) -> i32;
68 fn MSK_getlasterror64(task : * const u8,
69 lastreacode : * mut i32,
70 sizelastmsg : i64,
71 lastmsglen : * mut i64,
72 lastmsg : * mut u8) -> i32;
73 fn MSK_writedatahandle(task : * const u8,
74 func : extern fn (handle : * const c_void, src : * const u8, count : usize) -> usize,
75 handle : * const c_void,
76 format : i32,
77 compress : i32) -> i32;
78 fn MSK_readdatahandle(task : * const u8,
79 func : extern fn (handle : * const c_void, dst : * mut u8, count : usize) -> usize,
80 handle : * const c_void,
81 format : i32,
82 compress : i32) -> i32;
83 #[allow(dead_code)]
84 fn MSK_analyzenames(task_ : * const u8,whichstream_ : i32,nametype_ : i32) -> i32;
85 #[allow(dead_code)]
86 fn MSK_analyzeproblem(task_ : * const u8,whichstream_ : i32) -> i32;
87 #[allow(dead_code)]
88 fn MSK_analyzesolution(task_ : * const u8,whichstream_ : i32,whichsol_ : i32) -> i32;
89 #[allow(dead_code)]
90 fn MSK_appendacc(task_ : * const u8,domidx_ : i64,numafeidx_ : i64,afeidxlist_ : * const i64,b_ : * const f64) -> i32;
91 #[allow(dead_code)]
92 fn MSK_appendaccs(task_ : * const u8,numaccs_ : i64,domidxs_ : * const i64,numafeidx_ : i64,afeidxlist_ : * const i64,b_ : * const f64) -> i32;
93 #[allow(dead_code)]
94 fn MSK_appendaccseq(task_ : * const u8,domidx_ : i64,numafeidx_ : i64,afeidxfirst_ : i64,b_ : * const f64) -> i32;
95 #[allow(dead_code)]
96 fn MSK_appendaccsseq(task_ : * const u8,numaccs_ : i64,domidxs_ : * const i64,numafeidx_ : i64,afeidxfirst_ : i64,b_ : * const f64) -> i32;
97 #[allow(dead_code)]
98 fn MSK_appendafes(task_ : * const u8,num_ : i64) -> i32;
99 #[allow(dead_code)]
100 fn MSK_appendbarvars(task_ : * const u8,num_ : i32,dim_ : * const i32) -> i32;
101 #[allow(dead_code)]
102 fn MSK_appendcone(task_ : * const u8,ct_ : i32,conepar_ : f64,nummem_ : i32,submem_ : * const i32) -> i32;
103 #[allow(dead_code)]
104 fn MSK_appendconeseq(task_ : * const u8,ct_ : i32,conepar_ : f64,nummem_ : i32,j_ : i32) -> i32;
105 #[allow(dead_code)]
106 fn MSK_appendconesseq(task_ : * const u8,num_ : i32,ct_ : * const i32,conepar_ : * const f64,nummem_ : * const i32,j_ : i32) -> i32;
107 #[allow(dead_code)]
108 fn MSK_appendcons(task_ : * const u8,num_ : i32) -> i32;
109 #[allow(dead_code)]
110 fn MSK_appenddjcs(task_ : * const u8,num_ : i64) -> i32;
111 #[allow(dead_code)]
112 fn MSK_appenddualexpconedomain(task_ : * const u8,domidx_ : & mut i64) -> i32;
113 #[allow(dead_code)]
114 fn MSK_appenddualgeomeanconedomain(task_ : * const u8,n_ : i64,domidx_ : & mut i64) -> i32;
115 #[allow(dead_code)]
116 fn MSK_appenddualpowerconedomain(task_ : * const u8,n_ : i64,nleft_ : i64,alpha_ : * const f64,domidx_ : & mut i64) -> i32;
117 #[allow(dead_code)]
118 fn MSK_appenddualpowerconedomainseq(task_ : * const u8,num_ : i64,n_ : * const i64,nleft_ : * const i64,alpha_ : * const f64,domidxlist_ : * mut i64) -> i32;
119 #[allow(dead_code)]
120 fn MSK_appendprimalexpconedomain(task_ : * const u8,domidx_ : & mut i64) -> i32;
121 #[allow(dead_code)]
122 fn MSK_appendprimalgeomeanconedomain(task_ : * const u8,n_ : i64,domidx_ : & mut i64) -> i32;
123 #[allow(dead_code)]
124 fn MSK_appendprimalpowerconedomain(task_ : * const u8,n_ : i64,nleft_ : i64,alpha_ : * const f64,domidx_ : & mut i64) -> i32;
125 #[allow(dead_code)]
126 fn MSK_appendprimalpowerconedomainseq(task_ : * const u8,num_ : i64,n_ : * const i64,nleft_ : * const i64,alpha_ : * const f64,domidxlist_ : * mut i64) -> i32;
127 #[allow(dead_code)]
128 fn MSK_appendquadraticconedomain(task_ : * const u8,n_ : i64,domidx_ : & mut i64) -> i32;
129 #[allow(dead_code)]
130 fn MSK_appendrdomain(task_ : * const u8,n_ : i64,domidx_ : & mut i64) -> i32;
131 #[allow(dead_code)]
132 fn MSK_appendrminusdomain(task_ : * const u8,n_ : i64,domidx_ : & mut i64) -> i32;
133 #[allow(dead_code)]
134 fn MSK_appendrplusdomain(task_ : * const u8,n_ : i64,domidx_ : & mut i64) -> i32;
135 #[allow(dead_code)]
136 fn MSK_appendrquadraticconedomain(task_ : * const u8,n_ : i64,domidx_ : & mut i64) -> i32;
137 #[allow(dead_code)]
138 fn MSK_appendrzerodomain(task_ : * const u8,n_ : i64,domidx_ : & mut i64) -> i32;
139 #[allow(dead_code)]
140 fn MSK_appendsparsesymmat(task_ : * const u8,dim_ : i32,nz_ : i64,subi_ : * const i32,subj_ : * const i32,valij_ : * const f64,idx_ : & mut i64) -> i32;
141 #[allow(dead_code)]
142 fn MSK_appendsparsesymmatlist(task_ : * const u8,num_ : i32,dims_ : * const i32,nz_ : * const i64,subi_ : * const i32,subj_ : * const i32,valij_ : * const f64,idx_ : * mut i64) -> i32;
143 #[allow(dead_code)]
144 fn MSK_appendsvecpsdconedomain(task_ : * const u8,n_ : i64,domidx_ : & mut i64) -> i32;
145 #[allow(dead_code)]
146 fn MSK_appendvars(task_ : * const u8,num_ : i32) -> i32;
147 #[allow(dead_code)]
148 fn MSK_asyncgetlog(task_ : * const u8,addr_ : * const libc::c_char,accesstoken_ : * const libc::c_char,token_ : * const libc::c_char) -> i32;
149 #[allow(dead_code)]
150 fn MSK_asyncgetresult(task_ : * const u8,address_ : * const libc::c_char,accesstoken_ : * const libc::c_char,token_ : * const libc::c_char,respavailable_ : & mut i32,resp_ : &mut i32,trm_ : &mut i32) -> i32;
151 #[allow(dead_code)]
152 fn MSK_asyncoptimize(task_ : * const u8,address_ : * const libc::c_char,accesstoken_ : * const libc::c_char,token : * mut u8) -> i32;
153 #[allow(dead_code)]
154 fn MSK_asyncpoll(task_ : * const u8,address_ : * const libc::c_char,accesstoken_ : * const libc::c_char,token_ : * const libc::c_char,respavailable_ : & mut i32,resp_ : &mut i32,trm_ : &mut i32) -> i32;
155 #[allow(dead_code)]
156 fn MSK_asyncstop(task_ : * const u8,address_ : * const libc::c_char,accesstoken_ : * const libc::c_char,token_ : * const libc::c_char) -> i32;
157 #[allow(dead_code)]
158 fn MSK_basiscond(task_ : * const u8,nrmbasis_ : & mut f64,nrminvbasis_ : & mut f64) -> i32;
159 #[allow(dead_code)]
160 fn MSK_bktostr(task_ : * const u8,bk_ : i32,str : * mut u8) -> i32;
161 #[allow(dead_code)]
162 fn MSK_checkmemtask(task_ : * const u8,file_ : * const libc::c_char,line_ : i32) -> i32;
163 #[allow(dead_code)]
164 fn MSK_chgconbound(task_ : * const u8,i_ : i32,lower_ : i32,finite_ : i32,value_ : f64) -> i32;
165 #[allow(dead_code)]
166 fn MSK_chgvarbound(task_ : * const u8,j_ : i32,lower_ : i32,finite_ : i32,value_ : f64) -> i32;
167 #[allow(dead_code)]
168 fn MSK_clonetask(task_ : * const u8,clonedtask_ : & mut * const u8) -> i32;
169 #[allow(dead_code)]
170 fn MSK_commitchanges(task_ : * const u8) -> i32;
171 #[allow(dead_code)]
172 fn MSK_conetypetostr(task_ : * const u8,ct_ : i32,str : * mut u8) -> i32;
173 #[allow(dead_code)]
174 fn MSK_deletesolution(task_ : * const u8,whichsol_ : i32) -> i32;
175 #[allow(dead_code)]
176 fn MSK_deletetask(task_ : & mut * const u8) -> i32;
177 #[allow(dead_code)]
178 fn MSK_dualsensitivity(task_ : * const u8,numj_ : i32,subj_ : * const i32,leftpricej_ : * mut f64,rightpricej_ : * mut f64,leftrangej_ : * mut f64,rightrangej_ : * mut f64) -> i32;
179 #[allow(dead_code)]
180 fn MSK_emptyafebarfrow(task_ : * const u8,afeidx_ : i64) -> i32;
181 #[allow(dead_code)]
182 fn MSK_emptyafebarfrowlist(task_ : * const u8,numafeidx_ : i64,afeidxlist_ : * const i64) -> i32;
183 #[allow(dead_code)]
184 fn MSK_emptyafefcol(task_ : * const u8,varidx_ : i32) -> i32;
185 #[allow(dead_code)]
186 fn MSK_emptyafefcollist(task_ : * const u8,numvaridx_ : i64,varidx_ : * const i32) -> i32;
187 #[allow(dead_code)]
188 fn MSK_emptyafefrow(task_ : * const u8,afeidx_ : i64) -> i32;
189 #[allow(dead_code)]
190 fn MSK_emptyafefrowlist(task_ : * const u8,numafeidx_ : i64,afeidx_ : * const i64) -> i32;
191 #[allow(dead_code)]
192 fn MSK_evaluateacc(task_ : * const u8,whichsol_ : i32,accidx_ : i64,activity_ : * mut f64) -> i32;
193 #[allow(dead_code)]
194 fn MSK_evaluateaccs(task_ : * const u8,whichsol_ : i32,activity_ : * mut f64) -> i32;
195 #[allow(dead_code)]
196 fn MSK_freetask(task_ : * const u8,buffer_ : *mut u8) -> i32;
197 #[allow(dead_code)]
198 fn MSK_generateaccnames(task_ : * const u8,num_ : i64,sub_ : * const i64,fmt_ : * const libc::c_char,ndims_ : i32,dims_ : * const i32,sp_ : * const i64,numnamedaxis_ : i32,namedaxisidxs_ : * const i32,numnames_ : i64,names_ : * const * const libc::c_char) -> i32;
199 #[allow(dead_code)]
200 fn MSK_generatebarvarnames(task_ : * const u8,num_ : i32,subj_ : * const i32,fmt_ : * const libc::c_char,ndims_ : i32,dims_ : * const i32,sp_ : * const i64,numnamedaxis_ : i32,namedaxisidxs_ : * const i32,numnames_ : i64,names_ : * const * const libc::c_char) -> i32;
201 #[allow(dead_code)]
202 fn MSK_generateconenames(task_ : * const u8,num_ : i32,subk_ : * const i32,fmt_ : * const libc::c_char,ndims_ : i32,dims_ : * const i32,sp_ : * const i64,numnamedaxis_ : i32,namedaxisidxs_ : * const i32,numnames_ : i64,names_ : * const * const libc::c_char) -> i32;
203 #[allow(dead_code)]
204 fn MSK_generateconnames(task_ : * const u8,num_ : i32,subi_ : * const i32,fmt_ : * const libc::c_char,ndims_ : i32,dims_ : * const i32,sp_ : * const i64,numnamedaxis_ : i32,namedaxisidxs_ : * const i32,numnames_ : i64,names_ : * const * const libc::c_char) -> i32;
205 #[allow(dead_code)]
206 fn MSK_generatedjcnames(task_ : * const u8,num_ : i64,sub_ : * const i64,fmt_ : * const libc::c_char,ndims_ : i32,dims_ : * const i32,sp_ : * const i64,numnamedaxis_ : i32,namedaxisidxs_ : * const i32,numnames_ : i64,names_ : * const * const libc::c_char) -> i32;
207 #[allow(dead_code)]
208 fn MSK_generatevarnames(task_ : * const u8,num_ : i32,subj_ : * const i32,fmt_ : * const libc::c_char,ndims_ : i32,dims_ : * const i32,sp_ : * const i64,numnamedaxis_ : i32,namedaxisidxs_ : * const i32,numnames_ : i64,names_ : * const * const libc::c_char) -> i32;
209 #[allow(dead_code)]
210 fn MSK_getaccafeidxlist(task_ : * const u8,accidx_ : i64,afeidxlist_ : * mut i64) -> i32;
211 #[allow(dead_code)]
212 fn MSK_getaccb(task_ : * const u8,accidx_ : i64,b_ : * mut f64) -> i32;
213 #[allow(dead_code)]
214 fn MSK_getaccbarfblocktriplet(task_ : * const u8,maxnumtrip_ : i64,numtrip_ : & mut i64,acc_afe_ : * mut i64,bar_var_ : * mut i32,blk_row_ : * mut i32,blk_col_ : * mut i32,blk_val_ : * mut f64) -> i32;
215 #[allow(dead_code)]
216 fn MSK_getaccbarfnumblocktriplets(task_ : * const u8,numtrip_ : & mut i64) -> i32;
217 #[allow(dead_code)]
218 fn MSK_getaccdomain(task_ : * const u8,accidx_ : i64,domidx_ : & mut i64) -> i32;
219 #[allow(dead_code)]
220 fn MSK_getaccdoty(task_ : * const u8,whichsol_ : i32,accidx_ : i64,doty_ : * mut f64) -> i32;
221 #[allow(dead_code)]
222 fn MSK_getaccdotys(task_ : * const u8,whichsol_ : i32,doty_ : * mut f64) -> i32;
223 #[allow(dead_code)]
224 fn MSK_getaccfnumnz(task_ : * const u8,accfnnz_ : & mut i64) -> i32;
225 #[allow(dead_code)]
226 fn MSK_getaccftrip(task_ : * const u8,frow_ : * mut i64,fcol_ : * mut i32,fval_ : * mut f64) -> i32;
227 #[allow(dead_code)]
228 fn MSK_getaccgvector(task_ : * const u8,g_ : * mut f64) -> i32;
229 #[allow(dead_code)]
230 fn MSK_getaccn(task_ : * const u8,accidx_ : i64,n_ : & mut i64) -> i32;
231 #[allow(dead_code)]
232 fn MSK_getaccname(task_ : * const u8,accidx_ : i64,sizename_ : i32,name : * mut u8) -> i32;
233 #[allow(dead_code)]
234 fn MSK_getaccnamelen(task_ : * const u8,accidx_ : i64,len_ : & mut i32) -> i32;
235 #[allow(dead_code)]
236 fn MSK_getaccntot(task_ : * const u8,n_ : & mut i64) -> i32;
237 #[allow(dead_code)]
238 fn MSK_getaccs(task_ : * const u8,domidxlist_ : * mut i64,afeidxlist_ : * mut i64,b_ : * mut f64) -> i32;
239 #[allow(dead_code)]
240 fn MSK_getacol(task_ : * const u8,j_ : i32,nzj_ : & mut i32,subj_ : * mut i32,valj_ : * mut f64) -> i32;
241 #[allow(dead_code)]
242 fn MSK_getacolnumnz(task_ : * const u8,i_ : i32,nzj_ : & mut i32) -> i32;
243 #[allow(dead_code)]
244 fn MSK_getacolslice(task_ : * const u8,first_ : i32,last_ : i32,maxnumnz_ : i32,ptrb_ : * mut i32,ptre_ : * mut i32,sub_ : * mut i32,val_ : * mut f64) -> i32;
245 #[allow(dead_code)]
246 fn MSK_getacolslice64(task_ : * const u8,first_ : i32,last_ : i32,maxnumnz_ : i64,ptrb_ : * mut i64,ptre_ : * mut i64,sub_ : * mut i32,val_ : * mut f64) -> i32;
247 #[allow(dead_code)]
248 fn MSK_getacolslicenumnz(task_ : * const u8,first_ : i32,last_ : i32,numnz_ : & mut i32) -> i32;
249 #[allow(dead_code)]
250 fn MSK_getacolslicenumnz64(task_ : * const u8,first_ : i32,last_ : i32,numnz_ : & mut i64) -> i32;
251 #[allow(dead_code)]
252 fn MSK_getacolslicetrip(task_ : * const u8,first_ : i32,last_ : i32,maxnumnz_ : i64,subi_ : * mut i32,subj_ : * mut i32,val_ : * mut f64) -> i32;
253 #[allow(dead_code)]
254 fn MSK_getafebarfblocktriplet(task_ : * const u8,maxnumtrip_ : i64,numtrip_ : & mut i64,afeidx_ : * mut i64,barvaridx_ : * mut i32,subk_ : * mut i32,subl_ : * mut i32,valkl_ : * mut f64) -> i32;
255 #[allow(dead_code)]
256 fn MSK_getafebarfnumblocktriplets(task_ : * const u8,numtrip_ : & mut i64) -> i32;
257 #[allow(dead_code)]
258 fn MSK_getafebarfnumrowentries(task_ : * const u8,afeidx_ : i64,numentr_ : & mut i32) -> i32;
259 #[allow(dead_code)]
260 fn MSK_getafebarfrow(task_ : * const u8,afeidx_ : i64,barvaridx_ : * mut i32,ptrterm_ : * mut i64,numterm_ : * mut i64,termidx_ : * mut i64,termweight_ : * mut f64) -> i32;
261 #[allow(dead_code)]
262 fn MSK_getafebarfrowinfo(task_ : * const u8,afeidx_ : i64,numentr_ : & mut i32,numterm_ : & mut i64) -> i32;
263 #[allow(dead_code)]
264 fn MSK_getafefnumnz(task_ : * const u8,numnz_ : & mut i64) -> i32;
265 #[allow(dead_code)]
266 fn MSK_getafefrow(task_ : * const u8,afeidx_ : i64,numnz_ : & mut i32,varidx_ : * mut i32,val_ : * mut f64) -> i32;
267 #[allow(dead_code)]
268 fn MSK_getafefrownumnz(task_ : * const u8,afeidx_ : i64,numnz_ : & mut i32) -> i32;
269 #[allow(dead_code)]
270 fn MSK_getafeftrip(task_ : * const u8,afeidx_ : * mut i64,varidx_ : * mut i32,val_ : * mut f64) -> i32;
271 #[allow(dead_code)]
272 fn MSK_getafeg(task_ : * const u8,afeidx_ : i64,g_ : & mut f64) -> i32;
273 #[allow(dead_code)]
274 fn MSK_getafegslice(task_ : * const u8,first_ : i64,last_ : i64,g_ : * mut f64) -> i32;
275 #[allow(dead_code)]
276 fn MSK_getaij(task_ : * const u8,i_ : i32,j_ : i32,aij_ : & mut f64) -> i32;
277 #[allow(dead_code)]
278 fn MSK_getapiecenumnz(task_ : * const u8,firsti_ : i32,lasti_ : i32,firstj_ : i32,lastj_ : i32,numnz_ : & mut i32) -> i32;
279 #[allow(dead_code)]
280 fn MSK_getarow(task_ : * const u8,i_ : i32,nzi_ : & mut i32,subi_ : * mut i32,vali_ : * mut f64) -> i32;
281 #[allow(dead_code)]
282 fn MSK_getarownumnz(task_ : * const u8,i_ : i32,nzi_ : & mut i32) -> i32;
283 #[allow(dead_code)]
284 fn MSK_getarowslice(task_ : * const u8,first_ : i32,last_ : i32,maxnumnz_ : i32,ptrb_ : * mut i32,ptre_ : * mut i32,sub_ : * mut i32,val_ : * mut f64) -> i32;
285 #[allow(dead_code)]
286 fn MSK_getarowslice64(task_ : * const u8,first_ : i32,last_ : i32,maxnumnz_ : i64,ptrb_ : * mut i64,ptre_ : * mut i64,sub_ : * mut i32,val_ : * mut f64) -> i32;
287 #[allow(dead_code)]
288 fn MSK_getarowslicenumnz(task_ : * const u8,first_ : i32,last_ : i32,numnz_ : & mut i32) -> i32;
289 #[allow(dead_code)]
290 fn MSK_getarowslicenumnz64(task_ : * const u8,first_ : i32,last_ : i32,numnz_ : & mut i64) -> i32;
291 #[allow(dead_code)]
292 fn MSK_getarowslicetrip(task_ : * const u8,first_ : i32,last_ : i32,maxnumnz_ : i64,subi_ : * mut i32,subj_ : * mut i32,val_ : * mut f64) -> i32;
293 #[allow(dead_code)]
294 fn MSK_getatrip(task_ : * const u8,maxnumnz_ : i64,subi_ : * mut i32,subj_ : * mut i32,val_ : * mut f64) -> i32;
295 #[allow(dead_code)]
296 fn MSK_getatruncatetol(task_ : * const u8,tolzero_ : * mut f64) -> i32;
297 #[allow(dead_code)]
298 fn MSK_getbarablocktriplet(task_ : * const u8,maxnum_ : i64,num_ : & mut i64,subi_ : * mut i32,subj_ : * mut i32,subk_ : * mut i32,subl_ : * mut i32,valijkl_ : * mut f64) -> i32;
299 #[allow(dead_code)]
300 fn MSK_getbaraidx(task_ : * const u8,idx_ : i64,maxnum_ : i64,i_ : & mut i32,j_ : & mut i32,num_ : & mut i64,sub_ : * mut i64,weights_ : * mut f64) -> i32;
301 #[allow(dead_code)]
302 fn MSK_getbaraidxij(task_ : * const u8,idx_ : i64,i_ : & mut i32,j_ : & mut i32) -> i32;
303 #[allow(dead_code)]
304 fn MSK_getbaraidxinfo(task_ : * const u8,idx_ : i64,num_ : & mut i64) -> i32;
305 #[allow(dead_code)]
306 fn MSK_getbarasparsity(task_ : * const u8,maxnumnz_ : i64,numnz_ : & mut i64,idxij_ : * mut i64) -> i32;
307 #[allow(dead_code)]
308 fn MSK_getbarcblocktriplet(task_ : * const u8,maxnum_ : i64,num_ : & mut i64,subj_ : * mut i32,subk_ : * mut i32,subl_ : * mut i32,valjkl_ : * mut f64) -> i32;
309 #[allow(dead_code)]
310 fn MSK_getbarcidx(task_ : * const u8,idx_ : i64,maxnum_ : i64,j_ : & mut i32,num_ : & mut i64,sub_ : * mut i64,weights_ : * mut f64) -> i32;
311 #[allow(dead_code)]
312 fn MSK_getbarcidxinfo(task_ : * const u8,idx_ : i64,num_ : & mut i64) -> i32;
313 #[allow(dead_code)]
314 fn MSK_getbarcidxj(task_ : * const u8,idx_ : i64,j_ : & mut i32) -> i32;
315 #[allow(dead_code)]
316 fn MSK_getbarcsparsity(task_ : * const u8,maxnumnz_ : i64,numnz_ : & mut i64,idxj_ : * mut i64) -> i32;
317 #[allow(dead_code)]
318 fn MSK_getbarsj(task_ : * const u8,whichsol_ : i32,j_ : i32,barsj_ : * mut f64) -> i32;
319 #[allow(dead_code)]
320 fn MSK_getbarsslice(task_ : * const u8,whichsol_ : i32,first_ : i32,last_ : i32,slicesize_ : i64,barsslice_ : * mut f64) -> i32;
321 #[allow(dead_code)]
322 fn MSK_getbarvarname(task_ : * const u8,i_ : i32,sizename_ : i32,name : * mut u8) -> i32;
323 #[allow(dead_code)]
324 fn MSK_getbarvarnameindex(task_ : * const u8,somename_ : * const libc::c_char,asgn_ : & mut i32,index_ : & mut i32) -> i32;
325 #[allow(dead_code)]
326 fn MSK_getbarvarnamelen(task_ : * const u8,i_ : i32,len_ : & mut i32) -> i32;
327 #[allow(dead_code)]
328 fn MSK_getbarxj(task_ : * const u8,whichsol_ : i32,j_ : i32,barxj_ : * mut f64) -> i32;
329 #[allow(dead_code)]
330 fn MSK_getbarxslice(task_ : * const u8,whichsol_ : i32,first_ : i32,last_ : i32,slicesize_ : i64,barxslice_ : * mut f64) -> i32;
331 #[allow(dead_code)]
332 fn MSK_getc(task_ : * const u8,c_ : * mut f64) -> i32;
333 #[allow(dead_code)]
334 fn MSK_getcfix(task_ : * const u8,cfix_ : & mut f64) -> i32;
335 #[allow(dead_code)]
336 fn MSK_getcj(task_ : * const u8,j_ : i32,cj_ : & mut f64) -> i32;
337 #[allow(dead_code)]
338 fn MSK_getclist(task_ : * const u8,num_ : i32,subj_ : * const i32,c_ : * mut f64) -> i32;
339 #[allow(dead_code)]
340 fn MSK_getconbound(task_ : * const u8,i_ : i32,bk_ : &mut i32,bl_ : & mut f64,bu_ : & mut f64) -> i32;
341 #[allow(dead_code)]
342 fn MSK_getconboundslice(task_ : * const u8,first_ : i32,last_ : i32,bk_ : * mut i32,bl_ : * mut f64,bu_ : * mut f64) -> i32;
343 #[allow(dead_code)]
344 fn MSK_getcone(task_ : * const u8,k_ : i32,ct_ : &mut i32,conepar_ : & mut f64,nummem_ : & mut i32,submem_ : * mut i32) -> i32;
345 #[allow(dead_code)]
346 fn MSK_getconeinfo(task_ : * const u8,k_ : i32,ct_ : &mut i32,conepar_ : & mut f64,nummem_ : & mut i32) -> i32;
347 #[allow(dead_code)]
348 fn MSK_getconename(task_ : * const u8,i_ : i32,sizename_ : i32,name : * mut u8) -> i32;
349 #[allow(dead_code)]
350 fn MSK_getconenameindex(task_ : * const u8,somename_ : * const libc::c_char,asgn_ : & mut i32,index_ : & mut i32) -> i32;
351 #[allow(dead_code)]
352 fn MSK_getconenamelen(task_ : * const u8,i_ : i32,len_ : & mut i32) -> i32;
353 #[allow(dead_code)]
354 fn MSK_getconname(task_ : * const u8,i_ : i32,sizename_ : i32,name : * mut u8) -> i32;
355 #[allow(dead_code)]
356 fn MSK_getconnameindex(task_ : * const u8,somename_ : * const libc::c_char,asgn_ : & mut i32,index_ : & mut i32) -> i32;
357 #[allow(dead_code)]
358 fn MSK_getconnamelen(task_ : * const u8,i_ : i32,len_ : & mut i32) -> i32;
359 #[allow(dead_code)]
360 fn MSK_getcslice(task_ : * const u8,first_ : i32,last_ : i32,c_ : * mut f64) -> i32;
361 #[allow(dead_code)]
362 fn MSK_getdimbarvarj(task_ : * const u8,j_ : i32,dimbarvarj_ : & mut i32) -> i32;
363 #[allow(dead_code)]
364 fn MSK_getdjcafeidxlist(task_ : * const u8,djcidx_ : i64,afeidxlist_ : * mut i64) -> i32;
365 #[allow(dead_code)]
366 fn MSK_getdjcb(task_ : * const u8,djcidx_ : i64,b_ : * mut f64) -> i32;
367 #[allow(dead_code)]
368 fn MSK_getdjcdomainidxlist(task_ : * const u8,djcidx_ : i64,domidxlist_ : * mut i64) -> i32;
369 #[allow(dead_code)]
370 fn MSK_getdjcname(task_ : * const u8,djcidx_ : i64,sizename_ : i32,name : * mut u8) -> i32;
371 #[allow(dead_code)]
372 fn MSK_getdjcnamelen(task_ : * const u8,djcidx_ : i64,len_ : & mut i32) -> i32;
373 #[allow(dead_code)]
374 fn MSK_getdjcnumafe(task_ : * const u8,djcidx_ : i64,numafe_ : & mut i64) -> i32;
375 #[allow(dead_code)]
376 fn MSK_getdjcnumafetot(task_ : * const u8,numafetot_ : & mut i64) -> i32;
377 #[allow(dead_code)]
378 fn MSK_getdjcnumdomain(task_ : * const u8,djcidx_ : i64,numdomain_ : & mut i64) -> i32;
379 #[allow(dead_code)]
380 fn MSK_getdjcnumdomaintot(task_ : * const u8,numdomaintot_ : & mut i64) -> i32;
381 #[allow(dead_code)]
382 fn MSK_getdjcnumterm(task_ : * const u8,djcidx_ : i64,numterm_ : & mut i64) -> i32;
383 #[allow(dead_code)]
384 fn MSK_getdjcnumtermtot(task_ : * const u8,numtermtot_ : & mut i64) -> i32;
385 #[allow(dead_code)]
386 fn MSK_getdjcs(task_ : * const u8,domidxlist_ : * mut i64,afeidxlist_ : * mut i64,b_ : * mut f64,termsizelist_ : * mut i64,numterms_ : * mut i64) -> i32;
387 #[allow(dead_code)]
388 fn MSK_getdjctermsizelist(task_ : * const u8,djcidx_ : i64,termsizelist_ : * mut i64) -> i32;
389 #[allow(dead_code)]
390 fn MSK_getdomainn(task_ : * const u8,domidx_ : i64,n_ : & mut i64) -> i32;
391 #[allow(dead_code)]
392 fn MSK_getdomainname(task_ : * const u8,domidx_ : i64,sizename_ : i32,name : * mut u8) -> i32;
393 #[allow(dead_code)]
394 fn MSK_getdomainnamelen(task_ : * const u8,domidx_ : i64,len_ : & mut i32) -> i32;
395 #[allow(dead_code)]
396 fn MSK_getdomaintype(task_ : * const u8,domidx_ : i64,domtype_ : &mut i32) -> i32;
397 #[allow(dead_code)]
398 fn MSK_getdouinf(task_ : * const u8,whichdinf_ : i32,dvalue_ : & mut f64) -> i32;
399 #[allow(dead_code)]
400 fn MSK_getdouparam(task_ : * const u8,param_ : i32,parvalue_ : & mut f64) -> i32;
401 #[allow(dead_code)]
402 fn MSK_getdualobj(task_ : * const u8,whichsol_ : i32,dualobj_ : & mut f64) -> i32;
403 #[allow(dead_code)]
404 fn MSK_getdualproblem(task_ : * const u8,dualtask_ : & mut * const u8) -> i32;
405 #[allow(dead_code)]
406 fn MSK_getdualsolutionnorms(task_ : * const u8,whichsol_ : i32,nrmy_ : & mut f64,nrmslc_ : & mut f64,nrmsuc_ : & mut f64,nrmslx_ : & mut f64,nrmsux_ : & mut f64,nrmsnx_ : & mut f64,nrmbars_ : & mut f64) -> i32;
407 #[allow(dead_code)]
408 fn MSK_getdviolacc(task_ : * const u8,whichsol_ : i32,numaccidx_ : i64,accidxlist_ : * const i64,viol_ : * mut f64) -> i32;
409 #[allow(dead_code)]
410 fn MSK_getdviolbarvar(task_ : * const u8,whichsol_ : i32,num_ : i32,sub_ : * const i32,viol_ : * mut f64) -> i32;
411 #[allow(dead_code)]
412 fn MSK_getdviolcon(task_ : * const u8,whichsol_ : i32,num_ : i32,sub_ : * const i32,viol_ : * mut f64) -> i32;
413 #[allow(dead_code)]
414 fn MSK_getdviolcones(task_ : * const u8,whichsol_ : i32,num_ : i32,sub_ : * const i32,viol_ : * mut f64) -> i32;
415 #[allow(dead_code)]
416 fn MSK_getdviolvar(task_ : * const u8,whichsol_ : i32,num_ : i32,sub_ : * const i32,viol_ : * mut f64) -> i32;
417 #[allow(dead_code)]
418 fn MSK_getenv(task_ : * const u8,env_ : & mut * const u8) -> i32;
419 #[allow(dead_code)]
420 fn MSK_getinfeasiblesubproblem(task_ : * const u8,whichsol_ : i32,inftask_ : & mut * const u8) -> i32;
421 #[allow(dead_code)]
422 fn MSK_getinfindex(task_ : * const u8,inftype_ : i32,infname_ : * const libc::c_char,infindex_ : & mut i32) -> i32;
423 #[allow(dead_code)]
424 fn MSK_getinfmax(task_ : * const u8,inftype_ : i32,infmax_ : * mut i32) -> i32;
425 #[allow(dead_code)]
426 fn MSK_getinfname(task_ : * const u8,inftype_ : i32,whichinf_ : i32,infname : * mut u8) -> i32;
427 #[allow(dead_code)]
428 fn MSK_getintinf(task_ : * const u8,whichiinf_ : i32,ivalue_ : & mut i32) -> i32;
429 #[allow(dead_code)]
430 fn MSK_getintparam(task_ : * const u8,param_ : i32,parvalue_ : & mut i32) -> i32;
431 #[allow(dead_code)]
432 fn MSK_getlenbarvarj(task_ : * const u8,j_ : i32,lenbarvarj_ : & mut i64) -> i32;
433 #[allow(dead_code)]
434 fn MSK_getlintinf(task_ : * const u8,whichliinf_ : i32,ivalue_ : & mut i64) -> i32;
435 #[allow(dead_code)]
436 fn MSK_getlintparam(task_ : * const u8,param_ : i32,parvalue_ : & mut i64) -> i32;
437 #[allow(dead_code)]
438 fn MSK_getmaxnamelen(task_ : * const u8,maxlen_ : & mut i32) -> i32;
439 #[allow(dead_code)]
440 fn MSK_getmaxnumanz(task_ : * const u8,maxnumanz_ : & mut i32) -> i32;
441 #[allow(dead_code)]
442 fn MSK_getmaxnumanz64(task_ : * const u8,maxnumanz_ : & mut i64) -> i32;
443 #[allow(dead_code)]
444 fn MSK_getmaxnumbarvar(task_ : * const u8,maxnumbarvar_ : & mut i32) -> i32;
445 #[allow(dead_code)]
446 fn MSK_getmaxnumcon(task_ : * const u8,maxnumcon_ : & mut i32) -> i32;
447 #[allow(dead_code)]
448 fn MSK_getmaxnumcone(task_ : * const u8,maxnumcone_ : & mut i32) -> i32;
449 #[allow(dead_code)]
450 fn MSK_getmaxnumqnz(task_ : * const u8,maxnumqnz_ : & mut i32) -> i32;
451 #[allow(dead_code)]
452 fn MSK_getmaxnumqnz64(task_ : * const u8,maxnumqnz_ : & mut i64) -> i32;
453 #[allow(dead_code)]
454 fn MSK_getmaxnumvar(task_ : * const u8,maxnumvar_ : & mut i32) -> i32;
455 #[allow(dead_code)]
456 fn MSK_getmemusagetask(task_ : * const u8,meminuse_ : & mut i64,maxmemuse_ : & mut i64) -> i32;
457 #[allow(dead_code)]
458 fn MSK_getmionumthreads(task_ : * const u8,numthreads_ : & mut i32) -> i32;
459 #[allow(dead_code)]
460 fn MSK_getnadouinf(task_ : * const u8,infitemname_ : * const libc::c_char,dvalue_ : & mut f64) -> i32;
461 #[allow(dead_code)]
462 fn MSK_getnadouparam(task_ : * const u8,paramname_ : * const libc::c_char,parvalue_ : & mut f64) -> i32;
463 #[allow(dead_code)]
464 fn MSK_getnaintinf(task_ : * const u8,infitemname_ : * const libc::c_char,ivalue_ : & mut i32) -> i32;
465 #[allow(dead_code)]
466 fn MSK_getnaintparam(task_ : * const u8,paramname_ : * const libc::c_char,parvalue_ : & mut i32) -> i32;
467 #[allow(dead_code)]
468 fn MSK_getnastrparam(task_ : * const u8,paramname_ : * const libc::c_char,sizeparamname_ : i32,len_ : & mut i32,parvalue : * mut u8) -> i32;
469 #[allow(dead_code)]
470 fn MSK_getnumacc(task_ : * const u8,num_ : & mut i64) -> i32;
471 #[allow(dead_code)]
472 fn MSK_getnumafe(task_ : * const u8,numafe_ : & mut i64) -> i32;
473 #[allow(dead_code)]
474 fn MSK_getnumanz(task_ : * const u8,numanz_ : & mut i32) -> i32;
475 #[allow(dead_code)]
476 fn MSK_getnumanz64(task_ : * const u8,numanz_ : & mut i64) -> i32;
477 #[allow(dead_code)]
478 fn MSK_getnumbarablocktriplets(task_ : * const u8,num_ : & mut i64) -> i32;
479 #[allow(dead_code)]
480 fn MSK_getnumbaranz(task_ : * const u8,nz_ : & mut i64) -> i32;
481 #[allow(dead_code)]
482 fn MSK_getnumbarcblocktriplets(task_ : * const u8,num_ : & mut i64) -> i32;
483 #[allow(dead_code)]
484 fn MSK_getnumbarcnz(task_ : * const u8,nz_ : & mut i64) -> i32;
485 #[allow(dead_code)]
486 fn MSK_getnumbarvar(task_ : * const u8,numbarvar_ : & mut i32) -> i32;
487 #[allow(dead_code)]
488 fn MSK_getnumcon(task_ : * const u8,numcon_ : & mut i32) -> i32;
489 #[allow(dead_code)]
490 fn MSK_getnumcone(task_ : * const u8,numcone_ : & mut i32) -> i32;
491 #[allow(dead_code)]
492 fn MSK_getnumconemem(task_ : * const u8,k_ : i32,nummem_ : & mut i32) -> i32;
493 #[allow(dead_code)]
494 fn MSK_getnumdjc(task_ : * const u8,num_ : & mut i64) -> i32;
495 #[allow(dead_code)]
496 fn MSK_getnumdomain(task_ : * const u8,numdomain_ : & mut i64) -> i32;
497 #[allow(dead_code)]
498 fn MSK_getnumintvar(task_ : * const u8,numintvar_ : & mut i32) -> i32;
499 #[allow(dead_code)]
500 fn MSK_getnumparam(task_ : * const u8,partype_ : i32,numparam_ : & mut i32) -> i32;
501 #[allow(dead_code)]
502 fn MSK_getnumqconknz(task_ : * const u8,k_ : i32,numqcnz_ : & mut i32) -> i32;
503 #[allow(dead_code)]
504 fn MSK_getnumqconknz64(task_ : * const u8,k_ : i32,numqcnz_ : & mut i64) -> i32;
505 #[allow(dead_code)]
506 fn MSK_getnumqobjnz(task_ : * const u8,numqonz_ : & mut i32) -> i32;
507 #[allow(dead_code)]
508 fn MSK_getnumqobjnz64(task_ : * const u8,numqonz_ : & mut i64) -> i32;
509 #[allow(dead_code)]
510 fn MSK_getnumsymmat(task_ : * const u8,num_ : & mut i64) -> i32;
511 #[allow(dead_code)]
512 fn MSK_getnumvar(task_ : * const u8,numvar_ : & mut i32) -> i32;
513 #[allow(dead_code)]
514 fn MSK_getobjname(task_ : * const u8,sizeobjname_ : i32,objname : * mut u8) -> i32;
515 #[allow(dead_code)]
516 fn MSK_getobjnamelen(task_ : * const u8,len_ : & mut i32) -> i32;
517 #[allow(dead_code)]
518 fn MSK_getobjsense(task_ : * const u8,sense_ : &mut i32) -> i32;
519 #[allow(dead_code)]
520 fn MSK_getparammax(task_ : * const u8,partype_ : i32,parammax_ : & mut i32) -> i32;
521 #[allow(dead_code)]
522 fn MSK_getparamname(task_ : * const u8,partype_ : i32,param_ : i32,parname : * mut u8) -> i32;
523 #[allow(dead_code)]
524 fn MSK_getpowerdomainalpha(task_ : * const u8,domidx_ : i64,alpha_ : * mut f64) -> i32;
525 #[allow(dead_code)]
526 fn MSK_getpowerdomaininfo(task_ : * const u8,domidx_ : i64,n_ : & mut i64,nleft_ : & mut i64) -> i32;
527 #[allow(dead_code)]
528 fn MSK_getprimalobj(task_ : * const u8,whichsol_ : i32,primalobj_ : & mut f64) -> i32;
529 #[allow(dead_code)]
530 fn MSK_getprimalsolutionnorms(task_ : * const u8,whichsol_ : i32,nrmxc_ : & mut f64,nrmxx_ : & mut f64,nrmbarx_ : & mut f64) -> i32;
531 #[allow(dead_code)]
532 fn MSK_getprobtype(task_ : * const u8,probtype_ : &mut i32) -> i32;
533 #[allow(dead_code)]
534 fn MSK_getprosta(task_ : * const u8,whichsol_ : i32,problemsta_ : &mut i32) -> i32;
535 #[allow(dead_code)]
536 fn MSK_getpviolacc(task_ : * const u8,whichsol_ : i32,numaccidx_ : i64,accidxlist_ : * const i64,viol_ : * mut f64) -> i32;
537 #[allow(dead_code)]
538 fn MSK_getpviolbarvar(task_ : * const u8,whichsol_ : i32,num_ : i32,sub_ : * const i32,viol_ : * mut f64) -> i32;
539 #[allow(dead_code)]
540 fn MSK_getpviolcon(task_ : * const u8,whichsol_ : i32,num_ : i32,sub_ : * const i32,viol_ : * mut f64) -> i32;
541 #[allow(dead_code)]
542 fn MSK_getpviolcones(task_ : * const u8,whichsol_ : i32,num_ : i32,sub_ : * const i32,viol_ : * mut f64) -> i32;
543 #[allow(dead_code)]
544 fn MSK_getpvioldjc(task_ : * const u8,whichsol_ : i32,numdjcidx_ : i64,djcidxlist_ : * const i64,viol_ : * mut f64) -> i32;
545 #[allow(dead_code)]
546 fn MSK_getpviolvar(task_ : * const u8,whichsol_ : i32,num_ : i32,sub_ : * const i32,viol_ : * mut f64) -> i32;
547 #[allow(dead_code)]
548 fn MSK_getqconk(task_ : * const u8,k_ : i32,maxnumqcnz_ : i32,numqcnz_ : & mut i32,qcsubi_ : * mut i32,qcsubj_ : * mut i32,qcval_ : * mut f64) -> i32;
549 #[allow(dead_code)]
550 fn MSK_getqconk64(task_ : * const u8,k_ : i32,maxnumqcnz_ : i64,numqcnz_ : & mut i64,qcsubi_ : * mut i32,qcsubj_ : * mut i32,qcval_ : * mut f64) -> i32;
551 #[allow(dead_code)]
552 fn MSK_getqobj(task_ : * const u8,maxnumqonz_ : i32,numqonz_ : & mut i32,qosubi_ : * mut i32,qosubj_ : * mut i32,qoval_ : * mut f64) -> i32;
553 #[allow(dead_code)]
554 fn MSK_getqobj64(task_ : * const u8,maxnumqonz_ : i64,numqonz_ : & mut i64,qosubi_ : * mut i32,qosubj_ : * mut i32,qoval_ : * mut f64) -> i32;
555 #[allow(dead_code)]
556 fn MSK_getqobjij(task_ : * const u8,i_ : i32,j_ : i32,qoij_ : & mut f64) -> i32;
557 #[allow(dead_code)]
558 fn MSK_getreducedcosts(task_ : * const u8,whichsol_ : i32,first_ : i32,last_ : i32,redcosts_ : * mut f64) -> i32;
559 #[allow(dead_code)]
560 fn MSK_getskc(task_ : * const u8,whichsol_ : i32,skc_ : * mut i32) -> i32;
561 #[allow(dead_code)]
562 fn MSK_getskcslice(task_ : * const u8,whichsol_ : i32,first_ : i32,last_ : i32,skc_ : * mut i32) -> i32;
563 #[allow(dead_code)]
564 fn MSK_getskn(task_ : * const u8,whichsol_ : i32,skn_ : * mut i32) -> i32;
565 #[allow(dead_code)]
566 fn MSK_getskx(task_ : * const u8,whichsol_ : i32,skx_ : * mut i32) -> i32;
567 #[allow(dead_code)]
568 fn MSK_getskxslice(task_ : * const u8,whichsol_ : i32,first_ : i32,last_ : i32,skx_ : * mut i32) -> i32;
569 #[allow(dead_code)]
570 fn MSK_getslc(task_ : * const u8,whichsol_ : i32,slc_ : * mut f64) -> i32;
571 #[allow(dead_code)]
572 fn MSK_getslcslice(task_ : * const u8,whichsol_ : i32,first_ : i32,last_ : i32,slc_ : * mut f64) -> i32;
573 #[allow(dead_code)]
574 fn MSK_getslx(task_ : * const u8,whichsol_ : i32,slx_ : * mut f64) -> i32;
575 #[allow(dead_code)]
576 fn MSK_getslxslice(task_ : * const u8,whichsol_ : i32,first_ : i32,last_ : i32,slx_ : * mut f64) -> i32;
577 #[allow(dead_code)]
578 fn MSK_getsnx(task_ : * const u8,whichsol_ : i32,snx_ : * mut f64) -> i32;
579 #[allow(dead_code)]
580 fn MSK_getsnxslice(task_ : * const u8,whichsol_ : i32,first_ : i32,last_ : i32,snx_ : * mut f64) -> i32;
581 #[allow(dead_code)]
582 fn MSK_getsolsta(task_ : * const u8,whichsol_ : i32,solutionsta_ : &mut i32) -> i32;
583 #[allow(dead_code)]
584 fn MSK_getsolution(task_ : * const u8,whichsol_ : i32,problemsta_ : &mut i32,solutionsta_ : &mut i32,skc_ : * mut i32,skx_ : * mut i32,skn_ : * mut i32,xc_ : * mut f64,xx_ : * mut f64,y_ : * mut f64,slc_ : * mut f64,suc_ : * mut f64,slx_ : * mut f64,sux_ : * mut f64,snx_ : * mut f64) -> i32;
585 #[allow(dead_code)]
586 fn MSK_getsolutioninfo(task_ : * const u8,whichsol_ : i32,pobj_ : & mut f64,pviolcon_ : & mut f64,pviolvar_ : & mut f64,pviolbarvar_ : & mut f64,pviolcone_ : & mut f64,pviolitg_ : & mut f64,dobj_ : & mut f64,dviolcon_ : & mut f64,dviolvar_ : & mut f64,dviolbarvar_ : & mut f64,dviolcone_ : & mut f64) -> i32;
587 #[allow(dead_code)]
588 fn MSK_getsolutioninfonew(task_ : * const u8,whichsol_ : i32,pobj_ : & mut f64,pviolcon_ : & mut f64,pviolvar_ : & mut f64,pviolbarvar_ : & mut f64,pviolcone_ : & mut f64,pviolacc_ : & mut f64,pvioldjc_ : & mut f64,pviolitg_ : & mut f64,dobj_ : & mut f64,dviolcon_ : & mut f64,dviolvar_ : & mut f64,dviolbarvar_ : & mut f64,dviolcone_ : & mut f64,dviolacc_ : & mut f64) -> i32;
589 #[allow(dead_code)]
590 fn MSK_getsolutionnew(task_ : * const u8,whichsol_ : i32,problemsta_ : &mut i32,solutionsta_ : &mut i32,skc_ : * mut i32,skx_ : * mut i32,skn_ : * mut i32,xc_ : * mut f64,xx_ : * mut f64,y_ : * mut f64,slc_ : * mut f64,suc_ : * mut f64,slx_ : * mut f64,sux_ : * mut f64,snx_ : * mut f64,doty_ : * mut f64) -> i32;
591 #[allow(dead_code)]
592 fn MSK_getsolutionslice(task_ : * const u8,whichsol_ : i32,solitem_ : i32,first_ : i32,last_ : i32,values_ : * mut f64) -> i32;
593 #[allow(dead_code)]
594 fn MSK_getsparsesymmat(task_ : * const u8,idx_ : i64,maxlen_ : i64,subi_ : * mut i32,subj_ : * mut i32,valij_ : * mut f64) -> i32;
595 #[allow(dead_code)]
596 fn MSK_getstrparam(task_ : * const u8,param_ : i32,maxlen_ : i32,len_ : & mut i32,parvalue : * mut u8) -> i32;
597 #[allow(dead_code)]
598 fn MSK_getstrparamlen(task_ : * const u8,param_ : i32,len_ : & mut i32) -> i32;
599 #[allow(dead_code)]
600 fn MSK_getsuc(task_ : * const u8,whichsol_ : i32,suc_ : * mut f64) -> i32;
601 #[allow(dead_code)]
602 fn MSK_getsucslice(task_ : * const u8,whichsol_ : i32,first_ : i32,last_ : i32,suc_ : * mut f64) -> i32;
603 #[allow(dead_code)]
604 fn MSK_getsux(task_ : * const u8,whichsol_ : i32,sux_ : * mut f64) -> i32;
605 #[allow(dead_code)]
606 fn MSK_getsuxslice(task_ : * const u8,whichsol_ : i32,first_ : i32,last_ : i32,sux_ : * mut f64) -> i32;
607 #[allow(dead_code)]
608 fn MSK_getsymbcon(task_ : * const u8,i_ : i32,sizevalue_ : i32,name : * mut u8,value_ : & mut i32) -> i32;
609 #[allow(dead_code)]
610 fn MSK_getsymmatinfo(task_ : * const u8,idx_ : i64,dim_ : & mut i32,nz_ : & mut i64,mattype_ : &mut i32) -> i32;
611 #[allow(dead_code)]
612 fn MSK_gettaskname(task_ : * const u8,sizetaskname_ : i32,taskname : * mut u8) -> i32;
613 #[allow(dead_code)]
614 fn MSK_gettasknamelen(task_ : * const u8,len_ : & mut i32) -> i32;
615 #[allow(dead_code)]
616 fn MSK_getvarbound(task_ : * const u8,i_ : i32,bk_ : &mut i32,bl_ : & mut f64,bu_ : & mut f64) -> i32;
617 #[allow(dead_code)]
618 fn MSK_getvarboundslice(task_ : * const u8,first_ : i32,last_ : i32,bk_ : * mut i32,bl_ : * mut f64,bu_ : * mut f64) -> i32;
619 #[allow(dead_code)]
620 fn MSK_getvarname(task_ : * const u8,j_ : i32,sizename_ : i32,name : * mut u8) -> i32;
621 #[allow(dead_code)]
622 fn MSK_getvarnameindex(task_ : * const u8,somename_ : * const libc::c_char,asgn_ : & mut i32,index_ : & mut i32) -> i32;
623 #[allow(dead_code)]
624 fn MSK_getvarnamelen(task_ : * const u8,i_ : i32,len_ : & mut i32) -> i32;
625 #[allow(dead_code)]
626 fn MSK_getvartype(task_ : * const u8,j_ : i32,vartype_ : &mut i32) -> i32;
627 #[allow(dead_code)]
628 fn MSK_getvartypelist(task_ : * const u8,num_ : i32,subj_ : * const i32,vartype_ : * mut i32) -> i32;
629 #[allow(dead_code)]
630 fn MSK_getxc(task_ : * const u8,whichsol_ : i32,xc_ : * mut f64) -> i32;
631 #[allow(dead_code)]
632 fn MSK_getxcslice(task_ : * const u8,whichsol_ : i32,first_ : i32,last_ : i32,xc_ : * mut f64) -> i32;
633 #[allow(dead_code)]
634 fn MSK_getxx(task_ : * const u8,whichsol_ : i32,xx_ : * mut f64) -> i32;
635 #[allow(dead_code)]
636 fn MSK_getxxslice(task_ : * const u8,whichsol_ : i32,first_ : i32,last_ : i32,xx_ : * mut f64) -> i32;
637 #[allow(dead_code)]
638 fn MSK_gety(task_ : * const u8,whichsol_ : i32,y_ : * mut f64) -> i32;
639 #[allow(dead_code)]
640 fn MSK_getyslice(task_ : * const u8,whichsol_ : i32,first_ : i32,last_ : i32,y_ : * mut f64) -> i32;
641 #[allow(dead_code)]
642 fn MSK_infeasibilityreport(task_ : * const u8,whichstream_ : i32,whichsol_ : i32) -> i32;
643 #[allow(dead_code)]
644 fn MSK_initbasissolve(task_ : * const u8,basis_ : * mut i32) -> i32;
645 #[allow(dead_code)]
646 fn MSK_inputdata(task_ : * const u8,maxnumcon_ : i32,maxnumvar_ : i32,numcon_ : i32,numvar_ : i32,c_ : * const f64,cfix_ : f64,aptrb_ : * const i32,aptre_ : * const i32,asub_ : * const i32,aval_ : * const f64,bkc_ : * const i32,blc_ : * const f64,buc_ : * const f64,bkx_ : * const i32,blx_ : * const f64,bux_ : * const f64) -> i32;
647 #[allow(dead_code)]
648 fn MSK_inputdata64(task_ : * const u8,maxnumcon_ : i32,maxnumvar_ : i32,numcon_ : i32,numvar_ : i32,c_ : * const f64,cfix_ : f64,aptrb_ : * const i64,aptre_ : * const i64,asub_ : * const i32,aval_ : * const f64,bkc_ : * const i32,blc_ : * const f64,buc_ : * const f64,bkx_ : * const i32,blx_ : * const f64,bux_ : * const f64) -> i32;
649 #[allow(dead_code)]
650 fn MSK_isdouparname(task_ : * const u8,parname_ : * const libc::c_char,param_ : &mut i32) -> i32;
651 #[allow(dead_code)]
652 fn MSK_isintparname(task_ : * const u8,parname_ : * const libc::c_char,param_ : &mut i32) -> i32;
653 #[allow(dead_code)]
654 fn MSK_isstrparname(task_ : * const u8,parname_ : * const libc::c_char,param_ : &mut i32) -> i32;
655 #[allow(dead_code)]
656 fn MSK_linkfiletotaskstream(task_ : * const u8,whichstream_ : i32,filename_ : * const libc::c_char,append_ : i32) -> i32;
657 #[allow(dead_code)]
658 fn MSK_onesolutionsummary(task_ : * const u8,whichstream_ : i32,whichsol_ : i32) -> i32;
659 #[allow(dead_code)]
660 fn MSK_optimize(task_ : * const u8) -> i32;
661 #[allow(dead_code)]
662 fn MSK_optimizermt(task_ : * const u8,address_ : * const libc::c_char,accesstoken_ : * const libc::c_char,trmcode_ : &mut i32) -> i32;
663 #[allow(dead_code)]
664 fn MSK_optimizersummary(task_ : * const u8,whichstream_ : i32) -> i32;
665 #[allow(dead_code)]
666 fn MSK_optimizetrm(task_ : * const u8,trmcode_ : &mut i32) -> i32;
667 #[allow(dead_code)]
668 fn MSK_primalrepair(task_ : * const u8,wlc_ : * const f64,wuc_ : * const f64,wlx_ : * const f64,wux_ : * const f64) -> i32;
669 #[allow(dead_code)]
670 fn MSK_primalsensitivity(task_ : * const u8,numi_ : i32,subi_ : * const i32,marki_ : * const i32,numj_ : i32,subj_ : * const i32,markj_ : * const i32,leftpricei_ : * mut f64,rightpricei_ : * mut f64,leftrangei_ : * mut f64,rightrangei_ : * mut f64,leftpricej_ : * mut f64,rightpricej_ : * mut f64,leftrangej_ : * mut f64,rightrangej_ : * mut f64) -> i32;
671 #[allow(dead_code)]
672 fn MSK_printparam(task_ : * const u8) -> i32;
673 #[allow(dead_code)]
674 fn MSK_probtypetostr(task_ : * const u8,probtype_ : i32,str : * mut u8) -> i32;
675 #[allow(dead_code)]
676 fn MSK_prostatostr(task_ : * const u8,problemsta_ : i32,str : * mut u8) -> i32;
677 #[allow(dead_code)]
678 fn MSK_putacc(task_ : * const u8,accidx_ : i64,domidx_ : i64,numafeidx_ : i64,afeidxlist_ : * const i64,b_ : * const f64) -> i32;
679 #[allow(dead_code)]
680 fn MSK_putaccb(task_ : * const u8,accidx_ : i64,lengthb_ : i64,b_ : * const f64) -> i32;
681 #[allow(dead_code)]
682 fn MSK_putaccbj(task_ : * const u8,accidx_ : i64,j_ : i64,bj_ : f64) -> i32;
683 #[allow(dead_code)]
684 fn MSK_putaccdoty(task_ : * const u8,whichsol_ : i32,accidx_ : i64,doty_ : * mut f64) -> i32;
685 #[allow(dead_code)]
686 fn MSK_putacclist(task_ : * const u8,numaccs_ : i64,accidxs_ : * const i64,domidxs_ : * const i64,numafeidx_ : i64,afeidxlist_ : * const i64,b_ : * const f64) -> i32;
687 #[allow(dead_code)]
688 fn MSK_putaccname(task_ : * const u8,accidx_ : i64,name_ : * const libc::c_char) -> i32;
689 #[allow(dead_code)]
690 fn MSK_putacol(task_ : * const u8,j_ : i32,nzj_ : i32,subj_ : * const i32,valj_ : * const f64) -> i32;
691 #[allow(dead_code)]
692 fn MSK_putacollist(task_ : * const u8,num_ : i32,sub_ : * const i32,ptrb_ : * const i32,ptre_ : * const i32,asub_ : * const i32,aval_ : * const f64) -> i32;
693 #[allow(dead_code)]
694 fn MSK_putacollist64(task_ : * const u8,num_ : i32,sub_ : * const i32,ptrb_ : * const i64,ptre_ : * const i64,asub_ : * const i32,aval_ : * const f64) -> i32;
695 #[allow(dead_code)]
696 fn MSK_putacolslice(task_ : * const u8,first_ : i32,last_ : i32,ptrb_ : * const i32,ptre_ : * const i32,asub_ : * const i32,aval_ : * const f64) -> i32;
697 #[allow(dead_code)]
698 fn MSK_putacolslice64(task_ : * const u8,first_ : i32,last_ : i32,ptrb_ : * const i64,ptre_ : * const i64,asub_ : * const i32,aval_ : * const f64) -> i32;
699 #[allow(dead_code)]
700 fn MSK_putafebarfblocktriplet(task_ : * const u8,numtrip_ : i64,afeidx_ : * const i64,barvaridx_ : * const i32,subk_ : * const i32,subl_ : * const i32,valkl_ : * const f64) -> i32;
701 #[allow(dead_code)]
702 fn MSK_putafebarfentry(task_ : * const u8,afeidx_ : i64,barvaridx_ : i32,numterm_ : i64,termidx_ : * const i64,termweight_ : * const f64) -> i32;
703 #[allow(dead_code)]
704 fn MSK_putafebarfentrylist(task_ : * const u8,numafeidx_ : i64,afeidx_ : * const i64,barvaridx_ : * const i32,numterm_ : * const i64,ptrterm_ : * const i64,lenterm_ : i64,termidx_ : * const i64,termweight_ : * const f64) -> i32;
705 #[allow(dead_code)]
706 fn MSK_putafebarfrow(task_ : * const u8,afeidx_ : i64,numentr_ : i32,barvaridx_ : * const i32,numterm_ : * const i64,ptrterm_ : * const i64,lenterm_ : i64,termidx_ : * const i64,termweight_ : * const f64) -> i32;
707 #[allow(dead_code)]
708 fn MSK_putafefcol(task_ : * const u8,varidx_ : i32,numnz_ : i64,afeidx_ : * const i64,val_ : * const f64) -> i32;
709 #[allow(dead_code)]
710 fn MSK_putafefentry(task_ : * const u8,afeidx_ : i64,varidx_ : i32,value_ : f64) -> i32;
711 #[allow(dead_code)]
712 fn MSK_putafefentrylist(task_ : * const u8,numentr_ : i64,afeidx_ : * const i64,varidx_ : * const i32,val_ : * const f64) -> i32;
713 #[allow(dead_code)]
714 fn MSK_putafefrow(task_ : * const u8,afeidx_ : i64,numnz_ : i32,varidx_ : * const i32,val_ : * const f64) -> i32;
715 #[allow(dead_code)]
716 fn MSK_putafefrowlist(task_ : * const u8,numafeidx_ : i64,afeidx_ : * const i64,numnzrow_ : * const i32,ptrrow_ : * const i64,lenidxval_ : i64,varidx_ : * const i32,val_ : * const f64) -> i32;
717 #[allow(dead_code)]
718 fn MSK_putafeg(task_ : * const u8,afeidx_ : i64,g_ : f64) -> i32;
719 #[allow(dead_code)]
720 fn MSK_putafeglist(task_ : * const u8,numafeidx_ : i64,afeidx_ : * const i64,g_ : * const f64) -> i32;
721 #[allow(dead_code)]
722 fn MSK_putafegslice(task_ : * const u8,first_ : i64,last_ : i64,slice_ : * const f64) -> i32;
723 #[allow(dead_code)]
724 fn MSK_putaij(task_ : * const u8,i_ : i32,j_ : i32,aij_ : f64) -> i32;
725 #[allow(dead_code)]
726 fn MSK_putaijlist(task_ : * const u8,num_ : i32,subi_ : * const i32,subj_ : * const i32,valij_ : * const f64) -> i32;
727 #[allow(dead_code)]
728 fn MSK_putaijlist64(task_ : * const u8,num_ : i64,subi_ : * const i32,subj_ : * const i32,valij_ : * const f64) -> i32;
729 #[allow(dead_code)]
730 fn MSK_putarow(task_ : * const u8,i_ : i32,nzi_ : i32,subi_ : * const i32,vali_ : * const f64) -> i32;
731 #[allow(dead_code)]
732 fn MSK_putarowlist(task_ : * const u8,num_ : i32,sub_ : * const i32,ptrb_ : * const i32,ptre_ : * const i32,asub_ : * const i32,aval_ : * const f64) -> i32;
733 #[allow(dead_code)]
734 fn MSK_putarowlist64(task_ : * const u8,num_ : i32,sub_ : * const i32,ptrb_ : * const i64,ptre_ : * const i64,asub_ : * const i32,aval_ : * const f64) -> i32;
735 #[allow(dead_code)]
736 fn MSK_putarowslice(task_ : * const u8,first_ : i32,last_ : i32,ptrb_ : * const i32,ptre_ : * const i32,asub_ : * const i32,aval_ : * const f64) -> i32;
737 #[allow(dead_code)]
738 fn MSK_putarowslice64(task_ : * const u8,first_ : i32,last_ : i32,ptrb_ : * const i64,ptre_ : * const i64,asub_ : * const i32,aval_ : * const f64) -> i32;
739 #[allow(dead_code)]
740 fn MSK_putatruncatetol(task_ : * const u8,tolzero_ : f64) -> i32;
741 #[allow(dead_code)]
742 fn MSK_putbarablocktriplet(task_ : * const u8,num_ : i64,subi_ : * const i32,subj_ : * const i32,subk_ : * const i32,subl_ : * const i32,valijkl_ : * const f64) -> i32;
743 #[allow(dead_code)]
744 fn MSK_putbaraij(task_ : * const u8,i_ : i32,j_ : i32,num_ : i64,sub_ : * const i64,weights_ : * const f64) -> i32;
745 #[allow(dead_code)]
746 fn MSK_putbaraijlist(task_ : * const u8,num_ : i32,subi_ : * const i32,subj_ : * const i32,alphaptrb_ : * const i64,alphaptre_ : * const i64,matidx_ : * const i64,weights_ : * const f64) -> i32;
747 #[allow(dead_code)]
748 fn MSK_putbararowlist(task_ : * const u8,num_ : i32,subi_ : * const i32,ptrb_ : * const i64,ptre_ : * const i64,subj_ : * const i32,nummat_ : * const i64,matidx_ : * const i64,weights_ : * const f64) -> i32;
749 #[allow(dead_code)]
750 fn MSK_putbarcblocktriplet(task_ : * const u8,num_ : i64,subj_ : * const i32,subk_ : * const i32,subl_ : * const i32,valjkl_ : * const f64) -> i32;
751 #[allow(dead_code)]
752 fn MSK_putbarcj(task_ : * const u8,j_ : i32,num_ : i64,sub_ : * const i64,weights_ : * const f64) -> i32;
753 #[allow(dead_code)]
754 fn MSK_putbarsj(task_ : * const u8,whichsol_ : i32,j_ : i32,barsj_ : * const f64) -> i32;
755 #[allow(dead_code)]
756 fn MSK_putbarvarname(task_ : * const u8,j_ : i32,name_ : * const libc::c_char) -> i32;
757 #[allow(dead_code)]
758 fn MSK_putbarxj(task_ : * const u8,whichsol_ : i32,j_ : i32,barxj_ : * const f64) -> i32;
759 #[allow(dead_code)]
760 fn MSK_putcfix(task_ : * const u8,cfix_ : f64) -> i32;
761 #[allow(dead_code)]
762 fn MSK_putcj(task_ : * const u8,j_ : i32,cj_ : f64) -> i32;
763 #[allow(dead_code)]
764 fn MSK_putclist(task_ : * const u8,num_ : i32,subj_ : * const i32,val_ : * const f64) -> i32;
765 #[allow(dead_code)]
766 fn MSK_putconbound(task_ : * const u8,i_ : i32,bkc_ : i32,blc_ : f64,buc_ : f64) -> i32;
767 #[allow(dead_code)]
768 fn MSK_putconboundlist(task_ : * const u8,num_ : i32,sub_ : * const i32,bkc_ : * const i32,blc_ : * const f64,buc_ : * const f64) -> i32;
769 #[allow(dead_code)]
770 fn MSK_putconboundlistconst(task_ : * const u8,num_ : i32,sub_ : * const i32,bkc_ : i32,blc_ : f64,buc_ : f64) -> i32;
771 #[allow(dead_code)]
772 fn MSK_putconboundslice(task_ : * const u8,first_ : i32,last_ : i32,bkc_ : * const i32,blc_ : * const f64,buc_ : * const f64) -> i32;
773 #[allow(dead_code)]
774 fn MSK_putconboundsliceconst(task_ : * const u8,first_ : i32,last_ : i32,bkc_ : i32,blc_ : f64,buc_ : f64) -> i32;
775 #[allow(dead_code)]
776 fn MSK_putcone(task_ : * const u8,k_ : i32,ct_ : i32,conepar_ : f64,nummem_ : i32,submem_ : * const i32) -> i32;
777 #[allow(dead_code)]
778 fn MSK_putconename(task_ : * const u8,j_ : i32,name_ : * const libc::c_char) -> i32;
779 #[allow(dead_code)]
780 fn MSK_putconname(task_ : * const u8,i_ : i32,name_ : * const libc::c_char) -> i32;
781 #[allow(dead_code)]
782 fn MSK_putconsolutioni(task_ : * const u8,i_ : i32,whichsol_ : i32,sk_ : i32,x_ : f64,sl_ : f64,su_ : f64) -> i32;
783 #[allow(dead_code)]
784 fn MSK_putcslice(task_ : * const u8,first_ : i32,last_ : i32,slice_ : * const f64) -> i32;
785 #[allow(dead_code)]
786 fn MSK_putdjc(task_ : * const u8,djcidx_ : i64,numdomidx_ : i64,domidxlist_ : * const i64,numafeidx_ : i64,afeidxlist_ : * const i64,b_ : * const f64,numterms_ : i64,termsizelist_ : * const i64) -> i32;
787 #[allow(dead_code)]
788 fn MSK_putdjcname(task_ : * const u8,djcidx_ : i64,name_ : * const libc::c_char) -> i32;
789 #[allow(dead_code)]
790 fn MSK_putdjcslice(task_ : * const u8,idxfirst_ : i64,idxlast_ : i64,numdomidx_ : i64,domidxlist_ : * const i64,numafeidx_ : i64,afeidxlist_ : * const i64,b_ : * const f64,numterms_ : i64,termsizelist_ : * const i64,termsindjc_ : * const i64) -> i32;
791 #[allow(dead_code)]
792 fn MSK_putdomainname(task_ : * const u8,domidx_ : i64,name_ : * const libc::c_char) -> i32;
793 #[allow(dead_code)]
794 fn MSK_putdouparam(task_ : * const u8,param_ : i32,parvalue_ : f64) -> i32;
795 #[allow(dead_code)]
796 fn MSK_putintparam(task_ : * const u8,param_ : i32,parvalue_ : i32) -> i32;
797 #[allow(dead_code)]
798 fn MSK_putlintparam(task_ : * const u8,param_ : i32,parvalue_ : i64) -> i32;
799 #[allow(dead_code)]
800 fn MSK_putmaxnumacc(task_ : * const u8,maxnumacc_ : i64) -> i32;
801 #[allow(dead_code)]
802 fn MSK_putmaxnumafe(task_ : * const u8,maxnumafe_ : i64) -> i32;
803 #[allow(dead_code)]
804 fn MSK_putmaxnumanz(task_ : * const u8,maxnumanz_ : i64) -> i32;
805 #[allow(dead_code)]
806 fn MSK_putmaxnumbarvar(task_ : * const u8,maxnumbarvar_ : i32) -> i32;
807 #[allow(dead_code)]
808 fn MSK_putmaxnumcon(task_ : * const u8,maxnumcon_ : i32) -> i32;
809 #[allow(dead_code)]
810 fn MSK_putmaxnumcone(task_ : * const u8,maxnumcone_ : i32) -> i32;
811 #[allow(dead_code)]
812 fn MSK_putmaxnumdjc(task_ : * const u8,maxnumdjc_ : i64) -> i32;
813 #[allow(dead_code)]
814 fn MSK_putmaxnumdomain(task_ : * const u8,maxnumdomain_ : i64) -> i32;
815 #[allow(dead_code)]
816 fn MSK_putmaxnumqnz(task_ : * const u8,maxnumqnz_ : i64) -> i32;
817 #[allow(dead_code)]
818 fn MSK_putmaxnumvar(task_ : * const u8,maxnumvar_ : i32) -> i32;
819 #[allow(dead_code)]
820 fn MSK_putnadouparam(task_ : * const u8,paramname_ : * const libc::c_char,parvalue_ : f64) -> i32;
821 #[allow(dead_code)]
822 fn MSK_putnaintparam(task_ : * const u8,paramname_ : * const libc::c_char,parvalue_ : i32) -> i32;
823 #[allow(dead_code)]
824 fn MSK_putnastrparam(task_ : * const u8,paramname_ : * const libc::c_char,parvalue_ : * const libc::c_char) -> i32;
825 #[allow(dead_code)]
826 fn MSK_putobjname(task_ : * const u8,objname_ : * const libc::c_char) -> i32;
827 #[allow(dead_code)]
828 fn MSK_putobjsense(task_ : * const u8,sense_ : i32) -> i32;
829 #[allow(dead_code)]
830 fn MSK_putoptserverhost(task_ : * const u8,host_ : * const libc::c_char) -> i32;
831 #[allow(dead_code)]
832 fn MSK_putparam(task_ : * const u8,parname_ : * const libc::c_char,parvalue_ : * const libc::c_char) -> i32;
833 #[allow(dead_code)]
834 fn MSK_putqcon(task_ : * const u8,numqcnz_ : i32,qcsubk_ : * const i32,qcsubi_ : * const i32,qcsubj_ : * const i32,qcval_ : * const f64) -> i32;
835 #[allow(dead_code)]
836 fn MSK_putqconk(task_ : * const u8,k_ : i32,numqcnz_ : i32,qcsubi_ : * const i32,qcsubj_ : * const i32,qcval_ : * const f64) -> i32;
837 #[allow(dead_code)]
838 fn MSK_putqobj(task_ : * const u8,numqonz_ : i32,qosubi_ : * const i32,qosubj_ : * const i32,qoval_ : * const f64) -> i32;
839 #[allow(dead_code)]
840 fn MSK_putqobjij(task_ : * const u8,i_ : i32,j_ : i32,qoij_ : f64) -> i32;
841 #[allow(dead_code)]
842 fn MSK_putskc(task_ : * const u8,whichsol_ : i32,skc_ : * const i32) -> i32;
843 #[allow(dead_code)]
844 fn MSK_putskcslice(task_ : * const u8,whichsol_ : i32,first_ : i32,last_ : i32,skc_ : * const i32) -> i32;
845 #[allow(dead_code)]
846 fn MSK_putskx(task_ : * const u8,whichsol_ : i32,skx_ : * const i32) -> i32;
847 #[allow(dead_code)]
848 fn MSK_putskxslice(task_ : * const u8,whichsol_ : i32,first_ : i32,last_ : i32,skx_ : * const i32) -> i32;
849 #[allow(dead_code)]
850 fn MSK_putslc(task_ : * const u8,whichsol_ : i32,slc_ : * const f64) -> i32;
851 #[allow(dead_code)]
852 fn MSK_putslcslice(task_ : * const u8,whichsol_ : i32,first_ : i32,last_ : i32,slc_ : * const f64) -> i32;
853 #[allow(dead_code)]
854 fn MSK_putslx(task_ : * const u8,whichsol_ : i32,slx_ : * const f64) -> i32;
855 #[allow(dead_code)]
856 fn MSK_putslxslice(task_ : * const u8,whichsol_ : i32,first_ : i32,last_ : i32,slx_ : * const f64) -> i32;
857 #[allow(dead_code)]
858 fn MSK_putsnx(task_ : * const u8,whichsol_ : i32,sux_ : * const f64) -> i32;
859 #[allow(dead_code)]
860 fn MSK_putsnxslice(task_ : * const u8,whichsol_ : i32,first_ : i32,last_ : i32,snx_ : * const f64) -> i32;
861 #[allow(dead_code)]
862 fn MSK_putsolution(task_ : * const u8,whichsol_ : i32,skc_ : * const i32,skx_ : * const i32,skn_ : * const i32,xc_ : * const f64,xx_ : * const f64,y_ : * const f64,slc_ : * const f64,suc_ : * const f64,slx_ : * const f64,sux_ : * const f64,snx_ : * const f64) -> i32;
863 #[allow(dead_code)]
864 fn MSK_putsolutionnew(task_ : * const u8,whichsol_ : i32,skc_ : * const i32,skx_ : * const i32,skn_ : * const i32,xc_ : * const f64,xx_ : * const f64,y_ : * const f64,slc_ : * const f64,suc_ : * const f64,slx_ : * const f64,sux_ : * const f64,snx_ : * const f64,doty_ : * const f64) -> i32;
865 #[allow(dead_code)]
866 fn MSK_putsolutionyi(task_ : * const u8,i_ : i32,whichsol_ : i32,y_ : f64) -> i32;
867 #[allow(dead_code)]
868 fn MSK_putstrparam(task_ : * const u8,param_ : i32,parvalue_ : * const libc::c_char) -> i32;
869 #[allow(dead_code)]
870 fn MSK_putsuc(task_ : * const u8,whichsol_ : i32,suc_ : * const f64) -> i32;
871 #[allow(dead_code)]
872 fn MSK_putsucslice(task_ : * const u8,whichsol_ : i32,first_ : i32,last_ : i32,suc_ : * const f64) -> i32;
873 #[allow(dead_code)]
874 fn MSK_putsux(task_ : * const u8,whichsol_ : i32,sux_ : * const f64) -> i32;
875 #[allow(dead_code)]
876 fn MSK_putsuxslice(task_ : * const u8,whichsol_ : i32,first_ : i32,last_ : i32,sux_ : * const f64) -> i32;
877 #[allow(dead_code)]
878 fn MSK_puttaskname(task_ : * const u8,taskname_ : * const libc::c_char) -> i32;
879 #[allow(dead_code)]
880 fn MSK_putvarbound(task_ : * const u8,j_ : i32,bkx_ : i32,blx_ : f64,bux_ : f64) -> i32;
881 #[allow(dead_code)]
882 fn MSK_putvarboundlist(task_ : * const u8,num_ : i32,sub_ : * const i32,bkx_ : * const i32,blx_ : * const f64,bux_ : * const f64) -> i32;
883 #[allow(dead_code)]
884 fn MSK_putvarboundlistconst(task_ : * const u8,num_ : i32,sub_ : * const i32,bkx_ : i32,blx_ : f64,bux_ : f64) -> i32;
885 #[allow(dead_code)]
886 fn MSK_putvarboundslice(task_ : * const u8,first_ : i32,last_ : i32,bkx_ : * const i32,blx_ : * const f64,bux_ : * const f64) -> i32;
887 #[allow(dead_code)]
888 fn MSK_putvarboundsliceconst(task_ : * const u8,first_ : i32,last_ : i32,bkx_ : i32,blx_ : f64,bux_ : f64) -> i32;
889 #[allow(dead_code)]
890 fn MSK_putvarname(task_ : * const u8,j_ : i32,name_ : * const libc::c_char) -> i32;
891 #[allow(dead_code)]
892 fn MSK_putvarsolutionj(task_ : * const u8,j_ : i32,whichsol_ : i32,sk_ : i32,x_ : f64,sl_ : f64,su_ : f64,sn_ : f64) -> i32;
893 #[allow(dead_code)]
894 fn MSK_putvartype(task_ : * const u8,j_ : i32,vartype_ : i32) -> i32;
895 #[allow(dead_code)]
896 fn MSK_putvartypelist(task_ : * const u8,num_ : i32,subj_ : * const i32,vartype_ : * const i32) -> i32;
897 #[allow(dead_code)]
898 fn MSK_putxc(task_ : * const u8,whichsol_ : i32,xc_ : * mut f64) -> i32;
899 #[allow(dead_code)]
900 fn MSK_putxcslice(task_ : * const u8,whichsol_ : i32,first_ : i32,last_ : i32,xc_ : * const f64) -> i32;
901 #[allow(dead_code)]
902 fn MSK_putxx(task_ : * const u8,whichsol_ : i32,xx_ : * const f64) -> i32;
903 #[allow(dead_code)]
904 fn MSK_putxxslice(task_ : * const u8,whichsol_ : i32,first_ : i32,last_ : i32,xx_ : * const f64) -> i32;
905 #[allow(dead_code)]
906 fn MSK_puty(task_ : * const u8,whichsol_ : i32,y_ : * const f64) -> i32;
907 #[allow(dead_code)]
908 fn MSK_putyslice(task_ : * const u8,whichsol_ : i32,first_ : i32,last_ : i32,y_ : * const f64) -> i32;
909 #[allow(dead_code)]
910 fn MSK_readbsolution(task_ : * const u8,filename_ : * const libc::c_char,compress_ : i32) -> i32;
911 #[allow(dead_code)]
912 fn MSK_readdata(task_ : * const u8,filename_ : * const libc::c_char) -> i32;
913 #[allow(dead_code)]
914 fn MSK_readdataautoformat(task_ : * const u8,filename_ : * const libc::c_char) -> i32;
915 #[allow(dead_code)]
916 fn MSK_readdataformat(task_ : * const u8,filename_ : * const libc::c_char,format_ : i32,compress_ : i32) -> i32;
917 #[allow(dead_code)]
918 fn MSK_readjsonsol(task_ : * const u8,filename_ : * const libc::c_char) -> i32;
919 #[allow(dead_code)]
920 fn MSK_readjsonstring(task_ : * const u8,data_ : * const libc::c_char) -> i32;
921 #[allow(dead_code)]
922 fn MSK_readlpstring(task_ : * const u8,data_ : * const libc::c_char) -> i32;
923 #[allow(dead_code)]
924 fn MSK_readopfstring(task_ : * const u8,data_ : * const libc::c_char) -> i32;
925 #[allow(dead_code)]
926 fn MSK_readparamfile(task_ : * const u8,filename_ : * const libc::c_char) -> i32;
927 #[allow(dead_code)]
928 fn MSK_readptfstring(task_ : * const u8,data_ : * const libc::c_char) -> i32;
929 #[allow(dead_code)]
930 fn MSK_readsolution(task_ : * const u8,whichsol_ : i32,filename_ : * const libc::c_char) -> i32;
931 #[allow(dead_code)]
932 fn MSK_readsolutionfile(task_ : * const u8,filename_ : * const libc::c_char) -> i32;
933 #[allow(dead_code)]
934 fn MSK_readsummary(task_ : * const u8,whichstream_ : i32) -> i32;
935 #[allow(dead_code)]
936 fn MSK_readtask(task_ : * const u8,filename_ : * const libc::c_char) -> i32;
937 #[allow(dead_code)]
938 fn MSK_removebarvars(task_ : * const u8,num_ : i32,subset_ : * const i32) -> i32;
939 #[allow(dead_code)]
940 fn MSK_removecones(task_ : * const u8,num_ : i32,subset_ : * const i32) -> i32;
941 #[allow(dead_code)]
942 fn MSK_removecons(task_ : * const u8,num_ : i32,subset_ : * const i32) -> i32;
943 #[allow(dead_code)]
944 fn MSK_removevars(task_ : * const u8,num_ : i32,subset_ : * const i32) -> i32;
945 #[allow(dead_code)]
946 fn MSK_resetdouparam(task_ : * const u8,param_ : i32) -> i32;
947 #[allow(dead_code)]
948 fn MSK_resetintparam(task_ : * const u8,param_ : i32) -> i32;
949 #[allow(dead_code)]
950 fn MSK_resetparameters(task_ : * const u8) -> i32;
951 #[allow(dead_code)]
952 fn MSK_resetstrparam(task_ : * const u8,param_ : i32) -> i32;
953 #[allow(dead_code)]
954 fn MSK_resizetask(task_ : * const u8,maxnumcon_ : i32,maxnumvar_ : i32,maxnumcone_ : i32,maxnumanz_ : i64,maxnumqnz_ : i64) -> i32;
955 #[allow(dead_code)]
956 fn MSK_sensitivityreport(task_ : * const u8,whichstream_ : i32) -> i32;
957 #[allow(dead_code)]
958 fn MSK_sktostr(task_ : * const u8,sk_ : i32,str : * mut u8) -> i32;
959 #[allow(dead_code)]
960 fn MSK_solstatostr(task_ : * const u8,solutionsta_ : i32,str : * mut u8) -> i32;
961 #[allow(dead_code)]
962 fn MSK_solutiondef(task_ : * const u8,whichsol_ : i32,isdef_ : & mut i32) -> i32;
963 #[allow(dead_code)]
964 fn MSK_solutionsummary(task_ : * const u8,whichstream_ : i32) -> i32;
965 #[allow(dead_code)]
966 fn MSK_solvewithbasis(task_ : * const u8,transp_ : bool,numnz_ : i32,sub_ : * mut i32,val_ : * mut f64,numnzout_ : & mut i32) -> i32;
967 #[allow(dead_code)]
968 fn MSK_strtoconetype(task_ : * const u8,str_ : * const libc::c_char,conetype_ : &mut i32) -> i32;
969 #[allow(dead_code)]
970 fn MSK_strtosk(task_ : * const u8,str_ : * const libc::c_char,sk_ : &mut i32) -> i32;
971 #[allow(dead_code)]
972 fn MSK_toconic(task_ : * const u8) -> i32;
973 #[allow(dead_code)]
974 fn MSK_unlinkfuncfromtaskstream(task_ : * const u8,whichstream_ : i32) -> i32;
975 #[allow(dead_code)]
976 fn MSK_updatesolutioninfo(task_ : * const u8,whichsol_ : i32) -> i32;
977 #[allow(dead_code)]
978 fn MSK_whichparam(task_ : * const u8,parname_ : * const libc::c_char,partype_ : &mut i32,param_ : & mut i32) -> i32;
979 #[allow(dead_code)]
980 fn MSK_writebsolution(task_ : * const u8,filename_ : * const libc::c_char,compress_ : i32) -> i32;
981 #[allow(dead_code)]
982 fn MSK_writedata(task_ : * const u8,filename_ : * const libc::c_char) -> i32;
983 #[allow(dead_code)]
984 fn MSK_writejsonsol(task_ : * const u8,filename_ : * const libc::c_char) -> i32;
985 #[allow(dead_code)]
986 fn MSK_writeparamfile(task_ : * const u8,filename_ : * const libc::c_char) -> i32;
987 #[allow(dead_code)]
988 fn MSK_writesolution(task_ : * const u8,whichsol_ : i32,filename_ : * const libc::c_char) -> i32;
989 #[allow(dead_code)]
990 fn MSK_writesolutionfile(task_ : * const u8,filename_ : * const libc::c_char) -> i32;
991 #[allow(dead_code)]
992 fn MSK_writestat(task_ : * const u8,filename_ : * const libc::c_char) -> i32;
993 #[allow(dead_code)]
994 fn MSK_writetask(task_ : * const u8,filename_ : * const libc::c_char) -> i32;
995 #[allow(dead_code)]
996 fn MSK_writetasksolverresult_file(task_ : * const u8,filename_ : * const libc::c_char,compress_ : i32) -> i32;
997 #[allow(dead_code)]
998 fn MSK_axpy(env_ : * const u8,n_ : i32,alpha_ : f64,x_ : * const f64,y_ : * mut f64) -> i32;
999 #[allow(dead_code)]
1000 fn MSK_callbackcodetostr(code_ : i32,callbackcodestr : * mut u8) -> i32;
1001 #[allow(dead_code)]
1002 fn MSK_checkinall(env_ : * const u8) -> i32;
1003 #[allow(dead_code)]
1004 fn MSK_checkinlicense(env_ : * const u8,feature_ : i32) -> i32;
1005 #[allow(dead_code)]
1006 fn MSK_checkmemenv(env_ : * const u8,file_ : * const libc::c_char,line_ : i32) -> i32;
1007 #[allow(dead_code)]
1008 fn MSK_checkoutlicense(env_ : * const u8,feature_ : i32) -> i32;
1009 #[allow(dead_code)]
1010 fn MSK_checkversion(env_ : * const u8,major_ : i32,minor_ : i32,revision_ : i32) -> i32;
1011 #[allow(dead_code)]
1012 fn MSK_computesparsecholesky(env_ : * const u8,numthreads_ : i32,ordermethod_ : i32,tolsingular_ : f64,n_ : i32,anzc_ : * const i32,aptrc_ : * const i64,asubc_ : * const i32,avalc_ : * const f64,perm_ : & mut * const i32,diag_ : & mut * const f64,lnzc_ : & mut * const i32,lptrc_ : & mut * const i64,lensubnval_ : & mut i64,lsubc_ : & mut * const i32,lvalc_ : & mut * const f64) -> i32;
1013 #[allow(dead_code)]
1014 fn MSK_deleteenv(env_ : & mut * const u8) -> i32;
1015 #[allow(dead_code)]
1016 fn MSK_dinfitemtostr(item_ : i32,str : * mut u8) -> i32;
1017 #[allow(dead_code)]
1018 fn MSK_dot(env_ : * const u8,n_ : i32,x_ : * const f64,y_ : * const f64,xty_ : & mut f64) -> i32;
1019 #[allow(dead_code)]
1020 fn MSK_echointro(env_ : * const u8,longver_ : i32) -> i32;
1021 #[allow(dead_code)]
1022 fn MSK_enablegarcolenv(env_ : * const u8) -> i32;
1023 #[allow(dead_code)]
1024 fn MSK_expirylicenses(env_ : * const u8,expiry_ : & mut i64) -> i32;
1025 #[allow(dead_code)]
1026 fn MSK_freeenv(env_ : * const u8,buffer_ : *mut u8) -> i32;
1027 #[allow(dead_code)]
1028 fn MSK_gemm(env_ : * const u8,transa_ : i32,transb_ : i32,m_ : i32,n_ : i32,k_ : i32,alpha_ : f64,a_ : * const f64,b_ : * const f64,beta_ : f64,c_ : * mut f64) -> i32;
1029 #[allow(dead_code)]
1030 fn MSK_gemv(env_ : * const u8,transa_ : i32,m_ : i32,n_ : i32,alpha_ : f64,a_ : * const f64,x_ : * const f64,beta_ : f64,y_ : * mut f64) -> i32;
1031 #[allow(dead_code)]
1032 fn MSK_getbuildinfo(buildstate : * mut u8,builddate : * mut u8) -> i32;
1033 #[allow(dead_code)]
1034 fn MSK_getcodedesc(code_ : i32,symname : * mut u8,str : * mut u8) -> i32;
1035 #[allow(dead_code)]
1036 fn MSK_getresponseclass(r_ : i32,rc_ : &mut i32) -> i32;
1037 #[allow(dead_code)]
1038 fn MSK_getversion(major_ : & mut i32,minor_ : & mut i32,revision_ : & mut i32) -> i32;
1039 #[allow(dead_code)]
1040 fn MSK_globalenvfinalize() -> i32;
1041 #[allow(dead_code)]
1042 fn MSK_globalenvinitialize(maxnumalloc_ : i64,dbgfile_ : * const libc::c_char) -> i32;
1043 #[allow(dead_code)]
1044 fn MSK_iinfitemtostr(item_ : i32,str : * mut u8) -> i32;
1045 #[allow(dead_code)]
1046 fn MSK_isinfinity(value_ : f64) -> i32;
1047 #[allow(dead_code)]
1048 fn MSK_licensecleanup() -> i32;
1049 #[allow(dead_code)]
1050 fn MSK_liinfitemtostr(item_ : i32,str : * mut u8) -> i32;
1051 #[allow(dead_code)]
1052 fn MSK_linkfiletoenvstream(env_ : * const u8,whichstream_ : i32,filename_ : * const libc::c_char,append_ : i32) -> i32;
1053 #[allow(dead_code)]
1054 fn MSK_makeemptytask(env_ : * const u8,task_ : & mut * const u8) -> i32;
1055 #[allow(dead_code)]
1056 fn MSK_makeenv(env_ : & mut * const u8,dbgfile_ : * const libc::c_char) -> i32;
1057 #[allow(dead_code)]
1058 fn MSK_makeenvdebug(env_ : & mut * const u8,maxnumalloc_ : i64,dbgfile_ : * const libc::c_char) -> i32;
1059 #[allow(dead_code)]
1060 fn MSK_maketask(env_ : * const u8,maxnumcon_ : i32,maxnumvar_ : i32,task_ : & mut * const u8) -> i32;
1061 #[allow(dead_code)]
1062 fn MSK_optimizebatch(env_ : * const u8,israce_ : bool,maxtime_ : f64,numthreads_ : i32,numtask_ : i64,task_ : * const * const u8,trmcode_ : * mut i32,rcode_ : * mut i32) -> i32;
1063 #[allow(dead_code)]
1064 fn MSK_potrf(env_ : * const u8,uplo_ : i32,n_ : i32,a_ : * mut f64) -> i32;
1065 #[allow(dead_code)]
1066 fn MSK_putlicensecode(env_ : * const u8,code_ : * const i32) -> i32;
1067 #[allow(dead_code)]
1068 fn MSK_putlicensedebug(env_ : * const u8,licdebug_ : i32) -> i32;
1069 #[allow(dead_code)]
1070 fn MSK_putlicensepath(env_ : * const u8,licensepath_ : * const libc::c_char) -> i32;
1071 #[allow(dead_code)]
1072 fn MSK_putlicensewait(env_ : * const u8,licwait_ : i32) -> i32;
1073 #[allow(dead_code)]
1074 fn MSK_rescodetostr(res_ : i32,str : * mut u8) -> i32;
1075 #[allow(dead_code)]
1076 fn MSK_resetexpirylicenses(env_ : * const u8) -> i32;
1077 #[allow(dead_code)]
1078 fn MSK_shutdownglobalthreadpool() -> i32;
1079 #[allow(dead_code)]
1080 fn MSK_sparsetriangularsolvedense(env_ : * const u8,transposed_ : i32,n_ : i32,lnzc_ : * const i32,lptrc_ : * const i64,lensubnval_ : i64,lsubc_ : * const i32,lvalc_ : * const f64,b_ : * mut f64) -> i32;
1081 #[allow(dead_code)]
1082 fn MSK_syeig(env_ : * const u8,uplo_ : i32,n_ : i32,a_ : * const f64,w_ : * mut f64) -> i32;
1083 #[allow(dead_code)]
1084 fn MSK_syevd(env_ : * const u8,uplo_ : i32,n_ : i32,a_ : * mut f64,w_ : * mut f64) -> i32;
1085 #[allow(dead_code)]
1086 fn MSK_symnamtovalue(name_ : * const libc::c_char,value : * mut u8) -> i32;
1087 #[allow(dead_code)]
1088 fn MSK_syrk(env_ : * const u8,uplo_ : i32,trans_ : i32,n_ : i32,k_ : i32,alpha_ : f64,a_ : * const f64,beta_ : f64,c_ : * mut f64) -> i32;
1089 #[allow(dead_code)]
1090 fn MSK_unlinkfuncfromenvstream(env_ : * const u8,whichstream_ : i32) -> i32;
1091
1092}
1093
1094
1095/// Basis identification
1096#[non_exhaustive]
1097pub struct Basindtype;
1098impl Basindtype {
1099 /// Never do basis identification.
1100 pub const NEVER : i32 = 0;
1101 /// Basis identification is always performed even if the interior-point optimizer terminates abnormally.
1102 pub const ALWAYS : i32 = 1;
1103 /// Basis identification is performed if the interior-point optimizer terminates without an error.
1104 pub const NO_ERROR : i32 = 2;
1105 /// Basis identification is not performed if the interior-point optimizer terminates with a problem status saying that the problem is primal or dual infeasible.
1106 pub const IF_FEASIBLE : i32 = 3;
1107 /// Not currently in use.
1108 pub const RESERVERED : i32 = 4;
1109} // impl Basindtype
1110
1111/// Bound keys
1112#[non_exhaustive]
1113pub struct Boundkey;
1114impl Boundkey {
1115 /// The constraint or variable has a finite lower bound and an infinite upper bound.
1116 pub const LO : i32 = 0;
1117 /// The constraint or variable has an infinite lower bound and an finite upper bound.
1118 pub const UP : i32 = 1;
1119 /// The constraint or variable is fixed.
1120 pub const FX : i32 = 2;
1121 /// The constraint or variable is free.
1122 pub const FR : i32 = 3;
1123 /// The constraint or variable is ranged.
1124 pub const RA : i32 = 4;
1125} // impl Boundkey
1126
1127/// Mark
1128#[non_exhaustive]
1129pub struct Mark;
1130impl Mark {
1131 /// The lower bound is selected for sensitivity analysis.
1132 pub const LO : i32 = 0;
1133 /// The upper bound is selected for sensitivity analysis.
1134 pub const UP : i32 = 1;
1135} // impl Mark
1136
1137/// Experimental. Usage not recommended.
1138#[non_exhaustive]
1139pub struct Simprecision;
1140impl Simprecision {
1141 /// Experimental. Usage not recommended.
1142 pub const NORMAL : i32 = 0;
1143 /// Experimental. Usage not recommended.
1144 pub const EXTENDED : i32 = 1;
1145} // impl Simprecision
1146
1147/// Degeneracy strategies
1148#[non_exhaustive]
1149pub struct Simdegen;
1150impl Simdegen {
1151 /// The simplex optimizer should use no degeneration strategy.
1152 pub const NONE : i32 = 0;
1153 /// The simplex optimizer chooses the degeneration strategy.
1154 pub const FREE : i32 = 1;
1155 /// The simplex optimizer should use an aggressive degeneration strategy.
1156 pub const AGGRESSIVE : i32 = 2;
1157 /// The simplex optimizer should use a moderate degeneration strategy.
1158 pub const MODERATE : i32 = 3;
1159 /// The simplex optimizer should use a minimum degeneration strategy.
1160 pub const MINIMUM : i32 = 4;
1161} // impl Simdegen
1162
1163/// Transposed matrix.
1164#[non_exhaustive]
1165pub struct Transpose;
1166impl Transpose {
1167 /// No transpose is applied.
1168 pub const NO : i32 = 0;
1169 /// A transpose is applied.
1170 pub const YES : i32 = 1;
1171} // impl Transpose
1172
1173/// Triangular part of a symmetric matrix.
1174#[non_exhaustive]
1175pub struct Uplo;
1176impl Uplo {
1177 /// Lower part.
1178 pub const LO : i32 = 0;
1179 /// Upper part.
1180 pub const UP : i32 = 1;
1181} // impl Uplo
1182
1183/// Problem reformulation.
1184#[non_exhaustive]
1185pub struct Simreform;
1186impl Simreform {
1187 /// Disallow the simplex optimizer to reformulate the problem.
1188 pub const OFF : i32 = 0;
1189 /// Allow the simplex optimizer to reformulate the problem.
1190 pub const ON : i32 = 1;
1191 /// The simplex optimizer can choose freely.
1192 pub const FREE : i32 = 2;
1193 /// The simplex optimizer should use an aggressive reformulation strategy.
1194 pub const AGGRESSIVE : i32 = 3;
1195} // impl Simreform
1196
1197/// Exploit duplicate columns.
1198#[non_exhaustive]
1199pub struct Simdupvec;
1200impl Simdupvec {
1201 /// Disallow the simplex optimizer to exploit duplicated columns.
1202 pub const OFF : i32 = 0;
1203 /// Allow the simplex optimizer to exploit duplicated columns.
1204 pub const ON : i32 = 1;
1205 /// The simplex optimizer can choose freely.
1206 pub const FREE : i32 = 2;
1207} // impl Simdupvec
1208
1209/// Hot-start type employed by the simplex optimizer
1210#[non_exhaustive]
1211pub struct Simhotstart;
1212impl Simhotstart {
1213 /// The simplex optimizer performs a coldstart.
1214 pub const NONE : i32 = 0;
1215 /// The simplex optimize chooses the hot-start type.
1216 pub const FREE : i32 = 1;
1217 /// Only the status keys of the constraints and variables are used to choose the type of hot-start.
1218 pub const STATUS_KEYS : i32 = 2;
1219} // impl Simhotstart
1220
1221/// Hot-start type employed by the interior-point optimizers.
1222#[non_exhaustive]
1223pub struct Intpnthotstart;
1224impl Intpnthotstart {
1225 /// The interior-point optimizer performs a coldstart.
1226 pub const NONE : i32 = 0;
1227 /// The interior-point optimizer exploits the primal solution only.
1228 pub const PRIMAL : i32 = 1;
1229 /// The interior-point optimizer exploits the dual solution only.
1230 pub const DUAL : i32 = 2;
1231 /// The interior-point optimizer exploits both the primal and dual solution.
1232 pub const PRIMAL_DUAL : i32 = 3;
1233} // impl Intpnthotstart
1234
1235/// Progress callback codes
1236#[non_exhaustive]
1237pub struct Callbackcode;
1238impl Callbackcode {
1239 /// The basis identification procedure has been started.
1240 pub const BEGIN_BI : i32 = 0;
1241 /// The callback function is called when the conic optimizer is started.
1242 pub const BEGIN_CONIC : i32 = 1;
1243 /// The callback function is called from within the basis identification procedure when the dual phase is started.
1244 pub const BEGIN_DUAL_BI : i32 = 2;
1245 /// Dual sensitivity analysis is started.
1246 pub const BEGIN_DUAL_SENSITIVITY : i32 = 3;
1247 /// The callback function is called when the dual BI phase is started.
1248 pub const BEGIN_DUAL_SETUP_BI : i32 = 4;
1249 /// The callback function is called when the dual simplex optimizer started.
1250 pub const BEGIN_DUAL_SIMPLEX : i32 = 5;
1251 /// The callback function is called from within the basis identification procedure when the dual simplex clean-up phase is started.
1252 pub const BEGIN_DUAL_SIMPLEX_BI : i32 = 6;
1253 /// The calback function is called at the beginning of folding.
1254 pub const BEGIN_FOLDING : i32 = 7;
1255 /// TBD
1256 pub const BEGIN_FOLDING_BI : i32 = 8;
1257 /// TBD
1258 pub const BEGIN_FOLDING_BI_DUAL : i32 = 9;
1259 /// TBD
1260 pub const BEGIN_FOLDING_BI_INITIALIZE : i32 = 10;
1261 /// TBD
1262 pub const BEGIN_FOLDING_BI_OPTIMIZER : i32 = 11;
1263 /// TBD
1264 pub const BEGIN_FOLDING_BI_PRIMAL : i32 = 12;
1265 /// The callback function is called when the infeasibility analyzer is started.
1266 pub const BEGIN_INFEAS_ANA : i32 = 13;
1267 /// The callback function is called from within the basis identification procedure when the initialization phase is started.
1268 pub const BEGIN_INITIALIZE_BI : i32 = 14;
1269 /// The callback function is called when the interior-point optimizer is started.
1270 pub const BEGIN_INTPNT : i32 = 15;
1271 /// Begin waiting for license.
1272 pub const BEGIN_LICENSE_WAIT : i32 = 16;
1273 /// The callback function is called when the mixed-integer optimizer is started.
1274 pub const BEGIN_MIO : i32 = 17;
1275 /// TBD.
1276 pub const BEGIN_OPTIMIZE_BI : i32 = 18;
1277 /// The callback function is called when the optimizer is started.
1278 pub const BEGIN_OPTIMIZER : i32 = 19;
1279 /// The callback function is called when the presolve is started.
1280 pub const BEGIN_PRESOLVE : i32 = 20;
1281 /// The callback function is called from within the basis identification procedure when the primal phase is started.
1282 pub const BEGIN_PRIMAL_BI : i32 = 21;
1283 /// Begin primal feasibility repair.
1284 pub const BEGIN_PRIMAL_REPAIR : i32 = 22;
1285 /// Primal sensitivity analysis is started.
1286 pub const BEGIN_PRIMAL_SENSITIVITY : i32 = 23;
1287 /// The callback function is called when the primal BI setup is started.
1288 pub const BEGIN_PRIMAL_SETUP_BI : i32 = 24;
1289 /// The callback function is called when the primal simplex optimizer is started.
1290 pub const BEGIN_PRIMAL_SIMPLEX : i32 = 25;
1291 /// The callback function is called from within the basis identification procedure when the primal simplex clean-up phase is started.
1292 pub const BEGIN_PRIMAL_SIMPLEX_BI : i32 = 26;
1293 /// Begin QCQO reformulation.
1294 pub const BEGIN_QCQO_REFORMULATE : i32 = 27;
1295 /// MOSEK has started reading a problem file.
1296 pub const BEGIN_READ : i32 = 28;
1297 /// The callback function is called when root cut generation is started.
1298 pub const BEGIN_ROOT_CUTGEN : i32 = 29;
1299 /// The callback function is called when the simplex optimizer is started.
1300 pub const BEGIN_SIMPLEX : i32 = 30;
1301 /// The callback function is called when solution of root relaxation is started.
1302 pub const BEGIN_SOLVE_ROOT_RELAX : i32 = 31;
1303 /// Begin conic reformulation.
1304 pub const BEGIN_TO_CONIC : i32 = 32;
1305 /// MOSEK has started writing a problem file.
1306 pub const BEGIN_WRITE : i32 = 33;
1307 /// The callback function is called from within the conic optimizer after the information database has been updated.
1308 pub const CONIC : i32 = 34;
1309 /// The callback function is called when the dedicated algorithm for independent blocks inside the mixed-integer solver is started.
1310 pub const DECOMP_MIO : i32 = 35;
1311 /// The callback function is called from within the dual simplex optimizer.
1312 pub const DUAL_SIMPLEX : i32 = 36;
1313 /// The callback function is called when the basis identification procedure is terminated.
1314 pub const END_BI : i32 = 37;
1315 /// The callback function is called when the conic optimizer is terminated.
1316 pub const END_CONIC : i32 = 38;
1317 /// The callback function is called from within the basis identification procedure when the dual phase is terminated.
1318 pub const END_DUAL_BI : i32 = 39;
1319 /// Dual sensitivity analysis is terminated.
1320 pub const END_DUAL_SENSITIVITY : i32 = 40;
1321 /// The callback function is called when the dual BI phase is terminated.
1322 pub const END_DUAL_SETUP_BI : i32 = 41;
1323 /// The callback function is called when the dual simplex optimizer is terminated.
1324 pub const END_DUAL_SIMPLEX : i32 = 42;
1325 /// The callback function is called from within the basis identification procedure when the dual clean-up phase is terminated.
1326 pub const END_DUAL_SIMPLEX_BI : i32 = 43;
1327 /// The calback function is called at the end of folding.
1328 pub const END_FOLDING : i32 = 44;
1329 /// TBD
1330 pub const END_FOLDING_BI : i32 = 45;
1331 /// TBD
1332 pub const END_FOLDING_BI_DUAL : i32 = 46;
1333 /// TBD
1334 pub const END_FOLDING_BI_INITIALIZE : i32 = 47;
1335 /// TBD
1336 pub const END_FOLDING_BI_OPTIMIZER : i32 = 48;
1337 /// TBD
1338 pub const END_FOLDING_BI_PRIMAL : i32 = 49;
1339 /// The callback function is called when the infeasibility analyzer is terminated.
1340 pub const END_INFEAS_ANA : i32 = 50;
1341 /// The callback function is called from within the basis identification procedure when the initialization phase is terminated.
1342 pub const END_INITIALIZE_BI : i32 = 51;
1343 /// The callback function is called when the interior-point optimizer is terminated.
1344 pub const END_INTPNT : i32 = 52;
1345 /// End waiting for license.
1346 pub const END_LICENSE_WAIT : i32 = 53;
1347 /// The callback function is called when the mixed-integer optimizer is terminated.
1348 pub const END_MIO : i32 = 54;
1349 /// TBD.
1350 pub const END_OPTIMIZE_BI : i32 = 55;
1351 /// The callback function is called when the optimizer is terminated.
1352 pub const END_OPTIMIZER : i32 = 56;
1353 /// The callback function is called when the presolve is completed.
1354 pub const END_PRESOLVE : i32 = 57;
1355 /// The callback function is called from within the basis identification procedure when the primal phase is terminated.
1356 pub const END_PRIMAL_BI : i32 = 58;
1357 /// End primal feasibility repair.
1358 pub const END_PRIMAL_REPAIR : i32 = 59;
1359 /// Primal sensitivity analysis is terminated.
1360 pub const END_PRIMAL_SENSITIVITY : i32 = 60;
1361 /// The callback function is called when the primal BI setup is terminated.
1362 pub const END_PRIMAL_SETUP_BI : i32 = 61;
1363 /// The callback function is called when the primal simplex optimizer is terminated.
1364 pub const END_PRIMAL_SIMPLEX : i32 = 62;
1365 /// The callback function is called from within the basis identification procedure when the primal clean-up phase is terminated.
1366 pub const END_PRIMAL_SIMPLEX_BI : i32 = 63;
1367 /// End QCQO reformulation.
1368 pub const END_QCQO_REFORMULATE : i32 = 64;
1369 /// MOSEK has finished reading a problem file.
1370 pub const END_READ : i32 = 65;
1371 /// The callback function is called when root cut generation is terminated.
1372 pub const END_ROOT_CUTGEN : i32 = 66;
1373 /// The callback function is called when the simplex optimizer is terminated.
1374 pub const END_SIMPLEX : i32 = 67;
1375 /// The callback function is called from within the basis identification procedure when the simplex clean-up phase is terminated.
1376 pub const END_SIMPLEX_BI : i32 = 68;
1377 /// The callback function is called when solution of root relaxation is terminated.
1378 pub const END_SOLVE_ROOT_RELAX : i32 = 69;
1379 /// End conic reformulation.
1380 pub const END_TO_CONIC : i32 = 70;
1381 /// MOSEK has finished writing a problem file.
1382 pub const END_WRITE : i32 = 71;
1383 /// TBD
1384 pub const FOLDING_BI_DUAL : i32 = 72;
1385 /// TBD
1386 pub const FOLDING_BI_OPTIMIZER : i32 = 73;
1387 /// TBD
1388 pub const FOLDING_BI_PRIMAL : i32 = 74;
1389 /// A heartbeat callback.
1390 pub const HEARTBEAT : i32 = 75;
1391 /// The callback function is called at an intermediate stage of the dual sensitivity analysis.
1392 pub const IM_DUAL_SENSIVITY : i32 = 76;
1393 /// The callback function is called at an intermediate point in the dual simplex optimizer.
1394 pub const IM_DUAL_SIMPLEX : i32 = 77;
1395 /// MOSEK is waiting for a license.
1396 pub const IM_LICENSE_WAIT : i32 = 78;
1397 /// The callback function is called from within the LU factorization procedure at an intermediate point.
1398 pub const IM_LU : i32 = 79;
1399 /// The callback function is called at an intermediate point in the mixed-integer optimizer.
1400 pub const IM_MIO : i32 = 80;
1401 /// The callback function is called at an intermediate point in the mixed-integer optimizer while running the dual simplex optimizer.
1402 pub const IM_MIO_DUAL_SIMPLEX : i32 = 81;
1403 /// The callback function is called at an intermediate point in the mixed-integer optimizer while running the interior-point optimizer.
1404 pub const IM_MIO_INTPNT : i32 = 82;
1405 /// The callback function is called at an intermediate point in the mixed-integer optimizer while running the primal simplex optimizer.
1406 pub const IM_MIO_PRIMAL_SIMPLEX : i32 = 83;
1407 /// The callback function is called from within the matrix ordering procedure at an intermediate point.
1408 pub const IM_ORDER : i32 = 84;
1409 /// The callback function is called at an intermediate stage of the primal sensitivity analysis.
1410 pub const IM_PRIMAL_SENSIVITY : i32 = 85;
1411 /// The callback function is called at an intermediate point in the primal simplex optimizer.
1412 pub const IM_PRIMAL_SIMPLEX : i32 = 86;
1413 /// Intermediate stage in reading.
1414 pub const IM_READ : i32 = 87;
1415 /// The callback is called from within root cut generation at an intermediate stage.
1416 pub const IM_ROOT_CUTGEN : i32 = 88;
1417 /// The callback function is called from within the simplex optimizer at an intermediate point.
1418 pub const IM_SIMPLEX : i32 = 89;
1419 /// The callback function is called from within the interior-point optimizer after the information database has been updated.
1420 pub const INTPNT : i32 = 90;
1421 /// The callback function is called after a new integer solution has been located by the mixed-integer optimizer.
1422 pub const NEW_INT_MIO : i32 = 91;
1423 /// TBD.
1424 pub const OPTIMIZE_BI : i32 = 92;
1425 /// The callback function is called from within the primal simplex optimizer.
1426 pub const PRIMAL_SIMPLEX : i32 = 93;
1427 /// The callback function is called at an intermediate stage of the conic quadratic reformulation.
1428 pub const QO_REFORMULATE : i32 = 94;
1429 /// The callback function is called from the OPF reader.
1430 pub const READ_OPF : i32 = 95;
1431 /// A chunk of Q non-zeros has been read from a problem file.
1432 pub const READ_OPF_SECTION : i32 = 96;
1433 /// The callback function is called when the mixed-integer optimizer is restarted.
1434 pub const RESTART_MIO : i32 = 97;
1435 /// The callback function is called while the task is being solved on a remote server.
1436 pub const SOLVING_REMOTE : i32 = 98;
1437 /// The callback function is called from within the basis identification procedure at an intermediate point in the dual phase.
1438 pub const UPDATE_DUAL_BI : i32 = 99;
1439 /// The callback function is called in the dual simplex optimizer.
1440 pub const UPDATE_DUAL_SIMPLEX : i32 = 100;
1441 /// The callback function is called from within the basis identification procedure at an intermediate point in the dual simplex clean-up phase.
1442 pub const UPDATE_DUAL_SIMPLEX_BI : i32 = 101;
1443 /// The callback function is called from within the presolve procedure.
1444 pub const UPDATE_PRESOLVE : i32 = 102;
1445 /// The callback function is called from within the basis identification procedure at an intermediate point in the primal phase.
1446 pub const UPDATE_PRIMAL_BI : i32 = 103;
1447 /// The callback function is called in the primal simplex optimizer.
1448 pub const UPDATE_PRIMAL_SIMPLEX : i32 = 104;
1449 /// The callback function is called from within the basis identification procedure at an intermediate point in the primal simplex clean-up phase.
1450 pub const UPDATE_PRIMAL_SIMPLEX_BI : i32 = 105;
1451 /// The callback function is called from simplex optimizer.
1452 pub const UPDATE_SIMPLEX : i32 = 106;
1453 /// The callback function is called from the OPF writer.
1454 pub const WRITE_OPF : i32 = 107;
1455} // impl Callbackcode
1456
1457/// Compression types
1458#[non_exhaustive]
1459pub struct Compresstype;
1460impl Compresstype {
1461 /// No compression is used.
1462 pub const NONE : i32 = 0;
1463 /// The type of compression used is chosen automatically.
1464 pub const FREE : i32 = 1;
1465 /// The type of compression used is gzip compatible.
1466 pub const GZIP : i32 = 2;
1467 /// The type of compression used is zstd compatible.
1468 pub const ZSTD : i32 = 3;
1469} // impl Compresstype
1470
1471/// Cone types
1472#[non_exhaustive]
1473pub struct Conetype;
1474impl Conetype {
1475 /// The cone is a quadratic cone.
1476 pub const QUAD : i32 = 0;
1477 /// The cone is a rotated quadratic cone.
1478 pub const RQUAD : i32 = 1;
1479 /// A primal exponential cone.
1480 pub const PEXP : i32 = 2;
1481 /// A dual exponential cone.
1482 pub const DEXP : i32 = 3;
1483 /// A primal power cone.
1484 pub const PPOW : i32 = 4;
1485 /// A dual power cone.
1486 pub const DPOW : i32 = 5;
1487 /// The zero cone.
1488 pub const ZERO : i32 = 6;
1489} // impl Conetype
1490
1491/// Cone types
1492#[non_exhaustive]
1493pub struct Domaintype;
1494impl Domaintype {
1495 /// R.
1496 pub const R : i32 = 0;
1497 /// The zero vector.
1498 pub const RZERO : i32 = 1;
1499 /// The positive orthant.
1500 pub const RPLUS : i32 = 2;
1501 /// The negative orthant.
1502 pub const RMINUS : i32 = 3;
1503 /// The quadratic cone.
1504 pub const QUADRATIC_CONE : i32 = 4;
1505 /// The rotated quadratic cone.
1506 pub const RQUADRATIC_CONE : i32 = 5;
1507 /// The primal exponential cone.
1508 pub const PRIMAL_EXP_CONE : i32 = 6;
1509 /// The dual exponential cone.
1510 pub const DUAL_EXP_CONE : i32 = 7;
1511 /// The primal power cone.
1512 pub const PRIMAL_POWER_CONE : i32 = 8;
1513 /// The dual power cone.
1514 pub const DUAL_POWER_CONE : i32 = 9;
1515 /// The primal geometric mean cone.
1516 pub const PRIMAL_GEO_MEAN_CONE : i32 = 10;
1517 /// The dual geometric mean cone.
1518 pub const DUAL_GEO_MEAN_CONE : i32 = 11;
1519 /// The vectorized positive semidefinite cone.
1520 pub const SVEC_PSD_CONE : i32 = 12;
1521} // impl Domaintype
1522
1523/// Name types
1524#[non_exhaustive]
1525pub struct Nametype;
1526impl Nametype {
1527 /// General names. However, no duplicate and blank names are allowed.
1528 pub const GEN : i32 = 0;
1529 /// MPS type names.
1530 pub const MPS : i32 = 1;
1531 /// LP type names.
1532 pub const LP : i32 = 2;
1533} // impl Nametype
1534
1535/// Cone types
1536#[non_exhaustive]
1537pub struct Symmattype;
1538impl Symmattype {
1539 /// Sparse symmetric matrix.
1540 pub const SPARSE : i32 = 0;
1541} // impl Symmattype
1542
1543/// Data format types
1544#[non_exhaustive]
1545pub struct Dataformat;
1546impl Dataformat {
1547 /// The file extension is used to determine the data file format.
1548 pub const EXTENSION : i32 = 0;
1549 /// The data file is MPS formatted.
1550 pub const MPS : i32 = 1;
1551 /// The data file is LP formatted.
1552 pub const LP : i32 = 2;
1553 /// The data file is an optimization problem formatted file.
1554 pub const OP : i32 = 3;
1555 /// The data a free MPS formatted file.
1556 pub const FREE_MPS : i32 = 4;
1557 /// Generic task dump file.
1558 pub const TASK : i32 = 5;
1559 /// (P)retty (T)ext (F)format.
1560 pub const PTF : i32 = 6;
1561 /// Conic benchmark format,
1562 pub const CB : i32 = 7;
1563 /// JSON based task format.
1564 pub const JSON_TASK : i32 = 8;
1565} // impl Dataformat
1566
1567/// Data format types
1568#[non_exhaustive]
1569pub struct Solformat;
1570impl Solformat {
1571 /// The file extension is used to determine the data file format.
1572 pub const EXTENSION : i32 = 0;
1573 /// Simple binary format
1574 pub const B : i32 = 1;
1575 /// Tar based format.
1576 pub const TASK : i32 = 2;
1577 /// JSON based format.
1578 pub const JSON_TASK : i32 = 3;
1579} // impl Solformat
1580
1581/// Double information items
1582#[non_exhaustive]
1583pub struct Dinfitem;
1584impl Dinfitem {
1585 /// Density percentage of the scalarized constraint matrix.
1586 pub const ANA_PRO_SCALARIZED_CONSTRAINT_MATRIX_DENSITY : i32 = 0;
1587 /// Time spent within the clean-up phase of the basis identification procedure since its invocation (in seconds).
1588 pub const BI_CLEAN_TIME : i32 = 1;
1589 /// Time spent within the dual phase basis identification procedure since its invocation (in seconds).
1590 pub const BI_DUAL_TIME : i32 = 2;
1591 /// Time spent within the primal phase of the basis identification procedure since its invocation (in seconds).
1592 pub const BI_PRIMAL_TIME : i32 = 3;
1593 /// Time spent within the basis identification procedure since its invocation (in seconds).
1594 pub const BI_TIME : i32 = 4;
1595 /// TBD
1596 pub const FOLDING_BI_OPTIMIZE_TIME : i32 = 5;
1597 /// TBD
1598 pub const FOLDING_BI_UNFOLD_DUAL_TIME : i32 = 6;
1599 /// TBD
1600 pub const FOLDING_BI_UNFOLD_INITIALIZE_TIME : i32 = 7;
1601 /// TBD
1602 pub const FOLDING_BI_UNFOLD_PRIMAL_TIME : i32 = 8;
1603 /// TBD
1604 pub const FOLDING_BI_UNFOLD_TIME : i32 = 9;
1605 /// Problem size after folding as a fraction of the original size.
1606 pub const FOLDING_FACTOR : i32 = 10;
1607 /// Total time spent in folding for continuous problems (in seconds).
1608 pub const FOLDING_TIME : i32 = 11;
1609 /// Dual feasibility measure reported by the interior-point optimizer.
1610 pub const INTPNT_DUAL_FEAS : i32 = 12;
1611 /// Dual objective value reported by the interior-point optimizer.
1612 pub const INTPNT_DUAL_OBJ : i32 = 13;
1613 /// An estimate of the number of flops used in the factorization.
1614 pub const INTPNT_FACTOR_NUM_FLOPS : i32 = 14;
1615 /// A measure of optimality of the solution.
1616 pub const INTPNT_OPT_STATUS : i32 = 15;
1617 /// Order time (in seconds).
1618 pub const INTPNT_ORDER_TIME : i32 = 16;
1619 /// Primal feasibility measure reported by the interior-point optimizer.
1620 pub const INTPNT_PRIMAL_FEAS : i32 = 17;
1621 /// Primal objective value reported by the interior-point optimizer.
1622 pub const INTPNT_PRIMAL_OBJ : i32 = 18;
1623 /// Time spent within the interior-point optimizer since its invocation (in seconds).
1624 pub const INTPNT_TIME : i32 = 19;
1625 /// Selection time for clique cuts (in seconds).
1626 pub const MIO_CLIQUE_SELECTION_TIME : i32 = 20;
1627 /// Separation time for clique cuts (in seconds).
1628 pub const MIO_CLIQUE_SEPARATION_TIME : i32 = 21;
1629 /// Selection time for CMIR cuts (in seconds).
1630 pub const MIO_CMIR_SELECTION_TIME : i32 = 22;
1631 /// Separation time for CMIR cuts (in seconds).
1632 pub const MIO_CMIR_SEPARATION_TIME : i32 = 23;
1633 /// Optimal objective value corresponding to the feasible solution.
1634 pub const MIO_CONSTRUCT_SOLUTION_OBJ : i32 = 24;
1635 /// Value of the dual bound after presolve but before cut generation.
1636 pub const MIO_DUAL_BOUND_AFTER_PRESOLVE : i32 = 25;
1637 /// Selection time for GMI cuts (in seconds).
1638 pub const MIO_GMI_SELECTION_TIME : i32 = 26;
1639 /// Separation time for GMI cuts (in seconds).
1640 pub const MIO_GMI_SEPARATION_TIME : i32 = 27;
1641 /// Selection time for implied bound cuts (in seconds).
1642 pub const MIO_IMPLIED_BOUND_SELECTION_TIME : i32 = 28;
1643 /// Separation time for implied bound cuts (in seconds).
1644 pub const MIO_IMPLIED_BOUND_SEPARATION_TIME : i32 = 29;
1645 /// Optimal objective value corresponding to the user provided initial solution.
1646 pub const MIO_INITIAL_FEASIBLE_SOLUTION_OBJ : i32 = 30;
1647 /// Selection time for knapsack cover (in seconds).
1648 pub const MIO_KNAPSACK_COVER_SELECTION_TIME : i32 = 31;
1649 /// Separation time for knapsack cover (in seconds).
1650 pub const MIO_KNAPSACK_COVER_SEPARATION_TIME : i32 = 32;
1651 /// Selection time for lift-and-project cuts (in seconds).
1652 pub const MIO_LIPRO_SELECTION_TIME : i32 = 33;
1653 /// Separation time for lift-and-project cuts (in seconds).
1654 pub const MIO_LIPRO_SEPARATION_TIME : i32 = 34;
1655 /// If the mixed-integer optimizer has computed a feasible solution and a bound, this contains the absolute gap.
1656 pub const MIO_OBJ_ABS_GAP : i32 = 35;
1657 /// The best bound on the objective value known.
1658 pub const MIO_OBJ_BOUND : i32 = 36;
1659 /// The primal objective value corresponding to the best integer feasible solution.
1660 pub const MIO_OBJ_INT : i32 = 37;
1661 /// If the mixed-integer optimizer has computed a feasible solution and a bound, this contains the relative gap.
1662 pub const MIO_OBJ_REL_GAP : i32 = 38;
1663 /// Total time for probing (in seconds).
1664 pub const MIO_PROBING_TIME : i32 = 39;
1665 /// Total time for cut selection (in seconds).
1666 pub const MIO_ROOT_CUT_SELECTION_TIME : i32 = 40;
1667 /// Total time for cut separation (in seconds).
1668 pub const MIO_ROOT_CUT_SEPARATION_TIME : i32 = 41;
1669 /// Time spent in the contiuous optimizer while processing the root node relaxation (in seconds).
1670 pub const MIO_ROOT_OPTIMIZER_TIME : i32 = 42;
1671 /// Time spent presolving the problem at the root node (in seconds).
1672 pub const MIO_ROOT_PRESOLVE_TIME : i32 = 43;
1673 /// Time spent processing the root node (in seconds).
1674 pub const MIO_ROOT_TIME : i32 = 44;
1675 /// Total time for symmetry detection (in seconds).
1676 pub const MIO_SYMMETRY_DETECTION_TIME : i32 = 45;
1677 /// Degree to which the problem is affected by detected symmetry.
1678 pub const MIO_SYMMETRY_FACTOR : i32 = 46;
1679 /// Time spent in the mixed-integer optimizer (in seconds).
1680 pub const MIO_TIME : i32 = 47;
1681 /// If the objective cut is used, then this information item has the value of the cut.
1682 pub const MIO_USER_OBJ_CUT : i32 = 48;
1683 /// Total number of ticks spent in the optimizer since it was invoked. It is strictly negative if it is not available.
1684 pub const OPTIMIZER_TICKS : i32 = 49;
1685 /// Total time spent in the optimizer since it was invoked (in seconds).
1686 pub const OPTIMIZER_TIME : i32 = 50;
1687 /// Total time spent in the eliminator since the presolve was invoked (in seconds).
1688 pub const PRESOLVE_ELI_TIME : i32 = 51;
1689 /// Total time spent in the linear dependency checker since the presolve was invoked (in seconds).
1690 pub const PRESOLVE_LINDEP_TIME : i32 = 52;
1691 /// Total time spent in the presolve since it was invoked (in seconds).
1692 pub const PRESOLVE_TIME : i32 = 53;
1693 /// Total perturbation of the bounds of the primal problem.
1694 pub const PRESOLVE_TOTAL_PRIMAL_PERTURBATION : i32 = 54;
1695 /// The optimal objective value of the penalty function.
1696 pub const PRIMAL_REPAIR_PENALTY_OBJ : i32 = 55;
1697 /// Maximum absolute diagonal perturbation occurring during the QCQO reformulation.
1698 pub const QCQO_REFORMULATE_MAX_PERTURBATION : i32 = 56;
1699 /// Time spent with conic quadratic reformulation (in seconds).
1700 pub const QCQO_REFORMULATE_TIME : i32 = 57;
1701 /// Worst Cholesky column scaling.
1702 pub const QCQO_REFORMULATE_WORST_CHOLESKY_COLUMN_SCALING : i32 = 58;
1703 /// Worst Cholesky diagonal scaling.
1704 pub const QCQO_REFORMULATE_WORST_CHOLESKY_DIAG_SCALING : i32 = 59;
1705 /// Time spent reading the data file (in seconds).
1706 pub const READ_DATA_TIME : i32 = 60;
1707 /// The total real time in seconds spent when optimizing on a server by the process performing the optimization on the server (in seconds).
1708 pub const REMOTE_TIME : i32 = 61;
1709 /// Time spent in the dual simplex optimizer since invoking it (in seconds).
1710 pub const SIM_DUAL_TIME : i32 = 62;
1711 /// Feasibility measure reported by the simplex optimizer.
1712 pub const SIM_FEAS : i32 = 63;
1713 /// Objective value reported by the simplex optimizer.
1714 pub const SIM_OBJ : i32 = 64;
1715 /// Time spent in the primal simplex optimizer since invoking it (in seconds).
1716 pub const SIM_PRIMAL_TIME : i32 = 65;
1717 /// Time spent in the simplex optimizer since invoking it (in seconds).
1718 pub const SIM_TIME : i32 = 66;
1719 /// Dual objective value of the basic solution. Updated by the function updatesolutioninfo.
1720 pub const SOL_BAS_DUAL_OBJ : i32 = 67;
1721 /// Maximal dual bound violation for xx in the basic solution. Updated by the function updatesolutioninfo.
1722 pub const SOL_BAS_DVIOLCON : i32 = 68;
1723 /// Maximal dual bound violation for xx in the basic solution. Updated by the function updatesolutioninfo.
1724 pub const SOL_BAS_DVIOLVAR : i32 = 69;
1725 /// Infinity norm of barx in the basic solution.
1726 pub const SOL_BAS_NRM_BARX : i32 = 70;
1727 /// Infinity norm of slc in the basic solution.
1728 pub const SOL_BAS_NRM_SLC : i32 = 71;
1729 /// Infinity norm of slx in the basic solution.
1730 pub const SOL_BAS_NRM_SLX : i32 = 72;
1731 /// Infinity norm of suc in the basic solution.
1732 pub const SOL_BAS_NRM_SUC : i32 = 73;
1733 /// Infinity norm of sux in the basic solution.
1734 pub const SOL_BAS_NRM_SUX : i32 = 74;
1735 /// Infinity norm of xc in the basic solution.
1736 pub const SOL_BAS_NRM_XC : i32 = 75;
1737 /// Infinity norm of xx in the basic solution.
1738 pub const SOL_BAS_NRM_XX : i32 = 76;
1739 /// Infinity norm of Y in the basic solution.
1740 pub const SOL_BAS_NRM_Y : i32 = 77;
1741 /// Primal objective value of the basic solution. Updated by the function updatesolutioninfo.
1742 pub const SOL_BAS_PRIMAL_OBJ : i32 = 78;
1743 /// Maximal primal bound violation for xc in the basic solution. Updated by the function updatesolutioninfo.
1744 pub const SOL_BAS_PVIOLCON : i32 = 79;
1745 /// Maximal primal bound violation for xx in the basic solution. Updated by the function updatesolutioninfo.
1746 pub const SOL_BAS_PVIOLVAR : i32 = 80;
1747 /// Infinity norm of barx in the integer solution.
1748 pub const SOL_ITG_NRM_BARX : i32 = 81;
1749 /// Infinity norm of xc in the integer solution.
1750 pub const SOL_ITG_NRM_XC : i32 = 82;
1751 /// Infinity norm of xx in the integer solution.
1752 pub const SOL_ITG_NRM_XX : i32 = 83;
1753 /// Primal objective value of the integer solution. Updated by the function updatesolutioninfo.
1754 pub const SOL_ITG_PRIMAL_OBJ : i32 = 84;
1755 /// Maximal primal violation for affine conic constraints in the integer solution. Updated by the function updatesolutioninfo.
1756 pub const SOL_ITG_PVIOLACC : i32 = 85;
1757 /// Maximal primal bound violation for barx in the integer solution. Updated by the function updatesolutioninfo.
1758 pub const SOL_ITG_PVIOLBARVAR : i32 = 86;
1759 /// Maximal primal bound violation for xc in the integer solution. Updated by the function updatesolutioninfo.
1760 pub const SOL_ITG_PVIOLCON : i32 = 87;
1761 /// Maximal primal violation for primal conic constraints in the integer solution. Updated by the function updatesolutioninfo.
1762 pub const SOL_ITG_PVIOLCONES : i32 = 88;
1763 /// Maximal primal violation for disjunctive constraints in the integer solution. Updated by the function updatesolutioninfo.
1764 pub const SOL_ITG_PVIOLDJC : i32 = 89;
1765 /// Maximal violation for the integer constraints in the integer solution. Updated by the function updatesolutioninfo.
1766 pub const SOL_ITG_PVIOLITG : i32 = 90;
1767 /// Maximal primal bound violation for xx in the integer solution. Updated by the function updatesolutioninfo.
1768 pub const SOL_ITG_PVIOLVAR : i32 = 91;
1769 /// Dual objective value of the interior-point solution. Updated by the function updatesolutioninfo.
1770 pub const SOL_ITR_DUAL_OBJ : i32 = 92;
1771 /// Maximal dual violation for affine conic constraints in the interior-point solution. Updated by the function updatesolutioninfo.
1772 pub const SOL_ITR_DVIOLACC : i32 = 93;
1773 /// Maximal dual bound violation for barx in the interior-point solution. Updated by the function updatesolutioninfo.
1774 pub const SOL_ITR_DVIOLBARVAR : i32 = 94;
1775 /// Maximal dual bound violation for xc in the interior-point solution. Updated by the function updatesolutioninfo.
1776 pub const SOL_ITR_DVIOLCON : i32 = 95;
1777 /// Maximal dual violation for conic constraints in the interior-point solution. Updated by the function updatesolutioninfo.
1778 pub const SOL_ITR_DVIOLCONES : i32 = 96;
1779 /// Maximal dual bound violation for xx in the interior-point solution. Updated by the function updatesolutioninfo.
1780 pub const SOL_ITR_DVIOLVAR : i32 = 97;
1781 /// Infinity norm of bars in the interior-point solution.
1782 pub const SOL_ITR_NRM_BARS : i32 = 98;
1783 /// Infinity norm of barx in the interior-point solution.
1784 pub const SOL_ITR_NRM_BARX : i32 = 99;
1785 /// Infinity norm of slc in the interior-point solution.
1786 pub const SOL_ITR_NRM_SLC : i32 = 100;
1787 /// Infinity norm of slx in the interior-point solution.
1788 pub const SOL_ITR_NRM_SLX : i32 = 101;
1789 /// Infinity norm of snx in the interior-point solution.
1790 pub const SOL_ITR_NRM_SNX : i32 = 102;
1791 /// Infinity norm of suc in the interior-point solution.
1792 pub const SOL_ITR_NRM_SUC : i32 = 103;
1793 /// Infinity norm of sux in the interior-point solution.
1794 pub const SOL_ITR_NRM_SUX : i32 = 104;
1795 /// Infinity norm of xc in the interior-point solution.
1796 pub const SOL_ITR_NRM_XC : i32 = 105;
1797 /// Infinity norm of xx in the interior-point solution.
1798 pub const SOL_ITR_NRM_XX : i32 = 106;
1799 /// Infinity norm of Y in the interior-point solution.
1800 pub const SOL_ITR_NRM_Y : i32 = 107;
1801 /// Primal objective value of the interior-point solution.
1802 pub const SOL_ITR_PRIMAL_OBJ : i32 = 108;
1803 /// Maximal primal violation for affine conic constraints in the interior-point solution. Updated by the function updatesolutioninfo.
1804 pub const SOL_ITR_PVIOLACC : i32 = 109;
1805 /// Maximal primal bound violation for barx in the interior-point solution. Updated by the function updatesolutioninfo.
1806 pub const SOL_ITR_PVIOLBARVAR : i32 = 110;
1807 /// Maximal primal bound violation for xc in the interior-point solution. Updated by the function updatesolutioninfo.
1808 pub const SOL_ITR_PVIOLCON : i32 = 111;
1809 /// Maximal primal violation for conic constraints in the interior-point solution. Updated by the function updatesolutioninfo.
1810 pub const SOL_ITR_PVIOLCONES : i32 = 112;
1811 /// Maximal primal bound violation for xx in the interior-point solution. Updated by the function updatesolutioninfo.
1812 pub const SOL_ITR_PVIOLVAR : i32 = 113;
1813 /// Time spent in the last to conic reformulation (in seconds).
1814 pub const TO_CONIC_TIME : i32 = 114;
1815 /// Time spent writing the data file (in seconds).
1816 pub const WRITE_DATA_TIME : i32 = 115;
1817 pub const END : i32 = 115;
1818} // impl Dinfitem
1819
1820/// License feature
1821#[non_exhaustive]
1822pub struct Feature;
1823impl Feature {
1824 /// Base system.
1825 pub const PTS : i32 = 0;
1826 /// Conic extension.
1827 pub const PTON : i32 = 1;
1828} // impl Feature
1829
1830/// Double parameters
1831#[non_exhaustive]
1832pub struct Dparam;
1833impl Dparam {
1834 /// If a constraint violates its bound with an amount larger than this value, the constraint name, index and violation will be printed by the solution analyzer.
1835 pub const ANA_SOL_INFEAS_TOL : i32 = 0;
1836 /// Maximum relative dual bound violation allowed in an optimal basic solution.
1837 pub const BASIS_REL_TOL_S : i32 = 1;
1838 /// Maximum absolute dual bound violation in an optimal basic solution.
1839 pub const BASIS_TOL_S : i32 = 2;
1840 /// Maximum absolute primal bound violation allowed in an optimal basic solution.
1841 pub const BASIS_TOL_X : i32 = 3;
1842 /// Zero tolerance threshold for symmetric matrices.
1843 pub const DATA_SYM_MAT_TOL : i32 = 4;
1844 /// Data tolerance threshold.
1845 pub const DATA_SYM_MAT_TOL_HUGE : i32 = 5;
1846 /// Data tolerance threshold.
1847 pub const DATA_SYM_MAT_TOL_LARGE : i32 = 6;
1848 /// Data tolerance threshold.
1849 pub const DATA_TOL_AIJ_HUGE : i32 = 7;
1850 /// Data tolerance threshold.
1851 pub const DATA_TOL_AIJ_LARGE : i32 = 8;
1852 /// Data tolerance threshold.
1853 pub const DATA_TOL_BOUND_INF : i32 = 9;
1854 /// Data tolerance threshold.
1855 pub const DATA_TOL_BOUND_WRN : i32 = 10;
1856 /// Data tolerance threshold.
1857 pub const DATA_TOL_C_HUGE : i32 = 11;
1858 /// Data tolerance threshold.
1859 pub const DATA_TOL_CJ_LARGE : i32 = 12;
1860 /// Data tolerance threshold.
1861 pub const DATA_TOL_QIJ : i32 = 13;
1862 /// Data tolerance threshold.
1863 pub const DATA_TOL_X : i32 = 14;
1864 /// Tolerance for coefficient equality during folding.
1865 pub const FOLDING_TOL_EQ : i32 = 15;
1866 /// Dual feasibility tolerance used by the interior-point optimizer for conic problems.
1867 pub const INTPNT_CO_TOL_DFEAS : i32 = 16;
1868 /// Infeasibility tolerance used by the interior-point optimizer for conic problems.
1869 pub const INTPNT_CO_TOL_INFEAS : i32 = 17;
1870 /// Relative complementarity gap tolerance used by the interior-point optimizer for conic problems.
1871 pub const INTPNT_CO_TOL_MU_RED : i32 = 18;
1872 /// Optimality tolerance used by the interior-point optimizer for conic problems.
1873 pub const INTPNT_CO_TOL_NEAR_REL : i32 = 19;
1874 /// Primal feasibility tolerance used by the interior-point optimizer for conic problems.
1875 pub const INTPNT_CO_TOL_PFEAS : i32 = 20;
1876 /// Relative gap termination tolerance used by the interior-point optimizer for conic problems.
1877 pub const INTPNT_CO_TOL_REL_GAP : i32 = 21;
1878 /// Dual feasibility tolerance used by the interior-point optimizer for quadratic problems.
1879 pub const INTPNT_QO_TOL_DFEAS : i32 = 22;
1880 /// Infeasibility tolerance used by the interior-point optimizer for quadratic problems.
1881 pub const INTPNT_QO_TOL_INFEAS : i32 = 23;
1882 /// Relative complementarity gap tolerance used by the interior-point optimizer for quadratic problems.
1883 pub const INTPNT_QO_TOL_MU_RED : i32 = 24;
1884 /// Optimality tolerance used by the interior-point optimizer for quadratic problems.
1885 pub const INTPNT_QO_TOL_NEAR_REL : i32 = 25;
1886 /// Primal feasibility tolerance used by the interior-point optimizer for quadratic problems.
1887 pub const INTPNT_QO_TOL_PFEAS : i32 = 26;
1888 /// Relative gap termination tolerance used by the interior-point optimizer for quadratic problems.
1889 pub const INTPNT_QO_TOL_REL_GAP : i32 = 27;
1890 /// Dual feasibility tolerance used by the interior-point optimizer for linear problems.
1891 pub const INTPNT_TOL_DFEAS : i32 = 28;
1892 /// Controls the interior-point dual starting point.
1893 pub const INTPNT_TOL_DSAFE : i32 = 29;
1894 /// Infeasibility tolerance used by the interior-point optimizer for linear problems.
1895 pub const INTPNT_TOL_INFEAS : i32 = 30;
1896 /// Relative complementarity gap tolerance used by the interior-point optimizer for linear problems.
1897 pub const INTPNT_TOL_MU_RED : i32 = 31;
1898 /// Interior-point centering aggressiveness.
1899 pub const INTPNT_TOL_PATH : i32 = 32;
1900 /// Primal feasibility tolerance used by the interior-point optimizer for linear problems.
1901 pub const INTPNT_TOL_PFEAS : i32 = 33;
1902 /// Controls the interior-point primal starting point.
1903 pub const INTPNT_TOL_PSAFE : i32 = 34;
1904 /// Relative gap termination tolerance used by the interior-point optimizer for linear problems.
1905 pub const INTPNT_TOL_REL_GAP : i32 = 35;
1906 /// Relative step size to the boundary for linear and quadratic optimization problems.
1907 pub const INTPNT_TOL_REL_STEP : i32 = 36;
1908 /// Minimal step size tolerance for the interior-point optimizer.
1909 pub const INTPNT_TOL_STEP_SIZE : i32 = 37;
1910 /// Objective bound.
1911 pub const LOWER_OBJ_CUT : i32 = 38;
1912 /// Objective bound.
1913 pub const LOWER_OBJ_CUT_FINITE_TRH : i32 = 39;
1914 /// Controlls the maximum size of the clique table as a factor of the number of nonzeros in the A matrix.
1915 pub const MIO_CLIQUE_TABLE_SIZE_FACTOR : i32 = 40;
1916 /// Maximum allowed big-M value when reformulating disjunctive constraints to linear constraints.
1917 pub const MIO_DJC_MAX_BIGM : i32 = 41;
1918 /// Time limit for the mixed-integer optimizer.
1919 pub const MIO_MAX_TIME : i32 = 42;
1920 /// This value is used to compute the relative gap for the solution to a mixed-integer optimization problem.
1921 pub const MIO_REL_GAP_CONST : i32 = 43;
1922 /// Absolute optimality tolerance employed by the mixed-integer optimizer.
1923 pub const MIO_TOL_ABS_GAP : i32 = 44;
1924 /// Integer feasibility tolerance.
1925 pub const MIO_TOL_ABS_RELAX_INT : i32 = 45;
1926 /// Feasibility tolerance for mixed integer solver.
1927 pub const MIO_TOL_FEAS : i32 = 46;
1928 /// Controls cut generation for mixed-integer optimizer.
1929 pub const MIO_TOL_REL_DUAL_BOUND_IMPROVEMENT : i32 = 47;
1930 /// Relative optimality tolerance employed by the mixed-integer optimizer.
1931 pub const MIO_TOL_REL_GAP : i32 = 48;
1932 /// Solver ticks limit.
1933 pub const OPTIMIZER_MAX_TICKS : i32 = 49;
1934 /// Solver time limit.
1935 pub const OPTIMIZER_MAX_TIME : i32 = 50;
1936 /// Absolute tolerance employed by the linear dependency checker.
1937 pub const PRESOLVE_TOL_ABS_LINDEP : i32 = 51;
1938 /// The presolve is allowed to perturb a bound on a constraint or variable by this amount if it removes an infeasibility.
1939 pub const PRESOLVE_TOL_PRIMAL_INFEAS_PERTURBATION : i32 = 52;
1940 /// Relative tolerance employed by the linear dependency checker.
1941 pub const PRESOLVE_TOL_REL_LINDEP : i32 = 53;
1942 /// Absolute zero tolerance employed for slack variables in the presolve.
1943 pub const PRESOLVE_TOL_S : i32 = 54;
1944 /// Absolute zero tolerance employed for variables in the presolve.
1945 pub const PRESOLVE_TOL_X : i32 = 55;
1946 /// This parameter determines when columns are dropped in incomplete Cholesky factorization during reformulation of quadratic problems.
1947 pub const QCQO_REFORMULATE_REL_DROP_TOL : i32 = 56;
1948 /// Tolerance to define a matrix to be positive semidefinite.
1949 pub const SEMIDEFINITE_TOL_APPROX : i32 = 57;
1950 /// Relative pivot tolerance employed when computing the LU factorization of the basis matrix.
1951 pub const SIM_LU_TOL_REL_PIV : i32 = 58;
1952 /// Experimental. Usage not recommended.
1953 pub const SIM_PRECISION_SCALING_EXTENDED : i32 = 59;
1954 /// Experimental. Usage not recommended.
1955 pub const SIM_PRECISION_SCALING_NORMAL : i32 = 60;
1956 /// Absolute pivot tolerance employed by the simplex optimizers.
1957 pub const SIMPLEX_ABS_TOL_PIV : i32 = 61;
1958 /// Objective bound.
1959 pub const UPPER_OBJ_CUT : i32 = 62;
1960 /// Objective bound.
1961 pub const UPPER_OBJ_CUT_FINITE_TRH : i32 = 63;
1962} // impl Dparam
1963
1964/// Long integer information items.
1965#[non_exhaustive]
1966pub struct Liinfitem;
1967impl Liinfitem {
1968 /// Number of columns in the scalarized constraint matrix.
1969 pub const ANA_PRO_SCALARIZED_CONSTRAINT_MATRIX_NUM_COLUMNS : i32 = 0;
1970 /// Number of non-zero entries in the scalarized constraint matrix.
1971 pub const ANA_PRO_SCALARIZED_CONSTRAINT_MATRIX_NUM_NZ : i32 = 1;
1972 /// Number of rows in the scalarized constraint matrix.
1973 pub const ANA_PRO_SCALARIZED_CONSTRAINT_MATRIX_NUM_ROWS : i32 = 2;
1974 /// Number of clean iterations performed in the basis identification.
1975 pub const BI_CLEAN_ITER : i32 = 3;
1976 /// Number of dual pivots performed in the basis identification.
1977 pub const BI_DUAL_ITER : i32 = 4;
1978 /// Number of primal pivots performed in the basis identification.
1979 pub const BI_PRIMAL_ITER : i32 = 5;
1980 /// TBD
1981 pub const FOLDING_BI_DUAL_ITER : i32 = 6;
1982 /// TBD
1983 pub const FOLDING_BI_OPTIMIZER_ITER : i32 = 7;
1984 /// TBD
1985 pub const FOLDING_BI_PRIMAL_ITER : i32 = 8;
1986 /// Number of non-zeros in factorization.
1987 pub const INTPNT_FACTOR_NUM_NZ : i32 = 9;
1988 /// Number of non-zero entries in the constraint matrix of the problem to be solved by the mixed-integer optimizer.
1989 pub const MIO_ANZ : i32 = 10;
1990 /// Number of non-zero entries in the constraint matrix of the mixed-integer optimizer's final problem.
1991 pub const MIO_FINAL_ANZ : i32 = 11;
1992 /// Number of interior-point iterations performed by the mixed-integer optimizer.
1993 pub const MIO_INTPNT_ITER : i32 = 12;
1994 /// Number of dual illposed certificates encountered by the mixed-integer optimizer.
1995 pub const MIO_NUM_DUAL_ILLPOSED_CER : i32 = 13;
1996 /// Number of primal illposed certificates encountered by the mixed-integer optimizer.
1997 pub const MIO_NUM_PRIM_ILLPOSED_CER : i32 = 14;
1998 /// Number of non-zero entries in the constraint matrix of the problem after the mixed-integer optimizer's presolve.
1999 pub const MIO_PRESOLVED_ANZ : i32 = 15;
2000 /// Number of simplex iterations performed by the mixed-integer optimizer.
2001 pub const MIO_SIMPLEX_ITER : i32 = 16;
2002 /// Number of affince conic constraints.
2003 pub const RD_NUMACC : i32 = 17;
2004 /// Number of non-zeros in A that is read.
2005 pub const RD_NUMANZ : i32 = 18;
2006 /// Number of disjuncive constraints.
2007 pub const RD_NUMDJC : i32 = 19;
2008 /// Number of Q non-zeros.
2009 pub const RD_NUMQNZ : i32 = 20;
2010 /// Number of iterations performed by the simplex optimizer.
2011 pub const SIMPLEX_ITER : i32 = 21;
2012 pub const END : i32 = 21;
2013} // impl Liinfitem
2014
2015/// Integer information items.
2016#[non_exhaustive]
2017pub struct Iinfitem;
2018impl Iinfitem {
2019 /// Number of constraints in the problem.
2020 pub const ANA_PRO_NUM_CON : i32 = 0;
2021 /// Number of equality constraints.
2022 pub const ANA_PRO_NUM_CON_EQ : i32 = 1;
2023 /// Number of unbounded constraints.
2024 pub const ANA_PRO_NUM_CON_FR : i32 = 2;
2025 /// Number of constraints with a lower bound and an infinite upper bound.
2026 pub const ANA_PRO_NUM_CON_LO : i32 = 3;
2027 /// Number of constraints with finite lower and upper bounds.
2028 pub const ANA_PRO_NUM_CON_RA : i32 = 4;
2029 /// Number of constraints with an upper bound and an infinite lower bound.
2030 pub const ANA_PRO_NUM_CON_UP : i32 = 5;
2031 /// Number of variables in the problem.
2032 pub const ANA_PRO_NUM_VAR : i32 = 6;
2033 /// Number of binary variables.
2034 pub const ANA_PRO_NUM_VAR_BIN : i32 = 7;
2035 /// Number of continuous variables.
2036 pub const ANA_PRO_NUM_VAR_CONT : i32 = 8;
2037 /// Number of fixed variables.
2038 pub const ANA_PRO_NUM_VAR_EQ : i32 = 9;
2039 /// Number of unbounded constraints.
2040 pub const ANA_PRO_NUM_VAR_FR : i32 = 10;
2041 /// Number of general integer variables.
2042 pub const ANA_PRO_NUM_VAR_INT : i32 = 11;
2043 /// Number of variables with a lower bound and an infinite upper bound.
2044 pub const ANA_PRO_NUM_VAR_LO : i32 = 12;
2045 /// Number of variables with finite lower and upper bounds.
2046 pub const ANA_PRO_NUM_VAR_RA : i32 = 13;
2047 /// Number of variables with an upper bound and an infinite lower bound.
2048 pub const ANA_PRO_NUM_VAR_UP : i32 = 14;
2049 /// Non-zero if folding was exploited.
2050 pub const FOLDING_APPLIED : i32 = 15;
2051 /// Dimension of the dense sub system in factorization.
2052 pub const INTPNT_FACTOR_DIM_DENSE : i32 = 16;
2053 /// Number of interior-point iterations since invoking the interior-point optimizer.
2054 pub const INTPNT_ITER : i32 = 17;
2055 /// Number of threads that the interior-point optimizer is using.
2056 pub const INTPNT_NUM_THREADS : i32 = 18;
2057 /// Non-zero if the interior-point optimizer is solving the dual problem.
2058 pub const INTPNT_SOLVE_DUAL : i32 = 19;
2059 /// Non-zero if absolute gap is within tolerances.
2060 pub const MIO_ABSGAP_SATISFIED : i32 = 20;
2061 /// Size of the clique table.
2062 pub const MIO_CLIQUE_TABLE_SIZE : i32 = 21;
2063 /// Informs if MOSEK successfully constructed an initial integer feasible solution.
2064 pub const MIO_CONSTRUCT_SOLUTION : i32 = 22;
2065 /// Number of binary variables in the mixed-integer optimizer's final problem.
2066 pub const MIO_FINAL_NUMBIN : i32 = 23;
2067 /// Number of binary cone variables in the mixed-integer optimizer's final problem.
2068 pub const MIO_FINAL_NUMBINCONEVAR : i32 = 24;
2069 /// Number of constraints in the mixed-integer optimizer's final problem.
2070 pub const MIO_FINAL_NUMCON : i32 = 25;
2071 /// Number of cones in the mixed-integer optimizer's final problem.
2072 pub const MIO_FINAL_NUMCONE : i32 = 26;
2073 /// Number of cone variables in the mixed-integer optimizer's final problem.
2074 pub const MIO_FINAL_NUMCONEVAR : i32 = 27;
2075 /// Number of continuous variables in the mixed-integer optimizer's final problem.
2076 pub const MIO_FINAL_NUMCONT : i32 = 28;
2077 /// Number of continuous cone variables in the mixed-integer optimizer's final problem.
2078 pub const MIO_FINAL_NUMCONTCONEVAR : i32 = 29;
2079 /// Number of dual exponential cones in the mixed-integer optimizer's final problem.
2080 pub const MIO_FINAL_NUMDEXPCONES : i32 = 30;
2081 /// Number of disjunctive constraints in the mixed-integer optimizer's final problem.
2082 pub const MIO_FINAL_NUMDJC : i32 = 31;
2083 /// Number of dual power cones in the mixed-integer optimizer's final problem.
2084 pub const MIO_FINAL_NUMDPOWCONES : i32 = 32;
2085 /// Number of integer variables in the mixed-integer optimizer's final problem.
2086 pub const MIO_FINAL_NUMINT : i32 = 33;
2087 /// Number of integer cone variables in the mixed-integer optimizer's final problem.
2088 pub const MIO_FINAL_NUMINTCONEVAR : i32 = 34;
2089 /// Number of primal exponential cones in the mixed-integer optimizer's final problem.
2090 pub const MIO_FINAL_NUMPEXPCONES : i32 = 35;
2091 /// Number of primal power cones in the mixed-integer optimizer's final problem.
2092 pub const MIO_FINAL_NUMPPOWCONES : i32 = 36;
2093 /// Number of quadratic cones in the mixed-integer optimizer's final problem.
2094 pub const MIO_FINAL_NUMQCONES : i32 = 37;
2095 /// Number of rotated quadratic cones in the mixed-integer optimizer's final problem.
2096 pub const MIO_FINAL_NUMRQCONES : i32 = 38;
2097 /// Number of variables in the mixed-integer optimizer's final problem.
2098 pub const MIO_FINAL_NUMVAR : i32 = 39;
2099 /// Informs if MOSEK found the solution provided by the user to be feasible
2100 pub const MIO_INITIAL_FEASIBLE_SOLUTION : i32 = 40;
2101 /// Depth of the last node solved.
2102 pub const MIO_NODE_DEPTH : i32 = 41;
2103 /// Number of active branch and bound nodes.
2104 pub const MIO_NUM_ACTIVE_NODES : i32 = 42;
2105 /// Number of active cuts in the final relaxation after the mixed-integer optimizer's root cut generation.
2106 pub const MIO_NUM_ACTIVE_ROOT_CUTS : i32 = 43;
2107 /// Number of independent decomposition blocks solved though a dedicated algorithm.
2108 pub const MIO_NUM_BLOCKS_SOLVED_IN_BB : i32 = 44;
2109 /// Number of independent decomposition blocks solved during presolve.
2110 pub const MIO_NUM_BLOCKS_SOLVED_IN_PRESOLVE : i32 = 45;
2111 /// Number of branches performed during the optimization.
2112 pub const MIO_NUM_BRANCH : i32 = 46;
2113 /// Number of integer feasible solutions that have been found.
2114 pub const MIO_NUM_INT_SOLUTIONS : i32 = 47;
2115 /// Number of relaxations solved during the optimization.
2116 pub const MIO_NUM_RELAX : i32 = 48;
2117 /// Number of times presolve was repeated at root.
2118 pub const MIO_NUM_REPEATED_PRESOLVE : i32 = 49;
2119 /// Number of restarts performed during the optimization.
2120 pub const MIO_NUM_RESTARTS : i32 = 50;
2121 /// Number of cut separation rounds at the root node of the mixed-integer optimizer.
2122 pub const MIO_NUM_ROOT_CUT_ROUNDS : i32 = 51;
2123 /// Number of clique cuts selected to be included in the relaxation.
2124 pub const MIO_NUM_SELECTED_CLIQUE_CUTS : i32 = 52;
2125 /// Number of Complemented Mixed Integer Rounding (CMIR) cuts selected to be included in the relaxation.
2126 pub const MIO_NUM_SELECTED_CMIR_CUTS : i32 = 53;
2127 /// Number of Gomory cuts selected to be included in the relaxation.
2128 pub const MIO_NUM_SELECTED_GOMORY_CUTS : i32 = 54;
2129 /// Number of implied bound cuts selected to be included in the relaxation.
2130 pub const MIO_NUM_SELECTED_IMPLIED_BOUND_CUTS : i32 = 55;
2131 /// Number of clique cuts selected to be included in the relaxation.
2132 pub const MIO_NUM_SELECTED_KNAPSACK_COVER_CUTS : i32 = 56;
2133 /// Number of lift-and-project cuts selected to be included in the relaxation.
2134 pub const MIO_NUM_SELECTED_LIPRO_CUTS : i32 = 57;
2135 /// Number of separated clique cuts.
2136 pub const MIO_NUM_SEPARATED_CLIQUE_CUTS : i32 = 58;
2137 /// Number of separated Complemented Mixed Integer Rounding (CMIR) cuts.
2138 pub const MIO_NUM_SEPARATED_CMIR_CUTS : i32 = 59;
2139 /// Number of separated Gomory cuts.
2140 pub const MIO_NUM_SEPARATED_GOMORY_CUTS : i32 = 60;
2141 /// Number of separated implied bound cuts.
2142 pub const MIO_NUM_SEPARATED_IMPLIED_BOUND_CUTS : i32 = 61;
2143 /// Number of separated clique cuts.
2144 pub const MIO_NUM_SEPARATED_KNAPSACK_COVER_CUTS : i32 = 62;
2145 /// Number of separated lift-and-project cuts.
2146 pub const MIO_NUM_SEPARATED_LIPRO_CUTS : i32 = 63;
2147 /// Number of branch and bounds nodes solved in the main branch and bound tree.
2148 pub const MIO_NUM_SOLVED_NODES : i32 = 64;
2149 /// Number of binary variables in the problem to be solved by the mixed-integer optimizer.
2150 pub const MIO_NUMBIN : i32 = 65;
2151 /// Number of binary cone variables in the problem to be solved by the mixed-integer optimizer.
2152 pub const MIO_NUMBINCONEVAR : i32 = 66;
2153 /// Number of constraints in the problem to be solved by the mixed-integer optimizer.
2154 pub const MIO_NUMCON : i32 = 67;
2155 /// Number of cones in the problem to be solved by the mixed-integer optimizer.
2156 pub const MIO_NUMCONE : i32 = 68;
2157 /// Number of cone variables in the problem to be solved by the mixed-integer optimizer.
2158 pub const MIO_NUMCONEVAR : i32 = 69;
2159 /// Number of continuous variables in the problem to be solved by the mixed-integer optimizer.
2160 pub const MIO_NUMCONT : i32 = 70;
2161 /// Number of continuous cone variables in the problem to be solved by the mixed-integer optimizer.
2162 pub const MIO_NUMCONTCONEVAR : i32 = 71;
2163 /// Number of dual exponential cones in the problem to be solved by the mixed-integer optimizer.
2164 pub const MIO_NUMDEXPCONES : i32 = 72;
2165 /// Number of disjunctive constraints in the problem to be solved by the mixed-integer optimizer.
2166 pub const MIO_NUMDJC : i32 = 73;
2167 /// Number of dual power cones in the problem to be solved by the mixed-integer optimizer.
2168 pub const MIO_NUMDPOWCONES : i32 = 74;
2169 /// Number of integer variables in the problem to be solved by the mixed-integer optimizer.
2170 pub const MIO_NUMINT : i32 = 75;
2171 /// Number of integer cone variables in the problem to be solved by the mixed-integer optimizer.
2172 pub const MIO_NUMINTCONEVAR : i32 = 76;
2173 /// Number of primal exponential cones in the problem to be solved by the mixed-integer optimizer.
2174 pub const MIO_NUMPEXPCONES : i32 = 77;
2175 /// Number of primal power cones in the problem to be solved by the mixed-integer optimizer.
2176 pub const MIO_NUMPPOWCONES : i32 = 78;
2177 /// Number of quadratic cones in the problem to be solved by the mixed-integer optimizer.
2178 pub const MIO_NUMQCONES : i32 = 79;
2179 /// Number of rotated quadratic cones in the problem to be solved by the mixed-integer optimizer.
2180 pub const MIO_NUMRQCONES : i32 = 80;
2181 /// Number of variables in the problem to be solved by the mixed-integer optimizer.
2182 pub const MIO_NUMVAR : i32 = 81;
2183 /// Non-zero if a valid objective bound has been found, otherwise zero.
2184 pub const MIO_OBJ_BOUND_DEFINED : i32 = 82;
2185 /// Number of binary variables in the problem after the mixed-integer optimizer's presolve.
2186 pub const MIO_PRESOLVED_NUMBIN : i32 = 83;
2187 /// Number of binary cone variables in the problem after the mixed-integer optimizer's presolve.
2188 pub const MIO_PRESOLVED_NUMBINCONEVAR : i32 = 84;
2189 /// Number of constraints in the problem after the mixed-integer optimizer's presolve.
2190 pub const MIO_PRESOLVED_NUMCON : i32 = 85;
2191 /// Number of cones in the problem after the mixed-integer optimizer's presolve.
2192 pub const MIO_PRESOLVED_NUMCONE : i32 = 86;
2193 /// Number of cone variables in the problem after the mixed-integer optimizer's presolve.
2194 pub const MIO_PRESOLVED_NUMCONEVAR : i32 = 87;
2195 /// Number of continuous variables in the problem after the mixed-integer optimizer's presolve.
2196 pub const MIO_PRESOLVED_NUMCONT : i32 = 88;
2197 /// Number of continuous cone variables in the problem after the mixed-integer optimizer's presolve.
2198 pub const MIO_PRESOLVED_NUMCONTCONEVAR : i32 = 89;
2199 /// Number of dual exponential cones in the problem after the mixed-integer optimizer's presolve.
2200 pub const MIO_PRESOLVED_NUMDEXPCONES : i32 = 90;
2201 /// Number of disjunctive constraints in the problem after the mixed-integer optimizer's presolve.
2202 pub const MIO_PRESOLVED_NUMDJC : i32 = 91;
2203 /// Number of dual power cones in the problem after the mixed-integer optimizer's presolve.
2204 pub const MIO_PRESOLVED_NUMDPOWCONES : i32 = 92;
2205 /// Number of integer variables in the problem after the mixed-integer optimizer's presolve.
2206 pub const MIO_PRESOLVED_NUMINT : i32 = 93;
2207 /// Number of integer cone variables in the problem after the mixed-integer optimizer's presolve.
2208 pub const MIO_PRESOLVED_NUMINTCONEVAR : i32 = 94;
2209 /// Number of primal exponential cones in the problem after the mixed-integer optimizer's presolve.
2210 pub const MIO_PRESOLVED_NUMPEXPCONES : i32 = 95;
2211 /// Number of primal power cones in the problem after the mixed-integer optimizer's presolve.
2212 pub const MIO_PRESOLVED_NUMPPOWCONES : i32 = 96;
2213 /// Number of quadratic cones in the problem after the mixed-integer optimizer's presolve.
2214 pub const MIO_PRESOLVED_NUMQCONES : i32 = 97;
2215 /// Number of rotated quadratic cones in the problem after the mixed-integer optimizer's presolve.
2216 pub const MIO_PRESOLVED_NUMRQCONES : i32 = 98;
2217 /// Number of variables in the problem after the mixed-integer optimizer's presolve.
2218 pub const MIO_PRESOLVED_NUMVAR : i32 = 99;
2219 /// Non-zero if relative gap is within tolerances.
2220 pub const MIO_RELGAP_SATISFIED : i32 = 100;
2221 /// Total number of cuts selected to be included in the relaxation by the mixed-integer optimizer.
2222 pub const MIO_TOTAL_NUM_SELECTED_CUTS : i32 = 101;
2223 /// Total number of cuts separated by the mixed-integer optimizer.
2224 pub const MIO_TOTAL_NUM_SEPARATED_CUTS : i32 = 102;
2225 /// If it is non-zero, then the objective cut is used.
2226 pub const MIO_USER_OBJ_CUT : i32 = 103;
2227 /// Number of constraints in the problem solved when the optimizer is called.
2228 pub const OPT_NUMCON : i32 = 104;
2229 /// Number of variables in the problem solved when the optimizer is called
2230 pub const OPT_NUMVAR : i32 = 105;
2231 /// The response code returned by optimize.
2232 pub const OPTIMIZE_RESPONSE : i32 = 106;
2233 /// Number perturbations to thhe bounds of the primal problem.
2234 pub const PRESOLVE_NUM_PRIMAL_PERTURBATIONS : i32 = 107;
2235 /// Is nonzero if the dual solution is purified.
2236 pub const PURIFY_DUAL_SUCCESS : i32 = 108;
2237 /// Is nonzero if the primal solution is purified.
2238 pub const PURIFY_PRIMAL_SUCCESS : i32 = 109;
2239 /// Number of symmetric variables read.
2240 pub const RD_NUMBARVAR : i32 = 110;
2241 /// Number of constraints read.
2242 pub const RD_NUMCON : i32 = 111;
2243 /// Number of conic constraints read.
2244 pub const RD_NUMCONE : i32 = 112;
2245 /// Number of integer-constrained variables read.
2246 pub const RD_NUMINTVAR : i32 = 113;
2247 /// Number of nonempty Q matrices read.
2248 pub const RD_NUMQ : i32 = 114;
2249 /// Number of variables read.
2250 pub const RD_NUMVAR : i32 = 115;
2251 /// Problem type.
2252 pub const RD_PROTYPE : i32 = 116;
2253 /// The number of dual degenerate iterations.
2254 pub const SIM_DUAL_DEG_ITER : i32 = 117;
2255 /// If 1 then the dual simplex algorithm is solving from an advanced basis.
2256 pub const SIM_DUAL_HOTSTART : i32 = 118;
2257 /// If 1 then a valid basis factorization of full rank was located and used by the dual simplex algorithm.
2258 pub const SIM_DUAL_HOTSTART_LU : i32 = 119;
2259 /// The number of iterations taken with dual infeasibility.
2260 pub const SIM_DUAL_INF_ITER : i32 = 120;
2261 /// Number of dual simplex iterations during the last optimization.
2262 pub const SIM_DUAL_ITER : i32 = 121;
2263 /// Number of constraints in the problem solved by the simplex optimizer.
2264 pub const SIM_NUMCON : i32 = 122;
2265 /// Number of variables in the problem solved by the simplex optimizer.
2266 pub const SIM_NUMVAR : i32 = 123;
2267 /// The number of primal degenerate iterations.
2268 pub const SIM_PRIMAL_DEG_ITER : i32 = 124;
2269 /// If 1 then the primal simplex algorithm is solving from an advanced basis.
2270 pub const SIM_PRIMAL_HOTSTART : i32 = 125;
2271 /// If 1 then a valid basis factorization of full rank was located and used by the primal simplex algorithm.
2272 pub const SIM_PRIMAL_HOTSTART_LU : i32 = 126;
2273 /// The number of iterations taken with primal infeasibility.
2274 pub const SIM_PRIMAL_INF_ITER : i32 = 127;
2275 /// Number of primal simplex iterations during the last optimization.
2276 pub const SIM_PRIMAL_ITER : i32 = 128;
2277 /// Is non-zero if dual problem is solved.
2278 pub const SIM_SOLVE_DUAL : i32 = 129;
2279 /// Problem status of the basic solution. Updated after each optimization.
2280 pub const SOL_BAS_PROSTA : i32 = 130;
2281 /// Solution status of the basic solution. Updated after each optimization.
2282 pub const SOL_BAS_SOLSTA : i32 = 131;
2283 /// Problem status of the integer solution. Updated after each optimization.
2284 pub const SOL_ITG_PROSTA : i32 = 132;
2285 /// Solution status of the integer solution. Updated after each optimization.
2286 pub const SOL_ITG_SOLSTA : i32 = 133;
2287 /// Problem status of the interior-point solution. Updated after each optimization.
2288 pub const SOL_ITR_PROSTA : i32 = 134;
2289 /// Solution status of the interior-point solution. Updated after each optimization.
2290 pub const SOL_ITR_SOLSTA : i32 = 135;
2291 /// Number of times the storage for storing the linear coefficient matrix has been changed.
2292 pub const STO_NUM_A_REALLOC : i32 = 136;
2293 pub const END : i32 = 136;
2294} // impl Iinfitem
2295
2296/// Information item types
2297#[non_exhaustive]
2298pub struct Inftype;
2299impl Inftype {
2300 /// Is a double information type.
2301 pub const DOU_TYPE : i32 = 0;
2302 /// Is an integer.
2303 pub const INT_TYPE : i32 = 1;
2304 /// Is a long integer.
2305 pub const LINT_TYPE : i32 = 2;
2306} // impl Inftype
2307
2308/// Input/output modes
2309#[non_exhaustive]
2310pub struct Iomode;
2311impl Iomode {
2312 /// The file is read-only.
2313 pub const READ : i32 = 0;
2314 /// The file is write-only. If the file exists then it is truncated when it is opened. Otherwise it is created when it is opened.
2315 pub const WRITE : i32 = 1;
2316 /// The file is to read and write.
2317 pub const READWRITE : i32 = 2;
2318} // impl Iomode
2319
2320/// Integer parameters
2321#[non_exhaustive]
2322pub struct Iparam;
2323impl Iparam {
2324 /// Controls whether the basis matrix is analyzed in solution analyzer.
2325 pub const ANA_SOL_BASIS : i32 = 0;
2326 /// Controls whether a list of violated constraints is printed.
2327 pub const ANA_SOL_PRINT_VIOLATED : i32 = 1;
2328 /// Controls whether the elements in each column of A are sorted before an optimization is performed.
2329 pub const AUTO_SORT_A_BEFORE_OPT : i32 = 2;
2330 /// Controls whether the solution information items are automatically updated after an optimization is performed.
2331 pub const AUTO_UPDATE_SOL_INFO : i32 = 3;
2332 /// Controls the sign of the columns in the basis matrix corresponding to slack variables.
2333 pub const BASIS_SOLVE_USE_PLUS_ONE : i32 = 4;
2334 /// Controls which simplex optimizer is used in the clean-up phase.
2335 pub const BI_CLEAN_OPTIMIZER : i32 = 5;
2336 /// Turns on basis identification in case the interior-point optimizer is terminated due to maximum number of iterations.
2337 pub const BI_IGNORE_MAX_ITER : i32 = 6;
2338 /// Turns on basis identification in case the interior-point optimizer is terminated due to a numerical problem.
2339 pub const BI_IGNORE_NUM_ERROR : i32 = 7;
2340 /// Maximum number of iterations after basis identification.
2341 pub const BI_MAX_ITERATIONS : i32 = 8;
2342 /// Control license caching.
2343 pub const CACHE_LICENSE : i32 = 9;
2344 /// Control compression of stat files.
2345 pub const COMPRESS_STATFILE : i32 = 10;
2346 /// Controls how to use folding.
2347 pub const FOLDING_USE : i32 = 11;
2348 /// Detect LMIs and optimize their dualization.
2349 pub const GETDUAL_CONVERT_LMIS : i32 = 12;
2350 /// Controls heartbeat frequency for the new simplex optimizers.
2351 pub const HEARTBEAT_SIM_FREQ_TICKS : i32 = 13;
2352 /// Controls the contents of the infeasibility report.
2353 pub const INFEAS_GENERIC_NAMES : i32 = 14;
2354 /// Turns the feasibility report on or off.
2355 pub const INFEAS_REPORT_AUTO : i32 = 15;
2356 /// Controls the contents of the infeasibility report.
2357 pub const INFEAS_REPORT_LEVEL : i32 = 16;
2358 /// Controls whether basis identification is performed.
2359 pub const INTPNT_BASIS : i32 = 17;
2360 /// Controls whether different step sizes are allowed in the primal and dual space.
2361 pub const INTPNT_DIFF_STEP : i32 = 18;
2362 /// Currently not in use.
2363 pub const INTPNT_HOTSTART : i32 = 19;
2364 /// Controls the maximum number of iterations allowed in the interior-point optimizer.
2365 pub const INTPNT_MAX_ITERATIONS : i32 = 20;
2366 /// Maximum number of correction steps.
2367 pub const INTPNT_MAX_NUM_COR : i32 = 21;
2368 /// Controls the aggressiveness of the offending column detection.
2369 pub const INTPNT_OFF_COL_TRH : i32 = 22;
2370 /// This parameter controls the number of random seeds tried.
2371 pub const INTPNT_ORDER_GP_NUM_SEEDS : i32 = 23;
2372 /// Controls the ordering strategy.
2373 pub const INTPNT_ORDER_METHOD : i32 = 24;
2374 /// Controls whether regularization is allowed.
2375 pub const INTPNT_REGULARIZATION_USE : i32 = 25;
2376 /// Controls how the problem is scaled before the interior-point optimizer is used.
2377 pub const INTPNT_SCALING : i32 = 26;
2378 /// Controls whether the primal or the dual problem is solved.
2379 pub const INTPNT_SOLVE_FORM : i32 = 27;
2380 /// Starting point used by the interior-point optimizer.
2381 pub const INTPNT_STARTING_POINT : i32 = 28;
2382 /// Controls the license manager client debugging behavior.
2383 pub const LICENSE_DEBUG : i32 = 29;
2384 /// Controls license manager client behavior.
2385 pub const LICENSE_PAUSE_TIME : i32 = 30;
2386 /// Controls license manager client behavior.
2387 pub const LICENSE_SUPPRESS_EXPIRE_WRNS : i32 = 31;
2388 /// Controls when expiry warnings are issued.
2389 pub const LICENSE_TRH_EXPIRY_WRN : i32 = 32;
2390 /// Controls if MOSEK should queue for a license if none is available.
2391 pub const LICENSE_WAIT : i32 = 33;
2392 /// Controls the amount of log information.
2393 pub const LOG : i32 = 34;
2394 /// Controls amount of output from the problem analyzer.
2395 pub const LOG_ANA_PRO : i32 = 35;
2396 /// Controls the amount of output printed by the basis identification procedure. A higher level implies that more information is logged.
2397 pub const LOG_BI : i32 = 36;
2398 /// Controls the logging frequency.
2399 pub const LOG_BI_FREQ : i32 = 37;
2400 /// Controls the reduction in the log levels for the second and any subsequent optimizations.
2401 pub const LOG_CUT_SECOND_OPT : i32 = 38;
2402 /// Controls the amount of logging when a data item such as the maximum number constrains is expanded.
2403 pub const LOG_EXPAND : i32 = 39;
2404 /// Controls the amount of output printed when performing feasibility repair. A value higher than one means extensive logging.
2405 pub const LOG_FEAS_REPAIR : i32 = 40;
2406 /// If turned on, then some log info is printed when a file is written or read.
2407 pub const LOG_FILE : i32 = 41;
2408 /// Controls whether solution summary should be printed by the optimizer.
2409 pub const LOG_INCLUDE_SUMMARY : i32 = 42;
2410 /// Controls log level for the infeasibility analyzer.
2411 pub const LOG_INFEAS_ANA : i32 = 43;
2412 /// Controls the amount of log information from the interior-point optimizers.
2413 pub const LOG_INTPNT : i32 = 44;
2414 /// Control whether local identifying information is printed to the log.
2415 pub const LOG_LOCAL_INFO : i32 = 45;
2416 /// Controls the amount of log information from the mixed-integer optimizers.
2417 pub const LOG_MIO : i32 = 46;
2418 /// The mixed-integer optimizer logging frequency.
2419 pub const LOG_MIO_FREQ : i32 = 47;
2420 /// If turned on, then factor lines are added to the log.
2421 pub const LOG_ORDER : i32 = 48;
2422 /// Controls amount of output printed by the presolve procedure. A higher level implies that more information is logged.
2423 pub const LOG_PRESOLVE : i32 = 49;
2424 /// Control logging in sensitivity analyzer.
2425 pub const LOG_SENSITIVITY : i32 = 50;
2426 /// Control logging in sensitivity analyzer.
2427 pub const LOG_SENSITIVITY_OPT : i32 = 51;
2428 /// Controls the amount of log information from the simplex optimizers.
2429 pub const LOG_SIM : i32 = 52;
2430 /// Controls simplex logging frequency.
2431 pub const LOG_SIM_FREQ : i32 = 53;
2432 /// Controls logging frequency for the new simplex optimizers.
2433 pub const LOG_SIM_FREQ_GIGA_TICKS : i32 = 54;
2434 /// Controls the memory related log information.
2435 pub const LOG_STORAGE : i32 = 55;
2436 /// Each warning is shown a limited number of times controlled by this parameter. A negative value is identical to infinite number of times.
2437 pub const MAX_NUM_WARNINGS : i32 = 56;
2438 /// Controls whether the mixed-integer optimizer is branching up or down by default.
2439 pub const MIO_BRANCH_DIR : i32 = 57;
2440 /// Controls the amount of conflict analysis employed by the mixed-integer optimizer.
2441 pub const MIO_CONFLICT_ANALYSIS_LEVEL : i32 = 58;
2442 /// Toggles outer approximation for conic problems.
2443 pub const MIO_CONIC_OUTER_APPROXIMATION : i32 = 59;
2444 /// Controls if an initial mixed integer solution should be constructed from the values of the integer variables.
2445 pub const MIO_CONSTRUCT_SOL : i32 = 60;
2446 /// Maximum number of nodes in each call to Crossover.
2447 pub const MIO_CROSSOVER_MAX_NODES : i32 = 61;
2448 /// Controls whether clique cuts should be generated.
2449 pub const MIO_CUT_CLIQUE : i32 = 62;
2450 /// Controls whether mixed integer rounding cuts should be generated.
2451 pub const MIO_CUT_CMIR : i32 = 63;
2452 /// Controls whether GMI cuts should be generated.
2453 pub const MIO_CUT_GMI : i32 = 64;
2454 /// Controls whether implied bound cuts should be generated.
2455 pub const MIO_CUT_IMPLIED_BOUND : i32 = 65;
2456 /// Controls whether knapsack cover cuts should be generated.
2457 pub const MIO_CUT_KNAPSACK_COVER : i32 = 66;
2458 /// Controls whether lift-and-project cuts should be generated.
2459 pub const MIO_CUT_LIPRO : i32 = 67;
2460 /// Controls how aggressively generated cuts are selected to be included in the relaxation.
2461 pub const MIO_CUT_SELECTION_LEVEL : i32 = 68;
2462 /// Controls what problem data permutation method is appplied to mixed-integer problems.
2463 pub const MIO_DATA_PERMUTATION_METHOD : i32 = 69;
2464 /// Controls the amount of dual ray analysis employed by the mixed-integer optimizer.
2465 pub const MIO_DUAL_RAY_ANALYSIS_LEVEL : i32 = 70;
2466 /// Controls the way the Feasibility Pump heuristic is employed by the mixed-integer optimizer.
2467 pub const MIO_FEASPUMP_LEVEL : i32 = 71;
2468 /// Controls the heuristic employed by the mixed-integer optimizer to locate an initial integer feasible solution.
2469 pub const MIO_HEURISTIC_LEVEL : i32 = 72;
2470 /// Controls the way the mixed-integer optimizer exploits independent-block structure in the problem.
2471 pub const MIO_INDEPENDENT_BLOCK_LEVEL : i32 = 73;
2472 /// Maximum number of branches allowed during the branch and bound search.
2473 pub const MIO_MAX_NUM_BRANCHES : i32 = 74;
2474 /// Maximum number of relaxations in branch and bound search.
2475 pub const MIO_MAX_NUM_RELAXS : i32 = 75;
2476 /// Maximum number of restarts allowed during the branch and bound search.
2477 pub const MIO_MAX_NUM_RESTARTS : i32 = 76;
2478 /// Maximum number of cut separation rounds at the root node.
2479 pub const MIO_MAX_NUM_ROOT_CUT_ROUNDS : i32 = 77;
2480 /// Controls how many feasible solutions the mixed-integer optimizer investigates.
2481 pub const MIO_MAX_NUM_SOLUTIONS : i32 = 78;
2482 /// Controls how much emphasis is put on reducing memory usage.
2483 pub const MIO_MEMORY_EMPHASIS_LEVEL : i32 = 79;
2484 /// Number of times a variable must have been branched on for its pseudocost to be considered reliable.
2485 pub const MIO_MIN_REL : i32 = 80;
2486 /// Turns on/off the mixed-integer mode.
2487 pub const MIO_MODE : i32 = 81;
2488 /// Controls which optimizer is employed at the non-root nodes in the mixed-integer optimizer.
2489 pub const MIO_NODE_OPTIMIZER : i32 = 82;
2490 /// Controls the node selection strategy employed by the mixed-integer optimizer.
2491 pub const MIO_NODE_SELECTION : i32 = 83;
2492 /// Controls how much emphasis is put on reducing numerical problems
2493 pub const MIO_NUMERICAL_EMPHASIS_LEVEL : i32 = 84;
2494 /// Maximum number of nodes in each call to RINS.
2495 pub const MIO_OPT_FACE_MAX_NODES : i32 = 85;
2496 /// Enables or disables perspective reformulation in presolve.
2497 pub const MIO_PERSPECTIVE_REFORMULATE : i32 = 86;
2498 /// Controls if the aggregator should be used.
2499 pub const MIO_PRESOLVE_AGGREGATOR_USE : i32 = 87;
2500 /// Controls the amount of probing employed by the mixed-integer optimizer in presolve.
2501 pub const MIO_PROBING_LEVEL : i32 = 88;
2502 /// Use objective domain propagation.
2503 pub const MIO_PROPAGATE_OBJECTIVE_CONSTRAINT : i32 = 89;
2504 /// Controls what reformulation method is applied to mixed-integer quadratic problems.
2505 pub const MIO_QCQO_REFORMULATION_METHOD : i32 = 90;
2506 /// Maximum number of nodes in each call to RENS.
2507 pub const MIO_RENS_MAX_NODES : i32 = 91;
2508 /// Maximum number of nodes in each call to RINS.
2509 pub const MIO_RINS_MAX_NODES : i32 = 92;
2510 /// Controls which optimizer is employed at the root node in the mixed-integer optimizer.
2511 pub const MIO_ROOT_OPTIMIZER : i32 = 93;
2512 /// Sets the random seed used for randomization in the mixed integer optimizer.
2513 pub const MIO_SEED : i32 = 94;
2514 /// Controls the amount of symmetry detection and handling employed by the mixed-integer optimizer in presolve.
2515 pub const MIO_SYMMETRY_LEVEL : i32 = 95;
2516 /// Controls the variable selection strategy employed by the mixed-integer optimizer.
2517 pub const MIO_VAR_SELECTION : i32 = 96;
2518 /// Controls how much effort is put into detecting variable bounds.
2519 pub const MIO_VB_DETECTION_LEVEL : i32 = 97;
2520 /// Set the number of iterations to spin before sleeping.
2521 pub const MT_SPINCOUNT : i32 = 98;
2522 /// Not in use
2523 pub const NG : i32 = 99;
2524 /// The number of threads employed by the optimizer.
2525 pub const NUM_THREADS : i32 = 100;
2526 /// Write a text header with date and MOSEK version in an OPF file.
2527 pub const OPF_WRITE_HEADER : i32 = 101;
2528 /// Write a hint section with problem dimensions in the beginning of an OPF file.
2529 pub const OPF_WRITE_HINTS : i32 = 102;
2530 /// Aim to keep lines in OPF files not much longer than this.
2531 pub const OPF_WRITE_LINE_LENGTH : i32 = 103;
2532 /// Write a parameter section in an OPF file.
2533 pub const OPF_WRITE_PARAMETERS : i32 = 104;
2534 /// Write objective, constraints, bounds etc. to an OPF file.
2535 pub const OPF_WRITE_PROBLEM : i32 = 105;
2536 /// Controls what is written to the OPF files.
2537 pub const OPF_WRITE_SOL_BAS : i32 = 106;
2538 /// Controls what is written to the OPF files.
2539 pub const OPF_WRITE_SOL_ITG : i32 = 107;
2540 /// Controls what is written to the OPF files.
2541 pub const OPF_WRITE_SOL_ITR : i32 = 108;
2542 /// Enable inclusion of solutions in the OPF files.
2543 pub const OPF_WRITE_SOLUTIONS : i32 = 109;
2544 /// Controls which optimizer is used to optimize the task.
2545 pub const OPTIMIZER : i32 = 110;
2546 /// If turned on, then names in the parameter file are case sensitive.
2547 pub const PARAM_READ_CASE_NAME : i32 = 111;
2548 /// If turned on, then errors in parameter settings is ignored.
2549 pub const PARAM_READ_IGN_ERROR : i32 = 112;
2550 /// Maximum amount of fill-in created in one pivot during the elimination phase.
2551 pub const PRESOLVE_ELIMINATOR_MAX_FILL : i32 = 113;
2552 /// Control the maximum number of times the eliminator is tried.
2553 pub const PRESOLVE_ELIMINATOR_MAX_NUM_TRIES : i32 = 114;
2554 /// Controls linear dependency check in presolve.
2555 pub const PRESOLVE_LINDEP_ABS_WORK_TRH : i32 = 115;
2556 /// Controls whether a new experimental linear dependency checker is employed.
2557 pub const PRESOLVE_LINDEP_NEW : i32 = 116;
2558 /// Controls linear dependency check in presolve.
2559 pub const PRESOLVE_LINDEP_REL_WORK_TRH : i32 = 117;
2560 /// Controls whether the linear constraints are checked for linear dependencies.
2561 pub const PRESOLVE_LINDEP_USE : i32 = 118;
2562 /// Control the maximum number of times presolve passes over the problem.
2563 pub const PRESOLVE_MAX_NUM_PASS : i32 = 119;
2564 /// Controls the maximum number of reductions performed by the presolve.
2565 pub const PRESOLVE_MAX_NUM_REDUCTIONS : i32 = 120;
2566 /// Controls whether the presolve is applied to a problem before it is optimized.
2567 pub const PRESOLVE_USE : i32 = 121;
2568 /// Controls which optimizer that is used to find the optimal repair.
2569 pub const PRIMAL_REPAIR_OPTIMIZER : i32 = 122;
2570 /// Controls whether parameters section is written in PTF files.
2571 pub const PTF_WRITE_PARAMETERS : i32 = 123;
2572 /// Controls whether PSD terms with a coefficient matrix of just one non-zero are written as a single term instead of as a matrix term.
2573 pub const PTF_WRITE_SINGLE_PSD_TERMS : i32 = 124;
2574 /// Controls whether solution section is written in PTF files.
2575 pub const PTF_WRITE_SOLUTIONS : i32 = 125;
2576 /// Controls if simple transformation are done when writing PTF files.
2577 pub const PTF_WRITE_TRANSFORM : i32 = 126;
2578 /// Controls whether files are read using synchronous or asynchronous reader.
2579 pub const READ_ASYNC : i32 = 127;
2580 /// Turns on additional debugging information when reading files.
2581 pub const READ_DEBUG : i32 = 128;
2582 /// Controls whether the free constraints are included in the problem. Applies to MPS files.
2583 pub const READ_KEEP_FREE_CON : i32 = 129;
2584 /// Controls how strictly the MPS file reader interprets the MPS format.
2585 pub const READ_MPS_FORMAT : i32 = 130;
2586 /// Controls the maximal number of characters allowed in one line of the MPS file.
2587 pub const READ_MPS_WIDTH : i32 = 131;
2588 /// Controls what information is used from the task files.
2589 pub const READ_TASK_IGNORE_PARAM : i32 = 132;
2590 /// Use compression when sending data to an optimization server
2591 pub const REMOTE_USE_COMPRESSION : i32 = 133;
2592 /// Removes unused solutions before the optimization is performed.
2593 pub const REMOVE_UNUSED_SOLUTIONS : i32 = 134;
2594 /// Controls sensitivity report behavior.
2595 pub const SENSITIVITY_ALL : i32 = 135;
2596 /// Controls which type of sensitivity analysis is to be performed.
2597 pub const SENSITIVITY_TYPE : i32 = 136;
2598 /// Controls whether an LU factorization of the basis is used in a hot-start.
2599 pub const SIM_BASIS_FACTOR_USE : i32 = 137;
2600 /// Controls how aggressively degeneration is handled.
2601 pub const SIM_DEGEN : i32 = 138;
2602 /// Not in use.
2603 pub const SIM_DETECT_PWL : i32 = 139;
2604 /// Controls whether crashing is performed in the dual simplex optimizer.
2605 pub const SIM_DUAL_CRASH : i32 = 140;
2606 /// An experimental feature.
2607 pub const SIM_DUAL_PHASEONE_METHOD : i32 = 141;
2608 /// Controls how aggressively restricted selection is used.
2609 pub const SIM_DUAL_RESTRICT_SELECTION : i32 = 142;
2610 /// Controls the dual simplex strategy.
2611 pub const SIM_DUAL_SELECTION : i32 = 143;
2612 /// Controls if the simplex optimizers are allowed to exploit duplicated columns.
2613 pub const SIM_EXPLOIT_DUPVEC : i32 = 144;
2614 /// Controls the type of hot-start that the simplex optimizer perform.
2615 pub const SIM_HOTSTART : i32 = 145;
2616 /// Determines if the simplex optimizer should exploit the initial factorization.
2617 pub const SIM_HOTSTART_LU : i32 = 146;
2618 /// Maximum number of iterations that can be used by a simplex optimizer.
2619 pub const SIM_MAX_ITERATIONS : i32 = 147;
2620 /// Controls how many set-backs that are allowed within a simplex optimizer.
2621 pub const SIM_MAX_NUM_SETBACKS : i32 = 148;
2622 /// Controls if the simplex optimizer ensures a non-singular basis, if possible.
2623 pub const SIM_NON_SINGULAR : i32 = 149;
2624 /// Experimental. Usage not recommended.
2625 pub const SIM_PRECISION : i32 = 150;
2626 /// Controls whether the simplex optimizer is allowed to boost the precision.
2627 pub const SIM_PRECISION_BOOST : i32 = 151;
2628 /// Controls the simplex crash.
2629 pub const SIM_PRIMAL_CRASH : i32 = 152;
2630 /// An experimental feature.
2631 pub const SIM_PRIMAL_PHASEONE_METHOD : i32 = 153;
2632 /// Controls how aggressively restricted selection is used.
2633 pub const SIM_PRIMAL_RESTRICT_SELECTION : i32 = 154;
2634 /// Controls the primal simplex strategy.
2635 pub const SIM_PRIMAL_SELECTION : i32 = 155;
2636 /// Controls the basis refactoring frequency.
2637 pub const SIM_REFACTOR_FREQ : i32 = 156;
2638 /// Controls if the simplex optimizers are allowed to reformulate the problem.
2639 pub const SIM_REFORMULATION : i32 = 157;
2640 /// Controls if the LU factorization stored should be replaced with the LU factorization corresponding to the initial basis.
2641 pub const SIM_SAVE_LU : i32 = 158;
2642 /// Controls how much effort is used in scaling the problem before a simplex optimizer is used.
2643 pub const SIM_SCALING : i32 = 159;
2644 /// Controls how the problem is scaled before a simplex optimizer is used.
2645 pub const SIM_SCALING_METHOD : i32 = 160;
2646 /// Sets the random seed used for randomization in the simplex optimizers.
2647 pub const SIM_SEED : i32 = 161;
2648 /// Controls whether the primal or the dual problem is solved by the primal-/dual-simplex optimizer.
2649 pub const SIM_SOLVE_FORM : i32 = 162;
2650 /// Controls the simplex behavior.
2651 pub const SIM_SWITCH_OPTIMIZER : i32 = 163;
2652 /// Control the contents of the solution files.
2653 pub const SOL_FILTER_KEEP_BASIC : i32 = 164;
2654 /// Controls the input solution file format.
2655 pub const SOL_READ_NAME_WIDTH : i32 = 165;
2656 /// Controls the input solution file format.
2657 pub const SOL_READ_WIDTH : i32 = 166;
2658 /// Controls the amount of timing performed inside MOSEK.
2659 pub const TIMING_LEVEL : i32 = 167;
2660 /// Controls whether files are read using synchronous or asynchronous writer.
2661 pub const WRITE_ASYNC : i32 = 168;
2662 /// Controls the basic solution file format.
2663 pub const WRITE_BAS_CONSTRAINTS : i32 = 169;
2664 /// Controls the basic solution file format.
2665 pub const WRITE_BAS_HEAD : i32 = 170;
2666 /// Controls the basic solution file format.
2667 pub const WRITE_BAS_VARIABLES : i32 = 171;
2668 /// Controls output file compression.
2669 pub const WRITE_COMPRESSION : i32 = 172;
2670 /// Controls the output file data.
2671 pub const WRITE_FREE_CON : i32 = 173;
2672 /// Controls the output file data.
2673 pub const WRITE_GENERIC_NAMES : i32 = 174;
2674 /// Controls if the writer ignores incompatible problem items when writing files.
2675 pub const WRITE_IGNORE_INCOMPATIBLE_ITEMS : i32 = 175;
2676 /// Controls the integer solution file format.
2677 pub const WRITE_INT_CONSTRAINTS : i32 = 176;
2678 /// Controls the integer solution file format.
2679 pub const WRITE_INT_HEAD : i32 = 177;
2680 /// Controls the integer solution file format.
2681 pub const WRITE_INT_VARIABLES : i32 = 178;
2682 /// When set, the JSON task and solution files are written with indentation for better readability.
2683 pub const WRITE_JSON_INDENTATION : i32 = 179;
2684 /// Write full linear objective
2685 pub const WRITE_LP_FULL_OBJ : i32 = 180;
2686 /// Controls the LP output file format.
2687 pub const WRITE_LP_LINE_WIDTH : i32 = 181;
2688 /// Controls in which format the MPS file is written.
2689 pub const WRITE_MPS_FORMAT : i32 = 182;
2690 /// Controls the output file data.
2691 pub const WRITE_MPS_INT : i32 = 183;
2692 /// Controls the solution file format.
2693 pub const WRITE_SOL_BARVARIABLES : i32 = 184;
2694 /// Controls the solution file format.
2695 pub const WRITE_SOL_CONSTRAINTS : i32 = 185;
2696 /// Controls solution file format.
2697 pub const WRITE_SOL_HEAD : i32 = 186;
2698 /// Controls whether the user specified names are employed even if they are invalid names.
2699 pub const WRITE_SOL_IGNORE_INVALID_NAMES : i32 = 187;
2700 /// Controls the solution file format.
2701 pub const WRITE_SOL_VARIABLES : i32 = 188;
2702} // impl Iparam
2703
2704/// Specifies the branching direction.
2705#[non_exhaustive]
2706pub struct Branchdir;
2707impl Branchdir {
2708 /// The mixed-integer optimizer decides which branch to choose.
2709 pub const FREE : i32 = 0;
2710 /// The mixed-integer optimizer always chooses the up branch first.
2711 pub const UP : i32 = 1;
2712 /// The mixed-integer optimizer always chooses the down branch first.
2713 pub const DOWN : i32 = 2;
2714 /// Branch in direction nearest to selected fractional variable.
2715 pub const NEAR : i32 = 3;
2716 /// Branch in direction farthest from selected fractional variable.
2717 pub const FAR : i32 = 4;
2718 /// Chose direction based on root lp value of selected variable.
2719 pub const ROOT_LP : i32 = 5;
2720 /// Branch in direction of current incumbent.
2721 pub const GUIDED : i32 = 6;
2722 /// Branch based on the pseudocost of the variable.
2723 pub const PSEUDOCOST : i32 = 7;
2724} // impl Branchdir
2725
2726/// Specifies the reformulation method for mixed-integer quadratic problems.
2727#[non_exhaustive]
2728pub struct Miqcqoreformmethod;
2729impl Miqcqoreformmethod {
2730 /// The mixed-integer optimizer decides which reformulation method to apply.
2731 pub const FREE : i32 = 0;
2732 /// No reformulation method is applied.
2733 pub const NONE : i32 = 1;
2734 /// A reformulation via linearization is applied.
2735 pub const LINEARIZATION : i32 = 2;
2736 /// The eigenvalue method is applied.
2737 pub const EIGEN_VAL_METHOD : i32 = 3;
2738 /// A perturbation of matrix diagonals via the solution of SDPs is applied.
2739 pub const DIAG_SDP : i32 = 4;
2740 /// A Reformulation based on the solution of an SDP-relaxation of the problem is applied.
2741 pub const RELAX_SDP : i32 = 5;
2742} // impl Miqcqoreformmethod
2743
2744/// Specifies the problem data permutation method for mixed-integer problems.
2745#[non_exhaustive]
2746pub struct Miodatapermmethod;
2747impl Miodatapermmethod {
2748 /// No problem data permutation is applied.
2749 pub const NONE : i32 = 0;
2750 /// A random cyclic shift is applied to permute the problem data.
2751 pub const CYCLIC_SHIFT : i32 = 1;
2752 /// A random permutation is applied to the problem data.
2753 pub const RANDOM : i32 = 2;
2754} // impl Miodatapermmethod
2755
2756/// Continuous mixed-integer solution type
2757#[non_exhaustive]
2758pub struct Miocontsoltype;
2759impl Miocontsoltype {
2760 /// No interior-point or basic solution.
2761 pub const NONE : i32 = 0;
2762 /// Solutions to the root node problem.
2763 pub const ROOT : i32 = 1;
2764 /// A feasible primal solution.
2765 pub const ITG : i32 = 2;
2766 /// A feasible primal solution or a root node solution if the problem is infeasible.
2767 pub const ITG_REL : i32 = 3;
2768} // impl Miocontsoltype
2769
2770/// Integer restrictions
2771#[non_exhaustive]
2772pub struct Miomode;
2773impl Miomode {
2774 /// The integer constraints are ignored and the problem is solved as a continuous problem.
2775 pub const IGNORED : i32 = 0;
2776 /// Integer restrictions should be satisfied.
2777 pub const SATISFIED : i32 = 1;
2778} // impl Miomode
2779
2780/// Mixed-integer node selection types
2781#[non_exhaustive]
2782pub struct Mionodeseltype;
2783impl Mionodeseltype {
2784 /// The optimizer decides the node selection strategy.
2785 pub const FREE : i32 = 0;
2786 /// The optimizer employs a depth first node selection strategy.
2787 pub const FIRST : i32 = 1;
2788 /// The optimizer employs a best bound node selection strategy.
2789 pub const BEST : i32 = 2;
2790 /// The optimizer employs selects the node based on a pseudo cost estimate.
2791 pub const PSEUDO : i32 = 3;
2792} // impl Mionodeseltype
2793
2794/// Mixed-integer variable selection types
2795#[non_exhaustive]
2796pub struct Miovarseltype;
2797impl Miovarseltype {
2798 /// The optimizer decides the variable selection strategy.
2799 pub const FREE : i32 = 0;
2800 /// The optimizer employs pseudocost variable selection.
2801 pub const PSEUDOCOST : i32 = 1;
2802 /// The optimizer employs strong branching varfiable selection
2803 pub const STRONG : i32 = 2;
2804} // impl Miovarseltype
2805
2806/// MPS file format type
2807#[non_exhaustive]
2808pub struct Mpsformat;
2809impl Mpsformat {
2810 /// It is assumed that the input file satisfies the MPS format strictly.
2811 pub const STRICT : i32 = 0;
2812 /// It is assumed that the input file satisfies a slightly relaxed version of the MPS format.
2813 pub const RELAXED : i32 = 1;
2814 /// It is assumed that the input file satisfies the free MPS format. This implies that spaces are not allowed in names. Otherwise the format is free.
2815 pub const FREE : i32 = 2;
2816 /// The CPLEX compatible version of the MPS format is employed.
2817 pub const CPLEX : i32 = 3;
2818} // impl Mpsformat
2819
2820/// Objective sense types
2821#[non_exhaustive]
2822pub struct Objsense;
2823impl Objsense {
2824 /// The problem should be minimized.
2825 pub const MINIMIZE : i32 = 0;
2826 /// The problem should be maximized.
2827 pub const MAXIMIZE : i32 = 1;
2828} // impl Objsense
2829
2830/// On/off
2831#[non_exhaustive]
2832pub struct Onoffkey;
2833impl Onoffkey {
2834 /// Switch the option off.
2835 pub const OFF : i32 = 0;
2836 /// Switch the option on.
2837 pub const ON : i32 = 1;
2838} // impl Onoffkey
2839
2840/// Optimizer types
2841#[non_exhaustive]
2842pub struct Optimizertype;
2843impl Optimizertype {
2844 /// The optimizer for problems having conic constraints.
2845 pub const CONIC : i32 = 0;
2846 /// The dual simplex optimizer is used.
2847 pub const DUAL_SIMPLEX : i32 = 1;
2848 /// The optimizer is chosen automatically.
2849 pub const FREE : i32 = 2;
2850 /// One of the simplex optimizers is used.
2851 pub const FREE_SIMPLEX : i32 = 3;
2852 /// The interior-point optimizer is used.
2853 pub const INTPNT : i32 = 4;
2854 /// The mixed-integer optimizer.
2855 pub const MIXED_INT : i32 = 5;
2856 /// The new dual simplex optimizer is used.
2857 pub const NEW_DUAL_SIMPLEX : i32 = 6;
2858 /// The new primal simplex optimizer is used. It is not recommended to use this option.
2859 pub const NEW_PRIMAL_SIMPLEX : i32 = 7;
2860 /// The primal simplex optimizer is used.
2861 pub const PRIMAL_SIMPLEX : i32 = 8;
2862} // impl Optimizertype
2863
2864/// Ordering strategies
2865#[non_exhaustive]
2866pub struct Orderingtype;
2867impl Orderingtype {
2868 /// The ordering method is chosen automatically.
2869 pub const FREE : i32 = 0;
2870 /// Approximate minimum local fill-in ordering is employed.
2871 pub const APPMINLOC : i32 = 1;
2872 /// This option should not be used.
2873 pub const EXPERIMENTAL : i32 = 2;
2874 /// Always try the graph partitioning based ordering.
2875 pub const TRY_GRAPHPAR : i32 = 3;
2876 /// Always use the graph partitioning based ordering even if it is worse than the approximate minimum local fill ordering.
2877 pub const FORCE_GRAPHPAR : i32 = 4;
2878 /// No ordering is used. Note using this value almost always leads to a significantly slow down.
2879 pub const NONE : i32 = 5;
2880} // impl Orderingtype
2881
2882/// Presolve method.
2883#[non_exhaustive]
2884pub struct Presolvemode;
2885impl Presolvemode {
2886 /// The problem is not presolved before it is optimized.
2887 pub const OFF : i32 = 0;
2888 /// The problem is presolved before it is optimized.
2889 pub const ON : i32 = 1;
2890 /// It is decided automatically whether to presolve before the problem is optimized.
2891 pub const FREE : i32 = 2;
2892} // impl Presolvemode
2893
2894/// Method of folding (symmetry detection for continuous problems).
2895#[non_exhaustive]
2896pub struct Foldingmode;
2897impl Foldingmode {
2898 /// Disabled.
2899 pub const OFF : i32 = 0;
2900 /// The solver decides on the usage and amount of folding.
2901 pub const FREE : i32 = 1;
2902 /// If only the interior-point solution is requested then the solver decides; if the basic solution is requested then folding is disabled.
2903 pub const FREE_UNLESS_BASIC : i32 = 2;
2904 /// Full folding is always performed regardless of workload.
2905 pub const FORCE : i32 = 3;
2906} // impl Foldingmode
2907
2908/// Parameter type
2909#[non_exhaustive]
2910pub struct Parametertype;
2911impl Parametertype {
2912 /// Not a valid parameter.
2913 pub const INVALID_TYPE : i32 = 0;
2914 /// Is a double parameter.
2915 pub const DOU_TYPE : i32 = 1;
2916 /// Is an integer parameter.
2917 pub const INT_TYPE : i32 = 2;
2918 /// Is a string parameter.
2919 pub const STR_TYPE : i32 = 3;
2920} // impl Parametertype
2921
2922/// Problem data items
2923#[non_exhaustive]
2924pub struct Problemitem;
2925impl Problemitem {
2926 /// Item is a variable.
2927 pub const VAR : i32 = 0;
2928 /// Item is a constraint.
2929 pub const CON : i32 = 1;
2930 /// Item is a cone.
2931 pub const CONE : i32 = 2;
2932} // impl Problemitem
2933
2934/// Problem types
2935#[non_exhaustive]
2936pub struct Problemtype;
2937impl Problemtype {
2938 /// The problem is a linear optimization problem.
2939 pub const LO : i32 = 0;
2940 /// The problem is a quadratic optimization problem.
2941 pub const QO : i32 = 1;
2942 /// The problem is a quadratically constrained optimization problem.
2943 pub const QCQO : i32 = 2;
2944 /// A conic optimization.
2945 pub const CONIC : i32 = 3;
2946 /// General nonlinear constraints and conic constraints. This combination can not be solved by MOSEK.
2947 pub const MIXED : i32 = 4;
2948} // impl Problemtype
2949
2950/// Problem status keys
2951#[non_exhaustive]
2952pub struct Prosta;
2953impl Prosta {
2954 /// Unknown problem status.
2955 pub const UNKNOWN : i32 = 0;
2956 /// The problem is primal and dual feasible.
2957 pub const PRIM_AND_DUAL_FEAS : i32 = 1;
2958 /// The problem is primal feasible.
2959 pub const PRIM_FEAS : i32 = 2;
2960 /// The problem is dual feasible.
2961 pub const DUAL_FEAS : i32 = 3;
2962 /// The problem is primal infeasible.
2963 pub const PRIM_INFEAS : i32 = 4;
2964 /// The problem is dual infeasible.
2965 pub const DUAL_INFEAS : i32 = 5;
2966 /// The problem is primal and dual infeasible.
2967 pub const PRIM_AND_DUAL_INFEAS : i32 = 6;
2968 /// The problem is ill-posed. For example, it may be primal and dual feasible but have a positive duality gap.
2969 pub const ILL_POSED : i32 = 7;
2970 /// The problem is either primal infeasible or unbounded. This may occur for mixed-integer problems.
2971 pub const PRIM_INFEAS_OR_UNBOUNDED : i32 = 8;
2972} // impl Prosta
2973
2974/// Response codes
2975#[non_exhaustive]
2976pub struct Rescode;
2977impl Rescode {
2978 /// No error occurred.
2979 pub const OK : i32 = 0;
2980 /// The parameter file could not be opened.
2981 pub const WRN_OPEN_PARAM_FILE : i32 = 50;
2982 /// A numerically large bound value is specified.
2983 pub const WRN_LARGE_BOUND : i32 = 51;
2984 /// A numerically large lower bound value is specified.
2985 pub const WRN_LARGE_LO_BOUND : i32 = 52;
2986 /// A numerically large upper bound value is specified.
2987 pub const WRN_LARGE_UP_BOUND : i32 = 53;
2988 /// A equality constraint is fixed to numerically large value.
2989 pub const WRN_LARGE_CON_FX : i32 = 54;
2990 /// A numerically large value is specified for one element in c.
2991 pub const WRN_LARGE_CJ : i32 = 57;
2992 /// A numerically large value is specified for an element in A.
2993 pub const WRN_LARGE_AIJ : i32 = 62;
2994 /// One or more zero elements are specified in A.
2995 pub const WRN_ZERO_AIJ : i32 = 63;
2996 /// A name is longer than the buffer that is supposed to hold it.
2997 pub const WRN_NAME_MAX_LEN : i32 = 65;
2998 /// A value for a string parameter is longer than the buffer that is supposed to hold it.
2999 pub const WRN_SPAR_MAX_LEN : i32 = 66;
3000 /// An RHS vector is split into several nonadjacent parts.
3001 pub const WRN_MPS_SPLIT_RHS_VECTOR : i32 = 70;
3002 /// A RANGE vector is split into several nonadjacent parts in an MPS file.
3003 pub const WRN_MPS_SPLIT_RAN_VECTOR : i32 = 71;
3004 /// A BOUNDS vector is split into several nonadjacent parts in an MPS file.
3005 pub const WRN_MPS_SPLIT_BOU_VECTOR : i32 = 72;
3006 /// Missing '/2' after quadratic expressions in bound or objective.
3007 pub const WRN_LP_OLD_QUAD_FORMAT : i32 = 80;
3008 /// Ignore a variable because the variable was not previously defined.
3009 pub const WRN_LP_DROP_VARIABLE : i32 = 85;
3010 /// Non-zero elements specified in the upper triangle of a matrix were ignored.
3011 pub const WRN_NZ_IN_UPR_TRI : i32 = 200;
3012 /// One or more non-zero elements were dropped in the Q matrix in the objective.
3013 pub const WRN_DROPPED_NZ_QOBJ : i32 = 201;
3014 /// Ignored integer constraints.
3015 pub const WRN_IGNORE_INTEGER : i32 = 250;
3016 /// No global optimizer is available.
3017 pub const WRN_NO_GLOBAL_OPTIMIZER : i32 = 251;
3018 /// The final mixed-integer problem with all the integer variables fixed at their optimal values is infeasible.
3019 pub const WRN_MIO_INFEASIBLE_FINAL : i32 = 270;
3020 /// Invalid solution filter is specified.
3021 pub const WRN_SOL_FILTER : i32 = 300;
3022 /// Undefined name occurred in a solution.
3023 pub const WRN_UNDEF_SOL_FILE_NAME : i32 = 350;
3024 /// One or more lines in the constraint section were ignored when reading a solution file.
3025 pub const WRN_SOL_FILE_IGNORED_CON : i32 = 351;
3026 /// One or more lines in the variable section were ignored when reading a solution file.
3027 pub const WRN_SOL_FILE_IGNORED_VAR : i32 = 352;
3028 /// An incomplete basis is specified.
3029 pub const WRN_TOO_FEW_BASIS_VARS : i32 = 400;
3030 /// A basis with too many variables is specified.
3031 pub const WRN_TOO_MANY_BASIS_VARS : i32 = 405;
3032 /// The license expires.
3033 pub const WRN_LICENSE_EXPIRE : i32 = 500;
3034 /// The license server is not responding.
3035 pub const WRN_LICENSE_SERVER : i32 = 501;
3036 /// A variable or constraint name is empty. The output file may be invalid.
3037 pub const WRN_EMPTY_NAME : i32 = 502;
3038 /// Generic names are used because a name is invalid for requested format.
3039 pub const WRN_USING_GENERIC_NAMES : i32 = 503;
3040 /// A name e.g. a row name is not a valid MPS name.
3041 pub const WRN_INVALID_MPS_NAME : i32 = 504;
3042 /// The objective name is not a valid MPS name.
3043 pub const WRN_INVALID_MPS_OBJ_NAME : i32 = 505;
3044 /// The license expires.
3045 pub const WRN_LICENSE_FEATURE_EXPIRE : i32 = 509;
3046 /// Parameter name not recognized.
3047 pub const WRN_PARAM_NAME_DOU : i32 = 510;
3048 /// Parameter name not recognized.
3049 pub const WRN_PARAM_NAME_INT : i32 = 511;
3050 /// Parameter name not recognized.
3051 pub const WRN_PARAM_NAME_STR : i32 = 512;
3052 /// A parameter value is not correct.
3053 pub const WRN_PARAM_STR_VALUE : i32 = 515;
3054 /// A parameter was ignored by the conic mixed integer optimizer.
3055 pub const WRN_PARAM_IGNORED_CMIO : i32 = 516;
3056 /// One or more (near) zero elements are specified in a sparse row of a matrix.
3057 pub const WRN_ZEROS_IN_SPARSE_ROW : i32 = 705;
3058 /// One or more (near) zero elements are specified in a sparse column of a matrix.
3059 pub const WRN_ZEROS_IN_SPARSE_COL : i32 = 710;
3060 /// The linear dependency check(s) is incomplete.
3061 pub const WRN_INCOMPLETE_LINEAR_DEPENDENCY_CHECK : i32 = 800;
3062 /// The eliminator is skipped at least once due to lack of space.
3063 pub const WRN_ELIMINATOR_SPACE : i32 = 801;
3064 /// The presolve is incomplete due to lack of space.
3065 pub const WRN_PRESOLVE_OUTOFSPACE : i32 = 802;
3066 /// The presolve perturbed the bounds of the primal problem. This is an indication that the problem is nearly infeasible.
3067 pub const WRN_PRESOLVE_PRIMAL_PERTURBATIONS : i32 = 803;
3068 /// Some names were changed because they were invalid for the output file format.
3069 pub const WRN_WRITE_CHANGED_NAMES : i32 = 830;
3070 /// The fixed objective term was discarded in the output file.
3071 pub const WRN_WRITE_DISCARDED_CFIX : i32 = 831;
3072 /// Two constraint names are identical.
3073 pub const WRN_DUPLICATE_CONSTRAINT_NAMES : i32 = 850;
3074 /// Two variable names are identical.
3075 pub const WRN_DUPLICATE_VARIABLE_NAMES : i32 = 851;
3076 /// Two barvariable names are identical.
3077 pub const WRN_DUPLICATE_BARVARIABLE_NAMES : i32 = 852;
3078 /// Two cone names are identical.
3079 pub const WRN_DUPLICATE_CONE_NAMES : i32 = 853;
3080 /// Warn against very large bounds.
3081 pub const WRN_ANA_LARGE_BOUNDS : i32 = 900;
3082 /// Warn against all objective coefficients being zero.
3083 pub const WRN_ANA_C_ZERO : i32 = 901;
3084 /// Warn against empty columns.
3085 pub const WRN_ANA_EMPTY_COLS : i32 = 902;
3086 /// Warn against close bounds.
3087 pub const WRN_ANA_CLOSE_BOUNDS : i32 = 903;
3088 /// Warn against almost integral bounds.
3089 pub const WRN_ANA_ALMOST_INT_BOUNDS : i32 = 904;
3090 /// An infeasibility report is not available when the problem contains matrix variables.
3091 pub const WRN_NO_INFEASIBILITY_REPORT_WHEN_MATRIX_VARIABLES : i32 = 930;
3092 /// Dualizer ignores integer variables and disjunctive constraints.
3093 pub const WRN_GETDUAL_IGNORES_INTEGRALITY : i32 = 940;
3094 /// No automatic dualizer is available for the specified problem.
3095 pub const WRN_NO_DUALIZER : i32 = 950;
3096 /// A numerically large value is specified for an element in E.
3097 pub const WRN_SYM_MAT_LARGE : i32 = 960;
3098 /// A double parameter related to solver tolerances has a non-default value.
3099 pub const WRN_MODIFIED_DOUBLE_PARAMETER : i32 = 970;
3100 /// A numerically large value is specified for an element in F.
3101 pub const WRN_LARGE_FIJ : i32 = 980;
3102 /// Unexpected section in PTF file
3103 pub const WRN_PTF_UNKNOWN_SECTION : i32 = 981;
3104 /// Invalid license.
3105 pub const ERR_LICENSE : i32 = 1000;
3106 /// The license has expired.
3107 pub const ERR_LICENSE_EXPIRED : i32 = 1001;
3108 /// Invalid license version.
3109 pub const ERR_LICENSE_VERSION : i32 = 1002;
3110 /// The license server version is too old.
3111 pub const ERR_LICENSE_OLD_SERVER_VERSION : i32 = 1003;
3112 /// The problem is bigger than the license.
3113 pub const ERR_SIZE_LICENSE : i32 = 1005;
3114 /// The software is not licensed to solve the problem.
3115 pub const ERR_PROB_LICENSE : i32 = 1006;
3116 /// Invalid license file.
3117 pub const ERR_FILE_LICENSE : i32 = 1007;
3118 /// A license cannot be located.
3119 pub const ERR_MISSING_LICENSE_FILE : i32 = 1008;
3120 /// The problem has too many constraints.
3121 pub const ERR_SIZE_LICENSE_CON : i32 = 1010;
3122 /// The problem has too many variables.
3123 pub const ERR_SIZE_LICENSE_VAR : i32 = 1011;
3124 /// The problem contains too many integer variables.
3125 pub const ERR_SIZE_LICENSE_INTVAR : i32 = 1012;
3126 /// The optimizer required is not licensed.
3127 pub const ERR_OPTIMIZER_LICENSE : i32 = 1013;
3128 /// The license manager reported an error.
3129 pub const ERR_FLEXLM : i32 = 1014;
3130 /// The license server is not responding.
3131 pub const ERR_LICENSE_SERVER : i32 = 1015;
3132 /// Maximum number of licenses is reached.
3133 pub const ERR_LICENSE_MAX : i32 = 1016;
3134 /// The MOSEKLM license manager daemon is not up and running.
3135 pub const ERR_LICENSE_MOSEKLM_DAEMON : i32 = 1017;
3136 /// A requested feature is not available in the license file(s).
3137 pub const ERR_LICENSE_FEATURE : i32 = 1018;
3138 /// A requested license feature is not available for the required platform.
3139 pub const ERR_PLATFORM_NOT_LICENSED : i32 = 1019;
3140 /// The license system cannot allocate the memory required.
3141 pub const ERR_LICENSE_CANNOT_ALLOCATE : i32 = 1020;
3142 /// MOSEK cannot connect to the license server.
3143 pub const ERR_LICENSE_CANNOT_CONNECT : i32 = 1021;
3144 /// The host ID specified in the license file does not match the host ID of the computer.
3145 pub const ERR_LICENSE_INVALID_HOSTID : i32 = 1025;
3146 /// The version specified in the checkout request is greater than the highest version number the daemon supports.
3147 pub const ERR_LICENSE_SERVER_VERSION : i32 = 1026;
3148 /// The license server does not support the requested feature.
3149 pub const ERR_LICENSE_NO_SERVER_SUPPORT : i32 = 1027;
3150 /// No SERVER lines in license file.
3151 pub const ERR_LICENSE_NO_SERVER_LINE : i32 = 1028;
3152 /// The dynamic link library is older than the specified version.
3153 pub const ERR_OLDER_DLL : i32 = 1035;
3154 /// The dynamic link library is newer than the specified version.
3155 pub const ERR_NEWER_DLL : i32 = 1036;
3156 /// A file cannot be linked to a stream in the DLL version.
3157 pub const ERR_LINK_FILE_DLL : i32 = 1040;
3158 /// Could not initialize a mutex.
3159 pub const ERR_THREAD_MUTEX_INIT : i32 = 1045;
3160 /// Could not lock a mutex.
3161 pub const ERR_THREAD_MUTEX_LOCK : i32 = 1046;
3162 /// Could not unlock a mutex.
3163 pub const ERR_THREAD_MUTEX_UNLOCK : i32 = 1047;
3164 /// Could not create a thread.
3165 pub const ERR_THREAD_CREATE : i32 = 1048;
3166 /// Could not initialize a condition.
3167 pub const ERR_THREAD_COND_INIT : i32 = 1049;
3168 /// Unknown error.
3169 pub const ERR_UNKNOWN : i32 = 1050;
3170 /// Out of space.
3171 pub const ERR_SPACE : i32 = 1051;
3172 /// An error occurred while opening a file.
3173 pub const ERR_FILE_OPEN : i32 = 1052;
3174 /// An error occurred while reading file.
3175 pub const ERR_FILE_READ : i32 = 1053;
3176 /// An error occurred while writing to a file.
3177 pub const ERR_FILE_WRITE : i32 = 1054;
3178 /// The data file format cannot be determined from the file name.
3179 pub const ERR_DATA_FILE_EXT : i32 = 1055;
3180 /// An invalid file name has been specified.
3181 pub const ERR_INVALID_FILE_NAME : i32 = 1056;
3182 /// An invalid file name has been specified.
3183 pub const ERR_INVALID_SOL_FILE_NAME : i32 = 1057;
3184 /// End of file has been reached unexpectedly.
3185 pub const ERR_END_OF_FILE : i32 = 1059;
3186 /// env is a null pointer.
3187 pub const ERR_NULL_ENV : i32 = 1060;
3188 /// task is a null pointer.
3189 pub const ERR_NULL_TASK : i32 = 1061;
3190 /// An invalid stream is referenced.
3191 pub const ERR_INVALID_STREAM : i32 = 1062;
3192 /// Environment is not initialized.
3193 pub const ERR_NO_INIT_ENV : i32 = 1063;
3194 /// The task is invalid.
3195 pub const ERR_INVALID_TASK : i32 = 1064;
3196 /// An argument to a function is unexpectedly a null pointer.
3197 pub const ERR_NULL_POINTER : i32 = 1065;
3198 /// Not all tasks associated with the environment have been deleted.
3199 pub const ERR_LIVING_TASKS : i32 = 1066;
3200 /// Error encountered in GZIP stream.
3201 pub const ERR_READ_GZIP : i32 = 1067;
3202 /// Error encountered in ZSTD stream.
3203 pub const ERR_READ_ZSTD : i32 = 1068;
3204 /// Error encountered in async stream.
3205 pub const ERR_READ_ASYNC : i32 = 1069;
3206 /// An all blank name has been specified.
3207 pub const ERR_BLANK_NAME : i32 = 1070;
3208 /// Duplicate names specified.
3209 pub const ERR_DUP_NAME : i32 = 1071;
3210 /// The name format string is invalid.
3211 pub const ERR_FORMAT_STRING : i32 = 1072;
3212 /// The sparsity included an index that was out of bounds of the shape.
3213 pub const ERR_SPARSITY_SPECIFICATION : i32 = 1073;
3214 /// Mismatching dimensions specified in arguments
3215 pub const ERR_MISMATCHING_DIMENSION : i32 = 1074;
3216 /// An invalid objective name is specified.
3217 pub const ERR_INVALID_OBJ_NAME : i32 = 1075;
3218 /// An invalid constraint name is used.
3219 pub const ERR_INVALID_CON_NAME : i32 = 1076;
3220 /// An invalid variable name is used.
3221 pub const ERR_INVALID_VAR_NAME : i32 = 1077;
3222 /// An invalid cone name is used.
3223 pub const ERR_INVALID_CONE_NAME : i32 = 1078;
3224 /// An invalid symmetric matrix variable name is used.
3225 pub const ERR_INVALID_BARVAR_NAME : i32 = 1079;
3226 /// MOSEK is leaking memory.
3227 pub const ERR_SPACE_LEAKING : i32 = 1080;
3228 /// No available information about the space usage.
3229 pub const ERR_SPACE_NO_INFO : i32 = 1081;
3230 /// Invalid dimension specification
3231 pub const ERR_DIMENSION_SPECIFICATION : i32 = 1082;
3232 /// Invalid axis names specification
3233 pub const ERR_AXIS_NAME_SPECIFICATION : i32 = 1083;
3234 /// Encountered premature end-of-file in input stream.
3235 pub const ERR_READ_PREMATURE_EOF : i32 = 1089;
3236 /// The specified format cannot be read.
3237 pub const ERR_READ_FORMAT : i32 = 1090;
3238 /// Invalid variable name. Cannot write valid LP file.
3239 pub const ERR_WRITE_LP_INVALID_VAR_NAMES : i32 = 1091;
3240 /// Duplicate variable names. Cannot write valid LP file.
3241 pub const ERR_WRITE_LP_DUPLICATE_VAR_NAMES : i32 = 1092;
3242 /// Invalid constraint name. Cannot write valid LP file.
3243 pub const ERR_WRITE_LP_INVALID_CON_NAMES : i32 = 1093;
3244 /// Duplicate constraint names. Cannot write valid LP file.
3245 pub const ERR_WRITE_LP_DUPLICATE_CON_NAMES : i32 = 1094;
3246 /// An error occurred while reading an MPS file.
3247 pub const ERR_MPS_FILE : i32 = 1100;
3248 /// Invalid field occurred while reading an MPS file.
3249 pub const ERR_MPS_INV_FIELD : i32 = 1101;
3250 /// An invalid marker has been specified in the MPS file.
3251 pub const ERR_MPS_INV_MARKER : i32 = 1102;
3252 /// An empty constraint name is used in an MPS file.
3253 pub const ERR_MPS_NULL_CON_NAME : i32 = 1103;
3254 /// An empty variable name is used in an MPS file.
3255 pub const ERR_MPS_NULL_VAR_NAME : i32 = 1104;
3256 /// An undefined constraint name occurred in an MPS file.
3257 pub const ERR_MPS_UNDEF_CON_NAME : i32 = 1105;
3258 /// An undefined variable name occurred in an MPS file.
3259 pub const ERR_MPS_UNDEF_VAR_NAME : i32 = 1106;
3260 /// An invalid constraint key occurred in an MPS file.
3261 pub const ERR_MPS_INVALID_CON_KEY : i32 = 1107;
3262 /// An invalid bound key occurred in an MPS file.
3263 pub const ERR_MPS_INVALID_BOUND_KEY : i32 = 1108;
3264 /// An invalid section name occurred in an MPS file.
3265 pub const ERR_MPS_INVALID_SEC_NAME : i32 = 1109;
3266 /// No objective is defined in an MPS file.
3267 pub const ERR_MPS_NO_OBJECTIVE : i32 = 1110;
3268 /// The non-zero elements in A corresponding to a variable in an MPS file must be specified consecutively.
3269 pub const ERR_MPS_SPLITTED_VAR : i32 = 1111;
3270 /// A constraint name is specified multiple times in the ROWS section in an MPS file.
3271 pub const ERR_MPS_MUL_CON_NAME : i32 = 1112;
3272 /// Multiple QSECTIONs are specified for a constraint.
3273 pub const ERR_MPS_MUL_QSEC : i32 = 1113;
3274 /// The Q term in the objective is specified multiple times.
3275 pub const ERR_MPS_MUL_QOBJ : i32 = 1114;
3276 /// The sections in an MPS file is not in the correct order.
3277 pub const ERR_MPS_INV_SEC_ORDER : i32 = 1115;
3278 /// Multiple CSECTIONs are given the same name.
3279 pub const ERR_MPS_MUL_CSEC : i32 = 1116;
3280 /// Invalid cone type specified in a CSECTION.
3281 pub const ERR_MPS_CONE_TYPE : i32 = 1117;
3282 /// A variable is specified to be a member of several cones.
3283 pub const ERR_MPS_CONE_OVERLAP : i32 = 1118;
3284 /// A variable is repeated within the CSECTION.
3285 pub const ERR_MPS_CONE_REPEAT : i32 = 1119;
3286 /// A non symmetric matrix has been speciefied.
3287 pub const ERR_MPS_NON_SYMMETRIC_Q : i32 = 1120;
3288 /// Duplicate elements is specified in a Q matrix.
3289 pub const ERR_MPS_DUPLICATE_Q_ELEMENT : i32 = 1121;
3290 /// An invalid objective sense is specified.
3291 pub const ERR_MPS_INVALID_OBJSENSE : i32 = 1122;
3292 /// A tab char occurred in field 2.
3293 pub const ERR_MPS_TAB_IN_FIELD2 : i32 = 1125;
3294 /// A tab char occurred in field 3.
3295 pub const ERR_MPS_TAB_IN_FIELD3 : i32 = 1126;
3296 /// A tab char occurred in field 5.
3297 pub const ERR_MPS_TAB_IN_FIELD5 : i32 = 1127;
3298 /// An invalid objective name is specified.
3299 pub const ERR_MPS_INVALID_OBJ_NAME : i32 = 1128;
3300 /// An invalid indicator key occurred in an MPS file.
3301 pub const ERR_MPS_INVALID_KEY : i32 = 1129;
3302 /// An invalid indicator constraint is used. It must not be a ranged constraint.
3303 pub const ERR_MPS_INVALID_INDICATOR_CONSTRAINT : i32 = 1130;
3304 /// An invalid indicator variable is specfied. It must be a binary variable.
3305 pub const ERR_MPS_INVALID_INDICATOR_VARIABLE : i32 = 1131;
3306 /// An invalid indicator value is specfied. It must be either 0 or 1.
3307 pub const ERR_MPS_INVALID_INDICATOR_VALUE : i32 = 1132;
3308 /// A quadratic constraint can be be an indicator constraint.
3309 pub const ERR_MPS_INVALID_INDICATOR_QUADRATIC_CONSTRAINT : i32 = 1133;
3310 /// Syntax error in an OPF file
3311 pub const ERR_OPF_SYNTAX : i32 = 1134;
3312 /// Premature end of file in an OPF file.
3313 pub const ERR_OPF_PREMATURE_EOF : i32 = 1136;
3314 /// Mismatched end-tag in OPF file
3315 pub const ERR_OPF_MISMATCHED_TAG : i32 = 1137;
3316 /// Either upper or lower bound was specified twice in OPF file
3317 pub const ERR_OPF_DUPLICATE_BOUND : i32 = 1138;
3318 /// Duplicate constraint name in OPF File
3319 pub const ERR_OPF_DUPLICATE_CONSTRAINT_NAME : i32 = 1139;
3320 /// Invalid cone type in OPF File
3321 pub const ERR_OPF_INVALID_CONE_TYPE : i32 = 1140;
3322 /// Invalid number of parameters in start-tag in OPF File
3323 pub const ERR_OPF_INCORRECT_TAG_PARAM : i32 = 1141;
3324 /// Invalid start-tag in OPF File
3325 pub const ERR_OPF_INVALID_TAG : i32 = 1142;
3326 /// Same variable appears in multiple cones in OPF File
3327 pub const ERR_OPF_DUPLICATE_CONE_ENTRY : i32 = 1143;
3328 /// The problem is too large to be correctly loaded
3329 pub const ERR_OPF_TOO_LARGE : i32 = 1144;
3330 /// Dual solution values are not allowed in OPF File
3331 pub const ERR_OPF_DUAL_INTEGER_SOLUTION : i32 = 1146;
3332 /// The problem cannot be written to an LP formatted file.
3333 pub const ERR_LP_EMPTY : i32 = 1151;
3334 /// An invalid name is created while writing an MPS file.
3335 pub const ERR_WRITE_MPS_INVALID_NAME : i32 = 1153;
3336 /// A variable name is invalid when used in an LP formatted file.
3337 pub const ERR_LP_INVALID_VAR_NAME : i32 = 1154;
3338 /// Empty variable names cannot be written to OPF files.
3339 pub const ERR_WRITE_OPF_INVALID_VAR_NAME : i32 = 1156;
3340 /// Syntax error in an LP file.
3341 pub const ERR_LP_FILE_FORMAT : i32 = 1157;
3342 /// Expected a number in LP file
3343 pub const ERR_LP_EXPECTED_NUMBER : i32 = 1158;
3344 /// Syntax error in LP fil. Possibly missing End tag.
3345 pub const ERR_READ_LP_MISSING_END_TAG : i32 = 1159;
3346 /// An indicator variable was not declared binary
3347 pub const ERR_LP_INDICATOR_VAR : i32 = 1160;
3348 /// Expected an objective section in LP file
3349 pub const ERR_LP_EXPECTED_OBJECTIVE : i32 = 1161;
3350 /// Expected constraint relation
3351 pub const ERR_LP_EXPECTED_CONSTRAINT_RELATION : i32 = 1162;
3352 /// Constraint has ambiguous or invalid bound
3353 pub const ERR_LP_AMBIGUOUS_CONSTRAINT_BOUND : i32 = 1163;
3354 /// Duplicate section
3355 pub const ERR_LP_DUPLICATE_SECTION : i32 = 1164;
3356 /// Duplicate section
3357 pub const ERR_READ_LP_DELAYED_ROWS_NOT_SUPPORTED : i32 = 1165;
3358 /// An error occurred while writing file
3359 pub const ERR_WRITING_FILE : i32 = 1166;
3360 /// An error occurred while performing asynchronous writing
3361 pub const ERR_WRITE_ASYNC : i32 = 1167;
3362 /// An invalid name occurred in a solution file.
3363 pub const ERR_INVALID_NAME_IN_SOL_FILE : i32 = 1170;
3364 /// Syntax error in an JSON data
3365 pub const ERR_JSON_SYNTAX : i32 = 1175;
3366 /// Error in JSON string.
3367 pub const ERR_JSON_STRING : i32 = 1176;
3368 /// Invalid number entry - wrong type or value overflow.
3369 pub const ERR_JSON_NUMBER_OVERFLOW : i32 = 1177;
3370 /// Error in an JSON Task file
3371 pub const ERR_JSON_FORMAT : i32 = 1178;
3372 /// Inconsistent data in JSON Task file
3373 pub const ERR_JSON_DATA : i32 = 1179;
3374 /// Missing data section in JSON task file.
3375 pub const ERR_JSON_MISSING_DATA : i32 = 1180;
3376 /// Incompatible item
3377 pub const ERR_PTF_INCOMPATIBILITY : i32 = 1181;
3378 /// Undefined symbol referenced
3379 pub const ERR_PTF_UNDEFINED_ITEM : i32 = 1182;
3380 /// Inconsistent size of item
3381 pub const ERR_PTF_INCONSISTENCY : i32 = 1183;
3382 /// Syntax error in an PTF file
3383 pub const ERR_PTF_FORMAT : i32 = 1184;
3384 /// Incorrect length of arguments.
3385 pub const ERR_ARGUMENT_LENNEQ : i32 = 1197;
3386 /// Incorrect argument type.
3387 pub const ERR_ARGUMENT_TYPE : i32 = 1198;
3388 /// Incorrect number of function arguments.
3389 pub const ERR_NUM_ARGUMENTS : i32 = 1199;
3390 /// A function argument is incorrect.
3391 pub const ERR_IN_ARGUMENT : i32 = 1200;
3392 /// A function argument is of incorrect dimension.
3393 pub const ERR_ARGUMENT_DIMENSION : i32 = 1201;
3394 /// The size of the n-dimensional shape is too large.
3395 pub const ERR_SHAPE_IS_TOO_LARGE : i32 = 1202;
3396 /// An index in an argument is too small.
3397 pub const ERR_INDEX_IS_TOO_SMALL : i32 = 1203;
3398 /// An index in an argument is too large.
3399 pub const ERR_INDEX_IS_TOO_LARGE : i32 = 1204;
3400 /// An index in an argument is not unique.
3401 pub const ERR_INDEX_IS_NOT_UNIQUE : i32 = 1205;
3402 /// A parameter name is not correct.
3403 pub const ERR_PARAM_NAME : i32 = 1206;
3404 /// A parameter name is not correct.
3405 pub const ERR_PARAM_NAME_DOU : i32 = 1207;
3406 /// A parameter name is not correct.
3407 pub const ERR_PARAM_NAME_INT : i32 = 1208;
3408 /// A parameter name is not correct.
3409 pub const ERR_PARAM_NAME_STR : i32 = 1209;
3410 /// Parameter index is out of range.
3411 pub const ERR_PARAM_INDEX : i32 = 1210;
3412 /// A parameter value is too large.
3413 pub const ERR_PARAM_IS_TOO_LARGE : i32 = 1215;
3414 /// A parameter value is too small.
3415 pub const ERR_PARAM_IS_TOO_SMALL : i32 = 1216;
3416 /// A parameter value string is incorrect.
3417 pub const ERR_PARAM_VALUE_STR : i32 = 1217;
3418 /// A parameter type is invalid.
3419 pub const ERR_PARAM_TYPE : i32 = 1218;
3420 /// A double information index is out of range for the specified type.
3421 pub const ERR_INF_DOU_INDEX : i32 = 1219;
3422 /// An integer information index is out of range for the specified type.
3423 pub const ERR_INF_INT_INDEX : i32 = 1220;
3424 /// An index in an array argument is too small.
3425 pub const ERR_INDEX_ARR_IS_TOO_SMALL : i32 = 1221;
3426 /// An index in an array argument is too large.
3427 pub const ERR_INDEX_ARR_IS_TOO_LARGE : i32 = 1222;
3428 /// A long integer information index is out of range for the specified type.
3429 pub const ERR_INF_LINT_INDEX : i32 = 1225;
3430 /// The value of a argument is too small.
3431 pub const ERR_ARG_IS_TOO_SMALL : i32 = 1226;
3432 /// The value of a argument is too large.
3433 pub const ERR_ARG_IS_TOO_LARGE : i32 = 1227;
3434 /// whichsol is invalid.
3435 pub const ERR_INVALID_WHICHSOL : i32 = 1228;
3436 /// A double information name is invalid.
3437 pub const ERR_INF_DOU_NAME : i32 = 1230;
3438 /// An integer information name is invalid.
3439 pub const ERR_INF_INT_NAME : i32 = 1231;
3440 /// The information type is invalid.
3441 pub const ERR_INF_TYPE : i32 = 1232;
3442 /// A long integer information name is invalid.
3443 pub const ERR_INF_LINT_NAME : i32 = 1234;
3444 /// An index is out of range.
3445 pub const ERR_INDEX : i32 = 1235;
3446 /// The solution defined by whichsol does not exists.
3447 pub const ERR_WHICHSOL : i32 = 1236;
3448 /// The solution number solemn does not exists.
3449 pub const ERR_SOLITEM : i32 = 1237;
3450 /// whichitem is unacceptable.
3451 pub const ERR_WHICHITEM_NOT_ALLOWED : i32 = 1238;
3452 /// Invalid maximum number of constraints specified.
3453 pub const ERR_MAXNUMCON : i32 = 1240;
3454 /// The maximum number of variables limit is too small.
3455 pub const ERR_MAXNUMVAR : i32 = 1241;
3456 /// The maximum number of semidefinite variables limit is too small.
3457 pub const ERR_MAXNUMBARVAR : i32 = 1242;
3458 /// Too small maximum number of non-zeros for the Q matrices is specified.
3459 pub const ERR_MAXNUMQNZ : i32 = 1243;
3460 /// The maximum number of non-zeros specified is too small.
3461 pub const ERR_TOO_SMALL_MAX_NUM_NZ : i32 = 1245;
3462 /// A specified index is invalid.
3463 pub const ERR_INVALID_IDX : i32 = 1246;
3464 /// A specified index is invalid.
3465 pub const ERR_INVALID_MAX_NUM : i32 = 1247;
3466 /// The value of whichsol is not allowed.
3467 pub const ERR_UNALLOWED_WHICHSOL : i32 = 1248;
3468 /// Maximum number of constraints limit is exceeded.
3469 pub const ERR_NUMCONLIM : i32 = 1250;
3470 /// Maximum number of variables limit is exceeded.
3471 pub const ERR_NUMVARLIM : i32 = 1251;
3472 /// Too small maximum number of non-zeros in A specified.
3473 pub const ERR_TOO_SMALL_MAXNUMANZ : i32 = 1252;
3474 /// aptre\[j\] is strictly smaller than aptrb\[j\] for some j.
3475 pub const ERR_INV_APTRE : i32 = 1253;
3476 /// An element in A is defined multiple times.
3477 pub const ERR_MUL_A_ELEMENT : i32 = 1254;
3478 /// Invalid bound key.
3479 pub const ERR_INV_BK : i32 = 1255;
3480 /// Invalid bound key is specified for a constraint.
3481 pub const ERR_INV_BKC : i32 = 1256;
3482 /// An invalid bound key is specified for a variable.
3483 pub const ERR_INV_BKX : i32 = 1257;
3484 /// An invalid variable type is specified for a variable.
3485 pub const ERR_INV_VAR_TYPE : i32 = 1258;
3486 /// Problem type does not match the chosen optimizer.
3487 pub const ERR_SOLVER_PROBTYPE : i32 = 1259;
3488 /// Empty objective range.
3489 pub const ERR_OBJECTIVE_RANGE : i32 = 1260;
3490 /// Invalid response code.
3491 pub const ERR_INV_RESCODE : i32 = 1261;
3492 /// Invalid integer information item.
3493 pub const ERR_INV_IINF : i32 = 1262;
3494 /// Invalid long integer information item.
3495 pub const ERR_INV_LIINF : i32 = 1263;
3496 /// Invalid double information item.
3497 pub const ERR_INV_DINF : i32 = 1264;
3498 /// Invalid basis is specified.
3499 pub const ERR_BASIS : i32 = 1266;
3500 /// Invalid value in skc encountered.
3501 pub const ERR_INV_SKC : i32 = 1267;
3502 /// Invalid value in skx encountered.
3503 pub const ERR_INV_SKX : i32 = 1268;
3504 /// Invalid status key string encountered.
3505 pub const ERR_INV_SK_STR : i32 = 1269;
3506 /// Invalid status key code encountered.
3507 pub const ERR_INV_SK : i32 = 1270;
3508 /// Invalid cone type string encountered.
3509 pub const ERR_INV_CONE_TYPE_STR : i32 = 1271;
3510 /// Invalid cone type code encountered.
3511 pub const ERR_INV_CONE_TYPE : i32 = 1272;
3512 /// Invalid value in skn encountered.
3513 pub const ERR_INV_SKN : i32 = 1274;
3514 /// Invalid surplus.
3515 pub const ERR_INVALID_SURPLUS : i32 = 1275;
3516 /// An invalid name item code is used.
3517 pub const ERR_INV_NAME_ITEM : i32 = 1280;
3518 /// An invalid problem item is used.
3519 pub const ERR_PRO_ITEM : i32 = 1281;
3520 /// Invalid format type.
3521 pub const ERR_INVALID_FORMAT_TYPE : i32 = 1283;
3522 /// Invalid firsti.
3523 pub const ERR_FIRSTI : i32 = 1285;
3524 /// Invalid lasti.
3525 pub const ERR_LASTI : i32 = 1286;
3526 /// Invalid firstj.
3527 pub const ERR_FIRSTJ : i32 = 1287;
3528 /// Invalid lastj.
3529 pub const ERR_LASTJ : i32 = 1288;
3530 /// A maximum length that is too small has been specified.
3531 pub const ERR_MAX_LEN_IS_TOO_SMALL : i32 = 1289;
3532 /// The model contains a nonlinear equality.
3533 pub const ERR_NONLINEAR_EQUALITY : i32 = 1290;
3534 /// The optimization problem is nonconvex.
3535 pub const ERR_NONCONVEX : i32 = 1291;
3536 /// The problem contains a nonlinear constraint with inite lower and upper bound.
3537 pub const ERR_NONLINEAR_RANGED : i32 = 1292;
3538 /// The quadratic constraint matrix is not PSD.
3539 pub const ERR_CON_Q_NOT_PSD : i32 = 1293;
3540 /// The quadratic constraint matrix is not NSD.
3541 pub const ERR_CON_Q_NOT_NSD : i32 = 1294;
3542 /// The quadratic coefficient matrix in the objective is not PSD.
3543 pub const ERR_OBJ_Q_NOT_PSD : i32 = 1295;
3544 /// The quadratic coefficient matrix in the objective is not NSD.
3545 pub const ERR_OBJ_Q_NOT_NSD : i32 = 1296;
3546 /// An invalid permutation array is specified.
3547 pub const ERR_ARGUMENT_PERM_ARRAY : i32 = 1299;
3548 /// An index of a non-existing cone has been specified.
3549 pub const ERR_CONE_INDEX : i32 = 1300;
3550 /// A cone with incorrect number of members is specified.
3551 pub const ERR_CONE_SIZE : i32 = 1301;
3552 /// One or more of variables in the cone to be added is already member of another cone.
3553 pub const ERR_CONE_OVERLAP : i32 = 1302;
3554 /// A variable is included multiple times in the cone.
3555 pub const ERR_CONE_REP_VAR : i32 = 1303;
3556 /// The value specified for maxnumcone is too small.
3557 pub const ERR_MAXNUMCONE : i32 = 1304;
3558 /// Invalid cone type specified.
3559 pub const ERR_CONE_TYPE : i32 = 1305;
3560 /// Invalid cone type specified.
3561 pub const ERR_CONE_TYPE_STR : i32 = 1306;
3562 /// The cone to be appended has one variable which is already member of another cone.
3563 pub const ERR_CONE_OVERLAP_APPEND : i32 = 1307;
3564 /// A variable cannot be removed because it will make a cone invalid.
3565 pub const ERR_REMOVE_CONE_VARIABLE : i32 = 1310;
3566 /// Trying to append a too big cone.
3567 pub const ERR_APPENDING_TOO_BIG_CONE : i32 = 1311;
3568 /// An invalid cone parameter.
3569 pub const ERR_CONE_PARAMETER : i32 = 1320;
3570 /// An invalid number is specified in a solution file.
3571 pub const ERR_SOL_FILE_INVALID_NUMBER : i32 = 1350;
3572 /// A huge value in absolute size is specified for an objective coefficient.
3573 pub const ERR_HUGE_C : i32 = 1375;
3574 /// A numerically huge value is specified for an element in A.
3575 pub const ERR_HUGE_AIJ : i32 = 1380;
3576 /// An element in the A matrix is specified twice.
3577 pub const ERR_DUPLICATE_AIJ : i32 = 1385;
3578 /// The lower bound specified is not a number (nan) or is not finite.
3579 pub const ERR_LOWER_BOUND_IS_A_NAN : i32 = 1390;
3580 /// The upper bound specified is not a number (nan) or is not finite.
3581 pub const ERR_UPPER_BOUND_IS_A_NAN : i32 = 1391;
3582 /// A numerically huge bound value is specified.
3583 pub const ERR_INFINITE_BOUND : i32 = 1400;
3584 /// Invalid value %d at qosubi.
3585 pub const ERR_INV_QOBJ_SUBI : i32 = 1401;
3586 /// Invalid value in qosubj.
3587 pub const ERR_INV_QOBJ_SUBJ : i32 = 1402;
3588 /// Invalid value in qoval.
3589 pub const ERR_INV_QOBJ_VAL : i32 = 1403;
3590 /// Invalid value in qcsubk.
3591 pub const ERR_INV_QCON_SUBK : i32 = 1404;
3592 /// Invalid value in qcsubi.
3593 pub const ERR_INV_QCON_SUBI : i32 = 1405;
3594 /// Invalid value in qcsubj.
3595 pub const ERR_INV_QCON_SUBJ : i32 = 1406;
3596 /// Invalid value in qcval.
3597 pub const ERR_INV_QCON_VAL : i32 = 1407;
3598 /// Invalid value in qcsubi.
3599 pub const ERR_QCON_SUBI_TOO_SMALL : i32 = 1408;
3600 /// Invalid value in qcsubi.
3601 pub const ERR_QCON_SUBI_TOO_LARGE : i32 = 1409;
3602 /// An element in the upper triangle of the quadratic term in the objective is specified.
3603 pub const ERR_QOBJ_UPPER_TRIANGLE : i32 = 1415;
3604 /// An element in the upper triangle of the quadratic term in a constraint.
3605 pub const ERR_QCON_UPPER_TRIANGLE : i32 = 1417;
3606 /// A fixed constraint/variable has been specified using the bound keys but the numerical bounds are different.
3607 pub const ERR_FIXED_BOUND_VALUES : i32 = 1420;
3608 /// A too small value for the A trucation value is specified.
3609 pub const ERR_TOO_SMALL_A_TRUNCATION_VALUE : i32 = 1421;
3610 /// An invalid objective sense is specified.
3611 pub const ERR_INVALID_OBJECTIVE_SENSE : i32 = 1445;
3612 /// The objective sense has not been specified before the optimization.
3613 pub const ERR_UNDEFINED_OBJECTIVE_SENSE : i32 = 1446;
3614 /// The solution item y is undefined.
3615 pub const ERR_Y_IS_UNDEFINED : i32 = 1449;
3616 /// An invalid floating value was used in some double data.
3617 pub const ERR_NAN_IN_DOUBLE_DATA : i32 = 1450;
3618 /// An infinite floating value was used in some double data.
3619 pub const ERR_INF_IN_DOUBLE_DATA : i32 = 1451;
3620 /// blc contains an invalid floating point value, i.e. a NaN or Infinity
3621 pub const ERR_NAN_IN_BLC : i32 = 1461;
3622 /// buc contains an invalid floating point value, i.e. a NaN. or Infinity
3623 pub const ERR_NAN_IN_BUC : i32 = 1462;
3624 /// An invalid fixed term in the objective is speficied.
3625 pub const ERR_INVALID_CFIX : i32 = 1469;
3626 /// c contains an invalid floating point value, i.e. a NaN or Infinity.
3627 pub const ERR_NAN_IN_C : i32 = 1470;
3628 /// blx contains an invalid floating point value, i.e. a NaN or Infinity.
3629 pub const ERR_NAN_IN_BLX : i32 = 1471;
3630 /// bux contains an invalid floating point value, i.e. a NaN or Infinity.
3631 pub const ERR_NAN_IN_BUX : i32 = 1472;
3632 /// a\[i,j\] contains an invalid floating point value, i.e. a NaN or an infinite value.
3633 pub const ERR_INVALID_AIJ : i32 = 1473;
3634 /// c\[j\] contains an invalid floating point value, i.e. a NaN or an infinite value.
3635 pub const ERR_INVALID_CJ : i32 = 1474;
3636 /// A symmetric matrix contains an invalid floating point value, i.e. a NaN or an infinite value.
3637 pub const ERR_SYM_MAT_INVALID : i32 = 1480;
3638 /// A numerically huge value is specified for an element in E.
3639 pub const ERR_SYM_MAT_HUGE : i32 = 1482;
3640 /// Invalid problem type.
3641 pub const ERR_INV_PROBLEM : i32 = 1500;
3642 /// The problem contains both conic and nonlinear constraints.
3643 pub const ERR_MIXED_CONIC_AND_NL : i32 = 1501;
3644 /// The global optimizer can only be applied to problems without semidefinite variables.
3645 pub const ERR_GLOBAL_INV_CONIC_PROBLEM : i32 = 1503;
3646 /// An invalid optimizer has been chosen for the problem.
3647 pub const ERR_INV_OPTIMIZER : i32 = 1550;
3648 /// No optimizer is available for the current class of integer optimization problems.
3649 pub const ERR_MIO_NO_OPTIMIZER : i32 = 1551;
3650 /// No optimizer is available for this class of optimization problems.
3651 pub const ERR_NO_OPTIMIZER_VAR_TYPE : i32 = 1552;
3652 /// An error occurred during the solution finalization.
3653 pub const ERR_FINAL_SOLUTION : i32 = 1560;
3654 /// Invalid first.
3655 pub const ERR_FIRST : i32 = 1570;
3656 /// Invalid last.
3657 pub const ERR_LAST : i32 = 1571;
3658 /// Invalid slice size specified.
3659 pub const ERR_SLICE_SIZE : i32 = 1572;
3660 /// Negative surplus.
3661 pub const ERR_NEGATIVE_SURPLUS : i32 = 1573;
3662 /// Cannot append a negative number.
3663 pub const ERR_NEGATIVE_APPEND : i32 = 1578;
3664 /// An error occurred during the postsolve.
3665 pub const ERR_POSTSOLVE : i32 = 1580;
3666 /// A computation produced an overflow.
3667 pub const ERR_OVERFLOW : i32 = 1590;
3668 /// No basic solution is defined.
3669 pub const ERR_NO_BASIS_SOL : i32 = 1600;
3670 /// The factorization of the basis is invalid.
3671 pub const ERR_BASIS_FACTOR : i32 = 1610;
3672 /// The basis is singular.
3673 pub const ERR_BASIS_SINGULAR : i32 = 1615;
3674 /// An error occurred while factorizing a matrix.
3675 pub const ERR_FACTOR : i32 = 1650;
3676 /// An optimization problem cannot be relaxed.
3677 pub const ERR_FEASREPAIR_CANNOT_RELAX : i32 = 1700;
3678 /// The relaxed problem could not be solved to optimality.
3679 pub const ERR_FEASREPAIR_SOLVING_RELAXED : i32 = 1701;
3680 /// The upper bound is less than the lower bound for a variable or a constraint.
3681 pub const ERR_FEASREPAIR_INCONSISTENT_BOUND : i32 = 1702;
3682 /// The feasibility repair does not support the specified problem type.
3683 pub const ERR_REPAIR_INVALID_PROBLEM : i32 = 1710;
3684 /// Computation the optimal relaxation failed.
3685 pub const ERR_REPAIR_OPTIMIZATION_FAILED : i32 = 1711;
3686 /// A name is longer than the buffer that is supposed to hold it.
3687 pub const ERR_NAME_MAX_LEN : i32 = 1750;
3688 /// The name buffer is a null pointer.
3689 pub const ERR_NAME_IS_NULL : i32 = 1760;
3690 /// Invalid compression type.
3691 pub const ERR_INVALID_COMPRESSION : i32 = 1800;
3692 /// Invalid io mode.
3693 pub const ERR_INVALID_IOMODE : i32 = 1801;
3694 /// A certificate of primal infeasibility is not available.
3695 pub const ERR_NO_PRIMAL_INFEAS_CER : i32 = 2000;
3696 /// A certificate of dual infeasibility is not available.
3697 pub const ERR_NO_DUAL_INFEAS_CER : i32 = 2001;
3698 /// The required solution is not available.
3699 pub const ERR_NO_SOLUTION_IN_CALLBACK : i32 = 2500;
3700 /// Invalid value in marki.
3701 pub const ERR_INV_MARKI : i32 = 2501;
3702 /// Invalid value in markj.
3703 pub const ERR_INV_MARKJ : i32 = 2502;
3704 /// Invalid numi.
3705 pub const ERR_INV_NUMI : i32 = 2503;
3706 /// Invalid numj.
3707 pub const ERR_INV_NUMJ : i32 = 2504;
3708 /// The Task file is incompatible with this platform.
3709 pub const ERR_TASK_INCOMPATIBLE : i32 = 2560;
3710 /// The Task file is invalid.
3711 pub const ERR_TASK_INVALID : i32 = 2561;
3712 /// Failed to write the task file.
3713 pub const ERR_TASK_WRITE : i32 = 2562;
3714 /// Failed to read or write due to an I/O error.
3715 pub const ERR_READ_WRITE : i32 = 2563;
3716 /// The Task file ended prematurely.
3717 pub const ERR_TASK_PREMATURE_EOF : i32 = 2564;
3718 /// Could not compute the LU factors of the matrix within the maximum number of allowed tries.
3719 pub const ERR_LU_MAX_NUM_TRIES : i32 = 2800;
3720 /// An invalid UTF8 string is encountered.
3721 pub const ERR_INVALID_UTF8 : i32 = 2900;
3722 /// An invalid wchar string is encountered.
3723 pub const ERR_INVALID_WCHAR : i32 = 2901;
3724 /// No dual information is available for the integer solution.
3725 pub const ERR_NO_DUAL_FOR_ITG_SOL : i32 = 2950;
3726 /// snx is not available for the basis solution.
3727 pub const ERR_NO_SNX_FOR_BAS_SOL : i32 = 2953;
3728 /// An internal error occurred.
3729 pub const ERR_INTERNAL : i32 = 3000;
3730 /// An input array was too short.
3731 pub const ERR_API_ARRAY_TOO_SMALL : i32 = 3001;
3732 /// Failed to connect a callback object.
3733 pub const ERR_API_CB_CONNECT : i32 = 3002;
3734 /// An internal error occurred in the API. Please report this problem.
3735 pub const ERR_API_FATAL_ERROR : i32 = 3005;
3736 /// Syntax error in sensitivity analysis file.
3737 pub const ERR_SEN_FORMAT : i32 = 3050;
3738 /// An undefined name was encountered in the sensitivity analysis file.
3739 pub const ERR_SEN_UNDEF_NAME : i32 = 3051;
3740 /// Index out of range in the sensitivity analysis file.
3741 pub const ERR_SEN_INDEX_RANGE : i32 = 3052;
3742 /// Analysis of upper bound requested for an index, where no upper bound exists.
3743 pub const ERR_SEN_BOUND_INVALID_UP : i32 = 3053;
3744 /// Analysis of lower bound requested for an index, where no lower bound exists.
3745 pub const ERR_SEN_BOUND_INVALID_LO : i32 = 3054;
3746 /// Invalid range given in the sensitivity file.
3747 pub const ERR_SEN_INDEX_INVALID : i32 = 3055;
3748 /// Syntax error in regexp or regexp longer than 1024.
3749 pub const ERR_SEN_INVALID_REGEXP : i32 = 3056;
3750 /// No optimal solution found to the original problem given for sensitivity analysis.
3751 pub const ERR_SEN_SOLUTION_STATUS : i32 = 3057;
3752 /// Numerical difficulties encountered performing the sensitivity analysis.
3753 pub const ERR_SEN_NUMERICAL : i32 = 3058;
3754 /// Sensitivity analysis cannot be performed for the specified problem.
3755 pub const ERR_SEN_UNHANDLED_PROBLEM_TYPE : i32 = 3080;
3756 /// A step-size in an optimizer was unexpectedly unbounded.
3757 pub const ERR_UNB_STEP_SIZE : i32 = 3100;
3758 /// Some tasks related to this function call were identical. Unique tasks were expected.
3759 pub const ERR_IDENTICAL_TASKS : i32 = 3101;
3760 /// The code list data was invalid.
3761 pub const ERR_AD_INVALID_CODELIST : i32 = 3102;
3762 /// An internal unit test function failed.
3763 pub const ERR_INTERNAL_TEST_FAILED : i32 = 3500;
3764 /// A 64 bit integer could not be cast to a 32 bit integer.
3765 pub const ERR_INT64_TO_INT32_CAST : i32 = 3800;
3766 /// The requested value is not defined for this solution type.
3767 pub const ERR_INFEAS_UNDEFINED : i32 = 3910;
3768 /// There is no barx available for the solution specified.
3769 pub const ERR_NO_BARX_FOR_SOLUTION : i32 = 3915;
3770 /// There is no bars available for the solution specified.
3771 pub const ERR_NO_BARS_FOR_SOLUTION : i32 = 3916;
3772 /// The dimension of a symmetric matrix variable has to be greater than 0.
3773 pub const ERR_BAR_VAR_DIM : i32 = 3920;
3774 /// A row index specified for sparse symmetric matrix is invalid.
3775 pub const ERR_SYM_MAT_INVALID_ROW_INDEX : i32 = 3940;
3776 /// A column index specified for sparse symmetric matrix is invalid.
3777 pub const ERR_SYM_MAT_INVALID_COL_INDEX : i32 = 3941;
3778 /// Only the lower triangular part of sparse symmetric matrix should be specified.
3779 pub const ERR_SYM_MAT_NOT_LOWER_TRINGULAR : i32 = 3942;
3780 /// The numerical value specified in a sparse symmetric matrix is not a floating point value.
3781 pub const ERR_SYM_MAT_INVALID_VALUE : i32 = 3943;
3782 /// A value in a symmetric matric as been specified more than once.
3783 pub const ERR_SYM_MAT_DUPLICATE : i32 = 3944;
3784 /// A sparse symmetric matrix of invalid dimension is specified.
3785 pub const ERR_INVALID_SYM_MAT_DIM : i32 = 3950;
3786 /// An internal fatal error occurred in an interface function.
3787 pub const ERR_API_INTERNAL : i32 = 3999;
3788 /// The file format does not support a problem with symmetric matrix variables.
3789 pub const ERR_INVALID_FILE_FORMAT_FOR_SYM_MAT : i32 = 4000;
3790 /// The file format does not support a problem with nonzero fixed term in c.
3791 pub const ERR_INVALID_FILE_FORMAT_FOR_CFIX : i32 = 4001;
3792 /// The file format does not support a problem with ranged constraints.
3793 pub const ERR_INVALID_FILE_FORMAT_FOR_RANGED_CONSTRAINTS : i32 = 4002;
3794 /// The file format does not support a problem with free constraints.
3795 pub const ERR_INVALID_FILE_FORMAT_FOR_FREE_CONSTRAINTS : i32 = 4003;
3796 /// The file format does not support a problem with the simple cones (deprecated).
3797 pub const ERR_INVALID_FILE_FORMAT_FOR_CONES : i32 = 4005;
3798 /// The file format does not support a problem with quadratic terms.
3799 pub const ERR_INVALID_FILE_FORMAT_FOR_QUADRATIC_TERMS : i32 = 4006;
3800 /// The file format does not support a problem with nonlinear terms.
3801 pub const ERR_INVALID_FILE_FORMAT_FOR_NONLINEAR : i32 = 4010;
3802 /// The file format does not support a problem with disjunctive constraints.
3803 pub const ERR_INVALID_FILE_FORMAT_FOR_DISJUNCTIVE_CONSTRAINTS : i32 = 4011;
3804 /// The file format does not support a problem with affine conic constraints.
3805 pub const ERR_INVALID_FILE_FORMAT_FOR_AFFINE_CONIC_CONSTRAINTS : i32 = 4012;
3806 /// Two constraint names are identical.
3807 pub const ERR_DUPLICATE_CONSTRAINT_NAMES : i32 = 4500;
3808 /// Two variable names are identical.
3809 pub const ERR_DUPLICATE_VARIABLE_NAMES : i32 = 4501;
3810 /// Two barvariable names are identical.
3811 pub const ERR_DUPLICATE_BARVARIABLE_NAMES : i32 = 4502;
3812 /// Two cone names are identical.
3813 pub const ERR_DUPLICATE_CONE_NAMES : i32 = 4503;
3814 /// Two domain names are identical.
3815 pub const ERR_DUPLICATE_DOMAIN_NAMES : i32 = 4504;
3816 /// Two disjunctive constraint names are identical.
3817 pub const ERR_DUPLICATE_DJC_NAMES : i32 = 4505;
3818 /// An array does not contain unique elements.
3819 pub const ERR_NON_UNIQUE_ARRAY : i32 = 5000;
3820 /// The value of a function argument is too small.
3821 pub const ERR_ARGUMENT_IS_TOO_SMALL : i32 = 5004;
3822 /// The value of a function argument is too large.
3823 pub const ERR_ARGUMENT_IS_TOO_LARGE : i32 = 5005;
3824 /// A fatal error occurred in the mixed integer optimizer. Please contact MOSEK support.
3825 pub const ERR_MIO_INTERNAL : i32 = 5010;
3826 /// An invalid problem type.
3827 pub const ERR_INVALID_PROBLEM_TYPE : i32 = 6000;
3828 /// Unhandled solution status.
3829 pub const ERR_UNHANDLED_SOLUTION_STATUS : i32 = 6010;
3830 /// An element in the upper triangle of a lower triangular matrix is specified.
3831 pub const ERR_UPPER_TRIANGLE : i32 = 6020;
3832 /// A matrix is singular.
3833 pub const ERR_LAU_SINGULAR_MATRIX : i32 = 7000;
3834 /// A matrix is not positive definite.
3835 pub const ERR_LAU_NOT_POSITIVE_DEFINITE : i32 = 7001;
3836 /// An invalid lower triangular matrix.
3837 pub const ERR_LAU_INVALID_LOWER_TRIANGULAR_MATRIX : i32 = 7002;
3838 /// An unknown error.
3839 pub const ERR_LAU_UNKNOWN : i32 = 7005;
3840 /// Invalid argument m.
3841 pub const ERR_LAU_ARG_M : i32 = 7010;
3842 /// Invalid argument n.
3843 pub const ERR_LAU_ARG_N : i32 = 7011;
3844 /// Invalid argument k.
3845 pub const ERR_LAU_ARG_K : i32 = 7012;
3846 /// Invalid argument transa.
3847 pub const ERR_LAU_ARG_TRANSA : i32 = 7015;
3848 /// Invalid argument transb.
3849 pub const ERR_LAU_ARG_TRANSB : i32 = 7016;
3850 /// Invalid argument uplo.
3851 pub const ERR_LAU_ARG_UPLO : i32 = 7017;
3852 /// Invalid argument trans.
3853 pub const ERR_LAU_ARG_TRANS : i32 = 7018;
3854 /// An invalid sparse symmetric matrix is specfified.
3855 pub const ERR_LAU_INVALID_SPARSE_SYMMETRIC_MATRIX : i32 = 7019;
3856 /// An error occurred while parsing an CBF file.
3857 pub const ERR_CBF_PARSE : i32 = 7100;
3858 /// An invalid objective sense is specified.
3859 pub const ERR_CBF_OBJ_SENSE : i32 = 7101;
3860 /// An invalid objective sense is specified.
3861 pub const ERR_CBF_NO_VARIABLES : i32 = 7102;
3862 /// Too many constraints specified.
3863 pub const ERR_CBF_TOO_MANY_CONSTRAINTS : i32 = 7103;
3864 /// Too many variables specified.
3865 pub const ERR_CBF_TOO_MANY_VARIABLES : i32 = 7104;
3866 /// No version specified.
3867 pub const ERR_CBF_NO_VERSION_SPECIFIED : i32 = 7105;
3868 /// Invalid syntax.
3869 pub const ERR_CBF_SYNTAX : i32 = 7106;
3870 /// Duplicate OBJ keyword.
3871 pub const ERR_CBF_DUPLICATE_OBJ : i32 = 7107;
3872 /// Duplicate CON keyword.
3873 pub const ERR_CBF_DUPLICATE_CON : i32 = 7108;
3874 /// Duplicate VAR keyword.
3875 pub const ERR_CBF_DUPLICATE_VAR : i32 = 7110;
3876 /// Duplicate INT keyword.
3877 pub const ERR_CBF_DUPLICATE_INT : i32 = 7111;
3878 /// Invalid variable type.
3879 pub const ERR_CBF_INVALID_VAR_TYPE : i32 = 7112;
3880 /// Invalid constraint type.
3881 pub const ERR_CBF_INVALID_CON_TYPE : i32 = 7113;
3882 /// Invalid domain dimension.
3883 pub const ERR_CBF_INVALID_DOMAIN_DIMENSION : i32 = 7114;
3884 /// Duplicate index in OBJCOORD.
3885 pub const ERR_CBF_DUPLICATE_OBJACOORD : i32 = 7115;
3886 /// Duplicate index in BCOORD.
3887 pub const ERR_CBF_DUPLICATE_BCOORD : i32 = 7116;
3888 /// Duplicate index in ACOORD.
3889 pub const ERR_CBF_DUPLICATE_ACOORD : i32 = 7117;
3890 /// Too few variables defined.
3891 pub const ERR_CBF_TOO_FEW_VARIABLES : i32 = 7118;
3892 /// Too few constraints defined.
3893 pub const ERR_CBF_TOO_FEW_CONSTRAINTS : i32 = 7119;
3894 /// Too ints specified.
3895 pub const ERR_CBF_TOO_FEW_INTS : i32 = 7120;
3896 /// Too ints specified.
3897 pub const ERR_CBF_TOO_MANY_INTS : i32 = 7121;
3898 /// Invalid INT index.
3899 pub const ERR_CBF_INVALID_INT_INDEX : i32 = 7122;
3900 /// Unsupported feature is present.
3901 pub const ERR_CBF_UNSUPPORTED : i32 = 7123;
3902 /// Duplicate PSDVAR keyword.
3903 pub const ERR_CBF_DUPLICATE_PSDVAR : i32 = 7124;
3904 /// Invalid PSDVAR dimension.
3905 pub const ERR_CBF_INVALID_PSDVAR_DIMENSION : i32 = 7125;
3906 /// Too few variables defined.
3907 pub const ERR_CBF_TOO_FEW_PSDVAR : i32 = 7126;
3908 /// Invalid dimension of a exponential cone.
3909 pub const ERR_CBF_INVALID_EXP_DIMENSION : i32 = 7127;
3910 /// Multiple POWCONES specified.
3911 pub const ERR_CBF_DUPLICATE_POW_CONES : i32 = 7130;
3912 /// Multiple POW*CONES specified.
3913 pub const ERR_CBF_DUPLICATE_POW_STAR_CONES : i32 = 7131;
3914 /// Invalid power specified.
3915 pub const ERR_CBF_INVALID_POWER : i32 = 7132;
3916 /// Power cone is too long.
3917 pub const ERR_CBF_POWER_CONE_IS_TOO_LONG : i32 = 7133;
3918 /// Invalid power cone index.
3919 pub const ERR_CBF_INVALID_POWER_CONE_INDEX : i32 = 7134;
3920 /// Invalid power star cone index.
3921 pub const ERR_CBF_INVALID_POWER_STAR_CONE_INDEX : i32 = 7135;
3922 /// An unhandled power cone type.
3923 pub const ERR_CBF_UNHANDLED_POWER_CONE_TYPE : i32 = 7136;
3924 /// An unhandled power star cone type.
3925 pub const ERR_CBF_UNHANDLED_POWER_STAR_CONE_TYPE : i32 = 7137;
3926 /// The power cone does not match with it definition.
3927 pub const ERR_CBF_POWER_CONE_MISMATCH : i32 = 7138;
3928 /// The power star cone does not match with it definition.
3929 pub const ERR_CBF_POWER_STAR_CONE_MISMATCH : i32 = 7139;
3930 /// Invalid number of cones.
3931 pub const ERR_CBF_INVALID_NUMBER_OF_CONES : i32 = 7140;
3932 /// Invalid number of cones.
3933 pub const ERR_CBF_INVALID_DIMENSION_OF_CONES : i32 = 7141;
3934 /// Invalid number of OBJACOORD.
3935 pub const ERR_CBF_INVALID_NUM_OBJACOORD : i32 = 7150;
3936 /// Invalid number of OBJFCOORD.
3937 pub const ERR_CBF_INVALID_NUM_OBJFCOORD : i32 = 7151;
3938 /// Invalid number of ACOORD.
3939 pub const ERR_CBF_INVALID_NUM_ACOORD : i32 = 7152;
3940 /// Invalid number of BCOORD.
3941 pub const ERR_CBF_INVALID_NUM_BCOORD : i32 = 7153;
3942 /// Invalid number of FCOORD.
3943 pub const ERR_CBF_INVALID_NUM_FCOORD : i32 = 7155;
3944 /// Invalid number of HCOORD.
3945 pub const ERR_CBF_INVALID_NUM_HCOORD : i32 = 7156;
3946 /// Invalid number of DCOORD.
3947 pub const ERR_CBF_INVALID_NUM_DCOORD : i32 = 7157;
3948 /// Expected a key word.
3949 pub const ERR_CBF_EXPECTED_A_KEYWORD : i32 = 7158;
3950 /// Invalid number of PSDCON.
3951 pub const ERR_CBF_INVALID_NUM_PSDCON : i32 = 7200;
3952 /// Duplicate CON keyword.
3953 pub const ERR_CBF_DUPLICATE_PSDCON : i32 = 7201;
3954 /// Invalid PSDCON dimension.
3955 pub const ERR_CBF_INVALID_DIMENSION_OF_PSDCON : i32 = 7202;
3956 /// Invalid PSDCON index.
3957 pub const ERR_CBF_INVALID_PSDCON_INDEX : i32 = 7203;
3958 /// Invalid PSDCON index.
3959 pub const ERR_CBF_INVALID_PSDCON_VARIABLE_INDEX : i32 = 7204;
3960 /// Invalid PSDCON index.
3961 pub const ERR_CBF_INVALID_PSDCON_BLOCK_INDEX : i32 = 7205;
3962 /// The CHANGE section is not supported.
3963 pub const ERR_CBF_UNSUPPORTED_CHANGE : i32 = 7210;
3964 /// An invalid root optimizer was selected for the problem type.
3965 pub const ERR_MIO_INVALID_ROOT_OPTIMIZER : i32 = 7700;
3966 /// An invalid node optimizer was selected for the problem type.
3967 pub const ERR_MIO_INVALID_NODE_OPTIMIZER : i32 = 7701;
3968 /// An invalid cone type occurs when writing a CPLEX formatted MPS file.
3969 pub const ERR_MPS_WRITE_CPLEX_INVALID_CONE_TYPE : i32 = 7750;
3970 /// The matrix defining the quadratric part of constraint is not positive semidefinite.
3971 pub const ERR_TOCONIC_CONSTR_Q_NOT_PSD : i32 = 7800;
3972 /// The quadratic constraint is an equality, thus not convex.
3973 pub const ERR_TOCONIC_CONSTRAINT_FX : i32 = 7801;
3974 /// The quadratic constraint has finite lower and upper bound, and therefore it is not convex.
3975 pub const ERR_TOCONIC_CONSTRAINT_RA : i32 = 7802;
3976 /// The constraint is not conic representable.
3977 pub const ERR_TOCONIC_CONSTR_NOT_CONIC : i32 = 7803;
3978 /// The matrix defining the quadratric part of the objective function is not positive semidefinite.
3979 pub const ERR_TOCONIC_OBJECTIVE_NOT_PSD : i32 = 7804;
3980 /// The simple dualizer is not available for this problem class.
3981 pub const ERR_GETDUAL_NOT_AVAILABLE : i32 = 7820;
3982 /// Failed to connect to remote solver server.
3983 pub const ERR_SERVER_CONNECT : i32 = 8000;
3984 /// Unexpected message or data from solver server.
3985 pub const ERR_SERVER_PROTOCOL : i32 = 8001;
3986 /// Server returned non-ok status code
3987 pub const ERR_SERVER_STATUS : i32 = 8002;
3988 /// Invalid job ID
3989 pub const ERR_SERVER_TOKEN : i32 = 8003;
3990 /// Invalid address
3991 pub const ERR_SERVER_ADDRESS : i32 = 8004;
3992 /// Invalid TLS certificate format or path
3993 pub const ERR_SERVER_CERTIFICATE : i32 = 8005;
3994 /// Failed to create TLS client
3995 pub const ERR_SERVER_TLS_CLIENT : i32 = 8006;
3996 /// Invalid access token
3997 pub const ERR_SERVER_ACCESS_TOKEN : i32 = 8007;
3998 /// The problem is too large.
3999 pub const ERR_SERVER_PROBLEM_SIZE : i32 = 8008;
4000 /// The hard timeout limit was reached on solver server
4001 pub const ERR_SERVER_HARD_TIMEOUT : i32 = 8009;
4002 /// An element in a sparse matrix is specified twice.
4003 pub const ERR_DUPLICATE_INDEX_IN_A_SPARSE_MATRIX : i32 = 20050;
4004 /// An index is specified twice in an affine expression list.
4005 pub const ERR_DUPLICATE_INDEX_IN_AFEIDX_LIST : i32 = 20060;
4006 /// An element in the F matrix is specified twice.
4007 pub const ERR_DUPLICATE_FIJ : i32 = 20100;
4008 /// f\[i,j\] contains an invalid floating point value, i.e. a NaN or an infinite value.
4009 pub const ERR_INVALID_FIJ : i32 = 20101;
4010 /// A numerically huge value is specified for an element in F.
4011 pub const ERR_HUGE_FIJ : i32 = 20102;
4012 /// g contains an invalid floating point value, i.e. a NaN or an infinite value.
4013 pub const ERR_INVALID_G : i32 = 20103;
4014 /// b contains an invalid floating point value, i.e. a NaN or an infinite value.
4015 pub const ERR_INVALID_B : i32 = 20150;
4016 /// A domain index is invalid.
4017 pub const ERR_DOMAIN_INVALID_INDEX : i32 = 20400;
4018 /// A domain dimension is invalid.
4019 pub const ERR_DOMAIN_DIMENSION : i32 = 20401;
4020 /// A PSD domain dimension is invalid.
4021 pub const ERR_DOMAIN_DIMENSION_PSD : i32 = 20402;
4022 /// The function is only applicable to primal and dual power cone domains.
4023 pub const ERR_NOT_POWER_DOMAIN : i32 = 20403;
4024 /// Alpha contains an invalid floating point value, i.e. a NaN or an infinite value.
4025 pub const ERR_DOMAIN_POWER_INVALID_ALPHA : i32 = 20404;
4026 /// Alpha contains a negative value or zero.
4027 pub const ERR_DOMAIN_POWER_NEGATIVE_ALPHA : i32 = 20405;
4028 /// The value of nleft is too small or too large.
4029 pub const ERR_DOMAIN_POWER_NLEFT : i32 = 20406;
4030 /// An affine expression index is invalid.
4031 pub const ERR_AFE_INVALID_INDEX : i32 = 20500;
4032 /// A affine conic constraint index is invalid.
4033 pub const ERR_ACC_INVALID_INDEX : i32 = 20600;
4034 /// The index of an element in an affine conic constraint is invalid.
4035 pub const ERR_ACC_INVALID_ENTRY_INDEX : i32 = 20601;
4036 /// There is a mismatch between between the number of affine expressions and total dimension of the domain(s).
4037 pub const ERR_ACC_AFE_DOMAIN_MISMATCH : i32 = 20602;
4038 /// A disjunctive constraint index is invalid.
4039 pub const ERR_DJC_INVALID_INDEX : i32 = 20700;
4040 /// An unsupported domain type has been used in a disjunctive constraint.
4041 pub const ERR_DJC_UNSUPPORTED_DOMAIN_TYPE : i32 = 20701;
4042 /// There is a mismatch between the number of affine expressions and total dimension of the domain(s).
4043 pub const ERR_DJC_AFE_DOMAIN_MISMATCH : i32 = 20702;
4044 /// A termize is invalid.
4045 pub const ERR_DJC_INVALID_TERM_SIZE : i32 = 20703;
4046 /// There is a mismatch between the number of domains and the term sizes.
4047 pub const ERR_DJC_DOMAIN_TERMSIZE_MISMATCH : i32 = 20704;
4048 /// There total number of terms in all domains does not match.
4049 pub const ERR_DJC_TOTAL_NUM_TERMS_MISMATCH : i32 = 20705;
4050 /// The required solution is not defined.
4051 pub const ERR_UNDEF_SOLUTION : i32 = 22000;
4052 /// No doty is available.
4053 pub const ERR_NO_DOTY : i32 = 22010;
4054 /// The optimizer terminated at the maximum number of iterations.
4055 pub const TRM_MAX_ITERATIONS : i32 = 100000;
4056 /// The optimizer terminated at the maximum amount of time.
4057 pub const TRM_MAX_TIME : i32 = 100001;
4058 /// The optimizer terminated with an objective value outside the objective range.
4059 pub const TRM_OBJECTIVE_RANGE : i32 = 100002;
4060 /// The optimizer is terminated due to slow progress.
4061 pub const TRM_STALL : i32 = 100006;
4062 /// The user-defined progress callback function terminated the optimization.
4063 pub const TRM_USER_CALLBACK : i32 = 100007;
4064 /// The mixed-integer optimizer terminated as the maximum number of relaxations was reached.
4065 pub const TRM_MIO_NUM_RELAXS : i32 = 100008;
4066 /// The mixed-integer optimizer terminated as the maximum number of branches was reached.
4067 pub const TRM_MIO_NUM_BRANCHES : i32 = 100009;
4068 /// The mixed-integer optimizer terminated as the maximum number of feasible solutions was reached.
4069 pub const TRM_NUM_MAX_NUM_INT_SOLUTIONS : i32 = 100015;
4070 /// The optimizer terminated as the maximum number of set-backs was reached.
4071 pub const TRM_MAX_NUM_SETBACKS : i32 = 100020;
4072 /// The optimizer terminated due to a numerical problem.
4073 pub const TRM_NUMERICAL_PROBLEM : i32 = 100025;
4074 /// Lost a race.
4075 pub const TRM_LOST_RACE : i32 = 100027;
4076 /// The optimizer terminated due to some internal reason.
4077 pub const TRM_INTERNAL : i32 = 100030;
4078 /// The optimizer terminated for internal reasons.
4079 pub const TRM_INTERNAL_STOP : i32 = 100031;
4080 /// remote server terminated mosek on time limit criteria.
4081 pub const TRM_SERVER_MAX_TIME : i32 = 100032;
4082 /// remote server terminated mosek on memory limit criteria.
4083 pub const TRM_SERVER_MAX_MEMORY : i32 = 100033;
4084} // impl Rescode
4085
4086/// Response code type
4087#[non_exhaustive]
4088pub struct Rescodetype;
4089impl Rescodetype {
4090 /// The response code is OK.
4091 pub const OK : i32 = 0;
4092 /// The response code is a warning.
4093 pub const WRN : i32 = 1;
4094 /// The response code is an optimizer termination status.
4095 pub const TRM : i32 = 2;
4096 /// The response code is an error.
4097 pub const ERR : i32 = 3;
4098 /// The response code does not belong to any class.
4099 pub const UNK : i32 = 4;
4100} // impl Rescodetype
4101
4102/// Scaling type
4103#[non_exhaustive]
4104pub struct Scalingtype;
4105impl Scalingtype {
4106 /// The optimizer chooses the scaling heuristic.
4107 pub const FREE : i32 = 0;
4108 /// No scaling is performed.
4109 pub const NONE : i32 = 1;
4110} // impl Scalingtype
4111
4112/// Scaling method
4113#[non_exhaustive]
4114pub struct Scalingmethod;
4115impl Scalingmethod {
4116 /// Scales only with power of 2 leaving the mantissa untouched.
4117 pub const POW2 : i32 = 0;
4118 /// The optimizer chooses the scaling heuristic.
4119 pub const FREE : i32 = 1;
4120} // impl Scalingmethod
4121
4122/// Sensitivity types
4123#[non_exhaustive]
4124pub struct Sensitivitytype;
4125impl Sensitivitytype {
4126 /// Basis sensitivity analysis is performed.
4127 pub const BASIS : i32 = 0;
4128} // impl Sensitivitytype
4129
4130/// Simplex selection strategy
4131#[non_exhaustive]
4132pub struct Simseltype;
4133impl Simseltype {
4134 /// The optimizer chooses the pricing strategy.
4135 pub const FREE : i32 = 0;
4136 /// The optimizer uses full pricing.
4137 pub const FULL : i32 = 1;
4138 /// The optimizer uses approximate steepest-edge pricing.
4139 pub const ASE : i32 = 2;
4140 /// The optimizer uses devex steepest-edge pricing.
4141 pub const DEVEX : i32 = 3;
4142 /// The optimizer uses steepest-edge selection.
4143 pub const SE : i32 = 4;
4144 /// The optimizer uses a partial selection approach.
4145 pub const PARTIAL : i32 = 5;
4146} // impl Simseltype
4147
4148/// Solution items
4149#[non_exhaustive]
4150pub struct Solitem;
4151impl Solitem {
4152 /// Solution for the constraints.
4153 pub const XC : i32 = 0;
4154 /// Variable solution.
4155 pub const XX : i32 = 1;
4156 /// Lagrange multipliers for equations.
4157 pub const Y : i32 = 2;
4158 /// Lagrange multipliers for lower bounds on the constraints.
4159 pub const SLC : i32 = 3;
4160 /// Lagrange multipliers for upper bounds on the constraints.
4161 pub const SUC : i32 = 4;
4162 /// Lagrange multipliers for lower bounds on the variables.
4163 pub const SLX : i32 = 5;
4164 /// Lagrange multipliers for upper bounds on the variables.
4165 pub const SUX : i32 = 6;
4166 /// Lagrange multipliers corresponding to the conic constraints on the variables.
4167 pub const SNX : i32 = 7;
4168} // impl Solitem
4169
4170/// Solution status keys
4171#[non_exhaustive]
4172pub struct Solsta;
4173impl Solsta {
4174 /// Status of the solution is unknown.
4175 pub const UNKNOWN : i32 = 0;
4176 /// The solution is optimal.
4177 pub const OPTIMAL : i32 = 1;
4178 /// The solution is primal feasible.
4179 pub const PRIM_FEAS : i32 = 2;
4180 /// The solution is dual feasible.
4181 pub const DUAL_FEAS : i32 = 3;
4182 /// The solution is both primal and dual feasible.
4183 pub const PRIM_AND_DUAL_FEAS : i32 = 4;
4184 /// The solution is a certificate of primal infeasibility.
4185 pub const PRIM_INFEAS_CER : i32 = 5;
4186 /// The solution is a certificate of dual infeasibility.
4187 pub const DUAL_INFEAS_CER : i32 = 6;
4188 /// The solution is a certificate that the primal problem is illposed.
4189 pub const PRIM_ILLPOSED_CER : i32 = 7;
4190 /// The solution is a certificate that the dual problem is illposed.
4191 pub const DUAL_ILLPOSED_CER : i32 = 8;
4192 /// The primal solution is integer optimal.
4193 pub const INTEGER_OPTIMAL : i32 = 9;
4194} // impl Solsta
4195
4196/// Solution types
4197#[non_exhaustive]
4198pub struct Soltype;
4199impl Soltype {
4200 /// The interior solution.
4201 pub const ITR : i32 = 0;
4202 /// The basic solution.
4203 pub const BAS : i32 = 1;
4204 /// The integer solution.
4205 pub const ITG : i32 = 2;
4206} // impl Soltype
4207
4208/// Solve primal or dual form
4209#[non_exhaustive]
4210pub struct Solveform;
4211impl Solveform {
4212 /// The optimizer is free to solve either the primal or the dual problem.
4213 pub const FREE : i32 = 0;
4214 /// The optimizer should solve the primal problem.
4215 pub const PRIMAL : i32 = 1;
4216 /// The optimizer should solve the dual problem.
4217 pub const DUAL : i32 = 2;
4218} // impl Solveform
4219
4220/// String parameters
4221#[non_exhaustive]
4222pub struct Sparam;
4223impl Sparam {
4224 /// Name of the bas solution file.
4225 pub const BAS_SOL_FILE_NAME : i32 = 0;
4226 /// Data are read and written to this file.
4227 pub const DATA_FILE_NAME : i32 = 1;
4228 /// MOSEK debug file.
4229 pub const DEBUG_FILE_NAME : i32 = 2;
4230 /// Name of the int solution file.
4231 pub const INT_SOL_FILE_NAME : i32 = 3;
4232 /// Name of the itr solution file.
4233 pub const ITR_SOL_FILE_NAME : i32 = 4;
4234 /// For internal debugging purposes.
4235 pub const MIO_DEBUG_STRING : i32 = 5;
4236 /// Parameter file comment character.
4237 pub const PARAM_COMMENT_SIGN : i32 = 6;
4238 /// Modifications to the parameter database is read from this file.
4239 pub const PARAM_READ_FILE_NAME : i32 = 7;
4240 /// The parameter database is written to this file.
4241 pub const PARAM_WRITE_FILE_NAME : i32 = 8;
4242 /// Name of the BOUNDS vector used. An empty name means that the first BOUNDS vector is used.
4243 pub const READ_MPS_BOU_NAME : i32 = 9;
4244 /// Objective name in the MPS file.
4245 pub const READ_MPS_OBJ_NAME : i32 = 10;
4246 /// Name of the RANGE vector used. An empty name means that the first RANGE vector is used.
4247 pub const READ_MPS_RAN_NAME : i32 = 11;
4248 /// Name of the RHS used. An empty name means that the first RHS vector is used.
4249 pub const READ_MPS_RHS_NAME : i32 = 12;
4250 /// URL of the remote optimization server.
4251 pub const REMOTE_OPTSERVER_HOST : i32 = 13;
4252 /// Known server certificates in PEM format
4253 pub const REMOTE_TLS_CERT : i32 = 14;
4254 /// Path to known server certificates in PEM format
4255 pub const REMOTE_TLS_CERT_PATH : i32 = 15;
4256 /// Sensitivity report file name.
4257 pub const SENSITIVITY_FILE_NAME : i32 = 16;
4258 /// Name of the sensitivity report output file.
4259 pub const SENSITIVITY_RES_FILE_NAME : i32 = 17;
4260 /// Solution file filter.
4261 pub const SOL_FILTER_XC_LOW : i32 = 18;
4262 /// Solution file filter.
4263 pub const SOL_FILTER_XC_UPR : i32 = 19;
4264 /// Solution file filter.
4265 pub const SOL_FILTER_XX_LOW : i32 = 20;
4266 /// Solution file filter.
4267 pub const SOL_FILTER_XX_UPR : i32 = 21;
4268 /// Key used when writing the summary file.
4269 pub const STAT_KEY : i32 = 22;
4270 /// Name used when writing the statistics file.
4271 pub const STAT_NAME : i32 = 23;
4272} // impl Sparam
4273
4274/// Status keys
4275#[non_exhaustive]
4276pub struct Stakey;
4277impl Stakey {
4278 /// The status for the constraint or variable is unknown.
4279 pub const UNK : i32 = 0;
4280 /// The constraint or variable is in the basis.
4281 pub const BAS : i32 = 1;
4282 /// The constraint or variable is super basic.
4283 pub const SUPBAS : i32 = 2;
4284 /// The constraint or variable is at its lower bound.
4285 pub const LOW : i32 = 3;
4286 /// The constraint or variable is at its upper bound.
4287 pub const UPR : i32 = 4;
4288 /// The constraint or variable is fixed.
4289 pub const FIX : i32 = 5;
4290 /// The constraint or variable is infeasible in the bounds.
4291 pub const INF : i32 = 6;
4292} // impl Stakey
4293
4294/// Starting point types
4295#[non_exhaustive]
4296pub struct Startpointtype;
4297impl Startpointtype {
4298 /// The starting point is chosen automatically.
4299 pub const FREE : i32 = 0;
4300 /// The optimizer guesses a starting point.
4301 pub const GUESS : i32 = 1;
4302 /// The optimizer constructs a starting point by assigning a constant value to all primal and dual variables. This starting point is normally robust.
4303 pub const CONSTANT : i32 = 2;
4304} // impl Startpointtype
4305
4306/// Stream types
4307#[non_exhaustive]
4308pub struct Streamtype;
4309impl Streamtype {
4310 /// Log stream. Contains the aggregated contents of all other streams. This means that a message written to any other stream will also be written to this stream.
4311 pub const LOG : i32 = 0;
4312 /// Message stream. Log information relating to performance and progress of the optimization is written to this stream.
4313 pub const MSG : i32 = 1;
4314 /// Error stream. Error messages are written to this stream.
4315 pub const ERR : i32 = 2;
4316 /// Warning stream. Warning messages are written to this stream.
4317 pub const WRN : i32 = 3;
4318} // impl Streamtype
4319
4320/// Integer values
4321#[non_exhaustive]
4322pub struct Value;
4323impl Value {
4324 /// The length of a license key buffer.
4325 pub const LICENSE_BUFFER_LENGTH : i32 = 21;
4326 /// Maximum string length allowed in MOSEK.
4327 pub const MAX_STR_LEN : i32 = 1024;
4328} // impl Value
4329
4330/// Variable types
4331#[non_exhaustive]
4332pub struct Variabletype;
4333impl Variabletype {
4334 /// Is a continuous variable.
4335 pub const TYPE_CONT : i32 = 0;
4336 /// Is an integer variable.
4337 pub const TYPE_INT : i32 = 1;
4338} // impl Variabletype
4339
4340#[allow(unused_parens)]
4341fn handle_res_static(r : i32, funname : &str) -> Result<(),String> {
4342 return
4343 ( if r != 0 { Err(format!("Error in call to {}: {}",funname,r)) }
4344 else {
4345 Ok(())
4346 })
4347}
4348
4349/// Environment. Defines an environment in which tasks are created. In
4350/// most cases it is not necessary to create this directly since the
4351/// tasks can use the default environment.
4352pub struct Env {
4353 ptr : * const u8
4354}
4355
4356
4357/// The Task structure encapsulates a MOSEK Task containing problem
4358/// data, parameters and other information used to solve the
4359/// optimization problem, and provides the API for interacting with
4360/// the task data.
4361///
4362/// The Task object does not support callbacks, but can be passed or
4363/// shared between threads. If callbacks are needed, use the
4364/// `with_callbacks` metho to convert it into a `TaskCB` object.
4365pub struct Task {
4366 ptr : * const u8,
4367}
4368unsafe impl Send for Task {}
4369
4370
4371/// The `TaskCB` object has all the same API functions as the `Task`
4372/// object, plus functions for setting and clearing callbacks. The
4373/// `TaskCB` is not safe to pass or share between threads.
4374///
4375/// A `TaskCB` can be converted back into a `Task` by the member
4376/// function `without_callbacks()`.
4377
4378
4379struct TaskCBData {
4380 task : Task,
4381 streamcb : [ Option<Box<Box<dyn Fn(&str)>>>; 4 ],
4382 valuecb : Option<Box<dyn FnMut(i32,&[f64],&[i32],&[i64]) -> bool>>,
4383 codecb : Option<Box<dyn FnMut(i32) -> bool>>,
4384 intsolcb : Option<Box<dyn FnMut(&[f64])>>,
4385}
4386pub struct TaskCB {
4387 data : Box<TaskCBData>
4388}
4389
4390
4391impl Env {
4392
4393 /// Create a new environment
4394 pub fn new() -> Option<Env> {
4395 let mut env : * const u8 = std::ptr::null();
4396 let res = unsafe { MSK_makeenv(& mut env, std::ptr::null()) };
4397 if res != 0 { return None; }
4398
4399 return Some(Env { ptr : env });
4400 }
4401
4402 /// Create a new environment, specifying an output file used for writing memory debugging information.
4403 pub fn new_mem_debug(dbgfile : &str) -> Option<Env> {
4404 let mut env : * const u8 = std::ptr::null();
4405 let dbgfile_cstr = CString::new(dbgfile).unwrap();
4406 let res = unsafe { MSK_makeenv(& mut env, dbgfile_cstr.as_ptr()) };
4407 if res != 0 { return None; }
4408
4409 return Some(Env { ptr : env });
4410 }
4411
4412 /// Create a new task in this environment
4413 pub fn task(&self) -> Option<Task> { Task::from_env(Some(&self)) }
4414
4415 /// Create a new task in this environment with pre-defined capacities.
4416 pub fn task_with_capacity(&self, numcon : i32, numvar : i32) -> Option<Task> {
4417 return Task::with_capacity(Some(&self),numcon,numvar)
4418 }
4419
4420 fn handle_res(&self, r : i32, funname : &str) -> Result<(),String> {
4421 return handle_res_static(r,funname);
4422 }
4423
4424 /// Computes vector addition and multiplication by a scalar.
4425 ///
4426 /// # Arguments
4427 ///
4428 /// - `n_` Length of the vectors.
4429 /// - `alpha_` The scalar that multiplies x.
4430 /// - `x_` The x vector.
4431 /// - `y_` The y vector.
4432 ///
4433 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.axpy>
4434 #[allow(unused_parens)]
4435 pub fn axpy(&self,n_ : i32,alpha_ : f64,x_ : &[f64],y_ : &mut[f64]) -> Result<(),String> {
4436 if x_.len() != (n_).try_into().unwrap() {
4437 return Result::Err("axpy: Argument 'x' has the wrong length, expected n_".to_string());
4438 }
4439 if y_.len() != (n_).try_into().unwrap() {
4440 return Result::Err("axpy: Argument 'y' has the wrong length, expected n_".to_string());
4441 }
4442 self.handle_res(unsafe { MSK_axpy(self.ptr,n_,alpha_,x_.as_ptr(),y_.as_mut_ptr()) },"axpy")?;
4443 return Result::Ok(());
4444 } // axpy
4445 /// Check in all unused license features to the license token server.
4446 ///
4447 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.checkinall>
4448 #[allow(unused_parens)]
4449 pub fn check_in_all(&mut self) -> Result<(),String> {
4450 self.handle_res(unsafe { MSK_checkinall(self.ptr) },"check_in_all")?;
4451 return Result::Ok(());
4452 } // checkinall
4453 /// Check in a license feature back to the license server ahead of time.
4454 ///
4455 /// # Arguments
4456 ///
4457 /// - `feature_` Feature to check in to the license system.
4458 ///
4459 /// See [Feature]
4460 ///
4461 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.checkinlicense>
4462 #[allow(unused_parens)]
4463 pub fn check_in_license(&mut self,feature_ : i32) -> Result<(),String> {
4464 self.handle_res(unsafe { MSK_checkinlicense(self.ptr,feature_) },"check_in_license")?;
4465 return Result::Ok(());
4466 } // checkinlicense
4467 /// Check out a license feature from the license server ahead of time.
4468 ///
4469 /// # Arguments
4470 ///
4471 /// - `feature_` Feature to check out from the license system.
4472 ///
4473 /// See [Feature]
4474 ///
4475 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.checkoutlicense>
4476 #[allow(unused_parens)]
4477 pub fn check_out_license(&mut self,feature_ : i32) -> Result<(),String> {
4478 self.handle_res(unsafe { MSK_checkoutlicense(self.ptr,feature_) },"check_out_license")?;
4479 return Result::Ok(());
4480 } // checkoutlicense
4481 /// Compares a version of the MOSEK DLL with a specified version.
4482 ///
4483 /// # Arguments
4484 ///
4485 /// - `major_` Major version number.
4486 /// - `minor_` Minor version number.
4487 /// - `revision_` Revision number.
4488 ///
4489 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.checkversion>
4490 #[allow(unused_parens)]
4491 pub fn check_version(&self,major_ : i32,minor_ : i32,revision_ : i32) -> Result<(),String> {
4492 self.handle_res(unsafe { MSK_checkversion(self.ptr,major_,minor_,revision_) },"check_version")?;
4493 return Result::Ok(());
4494 } // checkversion
4495 /// Computes a Cholesky factorization of sparse matrix.
4496 ///
4497 /// # Arguments
4498 ///
4499 /// - `numthreads_` The number threads that can be used to do the computation. 0 means the code makes the choice.
4500 /// - `ordermethod_` If nonzero, then a sparsity preserving ordering will be employed.
4501 /// - `tolsingular_` A positive parameter controlling when a pivot is declared zero.
4502 /// - `anzc_` anzc\[j\] is the number of nonzeros in the jth column of A.
4503 /// - `aptrc_` aptrc\[j\] is a pointer to the first element in column j.
4504 /// - `asubc_` Row indexes for each column stored in increasing order.
4505 /// - `avalc_` The value corresponding to row indexed stored in asubc.
4506 /// - `perm_` Permutation array used to specify the permutation matrix P computed by the function.
4507 /// - `diag_` The diagonal elements of matrix D.
4508 /// - `lnzc_` lnzc\[j\] is the number of non zero elements in column j.
4509 /// - `lptrc_` lptrc\[j\] is a pointer to the first row index and value in column j.
4510 /// - `lensubnval_` Number of elements in lsubc and lvalc.
4511 /// - `lsubc_` Row indexes for each column stored in increasing order.
4512 /// - `lvalc_` The values corresponding to row indexed stored in lsubc.
4513 ///
4514 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.computesparsecholesky>
4515 #[allow(unused_parens)]
4516 pub fn compute_sparse_cholesky(&self,numthreads_ : i32,ordermethod_ : i32,tolsingular_ : f64,anzc_ : &[i32],aptrc_ : &[i64],asubc_ : &[i32],avalc_ : &[f64],perm_ : &mut Vec<i32>,diag_ : &mut Vec<f64>,lnzc_ : &mut Vec<i32>,lptrc_ : &mut Vec<i64>,lensubnval_ : &mut i64,lsubc_ : &mut Vec<i32>,lvalc_ : &mut Vec<f64>) -> Result<(),String> {
4517 let n_ : i32 = std::cmp::min(anzc_.len(),aptrc_.len()) as i32;
4518 let mut __tmp_0 : * const i32 = std::ptr::null();
4519 let mut __tmp_1 : * const f64 = std::ptr::null();
4520 let mut __tmp_2 : * const i32 = std::ptr::null();
4521 let mut __tmp_3 : * const i64 = std::ptr::null();
4522 let mut __tmp_5 : * const i32 = std::ptr::null();
4523 let mut __tmp_6 : * const f64 = std::ptr::null();
4524 self.handle_res(unsafe { MSK_computesparsecholesky(self.ptr,numthreads_,ordermethod_,tolsingular_,n_,anzc_.as_ptr(),aptrc_.as_ptr(),asubc_.as_ptr(),avalc_.as_ptr(),& mut __tmp_0,& mut __tmp_1,& mut __tmp_2,& mut __tmp_3,lensubnval_,& mut __tmp_5,& mut __tmp_6) },"compute_sparse_cholesky")?;
4525 let len_perm_ : usize = n_.try_into().unwrap_or(0);
4526 perm_.resize(len_perm_,Default::default());
4527 perm_.clone_from_slice(unsafe { std::slice::from_raw_parts(__tmp_0,len_perm_) } );
4528 let _ = unsafe { MSK_freeenv(self.ptr,__tmp_0 as * mut u8); };
4529 let len_diag_ : usize = n_.try_into().unwrap_or(0);
4530 diag_.resize(len_diag_,Default::default());
4531 diag_.clone_from_slice(unsafe { std::slice::from_raw_parts(__tmp_1,len_diag_) } );
4532 let _ = unsafe { MSK_freeenv(self.ptr,__tmp_1 as * mut u8); };
4533 let len_lnzc_ : usize = n_.try_into().unwrap_or(0);
4534 lnzc_.resize(len_lnzc_,Default::default());
4535 lnzc_.clone_from_slice(unsafe { std::slice::from_raw_parts(__tmp_2,len_lnzc_) } );
4536 let _ = unsafe { MSK_freeenv(self.ptr,__tmp_2 as * mut u8); };
4537 let len_lptrc_ : usize = n_.try_into().unwrap_or(0);
4538 lptrc_.resize(len_lptrc_,Default::default());
4539 lptrc_.clone_from_slice(unsafe { std::slice::from_raw_parts(__tmp_3,len_lptrc_) } );
4540 let _ = unsafe { MSK_freeenv(self.ptr,__tmp_3 as * mut u8); };
4541 let len_lsubc_ : usize = (*lensubnval_).try_into().unwrap_or(0);
4542 lsubc_.resize(len_lsubc_,Default::default());
4543 lsubc_.clone_from_slice(unsafe { std::slice::from_raw_parts(__tmp_5,len_lsubc_) } );
4544 let _ = unsafe { MSK_freeenv(self.ptr,__tmp_5 as * mut u8); };
4545 let len_lvalc_ : usize = (*lensubnval_).try_into().unwrap_or(0);
4546 lvalc_.resize(len_lvalc_,Default::default());
4547 lvalc_.clone_from_slice(unsafe { std::slice::from_raw_parts(__tmp_6,len_lvalc_) } );
4548 let _ = unsafe { MSK_freeenv(self.ptr,__tmp_6 as * mut u8); };
4549 return Result::Ok(());
4550 } // computesparsecholesky
4551 /// Computes the inner product of two vectors.
4552 ///
4553 /// # Arguments
4554 ///
4555 /// - `n_` Length of the vectors.
4556 /// - `x_` The x vector.
4557 /// - `y_` The y vector.
4558 /// - `xty_` The result of the inner product.
4559 ///
4560 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.dot>
4561 #[allow(unused_parens)]
4562 pub fn dot(&self,n_ : i32,x_ : &[f64],y_ : &[f64],xty_ : &mut f64) -> Result<(),String> {
4563 if x_.len() != (n_).try_into().unwrap() {
4564 return Result::Err("dot: Argument 'x' has the wrong length, expected n_".to_string());
4565 }
4566 if y_.len() != (n_).try_into().unwrap() {
4567 return Result::Err("dot: Argument 'y' has the wrong length, expected n_".to_string());
4568 }
4569 self.handle_res(unsafe { MSK_dot(self.ptr,n_,x_.as_ptr(),y_.as_ptr(),xty_) },"dot")?;
4570 return Result::Ok(());
4571 } // dot
4572 /// Prints an intro to message stream.
4573 ///
4574 /// # Arguments
4575 ///
4576 /// - `longver_` If non-zero, then the intro is slightly longer.
4577 ///
4578 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.echointro>
4579 #[allow(unused_parens)]
4580 pub fn echo_intro(&self,longver_ : i32) -> Result<(),String> {
4581 self.handle_res(unsafe { MSK_echointro(self.ptr,longver_) },"echo_intro")?;
4582 return Result::Ok(());
4583 } // echointro
4584 /// Enable reference counting for environments.
4585 ///
4586 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.enablegarcolenv>
4587 #[allow(unused_parens)]
4588 pub fn enable_gar_col_env(&mut self) -> Result<(),String> {
4589 self.handle_res(unsafe { MSK_enablegarcolenv(self.ptr) },"enable_gar_col_env")?;
4590 return Result::Ok(());
4591 } // enablegarcolenv
4592 /// Reports when the first license feature expires.
4593 ///
4594 /// # Arguments
4595 ///
4596 /// - `expiry_` If nonnegative, then it is the minimum number days to expiry of any feature that has been checked out.
4597 ///
4598 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.expirylicenses>
4599 #[allow(unused_parens)]
4600 pub fn expirylicenses(&mut self,expiry_ : &mut i64) -> Result<(),String> {
4601 self.handle_res(unsafe { MSK_expirylicenses(self.ptr,expiry_) },"expirylicenses")?;
4602 return Result::Ok(());
4603 } // expirylicenses
4604 /// Performs a dense matrix multiplication.
4605 ///
4606 /// # Arguments
4607 ///
4608 /// - `transa_` Indicates whether the matrix A must be transposed.
4609 ///
4610 /// See [Transpose]
4611 /// - `transb_` Indicates whether the matrix B must be transposed.
4612 ///
4613 /// See [Transpose]
4614 /// - `m_` Indicates the number of rows of matrix C.
4615 /// - `n_` Indicates the number of columns of matrix C.
4616 /// - `k_` Specifies the common dimension along which op(A) and op(B) are multiplied.
4617 /// - `alpha_` A scalar value multiplying the result of the matrix multiplication.
4618 /// - `a_` The pointer to the array storing matrix A in a column-major format.
4619 /// - `b_` The pointer to the array storing matrix B in a column-major format.
4620 /// - `beta_` A scalar value that multiplies C.
4621 /// - `c_` The pointer to the array storing matrix C in a column-major format.
4622 ///
4623 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.gemm>
4624 #[allow(unused_parens)]
4625 pub fn gemm(&self,transa_ : i32,transb_ : i32,m_ : i32,n_ : i32,k_ : i32,alpha_ : f64,a_ : &[f64],b_ : &[f64],beta_ : f64,c_ : &mut[f64]) -> Result<(),String> {
4626 if a_.len() != ((m_*k_)).try_into().unwrap() {
4627 return Result::Err("gemm: Argument 'a' has the wrong length, expected (m_*k_)".to_string());
4628 }
4629 if b_.len() != ((k_*n_)).try_into().unwrap() {
4630 return Result::Err("gemm: Argument 'b' has the wrong length, expected (k_*n_)".to_string());
4631 }
4632 if c_.len() != ((m_*n_)).try_into().unwrap() {
4633 return Result::Err("gemm: Argument 'c' has the wrong length, expected (m_*n_)".to_string());
4634 }
4635 self.handle_res(unsafe { MSK_gemm(self.ptr,transa_,transb_,m_,n_,k_,alpha_,a_.as_ptr(),b_.as_ptr(),beta_,c_.as_mut_ptr()) },"gemm")?;
4636 return Result::Ok(());
4637 } // gemm
4638 /// Computes dense matrix times a dense vector product.
4639 ///
4640 /// # Arguments
4641 ///
4642 /// - `transa_` Indicates whether the matrix A must be transposed.
4643 ///
4644 /// See [Transpose]
4645 /// - `m_` Specifies the number of rows of the matrix A.
4646 /// - `n_` Specifies the number of columns of the matrix A.
4647 /// - `alpha_` A scalar value multiplying the matrix A.
4648 /// - `a_` A pointer to the array storing matrix A in a column-major format.
4649 /// - `x_` A pointer to the array storing the vector x.
4650 /// - `beta_` A scalar value multiplying the vector y.
4651 /// - `y_` A pointer to the array storing the vector y.
4652 ///
4653 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.gemv>
4654 #[allow(unused_parens)]
4655 pub fn gemv(&self,transa_ : i32,m_ : i32,n_ : i32,alpha_ : f64,a_ : &[f64],x_ : &[f64],beta_ : f64,y_ : &mut[f64]) -> Result<(),String> {
4656 if a_.len() != ((n_*m_)).try_into().unwrap() {
4657 return Result::Err("gemv: Argument 'a' has the wrong length, expected (n_*m_)".to_string());
4658 }
4659 let __tmp_0 = if ((transa_==Transpose::NO)) {
4660 n_
4661 }
4662 else {
4663 m_
4664 };
4665 if x_.len() != (__tmp_0).try_into().unwrap() {
4666 return Result::Err("gemv: Argument 'x' has the wrong length, expected __tmp_0".to_string());
4667 }
4668 let __tmp_1 = if ((transa_==Transpose::NO)) {
4669 m_
4670 }
4671 else {
4672 n_
4673 };
4674 if y_.len() != (__tmp_1).try_into().unwrap() {
4675 return Result::Err("gemv: Argument 'y' has the wrong length, expected __tmp_1".to_string());
4676 }
4677 self.handle_res(unsafe { MSK_gemv(self.ptr,transa_,m_,n_,alpha_,a_.as_ptr(),x_.as_ptr(),beta_,y_.as_mut_ptr()) },"gemv")?;
4678 return Result::Ok(());
4679 } // gemv
4680 /// Directs all output from a stream to a file.
4681 ///
4682 /// # Arguments
4683 ///
4684 /// - `whichstream_` Index of the stream.
4685 ///
4686 /// See [Streamtype]
4687 /// - `filename_` A valid file name.
4688 /// - `append_` If this argument is 0 the file will be overwritten, otherwise it will be appended to.
4689 ///
4690 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.linkfiletoenvstream>
4691 #[allow(unused_parens)]
4692 pub fn link_file_to_stream(&mut self,whichstream_ : i32,filename_ : &str,append_ : i32) -> Result<(),String> {
4693 let __tmp_1 = CString::new(filename_).unwrap();
4694 self.handle_res(unsafe { MSK_linkfiletoenvstream(self.ptr,whichstream_,__tmp_1.as_ptr(),append_) },"link_file_to_stream")?;
4695 return Result::Ok(());
4696 } // linkfiletoenvstream
4697 /// Optimize a number of tasks in parallel using a specified number of threads.
4698 ///
4699 /// # Arguments
4700 ///
4701 /// - `israce_` If nonzero, then the function is terminated after the first task has been completed.
4702 /// - `maxtime_` Time limit for the function.
4703 /// - `numthreads_` Number of threads to be employed.
4704 /// - `trmcode_` The termination code for each task.
4705 ///
4706 /// See [Rescode]
4707 /// - `rcode_` The response code for each task.
4708 ///
4709 /// See [Rescode]
4710 ///
4711 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.optimizebatch>
4712 #[allow(unused_parens)]
4713 pub fn optimize_batch(&self,israce_ : bool,maxtime_ : f64,numthreads_ : i32,task_ : &[ & mut Task ],trmcode_ : &mut[i32],rcode_ : &mut[i32]) -> Result<(),String> {
4714 let numtask_ : i64 = task_.len() as i64;
4715 let arrptrs_task : Vec<* const u8> = task_.iter().map(|t| t.ptr).collect();
4716 if trmcode_.len() != (numtask_).try_into().unwrap() {
4717 return Result::Err("optimize_batch: Argument 'trmcode' has the wrong length, expected numtask_".to_string());
4718 }
4719 if rcode_.len() != (numtask_).try_into().unwrap() {
4720 return Result::Err("optimize_batch: Argument 'rcode' has the wrong length, expected numtask_".to_string());
4721 }
4722 self.handle_res(unsafe { MSK_optimizebatch(self.ptr,israce_,maxtime_,numthreads_,numtask_,arrptrs_task.as_ptr(),trmcode_.as_mut_ptr(),rcode_.as_mut_ptr()) },"optimize_batch")?;
4723 return Result::Ok(());
4724 } // optimizebatch
4725 /// Computes a Cholesky factorization of a dense matrix.
4726 ///
4727 /// # Arguments
4728 ///
4729 /// - `uplo_` Indicates whether the upper or lower triangular part of the matrix is stored.
4730 ///
4731 /// See [Uplo]
4732 /// - `n_` Dimension of the symmetric matrix.
4733 /// - `a_` A symmetric matrix stored in column-major order.
4734 ///
4735 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.potrf>
4736 #[allow(unused_parens)]
4737 pub fn potrf(&self,uplo_ : i32,n_ : i32,a_ : &mut[f64]) -> Result<(),String> {
4738 if a_.len() != ((n_*n_)).try_into().unwrap() {
4739 return Result::Err("potrf: Argument 'a' has the wrong length, expected (n_*n_)".to_string());
4740 }
4741 self.handle_res(unsafe { MSK_potrf(self.ptr,uplo_,n_,a_.as_mut_ptr()) },"potrf")?;
4742 return Result::Ok(());
4743 } // potrf
4744 /// Input a runtime license code.
4745 ///
4746 /// # Arguments
4747 ///
4748 /// - `code_` A license key string.
4749 ///
4750 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putlicensecode>
4751 #[allow(unused_parens)]
4752 pub fn put_license_code(&mut self,code_ : &[i32]) -> Result<(),String> {
4753 if code_.len() > 0 && code_.len() != (Value::LICENSE_BUFFER_LENGTH).try_into().unwrap() {
4754 return Result::Err("put_license_code: Argument 'code' has the wrong length, expected Value::LICENSE_BUFFER_LENGTH".to_string());
4755 }
4756 self.handle_res(unsafe { MSK_putlicensecode(self.ptr,if code_.len() == 0 { std::ptr::null() } else { code_.as_ptr() }) },"put_license_code")?;
4757 return Result::Ok(());
4758 } // putlicensecode
4759 /// Enables debug information for the license system.
4760 ///
4761 /// # Arguments
4762 ///
4763 /// - `licdebug_` Enable output of license check-out debug information.
4764 ///
4765 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putlicensedebug>
4766 #[allow(unused_parens)]
4767 pub fn put_license_debug(&mut self,licdebug_ : i32) -> Result<(),String> {
4768 self.handle_res(unsafe { MSK_putlicensedebug(self.ptr,licdebug_) },"put_license_debug")?;
4769 return Result::Ok(());
4770 } // putlicensedebug
4771 /// Set the path to the license file.
4772 ///
4773 /// # Arguments
4774 ///
4775 /// - `licensepath_` A path specifying where to search for the license.
4776 ///
4777 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putlicensepath>
4778 #[allow(unused_parens)]
4779 pub fn put_license_path(&mut self,licensepath_ : &str) -> Result<(),String> {
4780 let __tmp_1 = CString::new(licensepath_).unwrap();
4781 self.handle_res(unsafe { MSK_putlicensepath(self.ptr,__tmp_1.as_ptr()) },"put_license_path")?;
4782 return Result::Ok(());
4783 } // putlicensepath
4784 /// Control whether mosek should wait for an available license if no license is available.
4785 ///
4786 /// # Arguments
4787 ///
4788 /// - `licwait_` Enable waiting for a license.
4789 ///
4790 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putlicensewait>
4791 #[allow(unused_parens)]
4792 pub fn put_license_wait(&mut self,licwait_ : i32) -> Result<(),String> {
4793 self.handle_res(unsafe { MSK_putlicensewait(self.ptr,licwait_) },"put_license_wait")?;
4794 return Result::Ok(());
4795 } // putlicensewait
4796 /// Reset the license expiry reporting startpoint.
4797 ///
4798 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.resetexpirylicenses>
4799 #[allow(unused_parens)]
4800 pub fn reset_expiry_licenses(&mut self) -> Result<(),String> {
4801 self.handle_res(unsafe { MSK_resetexpirylicenses(self.ptr) },"reset_expiry_licenses")?;
4802 return Result::Ok(());
4803 } // resetexpirylicenses
4804 /// Solves a sparse triangular system of linear equations.
4805 ///
4806 /// # Arguments
4807 ///
4808 /// - `transposed_` Controls whether the solve is with L or the transposed L.
4809 ///
4810 /// See [Transpose]
4811 /// - `lnzc_` lnzc\[j\] is the number of nonzeros in column j.
4812 /// - `lptrc_` lptrc\[j\] is a pointer to the first row index and value in column j.
4813 /// - `lsubc_` Row indexes for each column stored sequentially.
4814 /// - `lvalc_` The value corresponding to row indexed stored lsubc.
4815 /// - `b_` The right-hand side of linear equation system to be solved as a dense vector.
4816 ///
4817 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.sparsetriangularsolvedense>
4818 #[allow(unused_parens)]
4819 pub fn sparse_triangular_solve_dense(&self,transposed_ : i32,lnzc_ : &[i32],lptrc_ : &[i64],lsubc_ : &[i32],lvalc_ : &[f64],b_ : &mut[f64]) -> Result<(),String> {
4820 let n_ : i32 = std::cmp::min(std::cmp::min(b_.len(),lnzc_.len()),lptrc_.len()) as i32;
4821 if lnzc_.len() != (n_).try_into().unwrap() {
4822 return Result::Err("sparse_triangular_solve_dense: Argument 'lnzc' has the wrong length, expected n_".to_string());
4823 }
4824 if lptrc_.len() != (n_).try_into().unwrap() {
4825 return Result::Err("sparse_triangular_solve_dense: Argument 'lptrc' has the wrong length, expected n_".to_string());
4826 }
4827 let lensubnval_ : i64 = std::cmp::min(lsubc_.len(),lvalc_.len()) as i64;
4828 if lsubc_.len() != (lensubnval_).try_into().unwrap() {
4829 return Result::Err("sparse_triangular_solve_dense: Argument 'lsubc' has the wrong length, expected lensubnval_".to_string());
4830 }
4831 if lvalc_.len() != (lensubnval_).try_into().unwrap() {
4832 return Result::Err("sparse_triangular_solve_dense: Argument 'lvalc' has the wrong length, expected lensubnval_".to_string());
4833 }
4834 if b_.len() != (n_).try_into().unwrap() {
4835 return Result::Err("sparse_triangular_solve_dense: Argument 'b' has the wrong length, expected n_".to_string());
4836 }
4837 self.handle_res(unsafe { MSK_sparsetriangularsolvedense(self.ptr,transposed_,n_,lnzc_.as_ptr(),lptrc_.as_ptr(),lensubnval_,lsubc_.as_ptr(),lvalc_.as_ptr(),b_.as_mut_ptr()) },"sparse_triangular_solve_dense")?;
4838 return Result::Ok(());
4839 } // sparsetriangularsolvedense
4840 /// Computes all eigenvalues of a symmetric dense matrix.
4841 ///
4842 /// # Arguments
4843 ///
4844 /// - `uplo_` Indicates whether the upper or lower triangular part is used.
4845 ///
4846 /// See [Uplo]
4847 /// - `n_` Dimension of the symmetric input matrix.
4848 /// - `a_` Input matrix A.
4849 /// - `w_` Array of length at least n containing the eigenvalues of A.
4850 ///
4851 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.syeig>
4852 #[allow(unused_parens)]
4853 pub fn syeig(&self,uplo_ : i32,n_ : i32,a_ : &[f64],w_ : &mut[f64]) -> Result<(),String> {
4854 if a_.len() != ((n_*n_)).try_into().unwrap() {
4855 return Result::Err("syeig: Argument 'a' has the wrong length, expected (n_*n_)".to_string());
4856 }
4857 if w_.len() != (n_).try_into().unwrap() {
4858 return Result::Err("syeig: Argument 'w' has the wrong length, expected n_".to_string());
4859 }
4860 self.handle_res(unsafe { MSK_syeig(self.ptr,uplo_,n_,a_.as_ptr(),w_.as_mut_ptr()) },"syeig")?;
4861 return Result::Ok(());
4862 } // syeig
4863 /// Computes all the eigenvalues and eigenvectors of a symmetric dense matrix, and thus its eigenvalue decomposition.
4864 ///
4865 /// # Arguments
4866 ///
4867 /// - `uplo_` Indicates whether the upper or lower triangular part is used.
4868 ///
4869 /// See [Uplo]
4870 /// - `n_` Dimension of the symmetric input matrix.
4871 /// - `a_` Input matrix A.
4872 /// - `w_` Array of length at least n containing the eigenvalues of A.
4873 ///
4874 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.syevd>
4875 #[allow(unused_parens)]
4876 pub fn syevd(&self,uplo_ : i32,n_ : i32,a_ : &mut[f64],w_ : &mut[f64]) -> Result<(),String> {
4877 if a_.len() != ((n_*n_)).try_into().unwrap() {
4878 return Result::Err("syevd: Argument 'a' has the wrong length, expected (n_*n_)".to_string());
4879 }
4880 if w_.len() != (n_).try_into().unwrap() {
4881 return Result::Err("syevd: Argument 'w' has the wrong length, expected n_".to_string());
4882 }
4883 self.handle_res(unsafe { MSK_syevd(self.ptr,uplo_,n_,a_.as_mut_ptr(),w_.as_mut_ptr()) },"syevd")?;
4884 return Result::Ok(());
4885 } // syevd
4886 /// Performs a rank-k update of a symmetric matrix.
4887 ///
4888 /// # Arguments
4889 ///
4890 /// - `uplo_` Indicates whether the upper or lower triangular part of C is used.
4891 ///
4892 /// See [Uplo]
4893 /// - `trans_` Indicates whether the matrix A must be transposed.
4894 ///
4895 /// See [Transpose]
4896 /// - `n_` Specifies the order of C.
4897 /// - `k_` Indicates the number of rows or columns of A, and its rank.
4898 /// - `alpha_` A scalar value multiplying the result of the matrix multiplication.
4899 /// - `a_` The pointer to the array storing matrix A in a column-major format.
4900 /// - `beta_` A scalar value that multiplies C.
4901 /// - `c_` The pointer to the array storing matrix C in a column-major format.
4902 ///
4903 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.syrk>
4904 #[allow(unused_parens)]
4905 pub fn syrk(&self,uplo_ : i32,trans_ : i32,n_ : i32,k_ : i32,alpha_ : f64,a_ : &[f64],beta_ : f64,c_ : &mut[f64]) -> Result<(),String> {
4906 if a_.len() != ((n_*k_)).try_into().unwrap() {
4907 return Result::Err("syrk: Argument 'a' has the wrong length, expected (n_*k_)".to_string());
4908 }
4909 if c_.len() != ((n_*n_)).try_into().unwrap() {
4910 return Result::Err("syrk: Argument 'c' has the wrong length, expected (n_*n_)".to_string());
4911 }
4912 self.handle_res(unsafe { MSK_syrk(self.ptr,uplo_,trans_,n_,k_,alpha_,a_.as_ptr(),beta_,c_.as_mut_ptr()) },"syrk")?;
4913 return Result::Ok(());
4914 } // syrk
4915
4916}
4917
4918//const MSK_GLOBAL_ENV : Env = Env{ ptr : std::ptr::null() };
4919
4920extern fn stream_callback_proxy(handle : * const libc::c_void, msg : * const libc::c_char) {
4921 let h = handle as * const Box<dyn Fn(&str)>;
4922 unsafe
4923 {
4924 let cstr = CStr::from_ptr(msg);
4925 let cstr_bytes = cstr.to_bytes();
4926 let s = String::from_utf8_lossy(cstr_bytes).into_owned();
4927 (*h)(&s);
4928 }
4929}
4930
4931
4932extern fn callback_proxy(_ : * const u8,
4933 handle : * const c_void,
4934 caller : i32,
4935 douinf : * const f64,
4936 intinf : * const i32,
4937 lintinf : * const i64 ) -> i32
4938{
4939 unsafe {
4940 let task : & mut TaskCBData = &mut (*(handle as * mut TaskCBData));
4941 let mut stop = false;
4942 if let Some(ref mut cb) = task.codecb {
4943 stop = (*cb)(caller) || stop;
4944 }
4945 if let Some(ref mut cb) = task.valuecb {
4946 stop = (*cb)(caller,
4947 & std::slice::from_raw_parts(douinf, Dinfitem::END as usize),
4948 & std::slice::from_raw_parts(intinf, Iinfitem::END as usize),
4949 & std::slice::from_raw_parts(lintinf, Liinfitem::END as usize)) || stop;
4950 }
4951 if caller == Callbackcode::NEW_INT_MIO && task.intsolcb.is_some() {
4952 if let Ok(numvar) = task.task.get_num_var() {
4953 let mut xx = vec![0.0;numvar as usize];
4954 if let Ok(_) = task.task.get_xx(Soltype::ITG,xx.as_mut_slice()) {
4955
4956 if let Some(ref mut cb) = task.intsolcb {
4957 (*cb)(xx.as_slice());
4958 }
4959 }
4960 }
4961 }
4962 if ! stop { 1 } else { 0 }
4963 }
4964}
4965
4966impl TaskCB {
4967 /// Create a new `TaskCB` object from a given `Task`.
4968 pub fn new(task : Task) -> TaskCB {
4969 TaskCB {
4970 data : Box::new(TaskCBData {
4971 task : task,
4972 streamcb : [None,None,None,None],
4973 valuecb : None,
4974 intsolcb : None,
4975 codecb : None
4976 })
4977 }
4978 }
4979
4980 /// Convert a `TaskCB` object into a `Task` object.
4981 pub fn without_callbacks(self) -> Task {
4982 for (whichstream,obj) in self.data.streamcb.iter().enumerate() {
4983 if let Some(ref _f) = *obj {
4984 let _ = unsafe { MSK_unlinkfuncfromtaskstream(self.data.task.ptr, whichstream as i32) };
4985 }
4986 }
4987 let _ = unsafe { MSK_putcallbackfunc_ptr(self.data.task.ptr, std::ptr::null(), std::ptr::null()) };
4988 self.data.task
4989 }
4990
4991 /// Clone a `TaskCB`. Since callbacks are not shaerd between
4992 /// cloned objects, this returns a plain `Task` object.
4993 pub fn clone(&self) -> Option<Task> { self.data.task.clone() }
4994
4995 // NOTE on callback with handles:
4996 // http://aatch.github.io/blog/2015/01/17/unboxed-closures-and-ffi-callbacks/
4997 /// Set a stream callback handler.
4998 ///
4999 /// # Arguments
5000 ///
5001 /// - `whichstream` defines which stream attach it to, use constants `MSK_STREAM_...`.
5002 /// - `func` is a function that receives a message to be printed.
5003 pub fn put_stream_callback<F>(& mut self,whichstream : i32, func : F) -> Result<(),String>
5004 where F : 'static+Fn(&str) {
5005 if whichstream >= 0 && whichstream < 4 {
5006 self.data.streamcb[whichstream as usize] = Some(Box::new(Box::new(func)));
5007
5008 match self.data.streamcb[whichstream as usize] {
5009 Some(ref bf) => {
5010 let hnd = &(**bf) as * const _ as * mut libc::c_void;
5011 if 0 != unsafe { MSK_linkfunctotaskstream(self.data.task.ptr,whichstream, hnd, stream_callback_proxy) } {
5012 Err("put_stream_callback: Failed to attach stream callback".to_string())
5013 }
5014 else {
5015 Ok(())
5016 }
5017 }
5018 None => {
5019 Err("put_stream_callback: Failed to attach stream callback".to_string())
5020 }
5021 }
5022 }
5023 else {
5024 Err("put_stream_callback: Invalid stream".to_string())
5025 }
5026 }
5027
5028
5029 /// Clear stream callback handler at a given stream.
5030 pub fn clear_stream_callback(&mut self,whichstream : i32) -> Result<(),String> {
5031 match self.data.streamcb[whichstream as usize] {
5032 Some(ref _f) => {
5033 if 0 != unsafe { MSK_unlinkfuncfromtaskstream(self.data.task.ptr, whichstream) } {
5034 Err("clear_stream_callback: Failed to clear stream callback".to_string())
5035 }
5036 else {
5037 self.data.streamcb[whichstream as usize] = None;
5038 Ok(())
5039 }
5040 },
5041 None => Ok(())
5042 }
5043 }
5044
5045 fn update_callback(& mut self) -> Result<(),String> {
5046 if self.data.valuecb.is_some() || self.data.codecb.is_some() || self.data.intsolcb.is_some() {
5047 let hnd = &(*self.data) as * const _ as * mut c_void;
5048 if 0 != unsafe { MSK_putcallbackfunc(self.data.task.ptr, callback_proxy, hnd) } {
5049 Err("put_callback: Failed to attach callback".to_string())
5050 } else {
5051 Ok(())
5052 }
5053 }
5054 else if 0 != unsafe { MSK_putcallbackfunc_ptr(self.data.task.ptr, std::ptr::null(), std::ptr::null()) } {
5055 Err("put_callback: Failed to attach callback".to_string())
5056 } else {
5057 Ok(())
5058 }
5059 }
5060 pub fn clear_callback(& mut self) -> Result<(),String> {
5061 self.data.valuecb = None;
5062 self.data.codecb = None;
5063 self.data.intsolcb = None;
5064 self.update_callback()
5065 }
5066
5067 /// Sets an information callback handler in the task
5068 ///
5069 /// # Arguments:
5070 ///
5071 /// - `func` A function (caller,dinf,iinf,liinf) -> bool, that
5072 /// returns false to indicate that the solver should terminate as
5073 /// soon as possible, otherwise returns true.
5074 /// - `caller` indicates what the solver is currently doing (see `MSK_CALLBACK_...` constants)
5075 /// - `dinf` is a list of f64 information items (indexed with `MSK_DINF_...`)
5076 /// - `iinf` is a list of i32 information items (indexed with `MSK_IINF_...`)
5077 /// - `liinf` is a list of i64 information items (indexed with `MSK_LIINF_...`)
5078 ///
5079 pub fn put_callback<F>(& mut self,func : F) -> Result<(),String>
5080 where F : 'static +FnMut(i32,&[f64],&[i32],&[i64]) -> bool
5081 {
5082 self.data.valuecb = Some(Box::new(func));
5083 self.update_callback()
5084 }
5085 pub fn put_codecallback<F>(& mut self,func : F) -> Result<(),String>
5086 where F : 'static +FnMut(i32) -> bool
5087 {
5088 self.data.codecb = Some(Box::new(func));
5089 self.update_callback()
5090 }
5091
5092 pub fn put_intsolcallback<F>(& mut self,func : F) -> Result<(),String>
5093 where F : 'static +FnMut(&[f64])
5094 {
5095 self.data.intsolcb = Some(Box::new(func));
5096 self.update_callback()
5097 }
5098
5099 pub fn write_data_stream<F>(&self, func : F, format : i32, compress : i32) -> Result<(),String>
5100 where F : FnMut(&[u8]) -> usize
5101 {
5102 self.data.task.write_data_stream(func,format,compress)
5103 }
5104
5105 pub fn read_data_stream<F>(&self, func : F, format : i32, compress : i32) -> Result<(),String>
5106 where F : FnMut(&mut [u8]) -> usize
5107 {
5108 self.data.task.read_data_stream(func,format,compress)
5109 }
5110 /// Analyze the names and issue an error for the first invalid name.
5111 ///
5112 /// # Arguments
5113 ///
5114 /// - `whichstream_` Index of the stream.
5115 ///
5116 /// See [Streamtype]
5117 /// - `nametype_` The type of names e.g. valid in MPS or LP files.
5118 ///
5119 /// See [Nametype]
5120 ///
5121 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.analyzenames>
5122 pub fn analyze_names(&self,whichstream_ : i32,nametype_ : i32) -> Result<(),String> { self.data.task.analyze_names(whichstream_,nametype_) }
5123 /// Analyze the data of a task.
5124 ///
5125 /// # Arguments
5126 ///
5127 /// - `whichstream_` Index of the stream.
5128 ///
5129 /// See [Streamtype]
5130 ///
5131 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.analyzeproblem>
5132 pub fn analyze_problem(&self,whichstream_ : i32) -> Result<(),String> { self.data.task.analyze_problem(whichstream_) }
5133 /// Print information related to the quality of the solution.
5134 ///
5135 /// # Arguments
5136 ///
5137 /// - `whichstream_` Index of the stream.
5138 ///
5139 /// See [Streamtype]
5140 /// - `whichsol_` Selects a solution.
5141 ///
5142 /// See [Soltype]
5143 ///
5144 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.analyzesolution>
5145 pub fn analyze_solution(&self,whichstream_ : i32,whichsol_ : i32) -> Result<(),String> { self.data.task.analyze_solution(whichstream_,whichsol_) }
5146 /// Appends an affine conic constraint to the task.
5147 ///
5148 /// # Arguments
5149 ///
5150 /// - `domidx_` Domain index.
5151 /// - `afeidxlist_` List of affine expression indexes.
5152 /// - `b_` The vector of constant terms modifying affine expressions. Optional.
5153 ///
5154 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendacc>
5155 pub fn append_acc(&mut self,domidx_ : i64,afeidxlist_ : &[i64],b_ : &[f64]) -> Result<(),String> { self.data.task.append_acc(domidx_,afeidxlist_,b_) }
5156 /// Appends a number of affine conic constraint to the task.
5157 ///
5158 /// # Arguments
5159 ///
5160 /// - `domidxs_` Domain indices.
5161 /// - `afeidxlist_` List of affine expression indexes.
5162 /// - `b_` The vector of constant terms modifying affine expressions. Optional.
5163 ///
5164 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendaccs>
5165 pub fn append_accs(&mut self,domidxs_ : &[i64],afeidxlist_ : &[i64],b_ : &[f64]) -> Result<(),String> { self.data.task.append_accs(domidxs_,afeidxlist_,b_) }
5166 /// Appends an affine conic constraint to the task.
5167 ///
5168 /// # Arguments
5169 ///
5170 /// - `domidx_` Domain index.
5171 /// - `afeidxfirst_` Index of the first affine expression.
5172 /// - `b_` The vector of constant terms modifying affine expressions. Optional.
5173 ///
5174 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendaccseq>
5175 pub fn append_acc_seq(&mut self,domidx_ : i64,afeidxfirst_ : i64,b_ : &[f64]) -> Result<(),String> { self.data.task.append_acc_seq(domidx_,afeidxfirst_,b_) }
5176 /// Appends a number of affine conic constraint to the task.
5177 ///
5178 /// # Arguments
5179 ///
5180 /// - `domidxs_` Domain indices.
5181 /// - `numafeidx_` Number of affine expressions in the affine expression list (must equal the sum of dimensions of the domains).
5182 /// - `afeidxfirst_` Index of the first affine expression.
5183 /// - `b_` The vector of constant terms modifying affine expressions. Optional.
5184 ///
5185 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendaccsseq>
5186 pub fn append_accs_seq(&mut self,domidxs_ : &[i64],numafeidx_ : i64,afeidxfirst_ : i64,b_ : &[f64]) -> Result<(),String> { self.data.task.append_accs_seq(domidxs_,numafeidx_,afeidxfirst_,b_) }
5187 /// Appends a number of empty affine expressions to the optimization task.
5188 ///
5189 /// # Arguments
5190 ///
5191 /// - `num_` Number of empty affine expressions which should be appended.
5192 ///
5193 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendafes>
5194 pub fn append_afes(&mut self,num_ : i64) -> Result<(),String> { self.data.task.append_afes(num_) }
5195 /// Appends semidefinite variables to the problem.
5196 ///
5197 /// # Arguments
5198 ///
5199 /// - `dim_` Dimensions of symmetric matrix variables to be added.
5200 ///
5201 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendbarvars>
5202 pub fn append_barvars(&mut self,dim_ : &[i32]) -> Result<(),String> { self.data.task.append_barvars(dim_) }
5203 /// Appends a new conic constraint to the problem.
5204 ///
5205 /// # Arguments
5206 ///
5207 /// - `ct_` Specifies the type of the cone.
5208 ///
5209 /// See [Conetype]
5210 /// - `conepar_` For the power cone it denotes the exponent alpha. For other cone types it is unused and can be set to 0.
5211 /// - `submem_` Variable subscripts of the members in the cone.
5212 ///
5213 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendcone>
5214 pub fn append_cone(&mut self,ct_ : i32,conepar_ : f64,submem_ : &[i32]) -> Result<(),String> { self.data.task.append_cone(ct_,conepar_,submem_) }
5215 /// Appends a new conic constraint to the problem.
5216 ///
5217 /// # Arguments
5218 ///
5219 /// - `ct_` Specifies the type of the cone.
5220 ///
5221 /// See [Conetype]
5222 /// - `conepar_` For the power cone it denotes the exponent alpha. For other cone types it is unused and can be set to 0.
5223 /// - `nummem_` Number of member variables in the cone.
5224 /// - `j_` Index of the first variable in the conic constraint.
5225 ///
5226 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendconeseq>
5227 pub fn append_cone_seq(&mut self,ct_ : i32,conepar_ : f64,nummem_ : i32,j_ : i32) -> Result<(),String> { self.data.task.append_cone_seq(ct_,conepar_,nummem_,j_) }
5228 /// Appends multiple conic constraints to the problem.
5229 ///
5230 /// # Arguments
5231 ///
5232 /// - `ct_` Specifies the type of the cone.
5233 ///
5234 /// See [Conetype]
5235 /// - `conepar_` For the power cone it denotes the exponent alpha. For other cone types it is unused and can be set to 0.
5236 /// - `nummem_` Numbers of member variables in the cones.
5237 /// - `j_` Index of the first variable in the first cone to be appended.
5238 ///
5239 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendconesseq>
5240 pub fn append_cones_seq(&mut self,ct_ : &[i32],conepar_ : &[f64],nummem_ : &[i32],j_ : i32) -> Result<(),String> { self.data.task.append_cones_seq(ct_,conepar_,nummem_,j_) }
5241 /// Appends a number of constraints to the optimization task.
5242 ///
5243 /// # Arguments
5244 ///
5245 /// - `num_` Number of constraints which should be appended.
5246 ///
5247 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendcons>
5248 pub fn append_cons(&mut self,num_ : i32) -> Result<(),String> { self.data.task.append_cons(num_) }
5249 /// Appends a number of empty disjunctive constraints to the task.
5250 ///
5251 /// # Arguments
5252 ///
5253 /// - `num_` Number of empty disjunctive constraints which should be appended.
5254 ///
5255 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appenddjcs>
5256 pub fn append_djcs(&mut self,num_ : i64) -> Result<(),String> { self.data.task.append_djcs(num_) }
5257 /// Appends the dual exponential cone domain.
5258 ///
5259 /// # Returns
5260 ///
5261 /// - `domidx` Index of the domain.
5262 ///
5263 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appenddualexpconedomain>
5264 pub fn append_dual_exp_cone_domain(&mut self) -> Result<i64,String> { self.data.task.append_dual_exp_cone_domain() }
5265 /// Appends the dual geometric mean cone domain.
5266 ///
5267 /// # Arguments
5268 ///
5269 /// - `n_` Dimension of the domain.
5270 ///
5271 /// # Returns
5272 ///
5273 /// - `domidx` Index of the domain.
5274 ///
5275 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appenddualgeomeanconedomain>
5276 pub fn append_dual_geo_mean_cone_domain(&mut self,n_ : i64) -> Result<i64,String> { self.data.task.append_dual_geo_mean_cone_domain(n_) }
5277 /// Appends the dual power cone domain.
5278 ///
5279 /// # Arguments
5280 ///
5281 /// - `n_` Dimension of the domain.
5282 /// - `alpha_` The sequence proportional to exponents. Must be positive.
5283 ///
5284 /// # Returns
5285 ///
5286 /// - `domidx` Index of the domain.
5287 ///
5288 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appenddualpowerconedomain>
5289 pub fn append_dual_power_cone_domain(&mut self,n_ : i64,alpha_ : &[f64]) -> Result<i64,String> { self.data.task.append_dual_power_cone_domain(n_,alpha_) }
5290 /// Appends a sequence of dual power cone domains.
5291 ///
5292 /// # Arguments
5293 ///
5294 /// - `n_` Dimensions of the domains.
5295 /// - `nleft_` Number of variables on the left hand sides.
5296 /// - `alpha_` The sequences proportional to exponents, concatenated for all domains. Must be positive.
5297 /// - `domidxlist_` Indexes of the domains.
5298 ///
5299 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appenddualpowerconedomainseq>
5300 pub fn append_dual_power_cone_domain_seq(&mut self,n_ : &[i64],nleft_ : &[i64],alpha_ : &[f64],domidxlist_ : &mut[i64]) -> Result<(),String> { self.data.task.append_dual_power_cone_domain_seq(n_,nleft_,alpha_,domidxlist_) }
5301 /// Appends the primal exponential cone domain.
5302 ///
5303 /// # Returns
5304 ///
5305 /// - `domidx` Index of the domain.
5306 ///
5307 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendprimalexpconedomain>
5308 pub fn append_primal_exp_cone_domain(&mut self) -> Result<i64,String> { self.data.task.append_primal_exp_cone_domain() }
5309 /// Appends the primal geometric mean cone domain.
5310 ///
5311 /// # Arguments
5312 ///
5313 /// - `n_` Dimension of the domain.
5314 ///
5315 /// # Returns
5316 ///
5317 /// - `domidx` Index of the domain.
5318 ///
5319 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendprimalgeomeanconedomain>
5320 pub fn append_primal_geo_mean_cone_domain(&mut self,n_ : i64) -> Result<i64,String> { self.data.task.append_primal_geo_mean_cone_domain(n_) }
5321 /// Appends the primal power cone domain.
5322 ///
5323 /// # Arguments
5324 ///
5325 /// - `n_` Dimension of the domain.
5326 /// - `alpha_` The sequence proportional to exponents. Must be positive.
5327 ///
5328 /// # Returns
5329 ///
5330 /// - `domidx` Index of the domain.
5331 ///
5332 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendprimalpowerconedomain>
5333 pub fn append_primal_power_cone_domain(&mut self,n_ : i64,alpha_ : &[f64]) -> Result<i64,String> { self.data.task.append_primal_power_cone_domain(n_,alpha_) }
5334 /// Appends a sequence of primal power cone domains.
5335 ///
5336 /// # Arguments
5337 ///
5338 /// - `n_` Dimensions of the domains.
5339 /// - `nleft_` Number of variables on the left hand sides.
5340 /// - `alpha_` The sequences proportional to exponents, concatenated for all domains. Must be positive.
5341 /// - `domidxlist_` Indexes of the domains.
5342 ///
5343 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendprimalpowerconedomainseq>
5344 pub fn append_primal_power_cone_domain_seq(&mut self,n_ : &[i64],nleft_ : &[i64],alpha_ : &[f64],domidxlist_ : &mut[i64]) -> Result<(),String> { self.data.task.append_primal_power_cone_domain_seq(n_,nleft_,alpha_,domidxlist_) }
5345 /// Appends the n dimensional quadratic cone domain.
5346 ///
5347 /// # Arguments
5348 ///
5349 /// - `n_` Dimension of the domain.
5350 ///
5351 /// # Returns
5352 ///
5353 /// - `domidx` Index of the domain.
5354 ///
5355 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendquadraticconedomain>
5356 pub fn append_quadratic_cone_domain(&mut self,n_ : i64) -> Result<i64,String> { self.data.task.append_quadratic_cone_domain(n_) }
5357 /// Appends the n dimensional real number domain.
5358 ///
5359 /// # Arguments
5360 ///
5361 /// - `n_` Dimension of the domain.
5362 ///
5363 /// # Returns
5364 ///
5365 /// - `domidx` Index of the domain.
5366 ///
5367 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendrdomain>
5368 pub fn append_r_domain(&mut self,n_ : i64) -> Result<i64,String> { self.data.task.append_r_domain(n_) }
5369 /// Appends the n dimensional negative orthant to the list of domains.
5370 ///
5371 /// # Arguments
5372 ///
5373 /// - `n_` Dimension of the domain.
5374 ///
5375 /// # Returns
5376 ///
5377 /// - `domidx` Index of the domain.
5378 ///
5379 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendrminusdomain>
5380 pub fn append_rminus_domain(&mut self,n_ : i64) -> Result<i64,String> { self.data.task.append_rminus_domain(n_) }
5381 /// Appends the n dimensional positive orthant to the list of domains.
5382 ///
5383 /// # Arguments
5384 ///
5385 /// - `n_` Dimension of the domain.
5386 ///
5387 /// # Returns
5388 ///
5389 /// - `domidx` Index of the domain.
5390 ///
5391 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendrplusdomain>
5392 pub fn append_rplus_domain(&mut self,n_ : i64) -> Result<i64,String> { self.data.task.append_rplus_domain(n_) }
5393 /// Appends the n dimensional rotated quadratic cone domain.
5394 ///
5395 /// # Arguments
5396 ///
5397 /// - `n_` Dimension of the domain.
5398 ///
5399 /// # Returns
5400 ///
5401 /// - `domidx` Index of the domain.
5402 ///
5403 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendrquadraticconedomain>
5404 pub fn append_r_quadratic_cone_domain(&mut self,n_ : i64) -> Result<i64,String> { self.data.task.append_r_quadratic_cone_domain(n_) }
5405 /// Appends the n dimensional 0 domain.
5406 ///
5407 /// # Arguments
5408 ///
5409 /// - `n_` Dimension of the domain.
5410 ///
5411 /// # Returns
5412 ///
5413 /// - `domidx` Index of the domain.
5414 ///
5415 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendrzerodomain>
5416 pub fn append_rzero_domain(&mut self,n_ : i64) -> Result<i64,String> { self.data.task.append_rzero_domain(n_) }
5417 /// Appends a general sparse symmetric matrix to the storage of symmetric matrices.
5418 ///
5419 /// # Arguments
5420 ///
5421 /// - `dim_` Dimension of the symmetric matrix that is appended.
5422 /// - `subi_` Row subscript in the triplets.
5423 /// - `subj_` Column subscripts in the triplets.
5424 /// - `valij_` Values of each triplet.
5425 ///
5426 /// # Returns
5427 ///
5428 /// - `idx` Unique index assigned to the inputted matrix.
5429 ///
5430 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendsparsesymmat>
5431 pub fn append_sparse_sym_mat(&mut self,dim_ : i32,subi_ : &[i32],subj_ : &[i32],valij_ : &[f64]) -> Result<i64,String> { self.data.task.append_sparse_sym_mat(dim_,subi_,subj_,valij_) }
5432 /// Appends a general sparse symmetric matrix to the storage of symmetric matrices.
5433 ///
5434 /// # Arguments
5435 ///
5436 /// - `dims_` Dimensions of the symmetric matrixes.
5437 /// - `nz_` Number of nonzeros for each matrix.
5438 /// - `subi_` Row subscript in the triplets.
5439 /// - `subj_` Column subscripts in the triplets.
5440 /// - `valij_` Values of each triplet.
5441 /// - `idx_` Unique index assigned to the inputted matrix.
5442 ///
5443 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendsparsesymmatlist>
5444 pub fn append_sparse_sym_mat_list(&mut self,dims_ : &[i32],nz_ : &[i64],subi_ : &[i32],subj_ : &[i32],valij_ : &[f64],idx_ : &mut[i64]) -> Result<(),String> { self.data.task.append_sparse_sym_mat_list(dims_,nz_,subi_,subj_,valij_,idx_) }
5445 /// Appends the vectorized SVEC PSD cone domain.
5446 ///
5447 /// # Arguments
5448 ///
5449 /// - `n_` Dimension of the domain.
5450 ///
5451 /// # Returns
5452 ///
5453 /// - `domidx` Index of the domain.
5454 ///
5455 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendsvecpsdconedomain>
5456 pub fn append_svec_psd_cone_domain(&mut self,n_ : i64) -> Result<i64,String> { self.data.task.append_svec_psd_cone_domain(n_) }
5457 /// Appends a number of variables to the optimization task.
5458 ///
5459 /// # Arguments
5460 ///
5461 /// - `num_` Number of variables which should be appended.
5462 ///
5463 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendvars>
5464 pub fn append_vars(&mut self,num_ : i32) -> Result<(),String> { self.data.task.append_vars(num_) }
5465 /// Get the optimizer log from a remote job.
5466 ///
5467 /// # Arguments
5468 ///
5469 /// - `addr_` Address of the solver server
5470 /// - `accesstoken_` Access token string.
5471 /// - `token_` Job token
5472 ///
5473 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.asyncgetlog>
5474 pub fn async_get_log(&mut self,addr_ : &str,accesstoken_ : &str,token_ : &str) -> Result<(),String> { self.data.task.async_get_log(addr_,accesstoken_,token_) }
5475 /// Request a solution from a remote job.
5476 ///
5477 /// # Arguments
5478 ///
5479 /// - `address_` Address of the OptServer.
5480 /// - `accesstoken_` Access token.
5481 /// - `token_` The task token.
5482 /// - `resp_` Is the response code from the remote solver.
5483 ///
5484 /// See [Rescode]
5485 /// - `trm_` Is either OK or a termination response code.
5486 ///
5487 /// See [Rescode]
5488 ///
5489 /// # Returns
5490 ///
5491 /// - `respavailable` Indicates if a remote response is available.
5492 ///
5493 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.asyncgetresult>
5494 pub fn async_get_result(&mut self,address_ : &str,accesstoken_ : &str,token_ : &str,resp_ : & mut i32,trm_ : & mut i32) -> Result<bool,String> { self.data.task.async_get_result(address_,accesstoken_,token_,resp_,trm_) }
5495 /// Offload the optimization task to a solver server in asynchronous mode.
5496 ///
5497 /// # Arguments
5498 ///
5499 /// - `address_` Address of the OptServer.
5500 /// - `accesstoken_` Access token.
5501 ///
5502 /// # Returns
5503 ///
5504 /// - `token` Returns the task token.
5505 ///
5506 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.asyncoptimize>
5507 pub fn async_optimize(&mut self,address_ : &str,accesstoken_ : &str) -> Result<String,String> { self.data.task.async_optimize(address_,accesstoken_) }
5508 /// Requests information about the status of the remote job.
5509 ///
5510 /// # Arguments
5511 ///
5512 /// - `address_` Address of the OptServer.
5513 /// - `accesstoken_` Access token.
5514 /// - `token_` The task token.
5515 /// - `resp_` Is the response code from the remote solver.
5516 ///
5517 /// See [Rescode]
5518 /// - `trm_` Is either OK or a termination response code.
5519 ///
5520 /// See [Rescode]
5521 ///
5522 /// # Returns
5523 ///
5524 /// - `respavailable` Indicates if a remote response is available.
5525 ///
5526 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.asyncpoll>
5527 pub fn async_poll(&mut self,address_ : &str,accesstoken_ : &str,token_ : &str,resp_ : & mut i32,trm_ : & mut i32) -> Result<bool,String> { self.data.task.async_poll(address_,accesstoken_,token_,resp_,trm_) }
5528 /// Request that the job identified by the token is terminated.
5529 ///
5530 /// # Arguments
5531 ///
5532 /// - `address_` Address of the OptServer.
5533 /// - `accesstoken_` Access token.
5534 /// - `token_` The task token.
5535 ///
5536 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.asyncstop>
5537 pub fn async_stop(&mut self,address_ : &str,accesstoken_ : &str,token_ : &str) -> Result<(),String> { self.data.task.async_stop(address_,accesstoken_,token_) }
5538 /// Computes conditioning information for the basis matrix.
5539 ///
5540 /// # Arguments
5541 ///
5542 /// - `nrmbasis_` An estimate for the 1-norm of the basis.
5543 /// - `nrminvbasis_` An estimate for the 1-norm of the inverse of the basis.
5544 ///
5545 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.basiscond>
5546 pub fn basis_cond(&mut self,nrmbasis_ : &mut f64,nrminvbasis_ : &mut f64) -> Result<(),String> { self.data.task.basis_cond(nrmbasis_,nrminvbasis_) }
5547 /// Checks the memory allocated by the task.
5548 ///
5549 /// # Arguments
5550 ///
5551 /// - `file_` File from which the function is called.
5552 /// - `line_` Line in the file from which the function is called.
5553 ///
5554 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.checkmemtask>
5555 pub fn check_mem(&mut self,file_ : &str,line_ : i32) -> Result<(),String> { self.data.task.check_mem(file_,line_) }
5556 /// Changes the bounds for one constraint.
5557 ///
5558 /// # Arguments
5559 ///
5560 /// - `i_` Index of the constraint for which the bounds should be changed.
5561 /// - `lower_` If non-zero, then the lower bound is changed, otherwise the upper bound is changed.
5562 /// - `finite_` If non-zero, then the given value is assumed to be finite.
5563 /// - `value_` New value for the bound.
5564 ///
5565 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.chgconbound>
5566 pub fn chg_con_bound(&mut self,i_ : i32,lower_ : i32,finite_ : i32,value_ : f64) -> Result<(),String> { self.data.task.chg_con_bound(i_,lower_,finite_,value_) }
5567 /// Changes the bounds for one variable.
5568 ///
5569 /// # Arguments
5570 ///
5571 /// - `j_` Index of the variable for which the bounds should be changed.
5572 /// - `lower_` If non-zero, then the lower bound is changed, otherwise the upper bound is changed.
5573 /// - `finite_` If non-zero, then the given value is assumed to be finite.
5574 /// - `value_` New value for the bound.
5575 ///
5576 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.chgvarbound>
5577 pub fn chg_var_bound(&mut self,j_ : i32,lower_ : i32,finite_ : i32,value_ : f64) -> Result<(),String> { self.data.task.chg_var_bound(j_,lower_,finite_,value_) }
5578 /// Commits all cached problem changes.
5579 ///
5580 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.commitchanges>
5581 pub fn commit_changes(&mut self) -> Result<(),String> { self.data.task.commit_changes() }
5582 /// Undefine a solution and free the memory it uses.
5583 ///
5584 /// # Arguments
5585 ///
5586 /// - `whichsol_` Selects a solution.
5587 ///
5588 /// See [Soltype]
5589 ///
5590 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.deletesolution>
5591 pub fn delete_solution(&mut self,whichsol_ : i32) -> Result<(),String> { self.data.task.delete_solution(whichsol_) }
5592 /// Performs sensitivity analysis on objective coefficients.
5593 ///
5594 /// # Arguments
5595 ///
5596 /// - `subj_` Indexes of objective coefficients to analyze.
5597 /// - `leftpricej_` Left shadow prices for requested coefficients.
5598 /// - `rightpricej_` Right shadow prices for requested coefficients.
5599 /// - `leftrangej_` Left range for requested coefficients.
5600 /// - `rightrangej_` Right range for requested coefficients.
5601 ///
5602 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.dualsensitivity>
5603 pub fn dual_sensitivity(&self,subj_ : &[i32],leftpricej_ : &mut[f64],rightpricej_ : &mut[f64],leftrangej_ : &mut[f64],rightrangej_ : &mut[f64]) -> Result<(),String> { self.data.task.dual_sensitivity(subj_,leftpricej_,rightpricej_,leftrangej_,rightrangej_) }
5604 /// Clears a row in barF
5605 ///
5606 /// # Arguments
5607 ///
5608 /// - `afeidx_` Row index of barF.
5609 ///
5610 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.emptyafebarfrow>
5611 pub fn empty_afe_barf_row(&mut self,afeidx_ : i64) -> Result<(),String> { self.data.task.empty_afe_barf_row(afeidx_) }
5612 /// Clears rows in barF.
5613 ///
5614 /// # Arguments
5615 ///
5616 /// - `afeidxlist_` Indices of rows in barF to clear.
5617 ///
5618 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.emptyafebarfrowlist>
5619 pub fn empty_afe_barf_row_list(&mut self,afeidxlist_ : &[i64]) -> Result<(),String> { self.data.task.empty_afe_barf_row_list(afeidxlist_) }
5620 /// Clears a column in F.
5621 ///
5622 /// # Arguments
5623 ///
5624 /// - `varidx_` Variable index.
5625 ///
5626 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.emptyafefcol>
5627 pub fn empty_afe_f_col(&mut self,varidx_ : i32) -> Result<(),String> { self.data.task.empty_afe_f_col(varidx_) }
5628 /// Clears columns in F.
5629 ///
5630 /// # Arguments
5631 ///
5632 /// - `varidx_` Indices of variables in F to clear.
5633 ///
5634 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.emptyafefcollist>
5635 pub fn empty_afe_f_col_list(&mut self,varidx_ : &[i32]) -> Result<(),String> { self.data.task.empty_afe_f_col_list(varidx_) }
5636 /// Clears a row in F.
5637 ///
5638 /// # Arguments
5639 ///
5640 /// - `afeidx_` Row index.
5641 ///
5642 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.emptyafefrow>
5643 pub fn empty_afe_f_row(&mut self,afeidx_ : i64) -> Result<(),String> { self.data.task.empty_afe_f_row(afeidx_) }
5644 /// Clears rows in F.
5645 ///
5646 /// # Arguments
5647 ///
5648 /// - `afeidx_` Indices of rows in F to clear.
5649 ///
5650 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.emptyafefrowlist>
5651 pub fn empty_afe_f_row_list(&mut self,afeidx_ : &[i64]) -> Result<(),String> { self.data.task.empty_afe_f_row_list(afeidx_) }
5652 /// Evaluates the activity of an affine conic constraint.
5653 ///
5654 /// # Arguments
5655 ///
5656 /// - `whichsol_` Selects a solution.
5657 ///
5658 /// See [Soltype]
5659 /// - `accidx_` The index of the affine conic constraint.
5660 /// - `activity_` The activity of the affine conic constraint. The array should have length equal to the dimension of the constraint.
5661 ///
5662 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.evaluateacc>
5663 pub fn evaluate_acc(&self,whichsol_ : i32,accidx_ : i64,activity_ : &mut[f64]) -> Result<(),String> { self.data.task.evaluate_acc(whichsol_,accidx_,activity_) }
5664 /// Evaluates the activities of all affine conic constraints.
5665 ///
5666 /// # Arguments
5667 ///
5668 /// - `whichsol_` Selects a solution.
5669 ///
5670 /// See [Soltype]
5671 /// - `activity_` The activity of affine conic constraints. The array should have length equal to the sum of dimensions of all affine conic constraints.
5672 ///
5673 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.evaluateaccs>
5674 pub fn evaluate_accs(&self,whichsol_ : i32,activity_ : &mut[f64]) -> Result<(),String> { self.data.task.evaluate_accs(whichsol_,activity_) }
5675 /// Generates systematic names for affine conic constraints.
5676 ///
5677 /// # Arguments
5678 ///
5679 /// - `sub_` Indexes of the affine conic constraints.
5680 /// - `fmt_` The variable name formatting string.
5681 /// - `dims_` Dimensions in the shape.
5682 /// - `sp_` Items that should be named.
5683 /// - `namedaxisidxs_` List if named index axes
5684 /// - `names_` All axis names.
5685 ///
5686 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.generateaccnames>
5687 pub fn generate_acc_names(&mut self,sub_ : &[i64],fmt_ : &str,dims_ : &[i32],sp_ : &[i64],namedaxisidxs_ : &[i32],names_ : &[String]) -> Result<(),String> { self.data.task.generate_acc_names(sub_,fmt_,dims_,sp_,namedaxisidxs_,names_) }
5688 /// Internal.
5689 ///
5690 /// # Arguments
5691 ///
5692 /// - `subj_` Indexes of the variables.
5693 /// - `fmt_` The variable name formatting string.
5694 /// - `dims_` Dimensions in the shape.
5695 /// - `sp_` Items that should be named.
5696 /// - `namedaxisidxs_` List if named index axes
5697 /// - `names_` All axis names.
5698 ///
5699 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.generatebarvarnames>
5700 pub fn generate_barvar_names(&mut self,subj_ : &[i32],fmt_ : &str,dims_ : &[i32],sp_ : &[i64],namedaxisidxs_ : &[i32],names_ : &[String]) -> Result<(),String> { self.data.task.generate_barvar_names(subj_,fmt_,dims_,sp_,namedaxisidxs_,names_) }
5701 /// Generates systematic names for cone.
5702 ///
5703 /// # Arguments
5704 ///
5705 /// - `subk_` Indexes of the cone.
5706 /// - `fmt_` The cone name formatting string.
5707 /// - `dims_` Dimensions in the shape.
5708 /// - `sp_` Items that should be named.
5709 /// - `namedaxisidxs_` List if named index axes
5710 /// - `names_` All axis names.
5711 ///
5712 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.generateconenames>
5713 pub fn generate_cone_names(&mut self,subk_ : &[i32],fmt_ : &str,dims_ : &[i32],sp_ : &[i64],namedaxisidxs_ : &[i32],names_ : &[String]) -> Result<(),String> { self.data.task.generate_cone_names(subk_,fmt_,dims_,sp_,namedaxisidxs_,names_) }
5714 /// Internal.
5715 ///
5716 /// # Arguments
5717 ///
5718 /// - `subi_` Indexes of the constraints.
5719 /// - `fmt_` The constraint name formatting string.
5720 /// - `dims_` Dimensions in the shape.
5721 /// - `sp_` Items that should be named.
5722 /// - `namedaxisidxs_` List if named index axes
5723 /// - `names_` All axis names.
5724 ///
5725 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.generateconnames>
5726 pub fn generate_con_names(&mut self,subi_ : &[i32],fmt_ : &str,dims_ : &[i32],sp_ : &[i64],namedaxisidxs_ : &[i32],names_ : &[String]) -> Result<(),String> { self.data.task.generate_con_names(subi_,fmt_,dims_,sp_,namedaxisidxs_,names_) }
5727 /// Generates systematic names for affine conic constraints.
5728 ///
5729 /// # Arguments
5730 ///
5731 /// - `sub_` Indexes of the disjunctive constraints.
5732 /// - `fmt_` The variable name formatting string.
5733 /// - `dims_` Dimensions in the shape.
5734 /// - `sp_` Items that should be named.
5735 /// - `namedaxisidxs_` List if named index axes
5736 /// - `names_` All axis names.
5737 ///
5738 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.generatedjcnames>
5739 pub fn generate_djc_names(&mut self,sub_ : &[i64],fmt_ : &str,dims_ : &[i32],sp_ : &[i64],namedaxisidxs_ : &[i32],names_ : &[String]) -> Result<(),String> { self.data.task.generate_djc_names(sub_,fmt_,dims_,sp_,namedaxisidxs_,names_) }
5740 /// Internal.
5741 ///
5742 /// # Arguments
5743 ///
5744 /// - `subj_` Indexes of the variables.
5745 /// - `fmt_` The variable name formatting string.
5746 /// - `dims_` Dimensions in the shape.
5747 /// - `sp_` Items that should be named.
5748 /// - `namedaxisidxs_` List if named index axes
5749 /// - `names_` All axis names.
5750 ///
5751 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.generatevarnames>
5752 pub fn generate_var_names(&mut self,subj_ : &[i32],fmt_ : &str,dims_ : &[i32],sp_ : &[i64],namedaxisidxs_ : &[i32],names_ : &[String]) -> Result<(),String> { self.data.task.generate_var_names(subj_,fmt_,dims_,sp_,namedaxisidxs_,names_) }
5753 /// Obtains the list of affine expressions appearing in the affine conic constraint.
5754 ///
5755 /// # Arguments
5756 ///
5757 /// - `accidx_` Index of the affine conic constraint.
5758 /// - `afeidxlist_` List of indexes of affine expressions appearing in the constraint.
5759 ///
5760 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccafeidxlist>
5761 pub fn get_acc_afe_idx_list(&self,accidx_ : i64,afeidxlist_ : &mut[i64]) -> Result<(),String> { self.data.task.get_acc_afe_idx_list(accidx_,afeidxlist_) }
5762 /// Obtains the additional constant term vector appearing in the affine conic constraint.
5763 ///
5764 /// # Arguments
5765 ///
5766 /// - `accidx_` Index of the affine conic constraint.
5767 /// - `b_` The vector b appearing in the constraint.
5768 ///
5769 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccb>
5770 pub fn get_acc_b(&self,accidx_ : i64,b_ : &mut[f64]) -> Result<(),String> { self.data.task.get_acc_b(accidx_,b_) }
5771 /// Obtains barF, implied by the ACCs, in block triplet form.
5772 ///
5773 /// # Arguments
5774 ///
5775 /// - `acc_afe_` Index of the AFE within the concatenated list of AFEs in ACCs.
5776 /// - `bar_var_` Symmetric matrix variable index.
5777 /// - `blk_row_` Block row index.
5778 /// - `blk_col_` Block column index.
5779 /// - `blk_val_` The numerical value associated with each block triplet.
5780 ///
5781 /// # Returns
5782 ///
5783 /// - `numtrip` Number of elements in the block triplet form.
5784 ///
5785 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccbarfblocktriplet>
5786 pub fn get_acc_barf_block_triplet(&self,acc_afe_ : &mut[i64],bar_var_ : &mut[i32],blk_row_ : &mut[i32],blk_col_ : &mut[i32],blk_val_ : &mut[f64]) -> Result<i64,String> { self.data.task.get_acc_barf_block_triplet(acc_afe_,bar_var_,blk_row_,blk_col_,blk_val_) }
5787 /// Obtains an upper bound on the number of elements in the block triplet form of barf, as used within the ACCs.
5788 ///
5789 /// # Returns
5790 ///
5791 /// - `numtrip` An upper bound on the number of elements in the block triplet form of barf, as used within the ACCs.
5792 ///
5793 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccbarfnumblocktriplets>
5794 pub fn get_acc_barf_num_block_triplets(&self) -> Result<i64,String> { self.data.task.get_acc_barf_num_block_triplets() }
5795 /// Obtains the domain appearing in the affine conic constraint.
5796 ///
5797 /// # Arguments
5798 ///
5799 /// - `accidx_` The index of the affine conic constraint.
5800 ///
5801 /// # Returns
5802 ///
5803 /// - `domidx` The index of domain in the affine conic constraint.
5804 ///
5805 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccdomain>
5806 pub fn get_acc_domain(&mut self,accidx_ : i64) -> Result<i64,String> { self.data.task.get_acc_domain(accidx_) }
5807 /// Obtains the doty vector for an affine conic constraint.
5808 ///
5809 /// # Arguments
5810 ///
5811 /// - `whichsol_` Selects a solution.
5812 ///
5813 /// See [Soltype]
5814 /// - `accidx_` The index of the affine conic constraint.
5815 /// - `doty_` The dual values for this affine conic constraint. The array should have length equal to the dimension of the constraint.
5816 ///
5817 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccdoty>
5818 pub fn get_acc_dot_y(&self,whichsol_ : i32,accidx_ : i64,doty_ : &mut[f64]) -> Result<(),String> { self.data.task.get_acc_dot_y(whichsol_,accidx_,doty_) }
5819 /// Obtains the doty vector for a solution.
5820 ///
5821 /// # Arguments
5822 ///
5823 /// - `whichsol_` Selects a solution.
5824 ///
5825 /// See [Soltype]
5826 /// - `doty_` The dual values of affine conic constraints. The array should have length equal to the sum of dimensions of all affine conic constraints.
5827 ///
5828 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccdotys>
5829 pub fn get_acc_dot_y_s(&self,whichsol_ : i32,doty_ : &mut[f64]) -> Result<(),String> { self.data.task.get_acc_dot_y_s(whichsol_,doty_) }
5830 /// Obtains the total number of nonzeros in the ACC implied F matrix.
5831 ///
5832 /// # Returns
5833 ///
5834 /// - `accfnnz` Number of nonzeros in the F matrix implied by ACCs.
5835 ///
5836 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccfnumnz>
5837 pub fn get_acc_f_numnz(&mut self) -> Result<i64,String> { self.data.task.get_acc_f_numnz() }
5838 /// Obtains the F matrix (implied by the AFE ordering within the ACCs) in triplet format.
5839 ///
5840 /// # Arguments
5841 ///
5842 /// - `frow_` Row indices of nonzeros in the implied F matrix.
5843 /// - `fcol_` Column indices of nonzeros in the implied F matrix.
5844 /// - `fval_` Values of nonzero entries in the implied F matrix.
5845 ///
5846 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccftrip>
5847 pub fn get_acc_f_trip(&mut self,frow_ : &mut[i64],fcol_ : &mut[i32],fval_ : &mut[f64]) -> Result<(),String> { self.data.task.get_acc_f_trip(frow_,fcol_,fval_) }
5848 /// The g vector as used within the ACCs.
5849 ///
5850 /// # Arguments
5851 ///
5852 /// - `g_` The g vector as used within the ACCs.
5853 ///
5854 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccgvector>
5855 pub fn get_acc_g_vector(&self,g_ : &mut[f64]) -> Result<(),String> { self.data.task.get_acc_g_vector(g_) }
5856 /// Obtains the dimension of the affine conic constraint.
5857 ///
5858 /// # Arguments
5859 ///
5860 /// - `accidx_` The index of the affine conic constraint.
5861 ///
5862 /// # Returns
5863 ///
5864 /// - `n` The dimension of the affine conic constraint (equal to the dimension of its domain).
5865 ///
5866 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccn>
5867 pub fn get_acc_n(&mut self,accidx_ : i64) -> Result<i64,String> { self.data.task.get_acc_n(accidx_) }
5868 /// Obtains the name of an affine conic constraint.
5869 ///
5870 /// # Arguments
5871 ///
5872 /// - `accidx_` Index of an affine conic constraint.
5873 ///
5874 /// # Returns
5875 ///
5876 /// - `name` Returns the required name.
5877 ///
5878 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccname>
5879 pub fn get_acc_name(&self,accidx_ : i64) -> Result<String,String> { self.data.task.get_acc_name(accidx_) }
5880 /// Obtains the length of the name of an affine conic constraint.
5881 ///
5882 /// # Arguments
5883 ///
5884 /// - `accidx_` Index of an affine conic constraint.
5885 ///
5886 /// # Returns
5887 ///
5888 /// - `len` Returns the length of the indicated name.
5889 ///
5890 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccnamelen>
5891 pub fn get_acc_name_len(&self,accidx_ : i64) -> Result<i32,String> { self.data.task.get_acc_name_len(accidx_) }
5892 /// Obtains the total dimension of all affine conic constraints.
5893 ///
5894 /// # Returns
5895 ///
5896 /// - `n` The total dimension of all affine conic constraints.
5897 ///
5898 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccntot>
5899 pub fn get_acc_n_tot(&mut self) -> Result<i64,String> { self.data.task.get_acc_n_tot() }
5900 /// Obtains full data of all affine conic constraints.
5901 ///
5902 /// # Arguments
5903 ///
5904 /// - `domidxlist_` The list of domains appearing in all affine conic constraints.
5905 /// - `afeidxlist_` The concatenation of index lists of affine expressions appearing in all affine conic constraints.
5906 /// - `b_` The concatenation of vectors b appearing in all affine conic constraints.
5907 ///
5908 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccs>
5909 pub fn get_accs(&self,domidxlist_ : &mut[i64],afeidxlist_ : &mut[i64],b_ : &mut[f64]) -> Result<(),String> { self.data.task.get_accs(domidxlist_,afeidxlist_,b_) }
5910 /// Obtains one column of the linear constraint matrix.
5911 ///
5912 /// # Arguments
5913 ///
5914 /// - `j_` Index of the column.
5915 /// - `nzj_` Number of non-zeros in the column obtained.
5916 /// - `subj_` Row indices of the non-zeros in the column obtained.
5917 /// - `valj_` Numerical values in the column obtained.
5918 ///
5919 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getacol>
5920 pub fn get_a_col(&self,j_ : i32,nzj_ : &mut i32,subj_ : &mut[i32],valj_ : &mut[f64]) -> Result<(),String> { self.data.task.get_a_col(j_,nzj_,subj_,valj_) }
5921 /// Obtains the number of non-zero elements in one column of the linear constraint matrix
5922 ///
5923 /// # Arguments
5924 ///
5925 /// - `i_` Index of the column.
5926 ///
5927 /// # Returns
5928 ///
5929 /// - `nzj` Number of non-zeros in the j'th column of (A).
5930 ///
5931 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getacolnumnz>
5932 pub fn get_a_col_num_nz(&self,i_ : i32) -> Result<i32,String> { self.data.task.get_a_col_num_nz(i_) }
5933 /// Obtains a sequence of columns from the coefficient matrix.
5934 ///
5935 /// # Arguments
5936 ///
5937 /// - `first_` Index of the first column in the sequence.
5938 /// - `last_` Index of the last column in the sequence plus one.
5939 /// - `ptrb_` Column start pointers.
5940 /// - `ptre_` Column end pointers.
5941 /// - `sub_` Contains the row subscripts.
5942 /// - `val_` Contains the coefficient values.
5943 ///
5944 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getacolslice64>
5945 pub fn get_a_col_slice(&self,first_ : i32,last_ : i32,ptrb_ : &mut[i64],ptre_ : &mut[i64],sub_ : &mut[i32],val_ : &mut[f64]) -> Result<(),String> { self.data.task.get_a_col_slice(first_,last_,ptrb_,ptre_,sub_,val_) }
5946 /// Obtains the number of non-zeros in a slice of columns of the coefficient matrix.
5947 ///
5948 /// # Arguments
5949 ///
5950 /// - `first_` Index of the first column in the sequence.
5951 /// - `last_` Index of the last column plus one in the sequence.
5952 ///
5953 /// # Returns
5954 ///
5955 /// - `numnz` Number of non-zeros in the slice.
5956 ///
5957 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getacolslicenumnz64>
5958 pub fn get_a_col_slice_num_nz(&self,first_ : i32,last_ : i32) -> Result<i64,String> { self.data.task.get_a_col_slice_num_nz(first_,last_) }
5959 /// Obtains a sequence of columns from the coefficient matrix in triplet format.
5960 ///
5961 /// # Arguments
5962 ///
5963 /// - `first_` Index of the first column in the sequence.
5964 /// - `last_` Index of the last column in the sequence plus one.
5965 /// - `subi_` Constraint subscripts.
5966 /// - `subj_` Column subscripts.
5967 /// - `val_` Values.
5968 ///
5969 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getacolslicetrip>
5970 pub fn get_a_col_slice_trip(&self,first_ : i32,last_ : i32,subi_ : &mut[i32],subj_ : &mut[i32],val_ : &mut[f64]) -> Result<(),String> { self.data.task.get_a_col_slice_trip(first_,last_,subi_,subj_,val_) }
5971 /// Obtains barF in block triplet form.
5972 ///
5973 /// # Arguments
5974 ///
5975 /// - `afeidx_` Constraint index.
5976 /// - `barvaridx_` Symmetric matrix variable index.
5977 /// - `subk_` Block row index.
5978 /// - `subl_` Block column index.
5979 /// - `valkl_` The numerical value associated with each block triplet.
5980 ///
5981 /// # Returns
5982 ///
5983 /// - `numtrip` Number of elements in the block triplet form.
5984 ///
5985 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getafebarfblocktriplet>
5986 pub fn get_afe_barf_block_triplet(&self,afeidx_ : &mut[i64],barvaridx_ : &mut[i32],subk_ : &mut[i32],subl_ : &mut[i32],valkl_ : &mut[f64]) -> Result<i64,String> { self.data.task.get_afe_barf_block_triplet(afeidx_,barvaridx_,subk_,subl_,valkl_) }
5987 /// Obtains an upper bound on the number of elements in the block triplet form of barf.
5988 ///
5989 /// # Returns
5990 ///
5991 /// - `numtrip` An upper bound on the number of elements in the block triplet form of barf.
5992 ///
5993 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getafebarfnumblocktriplets>
5994 pub fn get_afe_barf_num_block_triplets(&self) -> Result<i64,String> { self.data.task.get_afe_barf_num_block_triplets() }
5995 /// Obtains the number of nonzero entries in a row of barF.
5996 ///
5997 /// # Arguments
5998 ///
5999 /// - `afeidx_` Row index of barF.
6000 ///
6001 /// # Returns
6002 ///
6003 /// - `numentr` Number of nonzero entries in a row of barF.
6004 ///
6005 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getafebarfnumrowentries>
6006 pub fn get_afe_barf_num_row_entries(&mut self,afeidx_ : i64) -> Result<i32,String> { self.data.task.get_afe_barf_num_row_entries(afeidx_) }
6007 /// Obtains nonzero entries in one row of barF.
6008 ///
6009 /// # Arguments
6010 ///
6011 /// - `afeidx_` Row index of barF.
6012 /// - `barvaridx_` Semidefinite variable indices.
6013 /// - `ptrterm_` Pointers to the description of entries.
6014 /// - `numterm_` Number of terms in each entry.
6015 /// - `termidx_` Indices of semidefinite matrices from E.
6016 /// - `termweight_` Weights appearing in the weighted sum representation.
6017 ///
6018 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getafebarfrow>
6019 pub fn get_afe_barf_row(&mut self,afeidx_ : i64,barvaridx_ : &mut[i32],ptrterm_ : &mut[i64],numterm_ : &mut[i64],termidx_ : &mut[i64],termweight_ : &mut[f64]) -> Result<(),String> { self.data.task.get_afe_barf_row(afeidx_,barvaridx_,ptrterm_,numterm_,termidx_,termweight_) }
6020 /// Obtains information about one row of barF.
6021 ///
6022 /// # Arguments
6023 ///
6024 /// - `afeidx_` Row index of barF.
6025 /// - `numentr_` Number of nonzero entries in a row of barF.
6026 /// - `numterm_` Number of terms in the weighted sums representation of the row of barF.
6027 ///
6028 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getafebarfrowinfo>
6029 pub fn get_afe_barf_row_info(&mut self,afeidx_ : i64,numentr_ : &mut i32,numterm_ : &mut i64) -> Result<(),String> { self.data.task.get_afe_barf_row_info(afeidx_,numentr_,numterm_) }
6030 /// Obtains the total number of nonzeros in F.
6031 ///
6032 /// # Returns
6033 ///
6034 /// - `numnz` Number of nonzeros in F.
6035 ///
6036 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getafefnumnz>
6037 pub fn get_afe_f_num_nz(&mut self) -> Result<i64,String> { self.data.task.get_afe_f_num_nz() }
6038 /// Obtains one row of F in sparse format.
6039 ///
6040 /// # Arguments
6041 ///
6042 /// - `afeidx_` Row index.
6043 /// - `numnz_` Number of non-zeros in the row obtained.
6044 /// - `varidx_` Column indices of the non-zeros in the row obtained.
6045 /// - `val_` Values of the non-zeros in the row obtained.
6046 ///
6047 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getafefrow>
6048 pub fn get_afe_f_row(&mut self,afeidx_ : i64,numnz_ : &mut i32,varidx_ : &mut[i32],val_ : &mut[f64]) -> Result<(),String> { self.data.task.get_afe_f_row(afeidx_,numnz_,varidx_,val_) }
6049 /// Obtains the number of nonzeros in a row of F.
6050 ///
6051 /// # Arguments
6052 ///
6053 /// - `afeidx_` Row index.
6054 ///
6055 /// # Returns
6056 ///
6057 /// - `numnz` Number of non-zeros in the row.
6058 ///
6059 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getafefrownumnz>
6060 pub fn get_afe_f_row_num_nz(&mut self,afeidx_ : i64) -> Result<i32,String> { self.data.task.get_afe_f_row_num_nz(afeidx_) }
6061 /// Obtains the F matrix in triplet format.
6062 ///
6063 /// # Arguments
6064 ///
6065 /// - `afeidx_` Row indices of nonzeros.
6066 /// - `varidx_` Column indices of nonzeros.
6067 /// - `val_` Values of nonzero entries.
6068 ///
6069 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getafeftrip>
6070 pub fn get_afe_f_trip(&mut self,afeidx_ : &mut[i64],varidx_ : &mut[i32],val_ : &mut[f64]) -> Result<(),String> { self.data.task.get_afe_f_trip(afeidx_,varidx_,val_) }
6071 /// Obtains a single coefficient in g.
6072 ///
6073 /// # Arguments
6074 ///
6075 /// - `afeidx_` Element index.
6076 ///
6077 /// # Returns
6078 ///
6079 /// - `g` The entry in g.
6080 ///
6081 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getafeg>
6082 pub fn get_afe_g(&mut self,afeidx_ : i64) -> Result<f64,String> { self.data.task.get_afe_g(afeidx_) }
6083 /// Obtains a sequence of coefficients from the vector g.
6084 ///
6085 /// # Arguments
6086 ///
6087 /// - `first_` First index in the sequence.
6088 /// - `last_` Last index plus 1 in the sequence.
6089 /// - `g_` The slice of g as a dense vector.
6090 ///
6091 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getafegslice>
6092 pub fn get_afe_g_slice(&self,first_ : i64,last_ : i64,g_ : &mut[f64]) -> Result<(),String> { self.data.task.get_afe_g_slice(first_,last_,g_) }
6093 /// Obtains a single coefficient in linear constraint matrix.
6094 ///
6095 /// # Arguments
6096 ///
6097 /// - `i_` Row index of the coefficient to be returned.
6098 /// - `j_` Column index of the coefficient to be returned.
6099 ///
6100 /// # Returns
6101 ///
6102 /// - `aij` Returns the requested coefficient.
6103 ///
6104 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaij>
6105 pub fn get_aij(&self,i_ : i32,j_ : i32) -> Result<f64,String> { self.data.task.get_aij(i_,j_) }
6106 /// Obtains the number non-zeros in a rectangular piece of the linear constraint matrix.
6107 ///
6108 /// # Arguments
6109 ///
6110 /// - `firsti_` Index of the first row in the rectangular piece.
6111 /// - `lasti_` Index of the last row plus one in the rectangular piece.
6112 /// - `firstj_` Index of the first column in the rectangular piece.
6113 /// - `lastj_` Index of the last column plus one in the rectangular piece.
6114 ///
6115 /// # Returns
6116 ///
6117 /// - `numnz` Number of non-zero elements in the rectangular piece of the linear constraint matrix.
6118 ///
6119 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getapiecenumnz>
6120 pub fn get_a_piece_num_nz(&self,firsti_ : i32,lasti_ : i32,firstj_ : i32,lastj_ : i32) -> Result<i32,String> { self.data.task.get_a_piece_num_nz(firsti_,lasti_,firstj_,lastj_) }
6121 /// Obtains one row of the linear constraint matrix.
6122 ///
6123 /// # Arguments
6124 ///
6125 /// - `i_` Index of the row.
6126 /// - `nzi_` Number of non-zeros in the row obtained.
6127 /// - `subi_` Column indices of the non-zeros in the row obtained.
6128 /// - `vali_` Numerical values of the row obtained.
6129 ///
6130 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getarow>
6131 pub fn get_a_row(&self,i_ : i32,nzi_ : &mut i32,subi_ : &mut[i32],vali_ : &mut[f64]) -> Result<(),String> { self.data.task.get_a_row(i_,nzi_,subi_,vali_) }
6132 /// Obtains the number of non-zero elements in one row of the linear constraint matrix
6133 ///
6134 /// # Arguments
6135 ///
6136 /// - `i_` Index of the row.
6137 ///
6138 /// # Returns
6139 ///
6140 /// - `nzi` Number of non-zeros in the i'th row of `A`.
6141 ///
6142 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getarownumnz>
6143 pub fn get_a_row_num_nz(&self,i_ : i32) -> Result<i32,String> { self.data.task.get_a_row_num_nz(i_) }
6144 /// Obtains a sequence of rows from the coefficient matrix.
6145 ///
6146 /// # Arguments
6147 ///
6148 /// - `first_` Index of the first row in the sequence.
6149 /// - `last_` Index of the last row in the sequence plus one.
6150 /// - `ptrb_` Row start pointers.
6151 /// - `ptre_` Row end pointers.
6152 /// - `sub_` Contains the column subscripts.
6153 /// - `val_` Contains the coefficient values.
6154 ///
6155 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getarowslice64>
6156 pub fn get_a_row_slice(&self,first_ : i32,last_ : i32,ptrb_ : &mut[i64],ptre_ : &mut[i64],sub_ : &mut[i32],val_ : &mut[f64]) -> Result<(),String> { self.data.task.get_a_row_slice(first_,last_,ptrb_,ptre_,sub_,val_) }
6157 /// Obtains the number of non-zeros in a slice of rows of the coefficient matrix.
6158 ///
6159 /// # Arguments
6160 ///
6161 /// - `first_` Index of the first row in the sequence.
6162 /// - `last_` Index of the last row plus one in the sequence.
6163 ///
6164 /// # Returns
6165 ///
6166 /// - `numnz` Number of non-zeros in the slice.
6167 ///
6168 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getarowslicenumnz64>
6169 pub fn get_a_row_slice_num_nz(&self,first_ : i32,last_ : i32) -> Result<i64,String> { self.data.task.get_a_row_slice_num_nz(first_,last_) }
6170 /// Obtains a sequence of rows from the coefficient matrix in sparse triplet format.
6171 ///
6172 /// # Arguments
6173 ///
6174 /// - `first_` Index of the first row in the sequence.
6175 /// - `last_` Index of the last row in the sequence plus one.
6176 /// - `subi_` Constraint subscripts.
6177 /// - `subj_` Column subscripts.
6178 /// - `val_` Values.
6179 ///
6180 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getarowslicetrip>
6181 pub fn get_a_row_slice_trip(&self,first_ : i32,last_ : i32,subi_ : &mut[i32],subj_ : &mut[i32],val_ : &mut[f64]) -> Result<(),String> { self.data.task.get_a_row_slice_trip(first_,last_,subi_,subj_,val_) }
6182 /// Obtains the A matrix in sparse triplet format.
6183 ///
6184 /// # Arguments
6185 ///
6186 /// - `subi_` Constraint subscripts.
6187 /// - `subj_` Column subscripts.
6188 /// - `val_` Values.
6189 ///
6190 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getatrip>
6191 pub fn get_a_trip(&self,subi_ : &mut[i32],subj_ : &mut[i32],val_ : &mut[f64]) -> Result<(),String> { self.data.task.get_a_trip(subi_,subj_,val_) }
6192 /// Gets the current A matrix truncation threshold.
6193 ///
6194 /// # Arguments
6195 ///
6196 /// - `tolzero_` Truncation tolerance.
6197 ///
6198 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getatruncatetol>
6199 pub fn get_a_truncate_tol(&self,tolzero_ : &mut[f64]) -> Result<(),String> { self.data.task.get_a_truncate_tol(tolzero_) }
6200 /// Obtains barA in block triplet form.
6201 ///
6202 /// # Arguments
6203 ///
6204 /// - `subi_` Constraint index.
6205 /// - `subj_` Symmetric matrix variable index.
6206 /// - `subk_` Block row index.
6207 /// - `subl_` Block column index.
6208 /// - `valijkl_` The numerical value associated with each block triplet.
6209 ///
6210 /// # Returns
6211 ///
6212 /// - `num` Number of elements in the block triplet form.
6213 ///
6214 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarablocktriplet>
6215 pub fn get_bara_block_triplet(&self,subi_ : &mut[i32],subj_ : &mut[i32],subk_ : &mut[i32],subl_ : &mut[i32],valijkl_ : &mut[f64]) -> Result<i64,String> { self.data.task.get_bara_block_triplet(subi_,subj_,subk_,subl_,valijkl_) }
6216 /// Obtains information about an element in barA.
6217 ///
6218 /// # Arguments
6219 ///
6220 /// - `idx_` Position of the element in the vectorized form.
6221 /// - `i_` Row index of the element at position idx.
6222 /// - `j_` Column index of the element at position idx.
6223 /// - `sub_` A list indexes of the elements from symmetric matrix storage that appear in the weighted sum.
6224 /// - `weights_` The weights associated with each term in the weighted sum.
6225 ///
6226 /// # Returns
6227 ///
6228 /// - `num` Number of terms in weighted sum that forms the element.
6229 ///
6230 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbaraidx>
6231 pub fn get_bara_idx(&self,idx_ : i64,i_ : &mut i32,j_ : &mut i32,sub_ : &mut[i64],weights_ : &mut[f64]) -> Result<i64,String> { self.data.task.get_bara_idx(idx_,i_,j_,sub_,weights_) }
6232 /// Obtains information about an element in barA.
6233 ///
6234 /// # Arguments
6235 ///
6236 /// - `idx_` Position of the element in the vectorized form.
6237 /// - `i_` Row index of the element at position idx.
6238 /// - `j_` Column index of the element at position idx.
6239 ///
6240 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbaraidxij>
6241 pub fn get_bara_idx_i_j(&self,idx_ : i64,i_ : &mut i32,j_ : &mut i32) -> Result<(),String> { self.data.task.get_bara_idx_i_j(idx_,i_,j_) }
6242 /// Obtains the number of terms in the weighted sum that form a particular element in barA.
6243 ///
6244 /// # Arguments
6245 ///
6246 /// - `idx_` The internal position of the element for which information should be obtained.
6247 ///
6248 /// # Returns
6249 ///
6250 /// - `num` Number of terms in the weighted sum that form the specified element in barA.
6251 ///
6252 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbaraidxinfo>
6253 pub fn get_bara_idx_info(&self,idx_ : i64) -> Result<i64,String> { self.data.task.get_bara_idx_info(idx_) }
6254 /// Obtains the sparsity pattern of the barA matrix.
6255 ///
6256 /// # Arguments
6257 ///
6258 /// - `numnz_` Number of nonzero elements in barA.
6259 /// - `idxij_` Position of each nonzero element in the vector representation of barA.
6260 ///
6261 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarasparsity>
6262 pub fn get_bara_sparsity(&self,numnz_ : &mut i64,idxij_ : &mut[i64]) -> Result<(),String> { self.data.task.get_bara_sparsity(numnz_,idxij_) }
6263 /// Obtains barC in block triplet form.
6264 ///
6265 /// # Arguments
6266 ///
6267 /// - `subj_` Symmetric matrix variable index.
6268 /// - `subk_` Block row index.
6269 /// - `subl_` Block column index.
6270 /// - `valjkl_` The numerical value associated with each block triplet.
6271 ///
6272 /// # Returns
6273 ///
6274 /// - `num` Number of elements in the block triplet form.
6275 ///
6276 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarcblocktriplet>
6277 pub fn get_barc_block_triplet(&self,subj_ : &mut[i32],subk_ : &mut[i32],subl_ : &mut[i32],valjkl_ : &mut[f64]) -> Result<i64,String> { self.data.task.get_barc_block_triplet(subj_,subk_,subl_,valjkl_) }
6278 /// Obtains information about an element in barc.
6279 ///
6280 /// # Arguments
6281 ///
6282 /// - `idx_` Index of the element for which information should be obtained.
6283 /// - `j_` Row index in barc.
6284 /// - `num_` Number of terms in the weighted sum.
6285 /// - `sub_` Elements appearing the weighted sum.
6286 /// - `weights_` Weights of terms in the weighted sum.
6287 ///
6288 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarcidx>
6289 pub fn get_barc_idx(&self,idx_ : i64,j_ : &mut i32,num_ : &mut i64,sub_ : &mut[i64],weights_ : &mut[f64]) -> Result<(),String> { self.data.task.get_barc_idx(idx_,j_,num_,sub_,weights_) }
6290 /// Obtains information about an element in barc.
6291 ///
6292 /// # Arguments
6293 ///
6294 /// - `idx_` Index of the element for which information should be obtained. The value is an index of a symmetric sparse variable.
6295 ///
6296 /// # Returns
6297 ///
6298 /// - `num` Number of terms that appear in the weighted sum that forms the requested element.
6299 ///
6300 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarcidxinfo>
6301 pub fn get_barc_idx_info(&self,idx_ : i64) -> Result<i64,String> { self.data.task.get_barc_idx_info(idx_) }
6302 /// Obtains the row index of an element in barc.
6303 ///
6304 /// # Arguments
6305 ///
6306 /// - `idx_` Index of the element for which information should be obtained.
6307 ///
6308 /// # Returns
6309 ///
6310 /// - `j` Row index in barc.
6311 ///
6312 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarcidxj>
6313 pub fn get_barc_idx_j(&self,idx_ : i64) -> Result<i32,String> { self.data.task.get_barc_idx_j(idx_) }
6314 /// Get the positions of the nonzero elements in barc.
6315 ///
6316 /// # Arguments
6317 ///
6318 /// - `numnz_` Number of nonzero elements in barc.
6319 /// - `idxj_` Internal positions of the nonzeros elements in barc.
6320 ///
6321 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarcsparsity>
6322 pub fn get_barc_sparsity(&self,numnz_ : &mut i64,idxj_ : &mut[i64]) -> Result<(),String> { self.data.task.get_barc_sparsity(numnz_,idxj_) }
6323 /// Obtains the dual solution for a semidefinite variable.
6324 ///
6325 /// # Arguments
6326 ///
6327 /// - `whichsol_` Selects a solution.
6328 ///
6329 /// See [Soltype]
6330 /// - `j_` Index of the semidefinite variable.
6331 /// - `barsj_` Value of the j'th dual variable of barx.
6332 ///
6333 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarsj>
6334 pub fn get_bars_j(&self,whichsol_ : i32,j_ : i32,barsj_ : &mut[f64]) -> Result<(),String> { self.data.task.get_bars_j(whichsol_,j_,barsj_) }
6335 /// Obtains the dual solution for a sequence of semidefinite variables.
6336 ///
6337 /// # Arguments
6338 ///
6339 /// - `whichsol_` Selects a solution.
6340 ///
6341 /// See [Soltype]
6342 /// - `first_` Index of the first semidefinite variable in the slice.
6343 /// - `last_` Index of the last semidefinite variable in the slice plus one.
6344 /// - `slicesize_` Denotes the length of the array barsslice.
6345 /// - `barsslice_` Dual solution values of symmetric matrix variables in the slice, stored sequentially.
6346 ///
6347 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarsslice>
6348 pub fn get_bars_slice(&self,whichsol_ : i32,first_ : i32,last_ : i32,slicesize_ : i64,barsslice_ : &mut[f64]) -> Result<(),String> { self.data.task.get_bars_slice(whichsol_,first_,last_,slicesize_,barsslice_) }
6349 /// Obtains the name of a semidefinite variable.
6350 ///
6351 /// # Arguments
6352 ///
6353 /// - `i_` Index of the variable.
6354 ///
6355 /// # Returns
6356 ///
6357 /// - `name` The requested name is copied to this buffer.
6358 ///
6359 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarvarname>
6360 pub fn get_barvar_name(&self,i_ : i32) -> Result<String,String> { self.data.task.get_barvar_name(i_) }
6361 /// Obtains the index of semidefinite variable from its name.
6362 ///
6363 /// # Arguments
6364 ///
6365 /// - `somename_` The name of the variable.
6366 /// - `asgn_` Non-zero if the name somename is assigned to some semidefinite variable.
6367 ///
6368 /// # Returns
6369 ///
6370 /// - `index` The index of a semidefinite variable with the name somename (if one exists).
6371 ///
6372 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarvarnameindex>
6373 pub fn get_barvar_name_index(&self,somename_ : &str,asgn_ : &mut i32) -> Result<i32,String> { self.data.task.get_barvar_name_index(somename_,asgn_) }
6374 /// Obtains the length of the name of a semidefinite variable.
6375 ///
6376 /// # Arguments
6377 ///
6378 /// - `i_` Index of the variable.
6379 ///
6380 /// # Returns
6381 ///
6382 /// - `len` Returns the length of the indicated name.
6383 ///
6384 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarvarnamelen>
6385 pub fn get_barvar_name_len(&self,i_ : i32) -> Result<i32,String> { self.data.task.get_barvar_name_len(i_) }
6386 /// Obtains the primal solution for a semidefinite variable.
6387 ///
6388 /// # Arguments
6389 ///
6390 /// - `whichsol_` Selects a solution.
6391 ///
6392 /// See [Soltype]
6393 /// - `j_` Index of the semidefinite variable.
6394 /// - `barxj_` Value of the j'th variable of barx.
6395 ///
6396 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarxj>
6397 pub fn get_barx_j(&self,whichsol_ : i32,j_ : i32,barxj_ : &mut[f64]) -> Result<(),String> { self.data.task.get_barx_j(whichsol_,j_,barxj_) }
6398 /// Obtains the primal solution for a sequence of semidefinite variables.
6399 ///
6400 /// # Arguments
6401 ///
6402 /// - `whichsol_` Selects a solution.
6403 ///
6404 /// See [Soltype]
6405 /// - `first_` Index of the first semidefinite variable in the slice.
6406 /// - `last_` Index of the last semidefinite variable in the slice plus one.
6407 /// - `slicesize_` Denotes the length of the array barxslice.
6408 /// - `barxslice_` Solution values of symmetric matrix variables in the slice, stored sequentially.
6409 ///
6410 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarxslice>
6411 pub fn get_barx_slice(&self,whichsol_ : i32,first_ : i32,last_ : i32,slicesize_ : i64,barxslice_ : &mut[f64]) -> Result<(),String> { self.data.task.get_barx_slice(whichsol_,first_,last_,slicesize_,barxslice_) }
6412 /// Obtains all objective coefficients.
6413 ///
6414 /// # Arguments
6415 ///
6416 /// - `c_` Linear terms of the objective as a dense vector. The length is the number of variables.
6417 ///
6418 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getc>
6419 pub fn get_c(&self,c_ : &mut[f64]) -> Result<(),String> { self.data.task.get_c(c_) }
6420 /// Obtains the fixed term in the objective.
6421 ///
6422 /// # Returns
6423 ///
6424 /// - `cfix` Fixed term in the objective.
6425 ///
6426 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getcfix>
6427 pub fn get_cfix(&self) -> Result<f64,String> { self.data.task.get_cfix() }
6428 /// Obtains one objective coefficient.
6429 ///
6430 /// # Arguments
6431 ///
6432 /// - `j_` Index of the variable for which the c coefficient should be obtained.
6433 ///
6434 /// # Returns
6435 ///
6436 /// - `cj` The c coefficient value.
6437 ///
6438 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getcj>
6439 pub fn get_c_j(&self,j_ : i32) -> Result<f64,String> { self.data.task.get_c_j(j_) }
6440 /// Obtains a sequence of coefficients from the objective.
6441 ///
6442 /// # Arguments
6443 ///
6444 /// - `subj_` A list of variable indexes.
6445 /// - `c_` Linear terms of the requested list of the objective as a dense vector.
6446 ///
6447 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getclist>
6448 pub fn get_c_list(&self,subj_ : &[i32],c_ : &mut[f64]) -> Result<(),String> { self.data.task.get_c_list(subj_,c_) }
6449 /// Obtains bound information for one constraint.
6450 ///
6451 /// # Arguments
6452 ///
6453 /// - `i_` Index of the constraint for which the bound information should be obtained.
6454 /// - `bk_` Bound keys.
6455 ///
6456 /// See [Boundkey]
6457 /// - `bl_` Values for lower bounds.
6458 /// - `bu_` Values for upper bounds.
6459 ///
6460 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getconbound>
6461 pub fn get_con_bound(&self,i_ : i32,bk_ : & mut i32,bl_ : &mut f64,bu_ : &mut f64) -> Result<(),String> { self.data.task.get_con_bound(i_,bk_,bl_,bu_) }
6462 /// Obtains bounds information for a slice of the constraints.
6463 ///
6464 /// # Arguments
6465 ///
6466 /// - `first_` First index in the sequence.
6467 /// - `last_` Last index plus 1 in the sequence.
6468 /// - `bk_` Bound keys.
6469 ///
6470 /// See [Boundkey]
6471 /// - `bl_` Values for lower bounds.
6472 /// - `bu_` Values for upper bounds.
6473 ///
6474 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getconboundslice>
6475 pub fn get_con_bound_slice(&self,first_ : i32,last_ : i32,bk_ : &mut[i32],bl_ : &mut[f64],bu_ : &mut[f64]) -> Result<(),String> { self.data.task.get_con_bound_slice(first_,last_,bk_,bl_,bu_) }
6476 /// Obtains a cone.
6477 ///
6478 /// # Arguments
6479 ///
6480 /// - `k_` Index of the cone.
6481 /// - `ct_` Specifies the type of the cone.
6482 ///
6483 /// See [Conetype]
6484 /// - `conepar_` For the power cone it denotes the exponent alpha. For other cone types it is unused and can be set to 0.
6485 /// - `nummem_` Number of member variables in the cone.
6486 /// - `submem_` Variable subscripts of the members in the cone.
6487 ///
6488 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getcone>
6489 pub fn get_cone(&mut self,k_ : i32,ct_ : & mut i32,conepar_ : &mut f64,nummem_ : &mut i32,submem_ : &mut[i32]) -> Result<(),String> { self.data.task.get_cone(k_,ct_,conepar_,nummem_,submem_) }
6490 /// Obtains information about a cone.
6491 ///
6492 /// # Arguments
6493 ///
6494 /// - `k_` Index of the cone.
6495 /// - `ct_` Specifies the type of the cone.
6496 ///
6497 /// See [Conetype]
6498 /// - `conepar_` For the power cone it denotes the exponent alpha. For other cone types it is unused and can be set to 0.
6499 /// - `nummem_` Number of member variables in the cone.
6500 ///
6501 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getconeinfo>
6502 pub fn get_cone_info(&self,k_ : i32,ct_ : & mut i32,conepar_ : &mut f64,nummem_ : &mut i32) -> Result<(),String> { self.data.task.get_cone_info(k_,ct_,conepar_,nummem_) }
6503 /// Obtains the name of a cone.
6504 ///
6505 /// # Arguments
6506 ///
6507 /// - `i_` Index of the cone.
6508 ///
6509 /// # Returns
6510 ///
6511 /// - `name` The required name.
6512 ///
6513 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getconename>
6514 pub fn get_cone_name(&self,i_ : i32) -> Result<String,String> { self.data.task.get_cone_name(i_) }
6515 /// Checks whether the name has been assigned to any cone.
6516 ///
6517 /// # Arguments
6518 ///
6519 /// - `somename_` The name which should be checked.
6520 /// - `asgn_` Is non-zero if the name somename is assigned to some cone.
6521 ///
6522 /// # Returns
6523 ///
6524 /// - `index` If the name somename is assigned to some cone, this is the index of the cone.
6525 ///
6526 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getconenameindex>
6527 pub fn get_cone_name_index(&self,somename_ : &str,asgn_ : &mut i32) -> Result<i32,String> { self.data.task.get_cone_name_index(somename_,asgn_) }
6528 /// Obtains the length of the name of a cone.
6529 ///
6530 /// # Arguments
6531 ///
6532 /// - `i_` Index of the cone.
6533 ///
6534 /// # Returns
6535 ///
6536 /// - `len` Returns the length of the indicated name.
6537 ///
6538 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getconenamelen>
6539 pub fn get_cone_name_len(&self,i_ : i32) -> Result<i32,String> { self.data.task.get_cone_name_len(i_) }
6540 /// Obtains the name of a constraint.
6541 ///
6542 /// # Arguments
6543 ///
6544 /// - `i_` Index of the constraint.
6545 ///
6546 /// # Returns
6547 ///
6548 /// - `name` The required name.
6549 ///
6550 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getconname>
6551 pub fn get_con_name(&self,i_ : i32) -> Result<String,String> { self.data.task.get_con_name(i_) }
6552 /// Checks whether the name has been assigned to any constraint.
6553 ///
6554 /// # Arguments
6555 ///
6556 /// - `somename_` The name which should be checked.
6557 /// - `asgn_` Is non-zero if the name somename is assigned to some constraint.
6558 ///
6559 /// # Returns
6560 ///
6561 /// - `index` If the name somename is assigned to a constraint, then return the index of the constraint.
6562 ///
6563 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getconnameindex>
6564 pub fn get_con_name_index(&self,somename_ : &str,asgn_ : &mut i32) -> Result<i32,String> { self.data.task.get_con_name_index(somename_,asgn_) }
6565 /// Obtains the length of the name of a constraint.
6566 ///
6567 /// # Arguments
6568 ///
6569 /// - `i_` Index of the constraint.
6570 ///
6571 /// # Returns
6572 ///
6573 /// - `len` Returns the length of the indicated name.
6574 ///
6575 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getconnamelen>
6576 pub fn get_con_name_len(&self,i_ : i32) -> Result<i32,String> { self.data.task.get_con_name_len(i_) }
6577 /// Obtains a sequence of coefficients from the objective.
6578 ///
6579 /// # Arguments
6580 ///
6581 /// - `first_` First index in the sequence.
6582 /// - `last_` Last index plus 1 in the sequence.
6583 /// - `c_` Linear terms of the requested slice of the objective as a dense vector.
6584 ///
6585 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getcslice>
6586 pub fn get_c_slice(&self,first_ : i32,last_ : i32,c_ : &mut[f64]) -> Result<(),String> { self.data.task.get_c_slice(first_,last_,c_) }
6587 /// Obtains the dimension of a symmetric matrix variable.
6588 ///
6589 /// # Arguments
6590 ///
6591 /// - `j_` Index of the semidefinite variable whose dimension is requested.
6592 ///
6593 /// # Returns
6594 ///
6595 /// - `dimbarvarj` The dimension of the j'th semidefinite variable.
6596 ///
6597 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdimbarvarj>
6598 pub fn get_dim_barvar_j(&self,j_ : i32) -> Result<i32,String> { self.data.task.get_dim_barvar_j(j_) }
6599 /// Obtains the list of affine expression indexes in a disjunctive constraint.
6600 ///
6601 /// # Arguments
6602 ///
6603 /// - `djcidx_` Index of the disjunctive constraint.
6604 /// - `afeidxlist_` List of affine expression indexes.
6605 ///
6606 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjcafeidxlist>
6607 pub fn get_djc_afe_idx_list(&self,djcidx_ : i64,afeidxlist_ : &mut[i64]) -> Result<(),String> { self.data.task.get_djc_afe_idx_list(djcidx_,afeidxlist_) }
6608 /// Obtains the optional constant term vector of a disjunctive constraint.
6609 ///
6610 /// # Arguments
6611 ///
6612 /// - `djcidx_` Index of the disjunctive constraint.
6613 /// - `b_` The vector b.
6614 ///
6615 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjcb>
6616 pub fn get_djc_b(&self,djcidx_ : i64,b_ : &mut[f64]) -> Result<(),String> { self.data.task.get_djc_b(djcidx_,b_) }
6617 /// Obtains the list of domain indexes in a disjunctive constraint.
6618 ///
6619 /// # Arguments
6620 ///
6621 /// - `djcidx_` Index of the disjunctive constraint.
6622 /// - `domidxlist_` List of term sizes.
6623 ///
6624 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjcdomainidxlist>
6625 pub fn get_djc_domain_idx_list(&self,djcidx_ : i64,domidxlist_ : &mut[i64]) -> Result<(),String> { self.data.task.get_djc_domain_idx_list(djcidx_,domidxlist_) }
6626 /// Obtains the name of a disjunctive constraint.
6627 ///
6628 /// # Arguments
6629 ///
6630 /// - `djcidx_` Index of a disjunctive constraint.
6631 ///
6632 /// # Returns
6633 ///
6634 /// - `name` Returns the required name.
6635 ///
6636 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjcname>
6637 pub fn get_djc_name(&self,djcidx_ : i64) -> Result<String,String> { self.data.task.get_djc_name(djcidx_) }
6638 /// Obtains the length of the name of a disjunctive constraint.
6639 ///
6640 /// # Arguments
6641 ///
6642 /// - `djcidx_` Index of a disjunctive constraint.
6643 ///
6644 /// # Returns
6645 ///
6646 /// - `len` Returns the length of the indicated name.
6647 ///
6648 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjcnamelen>
6649 pub fn get_djc_name_len(&self,djcidx_ : i64) -> Result<i32,String> { self.data.task.get_djc_name_len(djcidx_) }
6650 /// Obtains the number of affine expressions in the disjunctive constraint.
6651 ///
6652 /// # Arguments
6653 ///
6654 /// - `djcidx_` Index of the disjunctive constraint.
6655 ///
6656 /// # Returns
6657 ///
6658 /// - `numafe` Number of affine expressions in the disjunctive constraint.
6659 ///
6660 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjcnumafe>
6661 pub fn get_djc_num_afe(&mut self,djcidx_ : i64) -> Result<i64,String> { self.data.task.get_djc_num_afe(djcidx_) }
6662 /// Obtains the number of affine expressions in all disjunctive constraints.
6663 ///
6664 /// # Returns
6665 ///
6666 /// - `numafetot` Number of affine expressions in all disjunctive constraints.
6667 ///
6668 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjcnumafetot>
6669 pub fn get_djc_num_afe_tot(&mut self) -> Result<i64,String> { self.data.task.get_djc_num_afe_tot() }
6670 /// Obtains the number of domains in the disjunctive constraint.
6671 ///
6672 /// # Arguments
6673 ///
6674 /// - `djcidx_` Index of the disjunctive constraint.
6675 ///
6676 /// # Returns
6677 ///
6678 /// - `numdomain` Number of domains in the disjunctive constraint.
6679 ///
6680 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjcnumdomain>
6681 pub fn get_djc_num_domain(&mut self,djcidx_ : i64) -> Result<i64,String> { self.data.task.get_djc_num_domain(djcidx_) }
6682 /// Obtains the number of domains in all disjunctive constraints.
6683 ///
6684 /// # Returns
6685 ///
6686 /// - `numdomaintot` Number of domains in all disjunctive constraints.
6687 ///
6688 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjcnumdomaintot>
6689 pub fn get_djc_num_domain_tot(&mut self) -> Result<i64,String> { self.data.task.get_djc_num_domain_tot() }
6690 /// Obtains the number terms in the disjunctive constraint.
6691 ///
6692 /// # Arguments
6693 ///
6694 /// - `djcidx_` Index of the disjunctive constraint.
6695 ///
6696 /// # Returns
6697 ///
6698 /// - `numterm` Number of terms in the disjunctive constraint.
6699 ///
6700 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjcnumterm>
6701 pub fn get_djc_num_term(&mut self,djcidx_ : i64) -> Result<i64,String> { self.data.task.get_djc_num_term(djcidx_) }
6702 /// Obtains the number of terms in all disjunctive constraints.
6703 ///
6704 /// # Returns
6705 ///
6706 /// - `numtermtot` Total number of terms in all disjunctive constraints.
6707 ///
6708 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjcnumtermtot>
6709 pub fn get_djc_num_term_tot(&mut self) -> Result<i64,String> { self.data.task.get_djc_num_term_tot() }
6710 /// Obtains full data of all disjunctive constraints.
6711 ///
6712 /// # Arguments
6713 ///
6714 /// - `domidxlist_` The concatenation of index lists of domains appearing in all disjunctive constraints.
6715 /// - `afeidxlist_` The concatenation of index lists of affine expressions appearing in all disjunctive constraints.
6716 /// - `b_` The concatenation of vectors b appearing in all disjunctive constraints.
6717 /// - `termsizelist_` The concatenation of lists of term sizes appearing in all disjunctive constraints.
6718 /// - `numterms_` The number of terms in each of the disjunctive constraints.
6719 ///
6720 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjcs>
6721 pub fn get_djcs(&self,domidxlist_ : &mut[i64],afeidxlist_ : &mut[i64],b_ : &mut[f64],termsizelist_ : &mut[i64],numterms_ : &mut[i64]) -> Result<(),String> { self.data.task.get_djcs(domidxlist_,afeidxlist_,b_,termsizelist_,numterms_) }
6722 /// Obtains the list of term sizes in a disjunctive constraint.
6723 ///
6724 /// # Arguments
6725 ///
6726 /// - `djcidx_` Index of the disjunctive constraint.
6727 /// - `termsizelist_` List of term sizes.
6728 ///
6729 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjctermsizelist>
6730 pub fn get_djc_term_size_list(&self,djcidx_ : i64,termsizelist_ : &mut[i64]) -> Result<(),String> { self.data.task.get_djc_term_size_list(djcidx_,termsizelist_) }
6731 /// Obtains the dimension of the domain.
6732 ///
6733 /// # Arguments
6734 ///
6735 /// - `domidx_` Index of the domain.
6736 ///
6737 /// # Returns
6738 ///
6739 /// - `n` Dimension of the domain.
6740 ///
6741 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdomainn>
6742 pub fn get_domain_n(&self,domidx_ : i64) -> Result<i64,String> { self.data.task.get_domain_n(domidx_) }
6743 /// Obtains the name of a domain.
6744 ///
6745 /// # Arguments
6746 ///
6747 /// - `domidx_` Index of a domain.
6748 ///
6749 /// # Returns
6750 ///
6751 /// - `name` Returns the required name.
6752 ///
6753 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdomainname>
6754 pub fn get_domain_name(&self,domidx_ : i64) -> Result<String,String> { self.data.task.get_domain_name(domidx_) }
6755 /// Obtains the length of the name of a domain.
6756 ///
6757 /// # Arguments
6758 ///
6759 /// - `domidx_` Index of a domain.
6760 ///
6761 /// # Returns
6762 ///
6763 /// - `len` Returns the length of the indicated name.
6764 ///
6765 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdomainnamelen>
6766 pub fn get_domain_name_len(&self,domidx_ : i64) -> Result<i32,String> { self.data.task.get_domain_name_len(domidx_) }
6767 /// Returns the type of the domain.
6768 ///
6769 /// # Arguments
6770 ///
6771 /// - `domidx_` Index of the domain.
6772 ///
6773 /// # Returns
6774 ///
6775 /// - `domtype` The type of the domain.
6776 ///
6777 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdomaintype>
6778 pub fn get_domain_type(&self,domidx_ : i64) -> Result<i32,String> { self.data.task.get_domain_type(domidx_) }
6779 /// Obtains a double information item.
6780 ///
6781 /// # Arguments
6782 ///
6783 /// - `whichdinf_` Specifies a double information item.
6784 ///
6785 /// See [Dinfitem]
6786 ///
6787 /// # Returns
6788 ///
6789 /// - `dvalue` The value of the required double information item.
6790 ///
6791 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdouinf>
6792 pub fn get_dou_inf(&self,whichdinf_ : i32) -> Result<f64,String> { self.data.task.get_dou_inf(whichdinf_) }
6793 /// Obtains a double parameter.
6794 ///
6795 /// # Arguments
6796 ///
6797 /// - `param_` Which parameter.
6798 ///
6799 /// See [Dparam]
6800 ///
6801 /// # Returns
6802 ///
6803 /// - `parvalue` Parameter value.
6804 ///
6805 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdouparam>
6806 pub fn get_dou_param(&self,param_ : i32) -> Result<f64,String> { self.data.task.get_dou_param(param_) }
6807 /// Computes the dual objective value associated with the solution.
6808 ///
6809 /// # Arguments
6810 ///
6811 /// - `whichsol_` Selects a solution.
6812 ///
6813 /// See [Soltype]
6814 ///
6815 /// # Returns
6816 ///
6817 /// - `dualobj` Objective value corresponding to the dual solution.
6818 ///
6819 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdualobj>
6820 pub fn get_dual_obj(&self,whichsol_ : i32) -> Result<f64,String> { self.data.task.get_dual_obj(whichsol_) }
6821 /// Compute norms of the dual solution.
6822 ///
6823 /// # Arguments
6824 ///
6825 /// - `whichsol_` Selects a solution.
6826 ///
6827 /// See [Soltype]
6828 /// - `nrmy_` The norm of the y vector.
6829 /// - `nrmslc_` The norm of the slc vector.
6830 /// - `nrmsuc_` The norm of the suc vector.
6831 /// - `nrmslx_` The norm of the slx vector.
6832 /// - `nrmsux_` The norm of the sux vector.
6833 /// - `nrmsnx_` The norm of the snx vector.
6834 /// - `nrmbars_` The norm of the bars vector.
6835 ///
6836 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdualsolutionnorms>
6837 pub fn get_dual_solution_norms(&self,whichsol_ : i32,nrmy_ : &mut f64,nrmslc_ : &mut f64,nrmsuc_ : &mut f64,nrmslx_ : &mut f64,nrmsux_ : &mut f64,nrmsnx_ : &mut f64,nrmbars_ : &mut f64) -> Result<(),String> { self.data.task.get_dual_solution_norms(whichsol_,nrmy_,nrmslc_,nrmsuc_,nrmslx_,nrmsux_,nrmsnx_,nrmbars_) }
6838 /// Computes the violation of the dual solution for set of affine conic constraints.
6839 ///
6840 /// # Arguments
6841 ///
6842 /// - `whichsol_` Selects a solution.
6843 ///
6844 /// See [Soltype]
6845 /// - `accidxlist_` An array of indexes of conic constraints.
6846 /// - `viol_` List of violations corresponding to sub.
6847 ///
6848 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdviolacc>
6849 pub fn get_dviol_acc(&self,whichsol_ : i32,accidxlist_ : &[i64],viol_ : &mut[f64]) -> Result<(),String> { self.data.task.get_dviol_acc(whichsol_,accidxlist_,viol_) }
6850 /// Computes the violation of dual solution for a set of semidefinite variables.
6851 ///
6852 /// # Arguments
6853 ///
6854 /// - `whichsol_` Selects a solution.
6855 ///
6856 /// See [Soltype]
6857 /// - `sub_` An array of indexes of barx variables.
6858 /// - `viol_` List of violations corresponding to sub.
6859 ///
6860 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdviolbarvar>
6861 pub fn get_dviol_barvar(&self,whichsol_ : i32,sub_ : &[i32],viol_ : &mut[f64]) -> Result<(),String> { self.data.task.get_dviol_barvar(whichsol_,sub_,viol_) }
6862 /// Computes the violation of a dual solution associated with a set of constraints.
6863 ///
6864 /// # Arguments
6865 ///
6866 /// - `whichsol_` Selects a solution.
6867 ///
6868 /// See [Soltype]
6869 /// - `sub_` An array of indexes of constraints.
6870 /// - `viol_` List of violations corresponding to sub.
6871 ///
6872 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdviolcon>
6873 pub fn get_dviol_con(&self,whichsol_ : i32,sub_ : &[i32],viol_ : &mut[f64]) -> Result<(),String> { self.data.task.get_dviol_con(whichsol_,sub_,viol_) }
6874 /// Computes the violation of a solution for set of dual conic constraints.
6875 ///
6876 /// # Arguments
6877 ///
6878 /// - `whichsol_` Selects a solution.
6879 ///
6880 /// See [Soltype]
6881 /// - `sub_` An array of indexes of conic constraints.
6882 /// - `viol_` List of violations corresponding to sub.
6883 ///
6884 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdviolcones>
6885 pub fn get_dviol_cones(&self,whichsol_ : i32,sub_ : &[i32],viol_ : &mut[f64]) -> Result<(),String> { self.data.task.get_dviol_cones(whichsol_,sub_,viol_) }
6886 /// Computes the violation of a dual solution associated with a set of scalar variables.
6887 ///
6888 /// # Arguments
6889 ///
6890 /// - `whichsol_` Selects a solution.
6891 ///
6892 /// See [Soltype]
6893 /// - `sub_` An array of indexes of x variables.
6894 /// - `viol_` List of violations corresponding to sub.
6895 ///
6896 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdviolvar>
6897 pub fn get_dviol_var(&self,whichsol_ : i32,sub_ : &[i32],viol_ : &mut[f64]) -> Result<(),String> { self.data.task.get_dviol_var(whichsol_,sub_,viol_) }
6898 /// Obtains the index of a named information item.
6899 ///
6900 /// # Arguments
6901 ///
6902 /// - `inftype_` Type of the information item.
6903 ///
6904 /// See [Inftype]
6905 /// - `infname_` Name of the information item.
6906 ///
6907 /// # Returns
6908 ///
6909 /// - `infindex` The item index.
6910 ///
6911 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getinfindex>
6912 pub fn get_inf_index(&self,inftype_ : i32,infname_ : &str) -> Result<i32,String> { self.data.task.get_inf_index(inftype_,infname_) }
6913 /// Obtains the maximum index of an information item of a given type.
6914 ///
6915 /// # Arguments
6916 ///
6917 /// - `inftype_` Type of the information item.
6918 ///
6919 /// See [Inftype]
6920 /// - `infmax_` The maximum index (plus 1) requested.
6921 ///
6922 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getinfmax>
6923 pub fn get_inf_max(&self,inftype_ : i32,infmax_ : &mut[i32]) -> Result<(),String> { self.data.task.get_inf_max(inftype_,infmax_) }
6924 /// Obtains the name of an information item.
6925 ///
6926 /// # Arguments
6927 ///
6928 /// - `inftype_` Type of the information item.
6929 ///
6930 /// See [Inftype]
6931 /// - `whichinf_` An information item.
6932 ///
6933 /// # Returns
6934 ///
6935 /// - `infname` Name of the information item.
6936 ///
6937 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getinfname>
6938 pub fn get_inf_name(&self,inftype_ : i32,whichinf_ : i32) -> Result<String,String> { self.data.task.get_inf_name(inftype_,whichinf_) }
6939 /// Obtains an integer information item.
6940 ///
6941 /// # Arguments
6942 ///
6943 /// - `whichiinf_` Specifies an integer information item.
6944 ///
6945 /// See [Iinfitem]
6946 ///
6947 /// # Returns
6948 ///
6949 /// - `ivalue` The value of the required integer information item.
6950 ///
6951 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getintinf>
6952 pub fn get_int_inf(&self,whichiinf_ : i32) -> Result<i32,String> { self.data.task.get_int_inf(whichiinf_) }
6953 /// Obtains an integer parameter.
6954 ///
6955 /// # Arguments
6956 ///
6957 /// - `param_` Which parameter.
6958 ///
6959 /// See [Iparam]
6960 ///
6961 /// # Returns
6962 ///
6963 /// - `parvalue` Parameter value.
6964 ///
6965 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getintparam>
6966 pub fn get_int_param(&self,param_ : i32) -> Result<i32,String> { self.data.task.get_int_param(param_) }
6967 /// Obtains the length of one semidefinite variable.
6968 ///
6969 /// # Arguments
6970 ///
6971 /// - `j_` Index of the semidefinite variable whose length if requested.
6972 ///
6973 /// # Returns
6974 ///
6975 /// - `lenbarvarj` Number of scalar elements in the lower triangular part of the semidefinite variable.
6976 ///
6977 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getlenbarvarj>
6978 pub fn get_len_barvar_j(&self,j_ : i32) -> Result<i64,String> { self.data.task.get_len_barvar_j(j_) }
6979 /// Obtains a long integer information item.
6980 ///
6981 /// # Arguments
6982 ///
6983 /// - `whichliinf_` Specifies a long information item.
6984 ///
6985 /// See [Liinfitem]
6986 ///
6987 /// # Returns
6988 ///
6989 /// - `ivalue` The value of the required long integer information item.
6990 ///
6991 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getlintinf>
6992 pub fn get_lint_inf(&self,whichliinf_ : i32) -> Result<i64,String> { self.data.task.get_lint_inf(whichliinf_) }
6993 /// Obtains an integer parameter.
6994 ///
6995 /// # Arguments
6996 ///
6997 /// - `param_` Which parameter.
6998 ///
6999 /// See [Iparam]
7000 ///
7001 /// # Returns
7002 ///
7003 /// - `parvalue` Parameter value.
7004 ///
7005 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getlintparam>
7006 pub fn get_lint_param(&self,param_ : i32) -> Result<i64,String> { self.data.task.get_lint_param(param_) }
7007 /// Obtains the maximum length (not including terminating zero character) of any objective, constraint, variable, domain or cone name.
7008 ///
7009 /// # Arguments
7010 ///
7011 /// - `maxlen_` The maximum length of any name.
7012 ///
7013 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getmaxnamelen>
7014 pub fn get_max_name_len(&self,maxlen_ : &mut i32) -> Result<(),String> { self.data.task.get_max_name_len(maxlen_) }
7015 /// Obtains number of preallocated non-zeros in the linear constraint matrix.
7016 ///
7017 /// # Returns
7018 ///
7019 /// - `maxnumanz` Number of preallocated non-zero linear matrix elements.
7020 ///
7021 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getmaxnumanz64>
7022 pub fn get_max_num_a_nz(&self) -> Result<i64,String> { self.data.task.get_max_num_a_nz() }
7023 /// Obtains maximum number of symmetric matrix variables for which space is currently preallocated.
7024 ///
7025 /// # Returns
7026 ///
7027 /// - `maxnumbarvar` Maximum number of symmetric matrix variables for which space is currently preallocated.
7028 ///
7029 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getmaxnumbarvar>
7030 pub fn get_max_num_barvar(&self) -> Result<i32,String> { self.data.task.get_max_num_barvar() }
7031 /// Obtains the number of preallocated constraints in the optimization task.
7032 ///
7033 /// # Returns
7034 ///
7035 /// - `maxnumcon` Number of preallocated constraints in the optimization task.
7036 ///
7037 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getmaxnumcon>
7038 pub fn get_max_num_con(&self) -> Result<i32,String> { self.data.task.get_max_num_con() }
7039 /// Obtains the number of preallocated cones in the optimization task.
7040 ///
7041 /// # Arguments
7042 ///
7043 /// - `maxnumcone_` Number of preallocated conic constraints in the optimization task.
7044 ///
7045 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getmaxnumcone>
7046 pub fn get_max_num_cone(&self,maxnumcone_ : &mut i32) -> Result<(),String> { self.data.task.get_max_num_cone(maxnumcone_) }
7047 /// Obtains the number of preallocated non-zeros for all quadratic terms in objective and constraints.
7048 ///
7049 /// # Arguments
7050 ///
7051 /// - `maxnumqnz_` Number of non-zero elements preallocated in quadratic coefficient matrices.
7052 ///
7053 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getmaxnumqnz64>
7054 pub fn get_max_num_q_nz(&self,maxnumqnz_ : &mut i64) -> Result<(),String> { self.data.task.get_max_num_q_nz(maxnumqnz_) }
7055 /// Obtains the maximum number variables allowed.
7056 ///
7057 /// # Returns
7058 ///
7059 /// - `maxnumvar` Number of preallocated variables in the optimization task.
7060 ///
7061 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getmaxnumvar>
7062 pub fn get_max_num_var(&self) -> Result<i32,String> { self.data.task.get_max_num_var() }
7063 /// Obtains information about the amount of memory used by a task.
7064 ///
7065 /// # Arguments
7066 ///
7067 /// - `meminuse_` Amount of memory currently used by the task.
7068 /// - `maxmemuse_` Maximum amount of memory used by the task until now.
7069 ///
7070 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getmemusagetask>
7071 pub fn get_mem_usage(&self,meminuse_ : &mut i64,maxmemuse_ : &mut i64) -> Result<(),String> { self.data.task.get_mem_usage(meminuse_,maxmemuse_) }
7072 /// Obtains the number of threads used by the mixed integer optimizer.
7073 ///
7074 /// # Returns
7075 ///
7076 /// - `numthreads` The number of threads.
7077 ///
7078 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getmionumthreads>
7079 pub fn get_mio_num_threads(&self) -> Result<i32,String> { self.data.task.get_mio_num_threads() }
7080 /// Obtains a named double information item.
7081 ///
7082 /// # Arguments
7083 ///
7084 /// - `infitemname_` The name of a double information item.
7085 /// - `dvalue_` The value of the required double information item.
7086 ///
7087 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnadouinf>
7088 pub fn get_na_dou_inf(&self,infitemname_ : &str,dvalue_ : &mut f64) -> Result<(),String> { self.data.task.get_na_dou_inf(infitemname_,dvalue_) }
7089 /// Obtains a double parameter.
7090 ///
7091 /// # Arguments
7092 ///
7093 /// - `paramname_` Name of a parameter.
7094 /// - `parvalue_` Parameter value.
7095 ///
7096 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnadouparam>
7097 pub fn get_na_dou_param(&self,paramname_ : &str,parvalue_ : &mut f64) -> Result<(),String> { self.data.task.get_na_dou_param(paramname_,parvalue_) }
7098 /// Obtains a named integer information item.
7099 ///
7100 /// # Arguments
7101 ///
7102 /// - `infitemname_` The name of an integer information item.
7103 /// - `ivalue_` The value of the required integer information item.
7104 ///
7105 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnaintinf>
7106 pub fn get_na_int_inf(&self,infitemname_ : &str,ivalue_ : &mut i32) -> Result<(),String> { self.data.task.get_na_int_inf(infitemname_,ivalue_) }
7107 /// Obtains an integer parameter.
7108 ///
7109 /// # Arguments
7110 ///
7111 /// - `paramname_` Name of a parameter.
7112 /// - `parvalue_` Parameter value.
7113 ///
7114 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnaintparam>
7115 pub fn get_na_int_param(&self,paramname_ : &str,parvalue_ : &mut i32) -> Result<(),String> { self.data.task.get_na_int_param(paramname_,parvalue_) }
7116 /// Obtains a string parameter.
7117 ///
7118 /// # Arguments
7119 ///
7120 /// - `paramname_` Name of a parameter.
7121 /// - `sizeparamname_` Size of the name buffer.
7122 /// - `len_` Returns the length of the parameter value.
7123 ///
7124 /// # Returns
7125 ///
7126 /// - `parvalue` Parameter value.
7127 ///
7128 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnastrparam>
7129 pub fn get_na_str_param(&self,paramname_ : &str,sizeparamname_ : i32,len_ : &mut i32) -> Result<String,String> { self.data.task.get_na_str_param(paramname_,sizeparamname_,len_) }
7130 /// Obtains the number of affine conic constraints.
7131 ///
7132 /// # Returns
7133 ///
7134 /// - `num` The number of affine conic constraints.
7135 ///
7136 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumacc>
7137 pub fn get_num_acc(&mut self) -> Result<i64,String> { self.data.task.get_num_acc() }
7138 /// Obtains the number of affine expressions.
7139 ///
7140 /// # Returns
7141 ///
7142 /// - `numafe` Number of affine expressions.
7143 ///
7144 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumafe>
7145 pub fn get_num_afe(&mut self) -> Result<i64,String> { self.data.task.get_num_afe() }
7146 /// Obtains the number of non-zeros in the coefficient matrix.
7147 ///
7148 /// # Returns
7149 ///
7150 /// - `numanz` Number of non-zero elements in the linear constraint matrix.
7151 ///
7152 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumanz64>
7153 pub fn getnumanz(&self) -> Result<i64,String> { self.data.task.getnumanz() }
7154 /// Obtains an upper bound on the number of scalar elements in the block triplet form of bara.
7155 ///
7156 /// # Returns
7157 ///
7158 /// - `num` An upper bound on the number of elements in the block triplet form of bara.
7159 ///
7160 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumbarablocktriplets>
7161 pub fn get_num_bara_block_triplets(&self) -> Result<i64,String> { self.data.task.get_num_bara_block_triplets() }
7162 /// Get the number of nonzero elements in barA.
7163 ///
7164 /// # Returns
7165 ///
7166 /// - `nz` The number of nonzero block elements in barA.
7167 ///
7168 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumbaranz>
7169 pub fn get_num_bara_nz(&self) -> Result<i64,String> { self.data.task.get_num_bara_nz() }
7170 /// Obtains an upper bound on the number of elements in the block triplet form of barc.
7171 ///
7172 /// # Returns
7173 ///
7174 /// - `num` An upper bound on the number of elements in the block triplet form of barc.
7175 ///
7176 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumbarcblocktriplets>
7177 pub fn get_num_barc_block_triplets(&self) -> Result<i64,String> { self.data.task.get_num_barc_block_triplets() }
7178 /// Obtains the number of nonzero elements in barc.
7179 ///
7180 /// # Returns
7181 ///
7182 /// - `nz` The number of nonzero elements in barc.
7183 ///
7184 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumbarcnz>
7185 pub fn get_num_barc_nz(&self) -> Result<i64,String> { self.data.task.get_num_barc_nz() }
7186 /// Obtains the number of semidefinite variables.
7187 ///
7188 /// # Returns
7189 ///
7190 /// - `numbarvar` Number of semidefinite variables in the problem.
7191 ///
7192 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumbarvar>
7193 pub fn get_num_barvar(&self) -> Result<i32,String> { self.data.task.get_num_barvar() }
7194 /// Obtains the number of constraints.
7195 ///
7196 /// # Returns
7197 ///
7198 /// - `numcon` Number of constraints.
7199 ///
7200 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumcon>
7201 pub fn get_num_con(&self) -> Result<i32,String> { self.data.task.get_num_con() }
7202 /// Obtains the number of cones.
7203 ///
7204 /// # Returns
7205 ///
7206 /// - `numcone` Number of conic constraints.
7207 ///
7208 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumcone>
7209 pub fn get_num_cone(&self) -> Result<i32,String> { self.data.task.get_num_cone() }
7210 /// Obtains the number of members in a cone.
7211 ///
7212 /// # Arguments
7213 ///
7214 /// - `k_` Index of the cone.
7215 /// - `nummem_` Number of member variables in the cone.
7216 ///
7217 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumconemem>
7218 pub fn get_num_cone_mem(&self,k_ : i32,nummem_ : &mut i32) -> Result<(),String> { self.data.task.get_num_cone_mem(k_,nummem_) }
7219 /// Obtains the number of disjunctive constraints.
7220 ///
7221 /// # Returns
7222 ///
7223 /// - `num` The number of disjunctive constraints.
7224 ///
7225 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumdjc>
7226 pub fn get_num_djc(&mut self) -> Result<i64,String> { self.data.task.get_num_djc() }
7227 /// Obtain the number of domains defined.
7228 ///
7229 /// # Returns
7230 ///
7231 /// - `numdomain` Number of domains in the task.
7232 ///
7233 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumdomain>
7234 pub fn get_num_domain(&mut self) -> Result<i64,String> { self.data.task.get_num_domain() }
7235 /// Obtains the number of integer-constrained variables.
7236 ///
7237 /// # Returns
7238 ///
7239 /// - `numintvar` Number of integer variables.
7240 ///
7241 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumintvar>
7242 pub fn get_num_int_var(&self) -> Result<i32,String> { self.data.task.get_num_int_var() }
7243 /// Obtains the number of parameters of a given type.
7244 ///
7245 /// # Arguments
7246 ///
7247 /// - `partype_` Parameter type.
7248 ///
7249 /// See [Parametertype]
7250 ///
7251 /// # Returns
7252 ///
7253 /// - `numparam` Returns the number of parameters of the requested type.
7254 ///
7255 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumparam>
7256 pub fn get_num_param(&self,partype_ : i32) -> Result<i32,String> { self.data.task.get_num_param(partype_) }
7257 /// Obtains the number of non-zero quadratic terms in a constraint.
7258 ///
7259 /// # Arguments
7260 ///
7261 /// - `k_` Index of the constraint for which the number quadratic terms should be obtained.
7262 ///
7263 /// # Returns
7264 ///
7265 /// - `numqcnz` Number of quadratic terms.
7266 ///
7267 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumqconknz64>
7268 pub fn get_num_q_con_k_nz(&self,k_ : i32) -> Result<i64,String> { self.data.task.get_num_q_con_k_nz(k_) }
7269 /// Obtains the number of non-zero quadratic terms in the objective.
7270 ///
7271 /// # Returns
7272 ///
7273 /// - `numqonz` Number of non-zero elements in the quadratic objective terms.
7274 ///
7275 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumqobjnz64>
7276 pub fn get_num_q_obj_nz(&self) -> Result<i64,String> { self.data.task.get_num_q_obj_nz() }
7277 /// Obtains the number of symmetric matrices stored.
7278 ///
7279 /// # Returns
7280 ///
7281 /// - `num` The number of symmetric sparse matrices.
7282 ///
7283 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumsymmat>
7284 pub fn get_num_sym_mat(&self) -> Result<i64,String> { self.data.task.get_num_sym_mat() }
7285 /// Obtains the number of variables.
7286 ///
7287 /// # Returns
7288 ///
7289 /// - `numvar` Number of variables.
7290 ///
7291 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumvar>
7292 pub fn get_num_var(&self) -> Result<i32,String> { self.data.task.get_num_var() }
7293 /// Obtains the name assigned to the objective function.
7294 ///
7295 /// # Returns
7296 ///
7297 /// - `objname` Assigned the objective name.
7298 ///
7299 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getobjname>
7300 pub fn get_obj_name(&self) -> Result<String,String> { self.data.task.get_obj_name() }
7301 /// Obtains the length of the name assigned to the objective function.
7302 ///
7303 /// # Returns
7304 ///
7305 /// - `len` Assigned the length of the objective name.
7306 ///
7307 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getobjnamelen>
7308 pub fn get_obj_name_len(&self) -> Result<i32,String> { self.data.task.get_obj_name_len() }
7309 /// Gets the objective sense.
7310 ///
7311 /// # Returns
7312 ///
7313 /// - `sense` The returned objective sense.
7314 ///
7315 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getobjsense>
7316 pub fn get_obj_sense(&self) -> Result<i32,String> { self.data.task.get_obj_sense() }
7317 /// Obtains the maximum index of a parameter of a given type.
7318 ///
7319 /// # Arguments
7320 ///
7321 /// - `partype_` Parameter type.
7322 ///
7323 /// See [Parametertype]
7324 ///
7325 /// # Returns
7326 ///
7327 /// - `parammax` The maximum index (plus 1) of the given parameter type.
7328 ///
7329 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getparammax>
7330 pub fn get_param_max(&self,partype_ : i32) -> Result<i32,String> { self.data.task.get_param_max(partype_) }
7331 /// Obtains the name of a parameter.
7332 ///
7333 /// # Arguments
7334 ///
7335 /// - `partype_` Parameter type.
7336 ///
7337 /// See [Parametertype]
7338 /// - `param_` Which parameter.
7339 ///
7340 /// # Returns
7341 ///
7342 /// - `parname` Parameter name.
7343 ///
7344 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getparamname>
7345 pub fn get_param_name(&self,partype_ : i32,param_ : i32) -> Result<String,String> { self.data.task.get_param_name(partype_,param_) }
7346 /// Obtains the exponent vector of a power domain.
7347 ///
7348 /// # Arguments
7349 ///
7350 /// - `domidx_` Index of the domain.
7351 /// - `alpha_` The exponent vector of the domain.
7352 ///
7353 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getpowerdomainalpha>
7354 pub fn get_power_domain_alpha(&mut self,domidx_ : i64,alpha_ : &mut[f64]) -> Result<(),String> { self.data.task.get_power_domain_alpha(domidx_,alpha_) }
7355 /// Obtains structural information about a power domain.
7356 ///
7357 /// # Arguments
7358 ///
7359 /// - `domidx_` Index of the domain.
7360 /// - `n_` Dimension of the domain.
7361 /// - `nleft_` Number of variables on the left hand side.
7362 ///
7363 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getpowerdomaininfo>
7364 pub fn get_power_domain_info(&mut self,domidx_ : i64,n_ : &mut i64,nleft_ : &mut i64) -> Result<(),String> { self.data.task.get_power_domain_info(domidx_,n_,nleft_) }
7365 /// Computes the primal objective value for the desired solution.
7366 ///
7367 /// # Arguments
7368 ///
7369 /// - `whichsol_` Selects a solution.
7370 ///
7371 /// See [Soltype]
7372 ///
7373 /// # Returns
7374 ///
7375 /// - `primalobj` Objective value corresponding to the primal solution.
7376 ///
7377 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getprimalobj>
7378 pub fn get_primal_obj(&self,whichsol_ : i32) -> Result<f64,String> { self.data.task.get_primal_obj(whichsol_) }
7379 /// Compute norms of the primal solution.
7380 ///
7381 /// # Arguments
7382 ///
7383 /// - `whichsol_` Selects a solution.
7384 ///
7385 /// See [Soltype]
7386 /// - `nrmxc_` The norm of the xc vector.
7387 /// - `nrmxx_` The norm of the xx vector.
7388 /// - `nrmbarx_` The norm of the barX vector.
7389 ///
7390 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getprimalsolutionnorms>
7391 pub fn get_primal_solution_norms(&self,whichsol_ : i32,nrmxc_ : &mut f64,nrmxx_ : &mut f64,nrmbarx_ : &mut f64) -> Result<(),String> { self.data.task.get_primal_solution_norms(whichsol_,nrmxc_,nrmxx_,nrmbarx_) }
7392 /// Obtains the problem type.
7393 ///
7394 /// # Returns
7395 ///
7396 /// - `probtype` The problem type.
7397 ///
7398 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getprobtype>
7399 pub fn get_prob_type(&self) -> Result<i32,String> { self.data.task.get_prob_type() }
7400 /// Obtains the problem status.
7401 ///
7402 /// # Arguments
7403 ///
7404 /// - `whichsol_` Selects a solution.
7405 ///
7406 /// See [Soltype]
7407 ///
7408 /// # Returns
7409 ///
7410 /// - `problemsta` Problem status.
7411 ///
7412 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getprosta>
7413 pub fn get_pro_sta(&self,whichsol_ : i32) -> Result<i32,String> { self.data.task.get_pro_sta(whichsol_) }
7414 /// Computes the violation of a solution for set of affine conic constraints.
7415 ///
7416 /// # Arguments
7417 ///
7418 /// - `whichsol_` Selects a solution.
7419 ///
7420 /// See [Soltype]
7421 /// - `accidxlist_` An array of indexes of conic constraints.
7422 /// - `viol_` List of violations corresponding to sub.
7423 ///
7424 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getpviolacc>
7425 pub fn get_pviol_acc(&self,whichsol_ : i32,accidxlist_ : &[i64],viol_ : &mut[f64]) -> Result<(),String> { self.data.task.get_pviol_acc(whichsol_,accidxlist_,viol_) }
7426 /// Computes the violation of a primal solution for a list of semidefinite variables.
7427 ///
7428 /// # Arguments
7429 ///
7430 /// - `whichsol_` Selects a solution.
7431 ///
7432 /// See [Soltype]
7433 /// - `sub_` An array of indexes of barX variables.
7434 /// - `viol_` List of violations corresponding to sub.
7435 ///
7436 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getpviolbarvar>
7437 pub fn get_pviol_barvar(&self,whichsol_ : i32,sub_ : &[i32],viol_ : &mut[f64]) -> Result<(),String> { self.data.task.get_pviol_barvar(whichsol_,sub_,viol_) }
7438 /// Computes the violation of a primal solution associated to a constraint.
7439 ///
7440 /// # Arguments
7441 ///
7442 /// - `whichsol_` Selects a solution.
7443 ///
7444 /// See [Soltype]
7445 /// - `sub_` An array of indexes of constraints.
7446 /// - `viol_` List of violations corresponding to sub.
7447 ///
7448 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getpviolcon>
7449 pub fn get_pviol_con(&self,whichsol_ : i32,sub_ : &[i32],viol_ : &mut[f64]) -> Result<(),String> { self.data.task.get_pviol_con(whichsol_,sub_,viol_) }
7450 /// Computes the violation of a solution for set of conic constraints.
7451 ///
7452 /// # Arguments
7453 ///
7454 /// - `whichsol_` Selects a solution.
7455 ///
7456 /// See [Soltype]
7457 /// - `sub_` An array of indexes of conic constraints.
7458 /// - `viol_` List of violations corresponding to sub.
7459 ///
7460 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getpviolcones>
7461 pub fn get_pviol_cones(&self,whichsol_ : i32,sub_ : &[i32],viol_ : &mut[f64]) -> Result<(),String> { self.data.task.get_pviol_cones(whichsol_,sub_,viol_) }
7462 /// Computes the violation of a solution for set of disjunctive constraints.
7463 ///
7464 /// # Arguments
7465 ///
7466 /// - `whichsol_` Selects a solution.
7467 ///
7468 /// See [Soltype]
7469 /// - `djcidxlist_` An array of indexes of disjunctive constraints.
7470 /// - `viol_` List of violations corresponding to sub.
7471 ///
7472 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getpvioldjc>
7473 pub fn get_pviol_djc(&self,whichsol_ : i32,djcidxlist_ : &[i64],viol_ : &mut[f64]) -> Result<(),String> { self.data.task.get_pviol_djc(whichsol_,djcidxlist_,viol_) }
7474 /// Computes the violation of a primal solution for a list of scalar variables.
7475 ///
7476 /// # Arguments
7477 ///
7478 /// - `whichsol_` Selects a solution.
7479 ///
7480 /// See [Soltype]
7481 /// - `sub_` An array of indexes of x variables.
7482 /// - `viol_` List of violations corresponding to sub.
7483 ///
7484 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getpviolvar>
7485 pub fn get_pviol_var(&self,whichsol_ : i32,sub_ : &[i32],viol_ : &mut[f64]) -> Result<(),String> { self.data.task.get_pviol_var(whichsol_,sub_,viol_) }
7486 /// Obtains all the quadratic terms in a constraint.
7487 ///
7488 /// # Arguments
7489 ///
7490 /// - `k_` Which constraint.
7491 /// - `qcsubi_` Row subscripts for quadratic constraint matrix.
7492 /// - `qcsubj_` Column subscripts for quadratic constraint matrix.
7493 /// - `qcval_` Quadratic constraint coefficient values.
7494 ///
7495 /// # Returns
7496 ///
7497 /// - `numqcnz` Number of quadratic terms.
7498 ///
7499 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getqconk64>
7500 pub fn get_q_con_k(&self,k_ : i32,qcsubi_ : &mut[i32],qcsubj_ : &mut[i32],qcval_ : &mut[f64]) -> Result<i64,String> { self.data.task.get_q_con_k(k_,qcsubi_,qcsubj_,qcval_) }
7501 /// Obtains all the quadratic terms in the objective.
7502 ///
7503 /// # Arguments
7504 ///
7505 /// - `numqonz_` Number of non-zero elements in the quadratic objective terms.
7506 /// - `qosubi_` Row subscripts for quadratic objective coefficients.
7507 /// - `qosubj_` Column subscripts for quadratic objective coefficients.
7508 /// - `qoval_` Quadratic objective coefficient values.
7509 ///
7510 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getqobj64>
7511 pub fn get_q_obj(&self,numqonz_ : &mut i64,qosubi_ : &mut[i32],qosubj_ : &mut[i32],qoval_ : &mut[f64]) -> Result<(),String> { self.data.task.get_q_obj(numqonz_,qosubi_,qosubj_,qoval_) }
7512 /// Obtains one coefficient from the quadratic term of the objective
7513 ///
7514 /// # Arguments
7515 ///
7516 /// - `i_` Row index of the coefficient.
7517 /// - `j_` Column index of coefficient.
7518 ///
7519 /// # Returns
7520 ///
7521 /// - `qoij` The required coefficient.
7522 ///
7523 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getqobjij>
7524 pub fn get_q_obj_i_j(&self,i_ : i32,j_ : i32) -> Result<f64,String> { self.data.task.get_q_obj_i_j(i_,j_) }
7525 /// Obtains the reduced costs for a sequence of variables.
7526 ///
7527 /// # Arguments
7528 ///
7529 /// - `whichsol_` Selects a solution.
7530 ///
7531 /// See [Soltype]
7532 /// - `first_` The index of the first variable in the sequence.
7533 /// - `last_` The index of the last variable in the sequence plus 1.
7534 /// - `redcosts_` Returns the requested reduced costs.
7535 ///
7536 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getreducedcosts>
7537 pub fn get_reduced_costs(&self,whichsol_ : i32,first_ : i32,last_ : i32,redcosts_ : &mut[f64]) -> Result<(),String> { self.data.task.get_reduced_costs(whichsol_,first_,last_,redcosts_) }
7538 /// Obtains the status keys for the constraints.
7539 ///
7540 /// # Arguments
7541 ///
7542 /// - `whichsol_` Selects a solution.
7543 ///
7544 /// See [Soltype]
7545 /// - `skc_` Status keys for the constraints.
7546 ///
7547 /// See [Stakey]
7548 ///
7549 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getskc>
7550 pub fn get_skc(&self,whichsol_ : i32,skc_ : &mut[i32]) -> Result<(),String> { self.data.task.get_skc(whichsol_,skc_) }
7551 /// Obtains the status keys for a slice of the constraints.
7552 ///
7553 /// # Arguments
7554 ///
7555 /// - `whichsol_` Selects a solution.
7556 ///
7557 /// See [Soltype]
7558 /// - `first_` First index in the sequence.
7559 /// - `last_` Last index plus 1 in the sequence.
7560 /// - `skc_` Status keys for the constraints.
7561 ///
7562 /// See [Stakey]
7563 ///
7564 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getskcslice>
7565 pub fn get_skc_slice(&self,whichsol_ : i32,first_ : i32,last_ : i32,skc_ : &mut[i32]) -> Result<(),String> { self.data.task.get_skc_slice(whichsol_,first_,last_,skc_) }
7566 /// Obtains the status keys for the conic constraints.
7567 ///
7568 /// # Arguments
7569 ///
7570 /// - `whichsol_` Selects a solution.
7571 ///
7572 /// See [Soltype]
7573 /// - `skn_` Status keys for the conic constraints.
7574 ///
7575 /// See [Stakey]
7576 ///
7577 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getskn>
7578 pub fn get_skn(&self,whichsol_ : i32,skn_ : &mut[i32]) -> Result<(),String> { self.data.task.get_skn(whichsol_,skn_) }
7579 /// Obtains the status keys for the scalar variables.
7580 ///
7581 /// # Arguments
7582 ///
7583 /// - `whichsol_` Selects a solution.
7584 ///
7585 /// See [Soltype]
7586 /// - `skx_` Status keys for the variables.
7587 ///
7588 /// See [Stakey]
7589 ///
7590 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getskx>
7591 pub fn get_skx(&self,whichsol_ : i32,skx_ : &mut[i32]) -> Result<(),String> { self.data.task.get_skx(whichsol_,skx_) }
7592 /// Obtains the status keys for a slice of the scalar variables.
7593 ///
7594 /// # Arguments
7595 ///
7596 /// - `whichsol_` Selects a solution.
7597 ///
7598 /// See [Soltype]
7599 /// - `first_` First index in the sequence.
7600 /// - `last_` Last index plus 1 in the sequence.
7601 /// - `skx_` Status keys for the variables.
7602 ///
7603 /// See [Stakey]
7604 ///
7605 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getskxslice>
7606 pub fn get_skx_slice(&self,whichsol_ : i32,first_ : i32,last_ : i32,skx_ : &mut[i32]) -> Result<(),String> { self.data.task.get_skx_slice(whichsol_,first_,last_,skx_) }
7607 /// Obtains the slc vector for a solution.
7608 ///
7609 /// # Arguments
7610 ///
7611 /// - `whichsol_` Selects a solution.
7612 ///
7613 /// See [Soltype]
7614 /// - `slc_` Dual variables corresponding to the lower bounds on the constraints.
7615 ///
7616 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getslc>
7617 pub fn get_slc(&self,whichsol_ : i32,slc_ : &mut[f64]) -> Result<(),String> { self.data.task.get_slc(whichsol_,slc_) }
7618 /// Obtains a slice of the slc vector for a solution.
7619 ///
7620 /// # Arguments
7621 ///
7622 /// - `whichsol_` Selects a solution.
7623 ///
7624 /// See [Soltype]
7625 /// - `first_` First index in the sequence.
7626 /// - `last_` Last index plus 1 in the sequence.
7627 /// - `slc_` Dual variables corresponding to the lower bounds on the constraints.
7628 ///
7629 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getslcslice>
7630 pub fn get_slc_slice(&self,whichsol_ : i32,first_ : i32,last_ : i32,slc_ : &mut[f64]) -> Result<(),String> { self.data.task.get_slc_slice(whichsol_,first_,last_,slc_) }
7631 /// Obtains the slx vector for a solution.
7632 ///
7633 /// # Arguments
7634 ///
7635 /// - `whichsol_` Selects a solution.
7636 ///
7637 /// See [Soltype]
7638 /// - `slx_` Dual variables corresponding to the lower bounds on the variables.
7639 ///
7640 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getslx>
7641 pub fn get_slx(&self,whichsol_ : i32,slx_ : &mut[f64]) -> Result<(),String> { self.data.task.get_slx(whichsol_,slx_) }
7642 /// Obtains a slice of the slx vector for a solution.
7643 ///
7644 /// # Arguments
7645 ///
7646 /// - `whichsol_` Selects a solution.
7647 ///
7648 /// See [Soltype]
7649 /// - `first_` First index in the sequence.
7650 /// - `last_` Last index plus 1 in the sequence.
7651 /// - `slx_` Dual variables corresponding to the lower bounds on the variables.
7652 ///
7653 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getslxslice>
7654 pub fn get_slx_slice(&self,whichsol_ : i32,first_ : i32,last_ : i32,slx_ : &mut[f64]) -> Result<(),String> { self.data.task.get_slx_slice(whichsol_,first_,last_,slx_) }
7655 /// Obtains the snx vector for a solution.
7656 ///
7657 /// # Arguments
7658 ///
7659 /// - `whichsol_` Selects a solution.
7660 ///
7661 /// See [Soltype]
7662 /// - `snx_` Dual variables corresponding to the conic constraints on the variables.
7663 ///
7664 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsnx>
7665 pub fn get_snx(&self,whichsol_ : i32,snx_ : &mut[f64]) -> Result<(),String> { self.data.task.get_snx(whichsol_,snx_) }
7666 /// Obtains a slice of the snx vector for a solution.
7667 ///
7668 /// # Arguments
7669 ///
7670 /// - `whichsol_` Selects a solution.
7671 ///
7672 /// See [Soltype]
7673 /// - `first_` First index in the sequence.
7674 /// - `last_` Last index plus 1 in the sequence.
7675 /// - `snx_` Dual variables corresponding to the conic constraints on the variables.
7676 ///
7677 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsnxslice>
7678 pub fn get_snx_slice(&self,whichsol_ : i32,first_ : i32,last_ : i32,snx_ : &mut[f64]) -> Result<(),String> { self.data.task.get_snx_slice(whichsol_,first_,last_,snx_) }
7679 /// Obtains the solution status.
7680 ///
7681 /// # Arguments
7682 ///
7683 /// - `whichsol_` Selects a solution.
7684 ///
7685 /// See [Soltype]
7686 ///
7687 /// # Returns
7688 ///
7689 /// - `solutionsta` Solution status.
7690 ///
7691 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsolsta>
7692 pub fn get_sol_sta(&self,whichsol_ : i32) -> Result<i32,String> { self.data.task.get_sol_sta(whichsol_) }
7693 /// Obtains the complete solution.
7694 ///
7695 /// # Arguments
7696 ///
7697 /// - `whichsol_` Selects a solution.
7698 ///
7699 /// See [Soltype]
7700 /// - `problemsta_` Problem status.
7701 ///
7702 /// See [Prosta]
7703 /// - `solutionsta_` Solution status.
7704 ///
7705 /// See [Solsta]
7706 /// - `skc_` Status keys for the constraints.
7707 ///
7708 /// See [Stakey]
7709 /// - `skx_` Status keys for the variables.
7710 ///
7711 /// See [Stakey]
7712 /// - `skn_` Status keys for the conic constraints.
7713 ///
7714 /// See [Stakey]
7715 /// - `xc_` Primal constraint solution.
7716 /// - `xx_` Primal variable solution.
7717 /// - `y_` Vector of dual variables corresponding to the constraints.
7718 /// - `slc_` Dual variables corresponding to the lower bounds on the constraints.
7719 /// - `suc_` Dual variables corresponding to the upper bounds on the constraints.
7720 /// - `slx_` Dual variables corresponding to the lower bounds on the variables.
7721 /// - `sux_` Dual variables corresponding to the upper bounds on the variables.
7722 /// - `snx_` Dual variables corresponding to the conic constraints on the variables.
7723 ///
7724 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsolution>
7725 pub fn get_solution(&self,whichsol_ : i32,problemsta_ : & mut i32,solutionsta_ : & mut i32,skc_ : &mut[i32],skx_ : &mut[i32],skn_ : &mut[i32],xc_ : &mut[f64],xx_ : &mut[f64],y_ : &mut[f64],slc_ : &mut[f64],suc_ : &mut[f64],slx_ : &mut[f64],sux_ : &mut[f64],snx_ : &mut[f64]) -> Result<(),String> { self.data.task.get_solution(whichsol_,problemsta_,solutionsta_,skc_,skx_,skn_,xc_,xx_,y_,slc_,suc_,slx_,sux_,snx_) }
7726 /// Obtains information about of a solution.
7727 ///
7728 /// # Arguments
7729 ///
7730 /// - `whichsol_` Selects a solution.
7731 ///
7732 /// See [Soltype]
7733 /// - `pobj_` The primal objective value.
7734 /// - `pviolcon_` Maximal primal bound violation for a xc variable.
7735 /// - `pviolvar_` Maximal primal bound violation for a xx variable.
7736 /// - `pviolbarvar_` Maximal primal bound violation for a barx variable.
7737 /// - `pviolcone_` Maximal primal violation of the solution with respect to the conic constraints.
7738 /// - `pviolitg_` Maximal violation in the integer constraints.
7739 /// - `dobj_` Dual objective value.
7740 /// - `dviolcon_` Maximal dual bound violation for a xc variable.
7741 /// - `dviolvar_` Maximal dual bound violation for a xx variable.
7742 /// - `dviolbarvar_` Maximal dual bound violation for a bars variable.
7743 /// - `dviolcone_` Maximum violation of the dual solution in the dual conic constraints.
7744 ///
7745 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsolutioninfo>
7746 pub fn get_solution_info(&self,whichsol_ : i32,pobj_ : &mut f64,pviolcon_ : &mut f64,pviolvar_ : &mut f64,pviolbarvar_ : &mut f64,pviolcone_ : &mut f64,pviolitg_ : &mut f64,dobj_ : &mut f64,dviolcon_ : &mut f64,dviolvar_ : &mut f64,dviolbarvar_ : &mut f64,dviolcone_ : &mut f64) -> Result<(),String> { self.data.task.get_solution_info(whichsol_,pobj_,pviolcon_,pviolvar_,pviolbarvar_,pviolcone_,pviolitg_,dobj_,dviolcon_,dviolvar_,dviolbarvar_,dviolcone_) }
7747 /// Obtains information about of a solution.
7748 ///
7749 /// # Arguments
7750 ///
7751 /// - `whichsol_` Selects a solution.
7752 ///
7753 /// See [Soltype]
7754 /// - `pobj_` The primal objective value.
7755 /// - `pviolcon_` Maximal primal bound violation for a xc variable.
7756 /// - `pviolvar_` Maximal primal bound violation for a xx variable.
7757 /// - `pviolbarvar_` Maximal primal bound violation for a barx variable.
7758 /// - `pviolcone_` Maximal primal violation of the solution with respect to the conic constraints.
7759 /// - `pviolacc_` Maximal primal violation of the solution with respect to the affine conic constraints.
7760 /// - `pvioldjc_` Maximal primal violation of the solution with respect to the disjunctive constraints.
7761 /// - `pviolitg_` Maximal violation in the integer constraints.
7762 /// - `dobj_` Dual objective value.
7763 /// - `dviolcon_` Maximal dual bound violation for a xc variable.
7764 /// - `dviolvar_` Maximal dual bound violation for a xx variable.
7765 /// - `dviolbarvar_` Maximal dual bound violation for a bars variable.
7766 /// - `dviolcone_` Maximum violation of the dual solution in the dual conic constraints.
7767 /// - `dviolacc_` Maximum violation of the dual solution in the dual affine conic constraints.
7768 ///
7769 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsolutioninfonew>
7770 pub fn get_solution_info_new(&self,whichsol_ : i32,pobj_ : &mut f64,pviolcon_ : &mut f64,pviolvar_ : &mut f64,pviolbarvar_ : &mut f64,pviolcone_ : &mut f64,pviolacc_ : &mut f64,pvioldjc_ : &mut f64,pviolitg_ : &mut f64,dobj_ : &mut f64,dviolcon_ : &mut f64,dviolvar_ : &mut f64,dviolbarvar_ : &mut f64,dviolcone_ : &mut f64,dviolacc_ : &mut f64) -> Result<(),String> { self.data.task.get_solution_info_new(whichsol_,pobj_,pviolcon_,pviolvar_,pviolbarvar_,pviolcone_,pviolacc_,pvioldjc_,pviolitg_,dobj_,dviolcon_,dviolvar_,dviolbarvar_,dviolcone_,dviolacc_) }
7771 /// Obtains the complete solution.
7772 ///
7773 /// # Arguments
7774 ///
7775 /// - `whichsol_` Selects a solution.
7776 ///
7777 /// See [Soltype]
7778 /// - `problemsta_` Problem status.
7779 ///
7780 /// See [Prosta]
7781 /// - `solutionsta_` Solution status.
7782 ///
7783 /// See [Solsta]
7784 /// - `skc_` Status keys for the constraints.
7785 ///
7786 /// See [Stakey]
7787 /// - `skx_` Status keys for the variables.
7788 ///
7789 /// See [Stakey]
7790 /// - `skn_` Status keys for the conic constraints.
7791 ///
7792 /// See [Stakey]
7793 /// - `xc_` Primal constraint solution.
7794 /// - `xx_` Primal variable solution.
7795 /// - `y_` Vector of dual variables corresponding to the constraints.
7796 /// - `slc_` Dual variables corresponding to the lower bounds on the constraints.
7797 /// - `suc_` Dual variables corresponding to the upper bounds on the constraints.
7798 /// - `slx_` Dual variables corresponding to the lower bounds on the variables.
7799 /// - `sux_` Dual variables corresponding to the upper bounds on the variables.
7800 /// - `snx_` Dual variables corresponding to the conic constraints on the variables.
7801 /// - `doty_` Dual variables corresponding to affine conic constraints.
7802 ///
7803 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsolutionnew>
7804 pub fn get_solution_new(&self,whichsol_ : i32,problemsta_ : & mut i32,solutionsta_ : & mut i32,skc_ : &mut[i32],skx_ : &mut[i32],skn_ : &mut[i32],xc_ : &mut[f64],xx_ : &mut[f64],y_ : &mut[f64],slc_ : &mut[f64],suc_ : &mut[f64],slx_ : &mut[f64],sux_ : &mut[f64],snx_ : &mut[f64],doty_ : &mut[f64]) -> Result<(),String> { self.data.task.get_solution_new(whichsol_,problemsta_,solutionsta_,skc_,skx_,skn_,xc_,xx_,y_,slc_,suc_,slx_,sux_,snx_,doty_) }
7805 /// Obtains a slice of the solution.
7806 ///
7807 /// # Arguments
7808 ///
7809 /// - `whichsol_` Selects a solution.
7810 ///
7811 /// See [Soltype]
7812 /// - `solitem_` Which part of the solution is required.
7813 ///
7814 /// See [Solitem]
7815 /// - `first_` First index in the sequence.
7816 /// - `last_` Last index plus 1 in the sequence.
7817 /// - `values_` The values of the requested solution elements.
7818 ///
7819 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsolutionslice>
7820 pub fn get_solution_slice(&self,whichsol_ : i32,solitem_ : i32,first_ : i32,last_ : i32,values_ : &mut[f64]) -> Result<(),String> { self.data.task.get_solution_slice(whichsol_,solitem_,first_,last_,values_) }
7821 /// Gets a single symmetric matrix from the matrix store.
7822 ///
7823 /// # Arguments
7824 ///
7825 /// - `idx_` Index of the matrix to retrieve.
7826 /// - `subi_` Row subscripts of the matrix non-zero elements.
7827 /// - `subj_` Column subscripts of the matrix non-zero elements.
7828 /// - `valij_` Coefficients of the matrix non-zero elements.
7829 ///
7830 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsparsesymmat>
7831 pub fn get_sparse_sym_mat(&self,idx_ : i64,subi_ : &mut[i32],subj_ : &mut[i32],valij_ : &mut[f64]) -> Result<(),String> { self.data.task.get_sparse_sym_mat(idx_,subi_,subj_,valij_) }
7832 /// Obtains the value of a string parameter.
7833 ///
7834 /// # Arguments
7835 ///
7836 /// - `param_` Which parameter.
7837 ///
7838 /// See [Sparam]
7839 /// - `len_` The length of the parameter value.
7840 ///
7841 /// # Returns
7842 ///
7843 /// - `parvalue` If this is not a null pointer, the parameter value is stored here.
7844 ///
7845 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getstrparam>
7846 pub fn get_str_param(&self,param_ : i32,len_ : &mut i32) -> Result<String,String> { self.data.task.get_str_param(param_,len_) }
7847 /// Obtains the length of a string parameter.
7848 ///
7849 /// # Arguments
7850 ///
7851 /// - `param_` Which parameter.
7852 ///
7853 /// See [Sparam]
7854 ///
7855 /// # Returns
7856 ///
7857 /// - `len` The length of the parameter value.
7858 ///
7859 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getstrparamlen>
7860 pub fn get_str_param_len(&self,param_ : i32) -> Result<i32,String> { self.data.task.get_str_param_len(param_) }
7861 /// Obtains the suc vector for a solution.
7862 ///
7863 /// # Arguments
7864 ///
7865 /// - `whichsol_` Selects a solution.
7866 ///
7867 /// See [Soltype]
7868 /// - `suc_` Dual variables corresponding to the upper bounds on the constraints.
7869 ///
7870 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsuc>
7871 pub fn get_suc(&self,whichsol_ : i32,suc_ : &mut[f64]) -> Result<(),String> { self.data.task.get_suc(whichsol_,suc_) }
7872 /// Obtains a slice of the suc vector for a solution.
7873 ///
7874 /// # Arguments
7875 ///
7876 /// - `whichsol_` Selects a solution.
7877 ///
7878 /// See [Soltype]
7879 /// - `first_` First index in the sequence.
7880 /// - `last_` Last index plus 1 in the sequence.
7881 /// - `suc_` Dual variables corresponding to the upper bounds on the constraints.
7882 ///
7883 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsucslice>
7884 pub fn get_suc_slice(&self,whichsol_ : i32,first_ : i32,last_ : i32,suc_ : &mut[f64]) -> Result<(),String> { self.data.task.get_suc_slice(whichsol_,first_,last_,suc_) }
7885 /// Obtains the sux vector for a solution.
7886 ///
7887 /// # Arguments
7888 ///
7889 /// - `whichsol_` Selects a solution.
7890 ///
7891 /// See [Soltype]
7892 /// - `sux_` Dual variables corresponding to the upper bounds on the variables.
7893 ///
7894 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsux>
7895 pub fn get_sux(&self,whichsol_ : i32,sux_ : &mut[f64]) -> Result<(),String> { self.data.task.get_sux(whichsol_,sux_) }
7896 /// Obtains a slice of the sux vector for a solution.
7897 ///
7898 /// # Arguments
7899 ///
7900 /// - `whichsol_` Selects a solution.
7901 ///
7902 /// See [Soltype]
7903 /// - `first_` First index in the sequence.
7904 /// - `last_` Last index plus 1 in the sequence.
7905 /// - `sux_` Dual variables corresponding to the upper bounds on the variables.
7906 ///
7907 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsuxslice>
7908 pub fn get_sux_slice(&self,whichsol_ : i32,first_ : i32,last_ : i32,sux_ : &mut[f64]) -> Result<(),String> { self.data.task.get_sux_slice(whichsol_,first_,last_,sux_) }
7909 /// Obtains a cone type string identifier.
7910 ///
7911 /// # Arguments
7912 ///
7913 /// - `i_` Index.
7914 /// - `value_` The corresponding value.
7915 ///
7916 /// # Returns
7917 ///
7918 /// - `name` Name of the i'th symbolic constant.
7919 ///
7920 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsymbcon>
7921 pub fn get_symb_con(&self,i_ : i32,value_ : &mut i32) -> Result<String,String> { self.data.task.get_symb_con(i_,value_) }
7922 /// Obtains information about a matrix from the symmetric matrix storage.
7923 ///
7924 /// # Arguments
7925 ///
7926 /// - `idx_` Index of the matrix for which information is requested.
7927 /// - `dim_` Returns the dimension of the requested matrix.
7928 /// - `nz_` Returns the number of non-zeros in the requested matrix.
7929 /// - `mattype_` Returns the type of the requested matrix.
7930 ///
7931 /// See [Symmattype]
7932 ///
7933 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsymmatinfo>
7934 pub fn get_sym_mat_info(&self,idx_ : i64,dim_ : &mut i32,nz_ : &mut i64,mattype_ : & mut i32) -> Result<(),String> { self.data.task.get_sym_mat_info(idx_,dim_,nz_,mattype_) }
7935 /// Obtains the task name.
7936 ///
7937 /// # Returns
7938 ///
7939 /// - `taskname` Returns the task name.
7940 ///
7941 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.gettaskname>
7942 pub fn get_task_name(&self) -> Result<String,String> { self.data.task.get_task_name() }
7943 /// Obtains the length the task name.
7944 ///
7945 /// # Returns
7946 ///
7947 /// - `len` Returns the length of the task name.
7948 ///
7949 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.gettasknamelen>
7950 pub fn get_task_name_len(&self) -> Result<i32,String> { self.data.task.get_task_name_len() }
7951 /// Obtains bound information for one variable.
7952 ///
7953 /// # Arguments
7954 ///
7955 /// - `i_` Index of the variable for which the bound information should be obtained.
7956 /// - `bk_` Bound keys.
7957 ///
7958 /// See [Boundkey]
7959 /// - `bl_` Values for lower bounds.
7960 /// - `bu_` Values for upper bounds.
7961 ///
7962 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getvarbound>
7963 pub fn get_var_bound(&self,i_ : i32,bk_ : & mut i32,bl_ : &mut f64,bu_ : &mut f64) -> Result<(),String> { self.data.task.get_var_bound(i_,bk_,bl_,bu_) }
7964 /// Obtains bounds information for a slice of the variables.
7965 ///
7966 /// # Arguments
7967 ///
7968 /// - `first_` First index in the sequence.
7969 /// - `last_` Last index plus 1 in the sequence.
7970 /// - `bk_` Bound keys.
7971 ///
7972 /// See [Boundkey]
7973 /// - `bl_` Values for lower bounds.
7974 /// - `bu_` Values for upper bounds.
7975 ///
7976 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getvarboundslice>
7977 pub fn get_var_bound_slice(&self,first_ : i32,last_ : i32,bk_ : &mut[i32],bl_ : &mut[f64],bu_ : &mut[f64]) -> Result<(),String> { self.data.task.get_var_bound_slice(first_,last_,bk_,bl_,bu_) }
7978 /// Obtains the name of a variable.
7979 ///
7980 /// # Arguments
7981 ///
7982 /// - `j_` Index of a variable.
7983 ///
7984 /// # Returns
7985 ///
7986 /// - `name` Returns the required name.
7987 ///
7988 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getvarname>
7989 pub fn get_var_name(&self,j_ : i32) -> Result<String,String> { self.data.task.get_var_name(j_) }
7990 /// Checks whether the name has been assigned to any variable.
7991 ///
7992 /// # Arguments
7993 ///
7994 /// - `somename_` The name which should be checked.
7995 /// - `asgn_` Is non-zero if the name somename is assigned to a variable.
7996 ///
7997 /// # Returns
7998 ///
7999 /// - `index` If the name somename is assigned to a variable, then return the index of the variable.
8000 ///
8001 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getvarnameindex>
8002 pub fn get_var_name_index(&self,somename_ : &str,asgn_ : &mut i32) -> Result<i32,String> { self.data.task.get_var_name_index(somename_,asgn_) }
8003 /// Obtains the length of the name of a variable.
8004 ///
8005 /// # Arguments
8006 ///
8007 /// - `i_` Index of a variable.
8008 ///
8009 /// # Returns
8010 ///
8011 /// - `len` Returns the length of the indicated name.
8012 ///
8013 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getvarnamelen>
8014 pub fn get_var_name_len(&self,i_ : i32) -> Result<i32,String> { self.data.task.get_var_name_len(i_) }
8015 /// Gets the variable type of one variable.
8016 ///
8017 /// # Arguments
8018 ///
8019 /// - `j_` Index of the variable.
8020 ///
8021 /// # Returns
8022 ///
8023 /// - `vartype` Variable type of variable index j.
8024 ///
8025 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getvartype>
8026 pub fn get_var_type(&self,j_ : i32) -> Result<i32,String> { self.data.task.get_var_type(j_) }
8027 /// Obtains the variable type for one or more variables.
8028 ///
8029 /// # Arguments
8030 ///
8031 /// - `subj_` A list of variable indexes.
8032 /// - `vartype_` Returns the variables types corresponding the variable indexes requested.
8033 ///
8034 /// See [Variabletype]
8035 ///
8036 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getvartypelist>
8037 pub fn get_var_type_list(&self,subj_ : &[i32],vartype_ : &mut[i32]) -> Result<(),String> { self.data.task.get_var_type_list(subj_,vartype_) }
8038 /// Obtains the xc vector for a solution.
8039 ///
8040 /// # Arguments
8041 ///
8042 /// - `whichsol_` Selects a solution.
8043 ///
8044 /// See [Soltype]
8045 /// - `xc_` Primal constraint solution.
8046 ///
8047 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getxc>
8048 pub fn get_xc(&self,whichsol_ : i32,xc_ : &mut[f64]) -> Result<(),String> { self.data.task.get_xc(whichsol_,xc_) }
8049 /// Obtains a slice of the xc vector for a solution.
8050 ///
8051 /// # Arguments
8052 ///
8053 /// - `whichsol_` Selects a solution.
8054 ///
8055 /// See [Soltype]
8056 /// - `first_` First index in the sequence.
8057 /// - `last_` Last index plus 1 in the sequence.
8058 /// - `xc_` Primal constraint solution.
8059 ///
8060 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getxcslice>
8061 pub fn get_xc_slice(&self,whichsol_ : i32,first_ : i32,last_ : i32,xc_ : &mut[f64]) -> Result<(),String> { self.data.task.get_xc_slice(whichsol_,first_,last_,xc_) }
8062 /// Obtains the xx vector for a solution.
8063 ///
8064 /// # Arguments
8065 ///
8066 /// - `whichsol_` Selects a solution.
8067 ///
8068 /// See [Soltype]
8069 /// - `xx_` Primal variable solution.
8070 ///
8071 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getxx>
8072 pub fn get_xx(&self,whichsol_ : i32,xx_ : &mut[f64]) -> Result<(),String> { self.data.task.get_xx(whichsol_,xx_) }
8073 /// Obtains a slice of the xx vector for a solution.
8074 ///
8075 /// # Arguments
8076 ///
8077 /// - `whichsol_` Selects a solution.
8078 ///
8079 /// See [Soltype]
8080 /// - `first_` First index in the sequence.
8081 /// - `last_` Last index plus 1 in the sequence.
8082 /// - `xx_` Primal variable solution.
8083 ///
8084 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getxxslice>
8085 pub fn get_xx_slice(&self,whichsol_ : i32,first_ : i32,last_ : i32,xx_ : &mut[f64]) -> Result<(),String> { self.data.task.get_xx_slice(whichsol_,first_,last_,xx_) }
8086 /// Obtains the y vector for a solution.
8087 ///
8088 /// # Arguments
8089 ///
8090 /// - `whichsol_` Selects a solution.
8091 ///
8092 /// See [Soltype]
8093 /// - `y_` Vector of dual variables corresponding to the constraints.
8094 ///
8095 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.gety>
8096 pub fn get_y(&self,whichsol_ : i32,y_ : &mut[f64]) -> Result<(),String> { self.data.task.get_y(whichsol_,y_) }
8097 /// Obtains a slice of the y vector for a solution.
8098 ///
8099 /// # Arguments
8100 ///
8101 /// - `whichsol_` Selects a solution.
8102 ///
8103 /// See [Soltype]
8104 /// - `first_` First index in the sequence.
8105 /// - `last_` Last index plus 1 in the sequence.
8106 /// - `y_` Vector of dual variables corresponding to the constraints.
8107 ///
8108 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getyslice>
8109 pub fn get_y_slice(&self,whichsol_ : i32,first_ : i32,last_ : i32,y_ : &mut[f64]) -> Result<(),String> { self.data.task.get_y_slice(whichsol_,first_,last_,y_) }
8110 /// Prints the infeasibility report to an output stream.
8111 ///
8112 /// # Arguments
8113 ///
8114 /// - `whichstream_` Index of the stream.
8115 ///
8116 /// See [Streamtype]
8117 /// - `whichsol_` Selects a solution.
8118 ///
8119 /// See [Soltype]
8120 ///
8121 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.infeasibilityreport>
8122 pub fn infeasibility_report(&mut self,whichstream_ : i32,whichsol_ : i32) -> Result<(),String> { self.data.task.infeasibility_report(whichstream_,whichsol_) }
8123 /// Prepare a task for basis solver.
8124 ///
8125 /// # Arguments
8126 ///
8127 /// - `basis_` The array of basis indexes to use.
8128 ///
8129 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.initbasissolve>
8130 pub fn init_basis_solve(&mut self,basis_ : &mut[i32]) -> Result<(),String> { self.data.task.init_basis_solve(basis_) }
8131 /// Input the linear part of an optimization task in one function call.
8132 ///
8133 /// # Arguments
8134 ///
8135 /// - `maxnumcon_` Number of preallocated constraints in the optimization task.
8136 /// - `maxnumvar_` Number of preallocated variables in the optimization task.
8137 /// - `c_` Linear terms of the objective as a dense vector. The length is the number of variables.
8138 /// - `cfix_` Fixed term in the objective.
8139 /// - `aptrb_` Row or column start pointers.
8140 /// - `aptre_` Row or column end pointers.
8141 /// - `asub_` Coefficient subscripts.
8142 /// - `aval_` Coefficient values.
8143 /// - `bkc_` Bound keys for the constraints.
8144 ///
8145 /// See [Boundkey]
8146 /// - `blc_` Lower bounds for the constraints.
8147 /// - `buc_` Upper bounds for the constraints.
8148 /// - `bkx_` Bound keys for the variables.
8149 ///
8150 /// See [Boundkey]
8151 /// - `blx_` Lower bounds for the variables.
8152 /// - `bux_` Upper bounds for the variables.
8153 ///
8154 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.inputdata64>
8155 pub fn input_data(&mut self,maxnumcon_ : i32,maxnumvar_ : i32,c_ : &[f64],cfix_ : f64,aptrb_ : &[i64],aptre_ : &[i64],asub_ : &[i32],aval_ : &[f64],bkc_ : &[i32],blc_ : &[f64],buc_ : &[f64],bkx_ : &[i32],blx_ : &[f64],bux_ : &[f64]) -> Result<(),String> { self.data.task.input_data(maxnumcon_,maxnumvar_,c_,cfix_,aptrb_,aptre_,asub_,aval_,bkc_,blc_,buc_,bkx_,blx_,bux_) }
8156 /// Checks a double parameter name.
8157 ///
8158 /// # Arguments
8159 ///
8160 /// - `parname_` Parameter name.
8161 /// - `param_` Returns the parameter corresponding to the name, if one exists.
8162 ///
8163 /// See [Dparam]
8164 ///
8165 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.isdouparname>
8166 pub fn is_dou_par_name(&self,parname_ : &str,param_ : & mut i32) -> Result<(),String> { self.data.task.is_dou_par_name(parname_,param_) }
8167 /// Checks an integer parameter name.
8168 ///
8169 /// # Arguments
8170 ///
8171 /// - `parname_` Parameter name.
8172 /// - `param_` Returns the parameter corresponding to the name, if one exists.
8173 ///
8174 /// See [Iparam]
8175 ///
8176 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.isintparname>
8177 pub fn is_int_par_name(&self,parname_ : &str,param_ : & mut i32) -> Result<(),String> { self.data.task.is_int_par_name(parname_,param_) }
8178 /// Checks a string parameter name.
8179 ///
8180 /// # Arguments
8181 ///
8182 /// - `parname_` Parameter name.
8183 /// - `param_` Returns the parameter corresponding to the name, if one exists.
8184 ///
8185 /// See [Sparam]
8186 ///
8187 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.isstrparname>
8188 pub fn is_str_par_name(&self,parname_ : &str,param_ : & mut i32) -> Result<(),String> { self.data.task.is_str_par_name(parname_,param_) }
8189 /// Directs all output from a task stream to a file.
8190 ///
8191 /// # Arguments
8192 ///
8193 /// - `whichstream_` Index of the stream.
8194 ///
8195 /// See [Streamtype]
8196 /// - `filename_` A valid file name.
8197 /// - `append_` If this argument is 0 the output file will be overwritten, otherwise it will be appended to.
8198 ///
8199 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.linkfiletotaskstream>
8200 pub fn link_file_to_stream(&mut self,whichstream_ : i32,filename_ : &str,append_ : i32) -> Result<(),String> { self.data.task.link_file_to_stream(whichstream_,filename_,append_) }
8201 /// Prints a short summary of a specified solution.
8202 ///
8203 /// # Arguments
8204 ///
8205 /// - `whichstream_` Index of the stream.
8206 ///
8207 /// See [Streamtype]
8208 /// - `whichsol_` Selects a solution.
8209 ///
8210 /// See [Soltype]
8211 ///
8212 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.onesolutionsummary>
8213 pub fn one_solution_summary(&self,whichstream_ : i32,whichsol_ : i32) -> Result<(),String> { self.data.task.one_solution_summary(whichstream_,whichsol_) }
8214 /// Offload the optimization task to a solver server and wait for the solution.
8215 ///
8216 /// # Arguments
8217 ///
8218 /// - `address_` Address of the OptServer.
8219 /// - `accesstoken_` Access token.
8220 ///
8221 /// # Returns
8222 ///
8223 /// - `trmcode` Is either OK or a termination response code.
8224 ///
8225 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.optimizermt>
8226 pub fn optimize_rmt(&mut self,address_ : &str,accesstoken_ : &str) -> Result<i32,String> { self.data.task.optimize_rmt(address_,accesstoken_) }
8227 /// Prints a short summary with optimizer statistics from last optimization.
8228 ///
8229 /// # Arguments
8230 ///
8231 /// - `whichstream_` Index of the stream.
8232 ///
8233 /// See [Streamtype]
8234 ///
8235 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.optimizersummary>
8236 pub fn optimizer_summary(&self,whichstream_ : i32) -> Result<(),String> { self.data.task.optimizer_summary(whichstream_) }
8237 /// Optimizes the problem.
8238 ///
8239 /// # Returns
8240 ///
8241 /// - `trmcode` Is either OK or a termination response code.
8242 ///
8243 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.optimizetrm>
8244 pub fn optimize(&mut self) -> Result<i32,String> { self.data.task.optimize() }
8245 /// Repairs a primal infeasible optimization problem by adjusting the bounds on the constraints and variables.
8246 ///
8247 /// # Arguments
8248 ///
8249 /// - `wlc_` Weights associated with relaxing lower bounds on the constraints.
8250 /// - `wuc_` Weights associated with relaxing the upper bound on the constraints.
8251 /// - `wlx_` Weights associated with relaxing the lower bounds of the variables.
8252 /// - `wux_` Weights associated with relaxing the upper bounds of variables.
8253 ///
8254 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.primalrepair>
8255 pub fn primal_repair(&mut self,wlc_ : &[f64],wuc_ : &[f64],wlx_ : &[f64],wux_ : &[f64]) -> Result<(),String> { self.data.task.primal_repair(wlc_,wuc_,wlx_,wux_) }
8256 /// Perform sensitivity analysis on bounds.
8257 ///
8258 /// # Arguments
8259 ///
8260 /// - `subi_` Indexes of constraints to analyze.
8261 /// - `marki_` Mark which constraint bounds to analyze.
8262 ///
8263 /// See [Mark]
8264 /// - `subj_` Indexes of variables to analyze.
8265 /// - `markj_` Mark which variable bounds to analyze.
8266 ///
8267 /// See [Mark]
8268 /// - `leftpricei_` Left shadow price for constraints.
8269 /// - `rightpricei_` Right shadow price for constraints.
8270 /// - `leftrangei_` Left range for constraints.
8271 /// - `rightrangei_` Right range for constraints.
8272 /// - `leftpricej_` Left shadow price for variables.
8273 /// - `rightpricej_` Right shadow price for variables.
8274 /// - `leftrangej_` Left range for variables.
8275 /// - `rightrangej_` Right range for variables.
8276 ///
8277 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.primalsensitivity>
8278 pub fn primal_sensitivity(&mut self,subi_ : &[i32],marki_ : &[i32],subj_ : &[i32],markj_ : &[i32],leftpricei_ : &mut[f64],rightpricei_ : &mut[f64],leftrangei_ : &mut[f64],rightrangei_ : &mut[f64],leftpricej_ : &mut[f64],rightpricej_ : &mut[f64],leftrangej_ : &mut[f64],rightrangej_ : &mut[f64]) -> Result<(),String> { self.data.task.primal_sensitivity(subi_,marki_,subj_,markj_,leftpricei_,rightpricei_,leftrangei_,rightrangei_,leftpricej_,rightpricej_,leftrangej_,rightrangej_) }
8279 /// Prints the current parameter settings.
8280 ///
8281 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.printparam>
8282 pub fn print_param(&self) -> Result<(),String> { self.data.task.print_param() }
8283 /// Puts an affine conic constraint.
8284 ///
8285 /// # Arguments
8286 ///
8287 /// - `accidx_` Affine conic constraint index.
8288 /// - `domidx_` Domain index.
8289 /// - `afeidxlist_` List of affine expression indexes.
8290 /// - `b_` The vector of constant terms modifying affine expressions. Optional.
8291 ///
8292 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putacc>
8293 pub fn put_acc(&mut self,accidx_ : i64,domidx_ : i64,afeidxlist_ : &[i64],b_ : &[f64]) -> Result<(),String> { self.data.task.put_acc(accidx_,domidx_,afeidxlist_,b_) }
8294 /// Puts the constant vector b in an affine conic constraint.
8295 ///
8296 /// # Arguments
8297 ///
8298 /// - `accidx_` Affine conic constraint index.
8299 /// - `b_` The vector of constant terms modifying affine expressions. Optional.
8300 ///
8301 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putaccb>
8302 pub fn put_acc_b(&mut self,accidx_ : i64,b_ : &[f64]) -> Result<(),String> { self.data.task.put_acc_b(accidx_,b_) }
8303 /// Sets one element in the b vector of an affine conic constraint.
8304 ///
8305 /// # Arguments
8306 ///
8307 /// - `accidx_` Affine conic constraint index.
8308 /// - `j_` The index of an element in b to change.
8309 /// - `bj_` The new value of b\[j\].
8310 ///
8311 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putaccbj>
8312 pub fn put_acc_b_j(&mut self,accidx_ : i64,j_ : i64,bj_ : f64) -> Result<(),String> { self.data.task.put_acc_b_j(accidx_,j_,bj_) }
8313 /// Puts the doty vector for a solution.
8314 ///
8315 /// # Arguments
8316 ///
8317 /// - `whichsol_` Selects a solution.
8318 ///
8319 /// See [Soltype]
8320 /// - `accidx_` The index of the affine conic constraint.
8321 /// - `doty_` The dual values for this affine conic constraint. The array should have length equal to the dimension of the constraint.
8322 ///
8323 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putaccdoty>
8324 pub fn put_acc_dot_y(&self,whichsol_ : i32,accidx_ : i64,doty_ : &mut[f64]) -> Result<(),String> { self.data.task.put_acc_dot_y(whichsol_,accidx_,doty_) }
8325 /// Puts a number of affine conic constraints.
8326 ///
8327 /// # Arguments
8328 ///
8329 /// - `accidxs_` Affine conic constraint indices.
8330 /// - `domidxs_` Domain indices.
8331 /// - `afeidxlist_` List of affine expression indexes.
8332 /// - `b_` The vector of constant terms modifying affine expressions. Optional.
8333 ///
8334 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putacclist>
8335 pub fn put_acc_list(&mut self,accidxs_ : &[i64],domidxs_ : &[i64],afeidxlist_ : &[i64],b_ : &[f64]) -> Result<(),String> { self.data.task.put_acc_list(accidxs_,domidxs_,afeidxlist_,b_) }
8336 /// Sets the name of an affine conic constraint.
8337 ///
8338 /// # Arguments
8339 ///
8340 /// - `accidx_` Index of the affine conic constraint.
8341 /// - `name_` The name of the affine conic constraint.
8342 ///
8343 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putaccname>
8344 pub fn put_acc_name(&mut self,accidx_ : i64,name_ : &str) -> Result<(),String> { self.data.task.put_acc_name(accidx_,name_) }
8345 /// Replaces all elements in one column of the linear constraint matrix.
8346 ///
8347 /// # Arguments
8348 ///
8349 /// - `j_` Column index.
8350 /// - `subj_` Row indexes of non-zero values in column.
8351 /// - `valj_` New non-zero values of column.
8352 ///
8353 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putacol>
8354 pub fn put_a_col(&mut self,j_ : i32,subj_ : &[i32],valj_ : &[f64]) -> Result<(),String> { self.data.task.put_a_col(j_,subj_,valj_) }
8355 /// Replaces all elements in several columns the linear constraint matrix.
8356 ///
8357 /// # Arguments
8358 ///
8359 /// - `sub_` Indexes of columns that should be replaced.
8360 /// - `ptrb_` Array of pointers to the first element in the columns.
8361 /// - `ptre_` Array of pointers to the last element plus one in the columns.
8362 /// - `asub_` Row indexes
8363 /// - `aval_` Coefficient values.
8364 ///
8365 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putacollist64>
8366 pub fn put_a_col_list(&mut self,sub_ : &[i32],ptrb_ : &[i64],ptre_ : &[i64],asub_ : &[i32],aval_ : &[f64]) -> Result<(),String> { self.data.task.put_a_col_list(sub_,ptrb_,ptre_,asub_,aval_) }
8367 /// Replaces all elements in a sequence of columns the linear constraint matrix.
8368 ///
8369 /// # Arguments
8370 ///
8371 /// - `first_` First column in the slice.
8372 /// - `last_` Last column plus one in the slice.
8373 /// - `ptrb_` Array of pointers to the first element in the columns.
8374 /// - `ptre_` Array of pointers to the last element plus one in the columns.
8375 /// - `asub_` Row indexes
8376 /// - `aval_` Coefficient values.
8377 ///
8378 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putacolslice64>
8379 pub fn put_a_col_slice(&mut self,first_ : i32,last_ : i32,ptrb_ : &[i64],ptre_ : &[i64],asub_ : &[i32],aval_ : &[f64]) -> Result<(),String> { self.data.task.put_a_col_slice(first_,last_,ptrb_,ptre_,asub_,aval_) }
8380 /// Inputs barF in block triplet form.
8381 ///
8382 /// # Arguments
8383 ///
8384 /// - `afeidx_` Constraint index.
8385 /// - `barvaridx_` Symmetric matrix variable index.
8386 /// - `subk_` Block row index.
8387 /// - `subl_` Block column index.
8388 /// - `valkl_` The numerical value associated with each block triplet.
8389 ///
8390 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putafebarfblocktriplet>
8391 pub fn put_afe_barf_block_triplet(&mut self,afeidx_ : &[i64],barvaridx_ : &[i32],subk_ : &[i32],subl_ : &[i32],valkl_ : &[f64]) -> Result<(),String> { self.data.task.put_afe_barf_block_triplet(afeidx_,barvaridx_,subk_,subl_,valkl_) }
8392 /// Inputs one entry in barF.
8393 ///
8394 /// # Arguments
8395 ///
8396 /// - `afeidx_` Row index of barF.
8397 /// - `barvaridx_` Semidefinite variable index.
8398 /// - `termidx_` Element indices in matrix storage.
8399 /// - `termweight_` Weights in the weighted sum.
8400 ///
8401 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putafebarfentry>
8402 pub fn put_afe_barf_entry(&mut self,afeidx_ : i64,barvaridx_ : i32,termidx_ : &[i64],termweight_ : &[f64]) -> Result<(),String> { self.data.task.put_afe_barf_entry(afeidx_,barvaridx_,termidx_,termweight_) }
8403 /// Inputs a list of entries in barF.
8404 ///
8405 /// # Arguments
8406 ///
8407 /// - `afeidx_` Row indexes of barF.
8408 /// - `barvaridx_` Semidefinite variable indexes.
8409 /// - `numterm_` Number of terms in the weighted sums.
8410 /// - `ptrterm_` Pointer to the terms forming each entry.
8411 /// - `termidx_` Concatenated element indexes in matrix storage.
8412 /// - `termweight_` Concatenated weights in the weighted sum.
8413 ///
8414 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putafebarfentrylist>
8415 pub fn put_afe_barf_entry_list(&mut self,afeidx_ : &[i64],barvaridx_ : &[i32],numterm_ : &[i64],ptrterm_ : &[i64],termidx_ : &[i64],termweight_ : &[f64]) -> Result<(),String> { self.data.task.put_afe_barf_entry_list(afeidx_,barvaridx_,numterm_,ptrterm_,termidx_,termweight_) }
8416 /// Inputs a row of barF.
8417 ///
8418 /// # Arguments
8419 ///
8420 /// - `afeidx_` Row index of barF.
8421 /// - `barvaridx_` Semidefinite variable indexes.
8422 /// - `numterm_` Number of terms in the weighted sums.
8423 /// - `ptrterm_` Pointer to the terms forming each entry.
8424 /// - `termidx_` Concatenated element indexes in matrix storage.
8425 /// - `termweight_` Concatenated weights in the weighted sum.
8426 ///
8427 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putafebarfrow>
8428 pub fn put_afe_barf_row(&mut self,afeidx_ : i64,barvaridx_ : &[i32],numterm_ : &[i64],ptrterm_ : &[i64],termidx_ : &[i64],termweight_ : &[f64]) -> Result<(),String> { self.data.task.put_afe_barf_row(afeidx_,barvaridx_,numterm_,ptrterm_,termidx_,termweight_) }
8429 /// Replaces all elements in one column of the F matrix in the affine expressions.
8430 ///
8431 /// # Arguments
8432 ///
8433 /// - `varidx_` Column index.
8434 /// - `afeidx_` Row indexes of non-zero values in the column.
8435 /// - `val_` New non-zero values in the column.
8436 ///
8437 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putafefcol>
8438 pub fn put_afe_f_col(&mut self,varidx_ : i32,afeidx_ : &[i64],val_ : &[f64]) -> Result<(),String> { self.data.task.put_afe_f_col(varidx_,afeidx_,val_) }
8439 /// Replaces one entry in F.
8440 ///
8441 /// # Arguments
8442 ///
8443 /// - `afeidx_` Row index in F.
8444 /// - `varidx_` Column index in F.
8445 /// - `value_` Value of the entry.
8446 ///
8447 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putafefentry>
8448 pub fn put_afe_f_entry(&mut self,afeidx_ : i64,varidx_ : i32,value_ : f64) -> Result<(),String> { self.data.task.put_afe_f_entry(afeidx_,varidx_,value_) }
8449 /// Replaces a list of entries in F.
8450 ///
8451 /// # Arguments
8452 ///
8453 /// - `afeidx_` Row indices in F.
8454 /// - `varidx_` Column indices in F.
8455 /// - `val_` Values of the entries in F.
8456 ///
8457 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putafefentrylist>
8458 pub fn put_afe_f_entry_list(&mut self,afeidx_ : &[i64],varidx_ : &[i32],val_ : &[f64]) -> Result<(),String> { self.data.task.put_afe_f_entry_list(afeidx_,varidx_,val_) }
8459 /// Replaces all elements in one row of the F matrix in the affine expressions.
8460 ///
8461 /// # Arguments
8462 ///
8463 /// - `afeidx_` Row index.
8464 /// - `varidx_` Column indexes of non-zero values in the row.
8465 /// - `val_` New non-zero values in the row.
8466 ///
8467 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putafefrow>
8468 pub fn put_afe_f_row(&mut self,afeidx_ : i64,varidx_ : &[i32],val_ : &[f64]) -> Result<(),String> { self.data.task.put_afe_f_row(afeidx_,varidx_,val_) }
8469 /// Replaces all elements in a number of rows of the F matrix in the affine expressions.
8470 ///
8471 /// # Arguments
8472 ///
8473 /// - `afeidx_` Row indices.
8474 /// - `numnzrow_` Number of non-zeros in each row.
8475 /// - `ptrrow_` Pointer to the first nonzero in each row.
8476 /// - `varidx_` Column indexes of non-zero values.
8477 /// - `val_` New non-zero values in the rows.
8478 ///
8479 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putafefrowlist>
8480 pub fn put_afe_f_row_list(&mut self,afeidx_ : &[i64],numnzrow_ : &[i32],ptrrow_ : &[i64],varidx_ : &[i32],val_ : &[f64]) -> Result<(),String> { self.data.task.put_afe_f_row_list(afeidx_,numnzrow_,ptrrow_,varidx_,val_) }
8481 /// Replaces one element in the g vector in the affine expressions.
8482 ///
8483 /// # Arguments
8484 ///
8485 /// - `afeidx_` Row index.
8486 /// - `g_` New value for the element of g.
8487 ///
8488 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putafeg>
8489 pub fn put_afe_g(&mut self,afeidx_ : i64,g_ : f64) -> Result<(),String> { self.data.task.put_afe_g(afeidx_,g_) }
8490 /// Replaces a list of elements in the g vector in the affine expressions.
8491 ///
8492 /// # Arguments
8493 ///
8494 /// - `afeidx_` Indices of entries in g.
8495 /// - `g_` New values for the elements of g.
8496 ///
8497 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putafeglist>
8498 pub fn put_afe_g_list(&mut self,afeidx_ : &[i64],g_ : &[f64]) -> Result<(),String> { self.data.task.put_afe_g_list(afeidx_,g_) }
8499 /// Modifies a slice of the vector g.
8500 ///
8501 /// # Arguments
8502 ///
8503 /// - `first_` First index in the sequence.
8504 /// - `last_` Last index plus 1 in the sequence.
8505 /// - `slice_` The slice of g as a dense vector.
8506 ///
8507 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putafegslice>
8508 pub fn put_afe_g_slice(&mut self,first_ : i64,last_ : i64,slice_ : &[f64]) -> Result<(),String> { self.data.task.put_afe_g_slice(first_,last_,slice_) }
8509 /// Changes a single value in the linear coefficient matrix.
8510 ///
8511 /// # Arguments
8512 ///
8513 /// - `i_` Constraint (row) index.
8514 /// - `j_` Variable (column) index.
8515 /// - `aij_` New coefficient.
8516 ///
8517 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putaij>
8518 pub fn put_aij(&mut self,i_ : i32,j_ : i32,aij_ : f64) -> Result<(),String> { self.data.task.put_aij(i_,j_,aij_) }
8519 /// Changes one or more coefficients in the linear constraint matrix.
8520 ///
8521 /// # Arguments
8522 ///
8523 /// - `subi_` Constraint (row) indices.
8524 /// - `subj_` Variable (column) indices.
8525 /// - `valij_` New coefficient values.
8526 ///
8527 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putaijlist64>
8528 pub fn put_aij_list(&mut self,subi_ : &[i32],subj_ : &[i32],valij_ : &[f64]) -> Result<(),String> { self.data.task.put_aij_list(subi_,subj_,valij_) }
8529 /// Replaces all elements in one row of the linear constraint matrix.
8530 ///
8531 /// # Arguments
8532 ///
8533 /// - `i_` Row index.
8534 /// - `subi_` Column indexes of non-zero values in row.
8535 /// - `vali_` New non-zero values of row.
8536 ///
8537 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putarow>
8538 pub fn put_a_row(&mut self,i_ : i32,subi_ : &[i32],vali_ : &[f64]) -> Result<(),String> { self.data.task.put_a_row(i_,subi_,vali_) }
8539 /// Replaces all elements in several rows of the linear constraint matrix.
8540 ///
8541 /// # Arguments
8542 ///
8543 /// - `sub_` Indexes of rows or columns that should be replaced.
8544 /// - `ptrb_` Array of pointers to the first element in the rows.
8545 /// - `ptre_` Array of pointers to the last element plus one in the rows.
8546 /// - `asub_` Variable indexes.
8547 /// - `aval_` Coefficient values.
8548 ///
8549 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putarowlist64>
8550 pub fn put_a_row_list(&mut self,sub_ : &[i32],ptrb_ : &[i64],ptre_ : &[i64],asub_ : &[i32],aval_ : &[f64]) -> Result<(),String> { self.data.task.put_a_row_list(sub_,ptrb_,ptre_,asub_,aval_) }
8551 /// Replaces all elements in several rows the linear constraint matrix.
8552 ///
8553 /// # Arguments
8554 ///
8555 /// - `first_` First row in the slice.
8556 /// - `last_` Last row plus one in the slice.
8557 /// - `ptrb_` Array of pointers to the first element in the rows.
8558 /// - `ptre_` Array of pointers to the last element plus one in the rows.
8559 /// - `asub_` Column indexes of new elements.
8560 /// - `aval_` Coefficient values.
8561 ///
8562 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putarowslice64>
8563 pub fn put_a_row_slice(&mut self,first_ : i32,last_ : i32,ptrb_ : &[i64],ptre_ : &[i64],asub_ : &[i32],aval_ : &[f64]) -> Result<(),String> { self.data.task.put_a_row_slice(first_,last_,ptrb_,ptre_,asub_,aval_) }
8564 /// Truncates all elements in A below a certain tolerance to zero.
8565 ///
8566 /// # Arguments
8567 ///
8568 /// - `tolzero_` Truncation tolerance.
8569 ///
8570 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putatruncatetol>
8571 pub fn put_a_truncate_tol(&mut self,tolzero_ : f64) -> Result<(),String> { self.data.task.put_a_truncate_tol(tolzero_) }
8572 /// Inputs barA in block triplet form.
8573 ///
8574 /// # Arguments
8575 ///
8576 /// - `subi_` Constraint index.
8577 /// - `subj_` Symmetric matrix variable index.
8578 /// - `subk_` Block row index.
8579 /// - `subl_` Block column index.
8580 /// - `valijkl_` The numerical value associated with each block triplet.
8581 ///
8582 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putbarablocktriplet>
8583 pub fn put_bara_block_triplet(&mut self,subi_ : &[i32],subj_ : &[i32],subk_ : &[i32],subl_ : &[i32],valijkl_ : &[f64]) -> Result<(),String> { self.data.task.put_bara_block_triplet(subi_,subj_,subk_,subl_,valijkl_) }
8584 /// Inputs an element of barA.
8585 ///
8586 /// # Arguments
8587 ///
8588 /// - `i_` Row index of barA.
8589 /// - `j_` Column index of barA.
8590 /// - `sub_` Element indexes in matrix storage.
8591 /// - `weights_` Weights in the weighted sum.
8592 ///
8593 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putbaraij>
8594 pub fn put_bara_ij(&mut self,i_ : i32,j_ : i32,sub_ : &[i64],weights_ : &[f64]) -> Result<(),String> { self.data.task.put_bara_ij(i_,j_,sub_,weights_) }
8595 /// Inputs list of elements of barA.
8596 ///
8597 /// # Arguments
8598 ///
8599 /// - `subi_` Row index of barA.
8600 /// - `subj_` Column index of barA.
8601 /// - `alphaptrb_` Start entries for terms in the weighted sum.
8602 /// - `alphaptre_` End entries for terms in the weighted sum.
8603 /// - `matidx_` Element indexes in matrix storage.
8604 /// - `weights_` Weights in the weighted sum.
8605 ///
8606 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putbaraijlist>
8607 pub fn put_bara_ij_list(&mut self,subi_ : &[i32],subj_ : &[i32],alphaptrb_ : &[i64],alphaptre_ : &[i64],matidx_ : &[i64],weights_ : &[f64]) -> Result<(),String> { self.data.task.put_bara_ij_list(subi_,subj_,alphaptrb_,alphaptre_,matidx_,weights_) }
8608 /// Replace a set of rows of barA
8609 ///
8610 /// # Arguments
8611 ///
8612 /// - `subi_` Row indexes of barA.
8613 /// - `ptrb_` Start of rows in barA.
8614 /// - `ptre_` End of rows in barA.
8615 /// - `subj_` Column index of barA.
8616 /// - `nummat_` Number of entries in weighted sum of matrixes.
8617 /// - `matidx_` Matrix indexes for weighted sum of matrixes.
8618 /// - `weights_` Weights for weighted sum of matrixes.
8619 ///
8620 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putbararowlist>
8621 pub fn put_bara_row_list(&mut self,subi_ : &[i32],ptrb_ : &[i64],ptre_ : &[i64],subj_ : &[i32],nummat_ : &[i64],matidx_ : &[i64],weights_ : &[f64]) -> Result<(),String> { self.data.task.put_bara_row_list(subi_,ptrb_,ptre_,subj_,nummat_,matidx_,weights_) }
8622 /// Inputs barC in block triplet form.
8623 ///
8624 /// # Arguments
8625 ///
8626 /// - `subj_` Symmetric matrix variable index.
8627 /// - `subk_` Block row index.
8628 /// - `subl_` Block column index.
8629 /// - `valjkl_` The numerical value associated with each block triplet.
8630 ///
8631 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putbarcblocktriplet>
8632 pub fn put_barc_block_triplet(&mut self,subj_ : &[i32],subk_ : &[i32],subl_ : &[i32],valjkl_ : &[f64]) -> Result<(),String> { self.data.task.put_barc_block_triplet(subj_,subk_,subl_,valjkl_) }
8633 /// Changes one element in barc.
8634 ///
8635 /// # Arguments
8636 ///
8637 /// - `j_` Index of the element in barc` that should be changed.
8638 /// - `sub_` sub is list of indexes of those symmetric matrices appearing in sum.
8639 /// - `weights_` The weights of the terms in the weighted sum.
8640 ///
8641 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putbarcj>
8642 pub fn put_barc_j(&mut self,j_ : i32,sub_ : &[i64],weights_ : &[f64]) -> Result<(),String> { self.data.task.put_barc_j(j_,sub_,weights_) }
8643 /// Sets the dual solution for a semidefinite variable.
8644 ///
8645 /// # Arguments
8646 ///
8647 /// - `whichsol_` Selects a solution.
8648 ///
8649 /// See [Soltype]
8650 /// - `j_` Index of the semidefinite variable.
8651 /// - `barsj_` Value of the j'th variable of barx.
8652 ///
8653 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putbarsj>
8654 pub fn put_bars_j(&mut self,whichsol_ : i32,j_ : i32,barsj_ : &[f64]) -> Result<(),String> { self.data.task.put_bars_j(whichsol_,j_,barsj_) }
8655 /// Sets the name of a semidefinite variable.
8656 ///
8657 /// # Arguments
8658 ///
8659 /// - `j_` Index of the variable.
8660 /// - `name_` The variable name.
8661 ///
8662 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putbarvarname>
8663 pub fn put_barvar_name(&mut self,j_ : i32,name_ : &str) -> Result<(),String> { self.data.task.put_barvar_name(j_,name_) }
8664 /// Sets the primal solution for a semidefinite variable.
8665 ///
8666 /// # Arguments
8667 ///
8668 /// - `whichsol_` Selects a solution.
8669 ///
8670 /// See [Soltype]
8671 /// - `j_` Index of the semidefinite variable.
8672 /// - `barxj_` Value of the j'th variable of barx.
8673 ///
8674 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putbarxj>
8675 pub fn put_barx_j(&mut self,whichsol_ : i32,j_ : i32,barxj_ : &[f64]) -> Result<(),String> { self.data.task.put_barx_j(whichsol_,j_,barxj_) }
8676 /// Replaces the fixed term in the objective.
8677 ///
8678 /// # Arguments
8679 ///
8680 /// - `cfix_` Fixed term in the objective.
8681 ///
8682 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putcfix>
8683 pub fn put_cfix(&mut self,cfix_ : f64) -> Result<(),String> { self.data.task.put_cfix(cfix_) }
8684 /// Modifies one linear coefficient in the objective.
8685 ///
8686 /// # Arguments
8687 ///
8688 /// - `j_` Index of the variable whose objective coefficient should be changed.
8689 /// - `cj_` New coefficient value.
8690 ///
8691 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putcj>
8692 pub fn put_c_j(&mut self,j_ : i32,cj_ : f64) -> Result<(),String> { self.data.task.put_c_j(j_,cj_) }
8693 /// Modifies a part of the linear objective coefficients.
8694 ///
8695 /// # Arguments
8696 ///
8697 /// - `subj_` Indices of variables for which objective coefficients should be changed.
8698 /// - `val_` New numerical values for the objective coefficients that should be modified.
8699 ///
8700 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putclist>
8701 pub fn put_c_list(&mut self,subj_ : &[i32],val_ : &[f64]) -> Result<(),String> { self.data.task.put_c_list(subj_,val_) }
8702 /// Changes the bound for one constraint.
8703 ///
8704 /// # Arguments
8705 ///
8706 /// - `i_` Index of the constraint.
8707 /// - `bkc_` New bound key.
8708 ///
8709 /// See [Boundkey]
8710 /// - `blc_` New lower bound.
8711 /// - `buc_` New upper bound.
8712 ///
8713 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putconbound>
8714 pub fn put_con_bound(&mut self,i_ : i32,bkc_ : i32,blc_ : f64,buc_ : f64) -> Result<(),String> { self.data.task.put_con_bound(i_,bkc_,blc_,buc_) }
8715 /// Changes the bounds of a list of constraints.
8716 ///
8717 /// # Arguments
8718 ///
8719 /// - `sub_` List of constraint indexes.
8720 /// - `bkc_` Bound keys for the constraints.
8721 ///
8722 /// See [Boundkey]
8723 /// - `blc_` Lower bounds for the constraints.
8724 /// - `buc_` Upper bounds for the constraints.
8725 ///
8726 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putconboundlist>
8727 pub fn put_con_bound_list(&mut self,sub_ : &[i32],bkc_ : &[i32],blc_ : &[f64],buc_ : &[f64]) -> Result<(),String> { self.data.task.put_con_bound_list(sub_,bkc_,blc_,buc_) }
8728 /// Changes the bounds of a list of constraints.
8729 ///
8730 /// # Arguments
8731 ///
8732 /// - `sub_` List of constraint indexes.
8733 /// - `bkc_` New bound key for all constraints in the list.
8734 ///
8735 /// See [Boundkey]
8736 /// - `blc_` New lower bound for all constraints in the list.
8737 /// - `buc_` New upper bound for all constraints in the list.
8738 ///
8739 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putconboundlistconst>
8740 pub fn put_con_bound_list_const(&mut self,sub_ : &[i32],bkc_ : i32,blc_ : f64,buc_ : f64) -> Result<(),String> { self.data.task.put_con_bound_list_const(sub_,bkc_,blc_,buc_) }
8741 /// Changes the bounds for a slice of the constraints.
8742 ///
8743 /// # Arguments
8744 ///
8745 /// - `first_` First index in the sequence.
8746 /// - `last_` Last index plus 1 in the sequence.
8747 /// - `bkc_` Bound keys for the constraints.
8748 ///
8749 /// See [Boundkey]
8750 /// - `blc_` Lower bounds for the constraints.
8751 /// - `buc_` Upper bounds for the constraints.
8752 ///
8753 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putconboundslice>
8754 pub fn put_con_bound_slice(&mut self,first_ : i32,last_ : i32,bkc_ : &[i32],blc_ : &[f64],buc_ : &[f64]) -> Result<(),String> { self.data.task.put_con_bound_slice(first_,last_,bkc_,blc_,buc_) }
8755 /// Changes the bounds for a slice of the constraints.
8756 ///
8757 /// # Arguments
8758 ///
8759 /// - `first_` First index in the sequence.
8760 /// - `last_` Last index plus 1 in the sequence.
8761 /// - `bkc_` New bound key for all constraints in the slice.
8762 ///
8763 /// See [Boundkey]
8764 /// - `blc_` New lower bound for all constraints in the slice.
8765 /// - `buc_` New upper bound for all constraints in the slice.
8766 ///
8767 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putconboundsliceconst>
8768 pub fn put_con_bound_slice_const(&mut self,first_ : i32,last_ : i32,bkc_ : i32,blc_ : f64,buc_ : f64) -> Result<(),String> { self.data.task.put_con_bound_slice_const(first_,last_,bkc_,blc_,buc_) }
8769 /// Replaces a conic constraint.
8770 ///
8771 /// # Arguments
8772 ///
8773 /// - `k_` Index of the cone.
8774 /// - `ct_` Specifies the type of the cone.
8775 ///
8776 /// See [Conetype]
8777 /// - `conepar_` For the power cone it denotes the exponent alpha. For other cone types it is unused and can be set to 0.
8778 /// - `submem_` Variable subscripts of the members in the cone.
8779 ///
8780 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putcone>
8781 pub fn put_cone(&mut self,k_ : i32,ct_ : i32,conepar_ : f64,submem_ : &[i32]) -> Result<(),String> { self.data.task.put_cone(k_,ct_,conepar_,submem_) }
8782 /// Sets the name of a cone.
8783 ///
8784 /// # Arguments
8785 ///
8786 /// - `j_` Index of the cone.
8787 /// - `name_` The name of the cone.
8788 ///
8789 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putconename>
8790 pub fn put_cone_name(&mut self,j_ : i32,name_ : &str) -> Result<(),String> { self.data.task.put_cone_name(j_,name_) }
8791 /// Sets the name of a constraint.
8792 ///
8793 /// # Arguments
8794 ///
8795 /// - `i_` Index of the constraint.
8796 /// - `name_` The name of the constraint.
8797 ///
8798 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putconname>
8799 pub fn put_con_name(&mut self,i_ : i32,name_ : &str) -> Result<(),String> { self.data.task.put_con_name(i_,name_) }
8800 /// Sets the primal and dual solution information for a single constraint.
8801 ///
8802 /// # Arguments
8803 ///
8804 /// - `i_` Index of the constraint.
8805 /// - `whichsol_` Selects a solution.
8806 ///
8807 /// See [Soltype]
8808 /// - `sk_` Status key of the constraint.
8809 ///
8810 /// See [Stakey]
8811 /// - `x_` Primal solution value of the constraint.
8812 /// - `sl_` Solution value of the dual variable associated with the lower bound.
8813 /// - `su_` Solution value of the dual variable associated with the upper bound.
8814 ///
8815 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putconsolutioni>
8816 pub fn put_con_solution_i(&mut self,i_ : i32,whichsol_ : i32,sk_ : i32,x_ : f64,sl_ : f64,su_ : f64) -> Result<(),String> { self.data.task.put_con_solution_i(i_,whichsol_,sk_,x_,sl_,su_) }
8817 /// Modifies a slice of the linear objective coefficients.
8818 ///
8819 /// # Arguments
8820 ///
8821 /// - `first_` First element in the slice of c.
8822 /// - `last_` Last element plus 1 of the slice in c to be changed.
8823 /// - `slice_` New numerical values for the objective coefficients that should be modified.
8824 ///
8825 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putcslice>
8826 pub fn put_c_slice(&mut self,first_ : i32,last_ : i32,slice_ : &[f64]) -> Result<(),String> { self.data.task.put_c_slice(first_,last_,slice_) }
8827 /// Inputs a disjunctive constraint.
8828 ///
8829 /// # Arguments
8830 ///
8831 /// - `djcidx_` Index of the disjunctive constraint.
8832 /// - `domidxlist_` List of domain indexes.
8833 /// - `afeidxlist_` List of affine expression indexes.
8834 /// - `b_` The vector of constant terms modifying affine expressions.
8835 /// - `termsizelist_` List of term sizes.
8836 ///
8837 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putdjc>
8838 pub fn put_djc(&mut self,djcidx_ : i64,domidxlist_ : &[i64],afeidxlist_ : &[i64],b_ : &[f64],termsizelist_ : &[i64]) -> Result<(),String> { self.data.task.put_djc(djcidx_,domidxlist_,afeidxlist_,b_,termsizelist_) }
8839 /// Sets the name of a disjunctive constraint.
8840 ///
8841 /// # Arguments
8842 ///
8843 /// - `djcidx_` Index of the disjunctive constraint.
8844 /// - `name_` The name of the disjunctive constraint.
8845 ///
8846 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putdjcname>
8847 pub fn put_djc_name(&mut self,djcidx_ : i64,name_ : &str) -> Result<(),String> { self.data.task.put_djc_name(djcidx_,name_) }
8848 /// Inputs a slice of disjunctive constraints.
8849 ///
8850 /// # Arguments
8851 ///
8852 /// - `idxfirst_` Index of the first disjunctive constraint in the slice.
8853 /// - `idxlast_` Index of the last disjunctive constraint in the slice plus 1.
8854 /// - `domidxlist_` List of domain indexes.
8855 /// - `afeidxlist_` List of affine expression indexes.
8856 /// - `b_` The vector of constant terms modifying affine expressions. Optional.
8857 /// - `termsizelist_` List of term sizes.
8858 /// - `termsindjc_` Number of terms in each of the disjunctive constraints in the slice.
8859 ///
8860 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putdjcslice>
8861 pub fn put_djc_slice(&mut self,idxfirst_ : i64,idxlast_ : i64,domidxlist_ : &[i64],afeidxlist_ : &[i64],b_ : &[f64],termsizelist_ : &[i64],termsindjc_ : &[i64]) -> Result<(),String> { self.data.task.put_djc_slice(idxfirst_,idxlast_,domidxlist_,afeidxlist_,b_,termsizelist_,termsindjc_) }
8862 /// Sets the name of a domain.
8863 ///
8864 /// # Arguments
8865 ///
8866 /// - `domidx_` Index of the domain.
8867 /// - `name_` The name of the domain.
8868 ///
8869 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putdomainname>
8870 pub fn put_domain_name(&mut self,domidx_ : i64,name_ : &str) -> Result<(),String> { self.data.task.put_domain_name(domidx_,name_) }
8871 /// Sets a double parameter.
8872 ///
8873 /// # Arguments
8874 ///
8875 /// - `param_` Which parameter.
8876 ///
8877 /// See [Dparam]
8878 /// - `parvalue_` Parameter value.
8879 ///
8880 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putdouparam>
8881 pub fn put_dou_param(&mut self,param_ : i32,parvalue_ : f64) -> Result<(),String> { self.data.task.put_dou_param(param_,parvalue_) }
8882 /// Sets an integer parameter.
8883 ///
8884 /// # Arguments
8885 ///
8886 /// - `param_` Which parameter.
8887 ///
8888 /// See [Iparam]
8889 /// - `parvalue_` Parameter value.
8890 ///
8891 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putintparam>
8892 pub fn put_int_param(&mut self,param_ : i32,parvalue_ : i32) -> Result<(),String> { self.data.task.put_int_param(param_,parvalue_) }
8893 /// Sets an integer parameter.
8894 ///
8895 /// # Arguments
8896 ///
8897 /// - `param_` Which parameter.
8898 ///
8899 /// See [Iparam]
8900 /// - `parvalue_` Parameter value.
8901 ///
8902 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putlintparam>
8903 pub fn put_lint_param(&mut self,param_ : i32,parvalue_ : i64) -> Result<(),String> { self.data.task.put_lint_param(param_,parvalue_) }
8904 /// Sets the number of preallocated affine conic constraints.
8905 ///
8906 /// # Arguments
8907 ///
8908 /// - `maxnumacc_` Number of preallocated affine conic constraints.
8909 ///
8910 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putmaxnumacc>
8911 pub fn put_max_num_acc(&mut self,maxnumacc_ : i64) -> Result<(),String> { self.data.task.put_max_num_acc(maxnumacc_) }
8912 /// Sets the number of preallocated affine expressions in the optimization task.
8913 ///
8914 /// # Arguments
8915 ///
8916 /// - `maxnumafe_` Number of preallocated affine expressions.
8917 ///
8918 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putmaxnumafe>
8919 pub fn put_max_num_afe(&mut self,maxnumafe_ : i64) -> Result<(),String> { self.data.task.put_max_num_afe(maxnumafe_) }
8920 /// Sets the number of preallocated non-zero entries in the linear coefficient matrix.
8921 ///
8922 /// # Arguments
8923 ///
8924 /// - `maxnumanz_` New size of the storage reserved for storing the linear coefficient matrix.
8925 ///
8926 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putmaxnumanz>
8927 pub fn put_max_num_a_nz(&mut self,maxnumanz_ : i64) -> Result<(),String> { self.data.task.put_max_num_a_nz(maxnumanz_) }
8928 /// Sets the number of preallocated symmetric matrix variables.
8929 ///
8930 /// # Arguments
8931 ///
8932 /// - `maxnumbarvar_` Number of preallocated symmetric matrix variables.
8933 ///
8934 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putmaxnumbarvar>
8935 pub fn put_max_num_barvar(&mut self,maxnumbarvar_ : i32) -> Result<(),String> { self.data.task.put_max_num_barvar(maxnumbarvar_) }
8936 /// Sets the number of preallocated constraints in the optimization task.
8937 ///
8938 /// # Arguments
8939 ///
8940 /// - `maxnumcon_` Number of preallocated constraints in the optimization task.
8941 ///
8942 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putmaxnumcon>
8943 pub fn put_max_num_con(&mut self,maxnumcon_ : i32) -> Result<(),String> { self.data.task.put_max_num_con(maxnumcon_) }
8944 /// Sets the number of preallocated conic constraints in the optimization task.
8945 ///
8946 /// # Arguments
8947 ///
8948 /// - `maxnumcone_` Number of preallocated conic constraints in the optimization task.
8949 ///
8950 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putmaxnumcone>
8951 pub fn put_max_num_cone(&mut self,maxnumcone_ : i32) -> Result<(),String> { self.data.task.put_max_num_cone(maxnumcone_) }
8952 /// Sets the number of preallocated disjunctive constraints.
8953 ///
8954 /// # Arguments
8955 ///
8956 /// - `maxnumdjc_` Number of preallocated disjunctive constraints in the task.
8957 ///
8958 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putmaxnumdjc>
8959 pub fn put_max_num_djc(&mut self,maxnumdjc_ : i64) -> Result<(),String> { self.data.task.put_max_num_djc(maxnumdjc_) }
8960 /// Sets the number of preallocated domains in the optimization task.
8961 ///
8962 /// # Arguments
8963 ///
8964 /// - `maxnumdomain_` Number of preallocated domains.
8965 ///
8966 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putmaxnumdomain>
8967 pub fn put_max_num_domain(&mut self,maxnumdomain_ : i64) -> Result<(),String> { self.data.task.put_max_num_domain(maxnumdomain_) }
8968 /// Sets the number of preallocated non-zero entries in quadratic terms.
8969 ///
8970 /// # Arguments
8971 ///
8972 /// - `maxnumqnz_` Number of non-zero elements preallocated in quadratic coefficient matrices.
8973 ///
8974 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putmaxnumqnz>
8975 pub fn put_max_num_q_nz(&mut self,maxnumqnz_ : i64) -> Result<(),String> { self.data.task.put_max_num_q_nz(maxnumqnz_) }
8976 /// Sets the number of preallocated variables in the optimization task.
8977 ///
8978 /// # Arguments
8979 ///
8980 /// - `maxnumvar_` Number of preallocated variables in the optimization task.
8981 ///
8982 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putmaxnumvar>
8983 pub fn put_max_num_var(&mut self,maxnumvar_ : i32) -> Result<(),String> { self.data.task.put_max_num_var(maxnumvar_) }
8984 /// Sets a double parameter.
8985 ///
8986 /// # Arguments
8987 ///
8988 /// - `paramname_` Name of a parameter.
8989 /// - `parvalue_` Parameter value.
8990 ///
8991 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putnadouparam>
8992 pub fn put_na_dou_param(&mut self,paramname_ : &str,parvalue_ : f64) -> Result<(),String> { self.data.task.put_na_dou_param(paramname_,parvalue_) }
8993 /// Sets an integer parameter.
8994 ///
8995 /// # Arguments
8996 ///
8997 /// - `paramname_` Name of a parameter.
8998 /// - `parvalue_` Parameter value.
8999 ///
9000 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putnaintparam>
9001 pub fn put_na_int_param(&mut self,paramname_ : &str,parvalue_ : i32) -> Result<(),String> { self.data.task.put_na_int_param(paramname_,parvalue_) }
9002 /// Sets a string parameter.
9003 ///
9004 /// # Arguments
9005 ///
9006 /// - `paramname_` Name of a parameter.
9007 /// - `parvalue_` Parameter value.
9008 ///
9009 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putnastrparam>
9010 pub fn put_na_str_param(&mut self,paramname_ : &str,parvalue_ : &str) -> Result<(),String> { self.data.task.put_na_str_param(paramname_,parvalue_) }
9011 /// Assigns a new name to the objective.
9012 ///
9013 /// # Arguments
9014 ///
9015 /// - `objname_` Name of the objective.
9016 ///
9017 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putobjname>
9018 pub fn put_obj_name(&mut self,objname_ : &str) -> Result<(),String> { self.data.task.put_obj_name(objname_) }
9019 /// Sets the objective sense.
9020 ///
9021 /// # Arguments
9022 ///
9023 /// - `sense_` The objective sense of the task
9024 ///
9025 /// See [Objsense]
9026 ///
9027 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putobjsense>
9028 pub fn put_obj_sense(&mut self,sense_ : i32) -> Result<(),String> { self.data.task.put_obj_sense(sense_) }
9029 /// Specify an OptServer for remote calls.
9030 ///
9031 /// # Arguments
9032 ///
9033 /// - `host_` A URL specifying the optimization server to be used.
9034 ///
9035 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putoptserverhost>
9036 pub fn put_optserver_host(&mut self,host_ : &str) -> Result<(),String> { self.data.task.put_optserver_host(host_) }
9037 /// Modifies the value of parameter.
9038 ///
9039 /// # Arguments
9040 ///
9041 /// - `parname_` Parameter name.
9042 /// - `parvalue_` Parameter value.
9043 ///
9044 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putparam>
9045 pub fn put_param(&mut self,parname_ : &str,parvalue_ : &str) -> Result<(),String> { self.data.task.put_param(parname_,parvalue_) }
9046 /// Replaces all quadratic terms in constraints.
9047 ///
9048 /// # Arguments
9049 ///
9050 /// - `qcsubk_` Constraint subscripts for quadratic coefficients.
9051 /// - `qcsubi_` Row subscripts for quadratic constraint matrix.
9052 /// - `qcsubj_` Column subscripts for quadratic constraint matrix.
9053 /// - `qcval_` Quadratic constraint coefficient values.
9054 ///
9055 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putqcon>
9056 pub fn put_q_con(&mut self,qcsubk_ : &[i32],qcsubi_ : &[i32],qcsubj_ : &[i32],qcval_ : &[f64]) -> Result<(),String> { self.data.task.put_q_con(qcsubk_,qcsubi_,qcsubj_,qcval_) }
9057 /// Replaces all quadratic terms in a single constraint.
9058 ///
9059 /// # Arguments
9060 ///
9061 /// - `k_` The constraint in which the new quadratic elements are inserted.
9062 /// - `qcsubi_` Row subscripts for quadratic constraint matrix.
9063 /// - `qcsubj_` Column subscripts for quadratic constraint matrix.
9064 /// - `qcval_` Quadratic constraint coefficient values.
9065 ///
9066 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putqconk>
9067 pub fn put_q_con_k(&mut self,k_ : i32,qcsubi_ : &[i32],qcsubj_ : &[i32],qcval_ : &[f64]) -> Result<(),String> { self.data.task.put_q_con_k(k_,qcsubi_,qcsubj_,qcval_) }
9068 /// Replaces all quadratic terms in the objective.
9069 ///
9070 /// # Arguments
9071 ///
9072 /// - `qosubi_` Row subscripts for quadratic objective coefficients.
9073 /// - `qosubj_` Column subscripts for quadratic objective coefficients.
9074 /// - `qoval_` Quadratic objective coefficient values.
9075 ///
9076 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putqobj>
9077 pub fn put_q_obj(&mut self,qosubi_ : &[i32],qosubj_ : &[i32],qoval_ : &[f64]) -> Result<(),String> { self.data.task.put_q_obj(qosubi_,qosubj_,qoval_) }
9078 /// Replaces one coefficient in the quadratic term in the objective.
9079 ///
9080 /// # Arguments
9081 ///
9082 /// - `i_` Row index for the coefficient to be replaced.
9083 /// - `j_` Column index for the coefficient to be replaced.
9084 /// - `qoij_` The new coefficient value.
9085 ///
9086 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putqobjij>
9087 pub fn put_q_obj_i_j(&mut self,i_ : i32,j_ : i32,qoij_ : f64) -> Result<(),String> { self.data.task.put_q_obj_i_j(i_,j_,qoij_) }
9088 /// Sets the status keys for the constraints.
9089 ///
9090 /// # Arguments
9091 ///
9092 /// - `whichsol_` Selects a solution.
9093 ///
9094 /// See [Soltype]
9095 /// - `skc_` Status keys for the constraints.
9096 ///
9097 /// See [Stakey]
9098 ///
9099 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putskc>
9100 pub fn put_skc(&mut self,whichsol_ : i32,skc_ : &[i32]) -> Result<(),String> { self.data.task.put_skc(whichsol_,skc_) }
9101 /// Sets the status keys for a slice of the constraints.
9102 ///
9103 /// # Arguments
9104 ///
9105 /// - `whichsol_` Selects a solution.
9106 ///
9107 /// See [Soltype]
9108 /// - `first_` First index in the sequence.
9109 /// - `last_` Last index plus 1 in the sequence.
9110 /// - `skc_` Status keys for the constraints.
9111 ///
9112 /// See [Stakey]
9113 ///
9114 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putskcslice>
9115 pub fn put_skc_slice(&mut self,whichsol_ : i32,first_ : i32,last_ : i32,skc_ : &[i32]) -> Result<(),String> { self.data.task.put_skc_slice(whichsol_,first_,last_,skc_) }
9116 /// Sets the status keys for the scalar variables.
9117 ///
9118 /// # Arguments
9119 ///
9120 /// - `whichsol_` Selects a solution.
9121 ///
9122 /// See [Soltype]
9123 /// - `skx_` Status keys for the variables.
9124 ///
9125 /// See [Stakey]
9126 ///
9127 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putskx>
9128 pub fn put_skx(&mut self,whichsol_ : i32,skx_ : &[i32]) -> Result<(),String> { self.data.task.put_skx(whichsol_,skx_) }
9129 /// Sets the status keys for a slice of the variables.
9130 ///
9131 /// # Arguments
9132 ///
9133 /// - `whichsol_` Selects a solution.
9134 ///
9135 /// See [Soltype]
9136 /// - `first_` First index in the sequence.
9137 /// - `last_` Last index plus 1 in the sequence.
9138 /// - `skx_` Status keys for the variables.
9139 ///
9140 /// See [Stakey]
9141 ///
9142 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putskxslice>
9143 pub fn put_skx_slice(&mut self,whichsol_ : i32,first_ : i32,last_ : i32,skx_ : &[i32]) -> Result<(),String> { self.data.task.put_skx_slice(whichsol_,first_,last_,skx_) }
9144 /// Sets the slc vector for a solution.
9145 ///
9146 /// # Arguments
9147 ///
9148 /// - `whichsol_` Selects a solution.
9149 ///
9150 /// See [Soltype]
9151 /// - `slc_` Dual variables corresponding to the lower bounds on the constraints.
9152 ///
9153 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putslc>
9154 pub fn put_slc(&mut self,whichsol_ : i32,slc_ : &[f64]) -> Result<(),String> { self.data.task.put_slc(whichsol_,slc_) }
9155 /// Sets a slice of the slc vector for a solution.
9156 ///
9157 /// # Arguments
9158 ///
9159 /// - `whichsol_` Selects a solution.
9160 ///
9161 /// See [Soltype]
9162 /// - `first_` First index in the sequence.
9163 /// - `last_` Last index plus 1 in the sequence.
9164 /// - `slc_` Dual variables corresponding to the lower bounds on the constraints.
9165 ///
9166 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putslcslice>
9167 pub fn put_slc_slice(&mut self,whichsol_ : i32,first_ : i32,last_ : i32,slc_ : &[f64]) -> Result<(),String> { self.data.task.put_slc_slice(whichsol_,first_,last_,slc_) }
9168 /// Sets the slx vector for a solution.
9169 ///
9170 /// # Arguments
9171 ///
9172 /// - `whichsol_` Selects a solution.
9173 ///
9174 /// See [Soltype]
9175 /// - `slx_` Dual variables corresponding to the lower bounds on the variables.
9176 ///
9177 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putslx>
9178 pub fn put_slx(&mut self,whichsol_ : i32,slx_ : &[f64]) -> Result<(),String> { self.data.task.put_slx(whichsol_,slx_) }
9179 /// Sets a slice of the slx vector for a solution.
9180 ///
9181 /// # Arguments
9182 ///
9183 /// - `whichsol_` Selects a solution.
9184 ///
9185 /// See [Soltype]
9186 /// - `first_` First index in the sequence.
9187 /// - `last_` Last index plus 1 in the sequence.
9188 /// - `slx_` Dual variables corresponding to the lower bounds on the variables.
9189 ///
9190 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putslxslice>
9191 pub fn put_slx_slice(&mut self,whichsol_ : i32,first_ : i32,last_ : i32,slx_ : &[f64]) -> Result<(),String> { self.data.task.put_slx_slice(whichsol_,first_,last_,slx_) }
9192 /// Sets the snx vector for a solution.
9193 ///
9194 /// # Arguments
9195 ///
9196 /// - `whichsol_` Selects a solution.
9197 ///
9198 /// See [Soltype]
9199 /// - `sux_` Dual variables corresponding to the upper bounds on the variables.
9200 ///
9201 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putsnx>
9202 pub fn put_snx(&mut self,whichsol_ : i32,sux_ : &[f64]) -> Result<(),String> { self.data.task.put_snx(whichsol_,sux_) }
9203 /// Sets a slice of the snx vector for a solution.
9204 ///
9205 /// # Arguments
9206 ///
9207 /// - `whichsol_` Selects a solution.
9208 ///
9209 /// See [Soltype]
9210 /// - `first_` First index in the sequence.
9211 /// - `last_` Last index plus 1 in the sequence.
9212 /// - `snx_` Dual variables corresponding to the conic constraints on the variables.
9213 ///
9214 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putsnxslice>
9215 pub fn put_snx_slice(&mut self,whichsol_ : i32,first_ : i32,last_ : i32,snx_ : &[f64]) -> Result<(),String> { self.data.task.put_snx_slice(whichsol_,first_,last_,snx_) }
9216 /// Inserts a solution.
9217 ///
9218 /// # Arguments
9219 ///
9220 /// - `whichsol_` Selects a solution.
9221 ///
9222 /// See [Soltype]
9223 /// - `skc_` Status keys for the constraints.
9224 ///
9225 /// See [Stakey]
9226 /// - `skx_` Status keys for the variables.
9227 ///
9228 /// See [Stakey]
9229 /// - `skn_` Status keys for the conic constraints.
9230 ///
9231 /// See [Stakey]
9232 /// - `xc_` Primal constraint solution.
9233 /// - `xx_` Primal variable solution.
9234 /// - `y_` Vector of dual variables corresponding to the constraints.
9235 /// - `slc_` Dual variables corresponding to the lower bounds on the constraints.
9236 /// - `suc_` Dual variables corresponding to the upper bounds on the constraints.
9237 /// - `slx_` Dual variables corresponding to the lower bounds on the variables.
9238 /// - `sux_` Dual variables corresponding to the upper bounds on the variables.
9239 /// - `snx_` Dual variables corresponding to the conic constraints on the variables.
9240 ///
9241 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putsolution>
9242 pub fn put_solution(&mut self,whichsol_ : i32,skc_ : &[i32],skx_ : &[i32],skn_ : &[i32],xc_ : &[f64],xx_ : &[f64],y_ : &[f64],slc_ : &[f64],suc_ : &[f64],slx_ : &[f64],sux_ : &[f64],snx_ : &[f64]) -> Result<(),String> { self.data.task.put_solution(whichsol_,skc_,skx_,skn_,xc_,xx_,y_,slc_,suc_,slx_,sux_,snx_) }
9243 /// Inserts a solution.
9244 ///
9245 /// # Arguments
9246 ///
9247 /// - `whichsol_` Selects a solution.
9248 ///
9249 /// See [Soltype]
9250 /// - `skc_` Status keys for the constraints.
9251 ///
9252 /// See [Stakey]
9253 /// - `skx_` Status keys for the variables.
9254 ///
9255 /// See [Stakey]
9256 /// - `skn_` Status keys for the conic constraints.
9257 ///
9258 /// See [Stakey]
9259 /// - `xc_` Primal constraint solution.
9260 /// - `xx_` Primal variable solution.
9261 /// - `y_` Vector of dual variables corresponding to the constraints.
9262 /// - `slc_` Dual variables corresponding to the lower bounds on the constraints.
9263 /// - `suc_` Dual variables corresponding to the upper bounds on the constraints.
9264 /// - `slx_` Dual variables corresponding to the lower bounds on the variables.
9265 /// - `sux_` Dual variables corresponding to the upper bounds on the variables.
9266 /// - `snx_` Dual variables corresponding to the conic constraints on the variables.
9267 /// - `doty_` Dual variables corresponding to affine conic constraints.
9268 ///
9269 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putsolutionnew>
9270 pub fn put_solution_new(&mut self,whichsol_ : i32,skc_ : &[i32],skx_ : &[i32],skn_ : &[i32],xc_ : &[f64],xx_ : &[f64],y_ : &[f64],slc_ : &[f64],suc_ : &[f64],slx_ : &[f64],sux_ : &[f64],snx_ : &[f64],doty_ : &[f64]) -> Result<(),String> { self.data.task.put_solution_new(whichsol_,skc_,skx_,skn_,xc_,xx_,y_,slc_,suc_,slx_,sux_,snx_,doty_) }
9271 /// Inputs the dual variable of a solution.
9272 ///
9273 /// # Arguments
9274 ///
9275 /// - `i_` Index of the dual variable.
9276 /// - `whichsol_` Selects a solution.
9277 ///
9278 /// See [Soltype]
9279 /// - `y_` Solution value of the dual variable.
9280 ///
9281 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putsolutionyi>
9282 pub fn put_solution_y_i(&mut self,i_ : i32,whichsol_ : i32,y_ : f64) -> Result<(),String> { self.data.task.put_solution_y_i(i_,whichsol_,y_) }
9283 /// Sets a string parameter.
9284 ///
9285 /// # Arguments
9286 ///
9287 /// - `param_` Which parameter.
9288 ///
9289 /// See [Sparam]
9290 /// - `parvalue_` Parameter value.
9291 ///
9292 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putstrparam>
9293 pub fn put_str_param(&mut self,param_ : i32,parvalue_ : &str) -> Result<(),String> { self.data.task.put_str_param(param_,parvalue_) }
9294 /// Sets the suc vector for a solution.
9295 ///
9296 /// # Arguments
9297 ///
9298 /// - `whichsol_` Selects a solution.
9299 ///
9300 /// See [Soltype]
9301 /// - `suc_` Dual variables corresponding to the upper bounds on the constraints.
9302 ///
9303 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putsuc>
9304 pub fn put_suc(&mut self,whichsol_ : i32,suc_ : &[f64]) -> Result<(),String> { self.data.task.put_suc(whichsol_,suc_) }
9305 /// Sets a slice of the suc vector for a solution.
9306 ///
9307 /// # Arguments
9308 ///
9309 /// - `whichsol_` Selects a solution.
9310 ///
9311 /// See [Soltype]
9312 /// - `first_` First index in the sequence.
9313 /// - `last_` Last index plus 1 in the sequence.
9314 /// - `suc_` Dual variables corresponding to the upper bounds on the constraints.
9315 ///
9316 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putsucslice>
9317 pub fn put_suc_slice(&mut self,whichsol_ : i32,first_ : i32,last_ : i32,suc_ : &[f64]) -> Result<(),String> { self.data.task.put_suc_slice(whichsol_,first_,last_,suc_) }
9318 /// Sets the sux vector for a solution.
9319 ///
9320 /// # Arguments
9321 ///
9322 /// - `whichsol_` Selects a solution.
9323 ///
9324 /// See [Soltype]
9325 /// - `sux_` Dual variables corresponding to the upper bounds on the variables.
9326 ///
9327 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putsux>
9328 pub fn put_sux(&mut self,whichsol_ : i32,sux_ : &[f64]) -> Result<(),String> { self.data.task.put_sux(whichsol_,sux_) }
9329 /// Sets a slice of the sux vector for a solution.
9330 ///
9331 /// # Arguments
9332 ///
9333 /// - `whichsol_` Selects a solution.
9334 ///
9335 /// See [Soltype]
9336 /// - `first_` First index in the sequence.
9337 /// - `last_` Last index plus 1 in the sequence.
9338 /// - `sux_` Dual variables corresponding to the upper bounds on the variables.
9339 ///
9340 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putsuxslice>
9341 pub fn put_sux_slice(&mut self,whichsol_ : i32,first_ : i32,last_ : i32,sux_ : &[f64]) -> Result<(),String> { self.data.task.put_sux_slice(whichsol_,first_,last_,sux_) }
9342 /// Assigns a new name to the task.
9343 ///
9344 /// # Arguments
9345 ///
9346 /// - `taskname_` Name assigned to the task.
9347 ///
9348 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.puttaskname>
9349 pub fn put_task_name(&mut self,taskname_ : &str) -> Result<(),String> { self.data.task.put_task_name(taskname_) }
9350 /// Changes the bounds for one variable.
9351 ///
9352 /// # Arguments
9353 ///
9354 /// - `j_` Index of the variable.
9355 /// - `bkx_` New bound key.
9356 ///
9357 /// See [Boundkey]
9358 /// - `blx_` New lower bound.
9359 /// - `bux_` New upper bound.
9360 ///
9361 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putvarbound>
9362 pub fn put_var_bound(&mut self,j_ : i32,bkx_ : i32,blx_ : f64,bux_ : f64) -> Result<(),String> { self.data.task.put_var_bound(j_,bkx_,blx_,bux_) }
9363 /// Changes the bounds of a list of variables.
9364 ///
9365 /// # Arguments
9366 ///
9367 /// - `sub_` List of variable indexes.
9368 /// - `bkx_` Bound keys for the variables.
9369 ///
9370 /// See [Boundkey]
9371 /// - `blx_` Lower bounds for the variables.
9372 /// - `bux_` Upper bounds for the variables.
9373 ///
9374 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putvarboundlist>
9375 pub fn put_var_bound_list(&mut self,sub_ : &[i32],bkx_ : &[i32],blx_ : &[f64],bux_ : &[f64]) -> Result<(),String> { self.data.task.put_var_bound_list(sub_,bkx_,blx_,bux_) }
9376 /// Changes the bounds of a list of variables.
9377 ///
9378 /// # Arguments
9379 ///
9380 /// - `sub_` List of variable indexes.
9381 /// - `bkx_` New bound key for all variables in the list.
9382 ///
9383 /// See [Boundkey]
9384 /// - `blx_` New lower bound for all variables in the list.
9385 /// - `bux_` New upper bound for all variables in the list.
9386 ///
9387 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putvarboundlistconst>
9388 pub fn put_var_bound_list_const(&mut self,sub_ : &[i32],bkx_ : i32,blx_ : f64,bux_ : f64) -> Result<(),String> { self.data.task.put_var_bound_list_const(sub_,bkx_,blx_,bux_) }
9389 /// Changes the bounds for a slice of the variables.
9390 ///
9391 /// # Arguments
9392 ///
9393 /// - `first_` First index in the sequence.
9394 /// - `last_` Last index plus 1 in the sequence.
9395 /// - `bkx_` Bound keys for the variables.
9396 ///
9397 /// See [Boundkey]
9398 /// - `blx_` Lower bounds for the variables.
9399 /// - `bux_` Upper bounds for the variables.
9400 ///
9401 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putvarboundslice>
9402 pub fn put_var_bound_slice(&mut self,first_ : i32,last_ : i32,bkx_ : &[i32],blx_ : &[f64],bux_ : &[f64]) -> Result<(),String> { self.data.task.put_var_bound_slice(first_,last_,bkx_,blx_,bux_) }
9403 /// Changes the bounds for a slice of the variables.
9404 ///
9405 /// # Arguments
9406 ///
9407 /// - `first_` First index in the sequence.
9408 /// - `last_` Last index plus 1 in the sequence.
9409 /// - `bkx_` New bound key for all variables in the slice.
9410 ///
9411 /// See [Boundkey]
9412 /// - `blx_` New lower bound for all variables in the slice.
9413 /// - `bux_` New upper bound for all variables in the slice.
9414 ///
9415 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putvarboundsliceconst>
9416 pub fn put_var_bound_slice_const(&mut self,first_ : i32,last_ : i32,bkx_ : i32,blx_ : f64,bux_ : f64) -> Result<(),String> { self.data.task.put_var_bound_slice_const(first_,last_,bkx_,blx_,bux_) }
9417 /// Sets the name of a variable.
9418 ///
9419 /// # Arguments
9420 ///
9421 /// - `j_` Index of the variable.
9422 /// - `name_` The variable name.
9423 ///
9424 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putvarname>
9425 pub fn put_var_name(&mut self,j_ : i32,name_ : &str) -> Result<(),String> { self.data.task.put_var_name(j_,name_) }
9426 /// Sets the primal and dual solution information for a single variable.
9427 ///
9428 /// # Arguments
9429 ///
9430 /// - `j_` Index of the variable.
9431 /// - `whichsol_` Selects a solution.
9432 ///
9433 /// See [Soltype]
9434 /// - `sk_` Status key of the variable.
9435 ///
9436 /// See [Stakey]
9437 /// - `x_` Primal solution value of the variable.
9438 /// - `sl_` Solution value of the dual variable associated with the lower bound.
9439 /// - `su_` Solution value of the dual variable associated with the upper bound.
9440 /// - `sn_` Solution value of the dual variable associated with the conic constraint.
9441 ///
9442 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putvarsolutionj>
9443 pub fn put_var_solution_j(&mut self,j_ : i32,whichsol_ : i32,sk_ : i32,x_ : f64,sl_ : f64,su_ : f64,sn_ : f64) -> Result<(),String> { self.data.task.put_var_solution_j(j_,whichsol_,sk_,x_,sl_,su_,sn_) }
9444 /// Sets the variable type of one variable.
9445 ///
9446 /// # Arguments
9447 ///
9448 /// - `j_` Index of the variable.
9449 /// - `vartype_` The new variable type.
9450 ///
9451 /// See [Variabletype]
9452 ///
9453 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putvartype>
9454 pub fn put_var_type(&mut self,j_ : i32,vartype_ : i32) -> Result<(),String> { self.data.task.put_var_type(j_,vartype_) }
9455 /// Sets the variable type for one or more variables.
9456 ///
9457 /// # Arguments
9458 ///
9459 /// - `subj_` A list of variable indexes for which the variable type should be changed.
9460 /// - `vartype_` A list of variable types.
9461 ///
9462 /// See [Variabletype]
9463 ///
9464 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putvartypelist>
9465 pub fn put_var_type_list(&mut self,subj_ : &[i32],vartype_ : &[i32]) -> Result<(),String> { self.data.task.put_var_type_list(subj_,vartype_) }
9466 /// Sets the xc vector for a solution.
9467 ///
9468 /// # Arguments
9469 ///
9470 /// - `whichsol_` Selects a solution.
9471 ///
9472 /// See [Soltype]
9473 /// - `xc_` Primal constraint solution.
9474 ///
9475 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putxc>
9476 pub fn put_xc(&mut self,whichsol_ : i32,xc_ : &mut[f64]) -> Result<(),String> { self.data.task.put_xc(whichsol_,xc_) }
9477 /// Sets a slice of the xc vector for a solution.
9478 ///
9479 /// # Arguments
9480 ///
9481 /// - `whichsol_` Selects a solution.
9482 ///
9483 /// See [Soltype]
9484 /// - `first_` First index in the sequence.
9485 /// - `last_` Last index plus 1 in the sequence.
9486 /// - `xc_` Primal constraint solution.
9487 ///
9488 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putxcslice>
9489 pub fn put_xc_slice(&mut self,whichsol_ : i32,first_ : i32,last_ : i32,xc_ : &[f64]) -> Result<(),String> { self.data.task.put_xc_slice(whichsol_,first_,last_,xc_) }
9490 /// Sets the xx vector for a solution.
9491 ///
9492 /// # Arguments
9493 ///
9494 /// - `whichsol_` Selects a solution.
9495 ///
9496 /// See [Soltype]
9497 /// - `xx_` Primal variable solution.
9498 ///
9499 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putxx>
9500 pub fn put_xx(&mut self,whichsol_ : i32,xx_ : &[f64]) -> Result<(),String> { self.data.task.put_xx(whichsol_,xx_) }
9501 /// Sets a slice of the xx vector for a solution.
9502 ///
9503 /// # Arguments
9504 ///
9505 /// - `whichsol_` Selects a solution.
9506 ///
9507 /// See [Soltype]
9508 /// - `first_` First index in the sequence.
9509 /// - `last_` Last index plus 1 in the sequence.
9510 /// - `xx_` Primal variable solution.
9511 ///
9512 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putxxslice>
9513 pub fn put_xx_slice(&mut self,whichsol_ : i32,first_ : i32,last_ : i32,xx_ : &[f64]) -> Result<(),String> { self.data.task.put_xx_slice(whichsol_,first_,last_,xx_) }
9514 /// Sets the y vector for a solution.
9515 ///
9516 /// # Arguments
9517 ///
9518 /// - `whichsol_` Selects a solution.
9519 ///
9520 /// See [Soltype]
9521 /// - `y_` Vector of dual variables corresponding to the constraints.
9522 ///
9523 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.puty>
9524 pub fn put_y(&mut self,whichsol_ : i32,y_ : &[f64]) -> Result<(),String> { self.data.task.put_y(whichsol_,y_) }
9525 /// Sets a slice of the y vector for a solution.
9526 ///
9527 /// # Arguments
9528 ///
9529 /// - `whichsol_` Selects a solution.
9530 ///
9531 /// See [Soltype]
9532 /// - `first_` First index in the sequence.
9533 /// - `last_` Last index plus 1 in the sequence.
9534 /// - `y_` Vector of dual variables corresponding to the constraints.
9535 ///
9536 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putyslice>
9537 pub fn put_y_slice(&mut self,whichsol_ : i32,first_ : i32,last_ : i32,y_ : &[f64]) -> Result<(),String> { self.data.task.put_y_slice(whichsol_,first_,last_,y_) }
9538 /// Read a binary dump of the task solution and information items.
9539 ///
9540 /// # Arguments
9541 ///
9542 /// - `filename_` A valid file name.
9543 /// - `compress_` Data compression type.
9544 ///
9545 /// See [Compresstype]
9546 ///
9547 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readbsolution>
9548 pub fn read_b_solution(&self,filename_ : &str,compress_ : i32) -> Result<(),String> { self.data.task.read_b_solution(filename_,compress_) }
9549 /// Reads problem data from a file.
9550 ///
9551 /// # Arguments
9552 ///
9553 /// - `filename_` A valid file name.
9554 ///
9555 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readdataautoformat>
9556 pub fn read_data(&mut self,filename_ : &str) -> Result<(),String> { self.data.task.read_data(filename_) }
9557 /// Reads problem data from a file.
9558 ///
9559 /// # Arguments
9560 ///
9561 /// - `filename_` A valid file name.
9562 /// - `format_` File data format.
9563 ///
9564 /// See [Dataformat]
9565 /// - `compress_` File compression type.
9566 ///
9567 /// See [Compresstype]
9568 ///
9569 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readdataformat>
9570 pub fn read_data_format(&mut self,filename_ : &str,format_ : i32,compress_ : i32) -> Result<(),String> { self.data.task.read_data_format(filename_,format_,compress_) }
9571 /// Reads a solution from a JSOL file.
9572 ///
9573 /// # Arguments
9574 ///
9575 /// - `filename_` A valid file name.
9576 ///
9577 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readjsonsol>
9578 pub fn read_json_sol(&mut self,filename_ : &str) -> Result<(),String> { self.data.task.read_json_sol(filename_) }
9579 /// Load task data from a string in JSON format.
9580 ///
9581 /// # Arguments
9582 ///
9583 /// - `data_` Problem data in text format.
9584 ///
9585 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readjsonstring>
9586 pub fn read_json_string(&mut self,data_ : &str) -> Result<(),String> { self.data.task.read_json_string(data_) }
9587 /// Load task data from a string in LP format.
9588 ///
9589 /// # Arguments
9590 ///
9591 /// - `data_` Problem data in text format.
9592 ///
9593 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readlpstring>
9594 pub fn read_lp_string(&mut self,data_ : &str) -> Result<(),String> { self.data.task.read_lp_string(data_) }
9595 /// Load task data from a string in OPF format.
9596 ///
9597 /// # Arguments
9598 ///
9599 /// - `data_` Problem data in text format.
9600 ///
9601 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readopfstring>
9602 pub fn read_opf_string(&mut self,data_ : &str) -> Result<(),String> { self.data.task.read_opf_string(data_) }
9603 /// Reads a parameter file.
9604 ///
9605 /// # Arguments
9606 ///
9607 /// - `filename_` A valid file name.
9608 ///
9609 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readparamfile>
9610 pub fn read_param_file(&mut self,filename_ : &str) -> Result<(),String> { self.data.task.read_param_file(filename_) }
9611 /// Load task data from a string in PTF format.
9612 ///
9613 /// # Arguments
9614 ///
9615 /// - `data_` Problem data in text format.
9616 ///
9617 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readptfstring>
9618 pub fn read_ptf_string(&mut self,data_ : &str) -> Result<(),String> { self.data.task.read_ptf_string(data_) }
9619 /// Reads a solution from a file.
9620 ///
9621 /// # Arguments
9622 ///
9623 /// - `whichsol_` Selects a solution.
9624 ///
9625 /// See [Soltype]
9626 /// - `filename_` A valid file name.
9627 ///
9628 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readsolution>
9629 pub fn read_solution(&mut self,whichsol_ : i32,filename_ : &str) -> Result<(),String> { self.data.task.read_solution(whichsol_,filename_) }
9630 /// Read solution file in format determined by the filename
9631 ///
9632 /// # Arguments
9633 ///
9634 /// - `filename_` A valid file name.
9635 ///
9636 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readsolutionfile>
9637 pub fn read_solution_file(&self,filename_ : &str) -> Result<(),String> { self.data.task.read_solution_file(filename_) }
9638 /// Prints information about last file read.
9639 ///
9640 /// # Arguments
9641 ///
9642 /// - `whichstream_` Index of the stream.
9643 ///
9644 /// See [Streamtype]
9645 ///
9646 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readsummary>
9647 pub fn read_summary(&mut self,whichstream_ : i32) -> Result<(),String> { self.data.task.read_summary(whichstream_) }
9648 /// Load task data from a file.
9649 ///
9650 /// # Arguments
9651 ///
9652 /// - `filename_` A valid file name.
9653 ///
9654 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readtask>
9655 pub fn read_task(&mut self,filename_ : &str) -> Result<(),String> { self.data.task.read_task(filename_) }
9656 /// Removes a number of symmetric matrices.
9657 ///
9658 /// # Arguments
9659 ///
9660 /// - `subset_` Indexes of symmetric matrices which should be removed.
9661 ///
9662 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.removebarvars>
9663 pub fn remove_barvars(&mut self,subset_ : &[i32]) -> Result<(),String> { self.data.task.remove_barvars(subset_) }
9664 /// Removes a number of conic constraints from the problem.
9665 ///
9666 /// # Arguments
9667 ///
9668 /// - `subset_` Indexes of cones which should be removed.
9669 ///
9670 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.removecones>
9671 pub fn remove_cones(&mut self,subset_ : &[i32]) -> Result<(),String> { self.data.task.remove_cones(subset_) }
9672 /// Removes a number of constraints.
9673 ///
9674 /// # Arguments
9675 ///
9676 /// - `subset_` Indexes of constraints which should be removed.
9677 ///
9678 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.removecons>
9679 pub fn remove_cons(&mut self,subset_ : &[i32]) -> Result<(),String> { self.data.task.remove_cons(subset_) }
9680 /// Removes a number of variables.
9681 ///
9682 /// # Arguments
9683 ///
9684 /// - `subset_` Indexes of variables which should be removed.
9685 ///
9686 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.removevars>
9687 pub fn remove_vars(&mut self,subset_ : &[i32]) -> Result<(),String> { self.data.task.remove_vars(subset_) }
9688 /// Resets a double parameter to its default value.
9689 ///
9690 /// # Arguments
9691 ///
9692 /// - `param_` Which parameter.
9693 ///
9694 /// See [Dparam]
9695 ///
9696 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.resetdouparam>
9697 pub fn reset_dou_param(&mut self,param_ : i32) -> Result<(),String> { self.data.task.reset_dou_param(param_) }
9698 /// Resets an integer parameter to its default value.
9699 ///
9700 /// # Arguments
9701 ///
9702 /// - `param_` Which parameter.
9703 ///
9704 /// See [Iparam]
9705 ///
9706 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.resetintparam>
9707 pub fn reset_int_param(&mut self,param_ : i32) -> Result<(),String> { self.data.task.reset_int_param(param_) }
9708 /// Resets all parameter values.
9709 ///
9710 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.resetparameters>
9711 pub fn reset_parameters(&mut self) -> Result<(),String> { self.data.task.reset_parameters() }
9712 /// Resets a string parameter to its defalt value.
9713 ///
9714 /// # Arguments
9715 ///
9716 /// - `param_` Which parameter.
9717 ///
9718 /// See [Sparam]
9719 ///
9720 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.resetstrparam>
9721 pub fn reset_str_param(&mut self,param_ : i32) -> Result<(),String> { self.data.task.reset_str_param(param_) }
9722 /// Resizes an optimization task.
9723 ///
9724 /// # Arguments
9725 ///
9726 /// - `maxnumcon_` New maximum number of constraints.
9727 /// - `maxnumvar_` New maximum number of variables.
9728 /// - `maxnumcone_` New maximum number of cones.
9729 /// - `maxnumanz_` New maximum number of linear non-zero elements.
9730 /// - `maxnumqnz_` New maximum number of quadratic non-zeros elements.
9731 ///
9732 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.resizetask>
9733 pub fn resize_task(&mut self,maxnumcon_ : i32,maxnumvar_ : i32,maxnumcone_ : i32,maxnumanz_ : i64,maxnumqnz_ : i64) -> Result<(),String> { self.data.task.resize_task(maxnumcon_,maxnumvar_,maxnumcone_,maxnumanz_,maxnumqnz_) }
9734 /// Creates a sensitivity report.
9735 ///
9736 /// # Arguments
9737 ///
9738 /// - `whichstream_` Index of the stream.
9739 ///
9740 /// See [Streamtype]
9741 ///
9742 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.sensitivityreport>
9743 pub fn sensitivity_report(&self,whichstream_ : i32) -> Result<(),String> { self.data.task.sensitivity_report(whichstream_) }
9744 /// Checks whether a solution is defined.
9745 ///
9746 /// # Arguments
9747 ///
9748 /// - `whichsol_` Selects a solution.
9749 ///
9750 /// See [Soltype]
9751 ///
9752 /// # Returns
9753 ///
9754 /// - `isdef` Is non-zero if the requested solution is defined.
9755 ///
9756 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.solutiondef>
9757 pub fn solution_def(&self,whichsol_ : i32) -> Result<bool,String> { self.data.task.solution_def(whichsol_) }
9758 /// Prints a short summary of the current solutions.
9759 ///
9760 /// # Arguments
9761 ///
9762 /// - `whichstream_` Index of the stream.
9763 ///
9764 /// See [Streamtype]
9765 ///
9766 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.solutionsummary>
9767 pub fn solution_summary(&self,whichstream_ : i32) -> Result<(),String> { self.data.task.solution_summary(whichstream_) }
9768 /// Solve a linear equation system involving a basis matrix.
9769 ///
9770 /// # Arguments
9771 ///
9772 /// - `transp_` Controls which problem formulation is solved.
9773 /// - `numnz_` Input (number of non-zeros in right-hand side).
9774 /// - `sub_` Input (indexes of non-zeros in right-hand side) and output (indexes of non-zeros in solution vector).
9775 /// - `val_` Input (right-hand side values) and output (solution vector values).
9776 ///
9777 /// # Returns
9778 ///
9779 /// - `numnzout` Output (number of non-zeros in solution vector).
9780 ///
9781 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.solvewithbasis>
9782 pub fn solve_with_basis(&mut self,transp_ : bool,numnz_ : i32,sub_ : &mut[i32],val_ : &mut[f64]) -> Result<i32,String> { self.data.task.solve_with_basis(transp_,numnz_,sub_,val_) }
9783 /// Obtains a cone type code.
9784 ///
9785 /// # Arguments
9786 ///
9787 /// - `str_` String corresponding to the cone type code.
9788 /// - `conetype_` The cone type corresponding to str.
9789 ///
9790 /// See [Conetype]
9791 ///
9792 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.strtoconetype>
9793 pub fn str_to_cone_type(&self,str_ : &str,conetype_ : & mut i32) -> Result<(),String> { self.data.task.str_to_cone_type(str_,conetype_) }
9794 /// Obtains a status key.
9795 ///
9796 /// # Arguments
9797 ///
9798 /// - `str_` A status key abbreviation string.
9799 /// - `sk_` Status key corresponding to the string.
9800 ///
9801 /// See [Stakey]
9802 ///
9803 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.strtosk>
9804 pub fn str_to_sk(&self,str_ : &str,sk_ : & mut i32) -> Result<(),String> { self.data.task.str_to_sk(str_,sk_) }
9805 /// In-place reformulation of a QCQO to a conic quadratic problem.
9806 ///
9807 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.toconic>
9808 pub fn toconic(&mut self) -> Result<(),String> { self.data.task.toconic() }
9809 /// Disconnects a user-defined function from a task stream.
9810 ///
9811 /// # Arguments
9812 ///
9813 /// - `whichstream_` Index of the stream.
9814 ///
9815 /// See [Streamtype]
9816 ///
9817 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.unlinkfuncfromtaskstream>
9818 pub fn unlink_func_from_stream(&mut self,whichstream_ : i32) -> Result<(),String> { self.data.task.unlink_func_from_stream(whichstream_) }
9819 /// Update the information items related to the solution.
9820 ///
9821 /// # Arguments
9822 ///
9823 /// - `whichsol_` Selects a solution.
9824 ///
9825 /// See [Soltype]
9826 ///
9827 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.updatesolutioninfo>
9828 pub fn update_solution_info(&mut self,whichsol_ : i32) -> Result<(),String> { self.data.task.update_solution_info(whichsol_) }
9829 /// Checks a parameter name.
9830 ///
9831 /// # Arguments
9832 ///
9833 /// - `parname_` Parameter name.
9834 /// - `partype_` Parameter type.
9835 ///
9836 /// See [Parametertype]
9837 /// - `param_` Which parameter.
9838 ///
9839 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.whichparam>
9840 pub fn which_param(&self,parname_ : &str,partype_ : & mut i32,param_ : &mut i32) -> Result<(),String> { self.data.task.which_param(parname_,partype_,param_) }
9841 /// Write a binary dump of the task solution and information items.
9842 ///
9843 /// # Arguments
9844 ///
9845 /// - `filename_` A valid file name.
9846 /// - `compress_` Data compression type.
9847 ///
9848 /// See [Compresstype]
9849 ///
9850 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.writebsolution>
9851 pub fn write_b_solution(&self,filename_ : &str,compress_ : i32) -> Result<(),String> { self.data.task.write_b_solution(filename_,compress_) }
9852 /// Writes problem data to a file.
9853 ///
9854 /// # Arguments
9855 ///
9856 /// - `filename_` A valid file name.
9857 ///
9858 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.writedata>
9859 pub fn write_data(&self,filename_ : &str) -> Result<(),String> { self.data.task.write_data(filename_) }
9860 /// Writes a solution to a JSON file.
9861 ///
9862 /// # Arguments
9863 ///
9864 /// - `filename_` A valid file name.
9865 ///
9866 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.writejsonsol>
9867 pub fn write_json_sol(&self,filename_ : &str) -> Result<(),String> { self.data.task.write_json_sol(filename_) }
9868 /// Writes all the parameters to a parameter file.
9869 ///
9870 /// # Arguments
9871 ///
9872 /// - `filename_` A valid file name.
9873 ///
9874 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.writeparamfile>
9875 pub fn write_param_file(&self,filename_ : &str) -> Result<(),String> { self.data.task.write_param_file(filename_) }
9876 /// Write a solution to a file.
9877 ///
9878 /// # Arguments
9879 ///
9880 /// - `whichsol_` Selects a solution.
9881 ///
9882 /// See [Soltype]
9883 /// - `filename_` A valid file name.
9884 ///
9885 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.writesolution>
9886 pub fn write_solution(&self,whichsol_ : i32,filename_ : &str) -> Result<(),String> { self.data.task.write_solution(whichsol_,filename_) }
9887 /// Write solution file in format determined by the filename
9888 ///
9889 /// # Arguments
9890 ///
9891 /// - `filename_` A valid file name.
9892 ///
9893 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.writesolutionfile>
9894 pub fn write_solution_file(&self,filename_ : &str) -> Result<(),String> { self.data.task.write_solution_file(filename_) }
9895 /// Appends a record to the statistics file.
9896 ///
9897 /// # Arguments
9898 ///
9899 /// - `filename_` A valid file name.
9900 ///
9901 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.writestat>
9902 pub fn write_stat(&mut self,filename_ : &str) -> Result<(),String> { self.data.task.write_stat(filename_) }
9903 /// Write a complete binary dump of the task data.
9904 ///
9905 /// # Arguments
9906 ///
9907 /// - `filename_` A valid file name.
9908 ///
9909 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.writetask>
9910 pub fn write_task(&self,filename_ : &str) -> Result<(),String> { self.data.task.write_task(filename_) }
9911 /// Internal
9912 ///
9913 /// # Arguments
9914 ///
9915 /// - `filename_` A valid file name.
9916 /// - `compress_` Data compression type.
9917 ///
9918 /// See [Compresstype]
9919 ///
9920 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.writetasksolverresult_file>
9921 pub fn write_task_solver_result_file(&self,filename_ : &str,compress_ : i32) -> Result<(),String> { self.data.task.write_task_solver_result_file(filename_,compress_) }
9922
9923}
9924
9925
9926extern fn wrap_data_write_handle(handle : * const libc::c_void,
9927 src : * const u8,
9928 count : usize) -> usize {
9929 let h = handle as * mut Box<dyn FnMut(&[u8]) -> usize>;
9930 unsafe {
9931 (*h)(std::slice::from_raw_parts(src,count))
9932 }
9933}
9934
9935extern fn wrap_data_read_handle(handle : * const libc::c_void,
9936 dst : * mut u8,
9937 count : usize) -> usize {
9938 let h = handle as * mut Box<dyn FnMut(&mut [u8]) -> usize>;
9939 unsafe {
9940 (*h)(std::slice::from_raw_parts_mut(dst,count))
9941 }
9942}
9943
9944struct CallbackHandle {
9945 codecb : Option<* mut c_void>,
9946 infocb : Option<* mut c_void>,
9947 intsolcb : Option<* mut c_void>,
9948}
9949impl CallbackHandle {
9950 extern fn proxy(
9951 task : * const u8,
9952 handle : * const c_void,
9953 caller : i32,
9954 dinf : * const f64,
9955 iinf : * const i32,
9956 liinf : * const i64) -> i32
9957 {
9958 let cbdata = handle as * mut CallbackHandle;
9959 let r0 = if let Some(cb) = unsafe { (*cbdata).codecb } {
9960 let cb : * mut c_void = cb;
9961 let cb = cb as * mut Box<& mut dyn FnMut(i32) -> bool>;
9962 unsafe { (*cb)(caller) }
9963 } else {
9964 false
9965 };
9966
9967 let r1 = if let Some(cb) = unsafe { (*cbdata).infocb } {
9968 let cb : * mut c_void = cb;
9969 let cb = cb as * mut Box<& mut dyn FnMut(i32,&[f64],&[i32],&[i64]) -> bool>;
9970 unsafe {
9971 (*cb)(caller,
9972 & std::slice::from_raw_parts(dinf, Dinfitem::END as usize),
9973 & std::slice::from_raw_parts(iinf, Iinfitem::END as usize),
9974 & std::slice::from_raw_parts(liinf, Liinfitem::END as usize))
9975 }
9976 } else {
9977 false
9978 };
9979
9980 let r2 = if let Some(cb) = unsafe { (*cbdata).intsolcb } {
9981 let cb : * mut c_void = cb;
9982 let cb = cb as * mut Box<& mut dyn FnMut(&[f64]) -> bool>;
9983 if caller == Callbackcode::NEW_INT_MIO {
9984 let mut numvar : i32 = 0;
9985 if 0 == unsafe { MSK_getnumvar(task,& mut numvar) } {
9986 let mut xx : Vec<f64> = vec![0.0; numvar as usize];
9987 if 0 == unsafe { MSK_getxx(task,Soltype::ITG,xx.as_mut_ptr()) } {
9988 unsafe {(*cb)(xx.as_slice()) }
9989 } else {
9990 false
9991 }
9992 } else {
9993 false
9994 }
9995 } else {
9996 false
9997 }
9998 } else {
9999 false
10000 };
10001
10002 if r0 || r1 || r2 { 1 } else { 0 }
10003 }
10004}
10005
10006impl Task {
10007 /// Create a new task in the given environment or with the default environment with a given capacity
10008 pub fn with_capacity(env : Option<&Env>, numcon : i32, numvar : i32) -> Option<Task> {
10009 let mut task : * const u8 = std::ptr::null();
10010 if 0 != unsafe { MSK_maketask(if let Some(e) = env {(*e).ptr} else {std::ptr::null()},
10011 numcon,
10012 numvar,
10013 & mut task) } {
10014 None
10015 }
10016 else {
10017 Some(Task { ptr : task })
10018 }
10019 }
10020
10021 /// Create a new task in the given environment or with the default environment
10022 pub fn from_env(env : Option<&Env>) -> Option<Task> { Task::with_capacity(env,0,0) }
10023
10024 /// Create a new task in the given environment or with the default environment
10025 pub fn clone(&self) -> Option<Task> {
10026 let mut task : * const u8 = std::ptr::null();
10027 if 0 != unsafe { MSK_clonetask(self.ptr,& mut task) } {
10028 None
10029 }
10030 else {
10031 Some(Task{ptr : task})
10032 }
10033 }
10034
10035 /// Create a new task in the default environment
10036 pub fn new() -> Option<Task> { Task::with_capacity(None,0,0) }
10037
10038
10039 extern fn stream_callback_proxy<F>(handle : * const c_void, msg : * const libc::c_char)
10040 where F : Fn(&str)
10041 {
10042 let func = handle as * mut F;
10043 unsafe {
10044 let cstr = CStr::from_ptr(msg);
10045 let cstr_bytes = cstr.to_bytes();
10046 let s = String::from_utf8_lossy(cstr_bytes).into_owned();
10047 (*func)(&s);
10048 }
10049 }
10050
10051 /// Temporarily attach a stream printer function to the task.
10052 ///
10053 /// # Arguments
10054 /// - `whichstream` Which stream to attach to (See Streamtype)
10055 /// - `streamfunc` The callback function
10056 /// - `func` The function to call with the updated task. The stream callback will be attached
10057 /// for the duration of this call.
10058 pub fn with_stream_callback<F,G,R>(& mut self,
10059 whichstream : i32,
10060 streamfunc : &F,
10061 mut func : G) -> R
10062 where G: FnMut(& mut Task) -> R,
10063 F: Fn(&str),
10064 {
10065 unsafe{
10066 let hnd = streamfunc as * const _ as * mut c_void;
10067 _ = MSK_linkfunctotaskstream(self.ptr, whichstream,hnd, Task::stream_callback_proxy::<F>);
10068 }
10069
10070 let res = func(self);
10071 unsafe {
10072 _ = MSK_unlinkfuncfromtaskstream(self.ptr,whichstream);
10073 }
10074 res
10075 }
10076
10077 /// Temporarily attach a code callback to the task.
10078 ///
10079 /// For the duration of the call of `body`, the code callback will be set to `cbfunc`.
10080 ///
10081 /// # Arguments
10082 /// - `cbfunc` A callback function that may be called repeatedly
10083 /// - `body` A function `(& mut Task) -> R` that is called exactly once.
10084 pub fn with_callback<F,G,R>(& mut self, cbfunc : & mut F, body : G ) -> R
10085 where G : FnOnce(& mut Task) -> R,
10086 F : FnMut(i32) -> bool
10087 {
10088 let mut prev_func : * const u8 = std::ptr::null();
10089 let mut prev_handle : * const c_void = std::ptr::null();
10090 // We create a Box with a dyn function to make sure we pin the dyn function for the
10091 // duration of the scope. We then convert a pointer to the box to a `* mut c_void` to
10092 // subvert Rust's complaints about lifetimes when we pass it to MSK_putcallbackfunc and
10093 // actually store it in unsafe-land.
10094 //
10095 // This work only because we now KNOW that the content of the box will exists for the
10096 // duration of this scope, and we make sure to erase the reference in unsafe-land before
10097 // returning.
10098 let mut new_handle : Box<& mut dyn FnMut(i32) -> bool> = Box::new(cbfunc);
10099 unsafe {
10100 _ = MSK_getcallbackfunc(self.ptr,&mut prev_func,&mut prev_handle);
10101 }
10102
10103 let mut cbdata = CallbackHandle {
10104 codecb : Some(&mut new_handle as * mut _ as * mut c_void),
10105 infocb : None,
10106 intsolcb : None,
10107 };
10108
10109 if ! prev_handle.is_null() {
10110 cbdata.infocb = unsafe { (*(prev_handle as *const CallbackHandle)).infocb };
10111 cbdata.intsolcb = unsafe { (*(prev_handle as *const CallbackHandle)).intsolcb };
10112 }
10113
10114 // Set the new callback handle and function
10115 unsafe {
10116 let hnd : * mut c_void = &cbdata as * const _ as * mut c_void;
10117 _ = MSK_putcallbackfunc(self.ptr, CallbackHandle::proxy,hnd);
10118 }
10119
10120 let res = body(self);
10121
10122 // Reset to the old handle and function. This removes the reference to new_handle in
10123 // unsafe-land.
10124 // TODO: Do some kind of unwind protect to ensure that this is called, even in event of a
10125 // panic. See: std::panic::{catch_unwind, resume_unwind}
10126 unsafe {
10127 _ = MSK_putcallbackfunc_ptr(self.ptr, prev_func, prev_handle);
10128 }
10129 res
10130 }
10131
10132 /// Temporarily attach an info callback to the task.
10133 ///
10134 /// For the duration of the call of `body`, the code callback will be set to `cbfunc`.
10135 ///
10136 /// # Arguments
10137 /// - `cbfunc` A callback function that may be called repeatedly
10138 /// - `body` A function `(& mut Task) -> R` that is called exactly once.
10139 pub fn with_info_callback<F,G,R>(& mut self, cbfunc : & mut F, body : G ) -> R
10140 where G : FnOnce(& mut Task) -> R,
10141 F : FnMut(i32,&[f64],&[i32],&[i64]) -> bool
10142 {
10143 let mut prev_func : * const u8 = std::ptr::null();
10144 let mut prev_handle : * const c_void = std::ptr::null();
10145 let mut new_handle : Box<& mut dyn FnMut(i32,&[f64],&[i32],&[i64]) -> bool> = Box::new(cbfunc);
10146 unsafe {
10147 _ = MSK_getcallbackfunc(self.ptr,&mut prev_func,&mut prev_handle);
10148 }
10149
10150 let mut cbdata = CallbackHandle {
10151 codecb : None,
10152 infocb : Some(&mut new_handle as * mut _ as * mut c_void),
10153 intsolcb : None,
10154 };
10155
10156 if ! prev_handle.is_null() {
10157 cbdata.codecb = unsafe { (*(prev_handle as *const CallbackHandle)).codecb };
10158 cbdata.intsolcb = unsafe { (*(prev_handle as *const CallbackHandle)).intsolcb };
10159 }
10160
10161 // Set the new callback handle and function
10162 unsafe {
10163 let hnd : * mut c_void = &cbdata as * const _ as * mut c_void;
10164 _ = MSK_putcallbackfunc(self.ptr, CallbackHandle::proxy,hnd);
10165 }
10166
10167 let res = body(self);
10168
10169 // Reset to the old handle and function. This removes the reference to new_handle in
10170 // unsafe-land.
10171 // TODO: Do some kind of unwind protect to ensure that this is called, even in event of a
10172 // panic. See: std::panic::{catch_unwind, resume_unwind}
10173 unsafe {
10174 _ = MSK_putcallbackfunc_ptr(self.ptr, prev_func, prev_handle);
10175 }
10176 res
10177 }
10178
10179 /// Temporarily attach an info callback to the task.
10180 ///
10181 /// For the duration of the call of `body`, the code callback will be set to `cbfunc`.
10182 ///
10183 /// # Arguments
10184 /// - `cbfunc` A callback function that may be called repeatedly
10185 /// - `body` A function `(& mut Task) -> R` that is called exactly once.
10186 pub fn with_itg_sol_callback<F,G,R>(& mut self, cbfunc : & mut F, body : G ) -> R
10187 where G : FnOnce(& mut Task) -> R,
10188 F : FnMut(&[f64]) -> bool
10189 {
10190 let mut prev_func : * const u8 = std::ptr::null();
10191 let mut prev_handle : * const c_void = std::ptr::null();
10192 let mut new_handle : Box<& mut dyn FnMut(&[f64]) -> bool> = Box::new(cbfunc);
10193 unsafe {
10194 _ = MSK_getcallbackfunc(self.ptr,&mut prev_func,&mut prev_handle);
10195 }
10196
10197 let mut cbdata = CallbackHandle {
10198 codecb : None,
10199 infocb : None,
10200 intsolcb : Some(&mut new_handle as * mut _ as * mut c_void),
10201 };
10202
10203 if ! prev_handle.is_null() {
10204 cbdata.codecb = unsafe { (*(prev_handle as *const CallbackHandle)).codecb };
10205 cbdata.infocb = unsafe { (*(prev_handle as *const CallbackHandle)).infocb };
10206 }
10207
10208 // Set the new callback handle and function
10209 unsafe {
10210 let hnd : * mut c_void = &cbdata as * const _ as * mut c_void;
10211 _ = MSK_putcallbackfunc(self.ptr, CallbackHandle::proxy,hnd);
10212 }
10213
10214 let res = body(self);
10215
10216 // Reset to the old handle and function. This removes the reference to new_handle in
10217 // unsafe-land.
10218 // TODO: Do some kind of unwind protect to ensure that this is called, even in event of a
10219 // panic. See: std::panic::{catch_unwind, resume_unwind}
10220 unsafe {
10221 _ = MSK_putcallbackfunc_ptr(self.ptr, prev_func, prev_handle);
10222 }
10223 res
10224 }
10225
10226
10227
10228 /// This converts the Task object into a TaskCB object. The main
10229 /// difference is the the TaskCB enables attaching callback
10230 /// functions (message printing and information callbacks), and
10231 /// that it due to the callbacks cannot be shared between multiple
10232 /// threads.
10233 pub fn with_callbacks(self) -> TaskCB { TaskCB::new(self) }
10234
10235 #[allow(unused_parens)]
10236 fn handle_res(&self, r : i32, funname : &str) -> Result<(),String> {
10237 return (
10238 if 0 != r {
10239 let mut lastsz : i64 = 0;
10240 let mut lastcode : i32 = 0;
10241 if 0 == unsafe{ MSK_getlasterror64(self.ptr,& mut lastcode,0,& mut lastsz,std::ptr::null_mut()) } {
10242 let mut lastmsg : Vec<u8> = vec![0; (lastsz+1) as usize];
10243 unsafe{ MSK_getlasterror64(self.ptr,& mut lastcode,lastsz+1,& mut lastsz,lastmsg.as_mut_ptr()) };
10244 let lastmsgstr = String::from_utf8_lossy(&lastmsg[0..lastsz as usize]);
10245 Result::Err(format!("Error in call to {}: ({}) {:?}",funname,r,lastmsgstr))
10246 }
10247 else {
10248 handle_res_static(r,funname)
10249 }
10250 }
10251 else {
10252 Ok(())
10253 }
10254 );
10255 }
10256
10257 pub fn write_data_stream<F>(&self, func : F, format : i32, compress : i32) -> Result<(),String>
10258 where F : FnMut(&[u8]) -> usize {
10259 let boxfunc : Box<dyn FnMut(&[u8]) -> usize> = Box::new(func);
10260 let hnd = (&boxfunc) as * const _ as * mut libc::c_void;
10261 self.handle_res(unsafe { MSK_writedatahandle(self.ptr, wrap_data_write_handle, hnd, format,compress ) }, "write_data_stream")
10262 }
10263
10264 pub fn read_data_stream<F>(&self, func : F, format : i32, compress : i32) -> Result<(),String>
10265 where F : FnMut(&mut [u8]) -> usize {
10266 let boxfunc : Box<dyn FnMut(&mut [u8]) -> usize> = Box::new(func);
10267 let hnd = (&boxfunc) as * const _ as * mut libc::c_void;
10268 self.handle_res(unsafe { MSK_readdatahandle(self.ptr, wrap_data_read_handle, hnd, format,compress ) }, "read_data_stream")
10269 }
10270
10271 /// Analyze the names and issue an error for the first invalid name.
10272 ///
10273 /// # Arguments
10274 ///
10275 /// - `whichstream_` Index of the stream.
10276 ///
10277 /// See [Streamtype]
10278 /// - `nametype_` The type of names e.g. valid in MPS or LP files.
10279 ///
10280 /// See [Nametype]
10281 ///
10282 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.analyzenames>
10283 #[allow(unused_parens)]
10284 pub fn analyze_names(&self,whichstream_ : i32,nametype_ : i32) -> Result<(),String> {
10285 self.handle_res(unsafe { MSK_analyzenames(self.ptr,whichstream_,nametype_) },"analyze_names")?;
10286 return Result::Ok(());
10287 } // analyzenames
10288 /// Analyze the data of a task.
10289 ///
10290 /// # Arguments
10291 ///
10292 /// - `whichstream_` Index of the stream.
10293 ///
10294 /// See [Streamtype]
10295 ///
10296 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.analyzeproblem>
10297 #[allow(unused_parens)]
10298 pub fn analyze_problem(&self,whichstream_ : i32) -> Result<(),String> {
10299 self.handle_res(unsafe { MSK_analyzeproblem(self.ptr,whichstream_) },"analyze_problem")?;
10300 return Result::Ok(());
10301 } // analyzeproblem
10302 /// Print information related to the quality of the solution.
10303 ///
10304 /// # Arguments
10305 ///
10306 /// - `whichstream_` Index of the stream.
10307 ///
10308 /// See [Streamtype]
10309 /// - `whichsol_` Selects a solution.
10310 ///
10311 /// See [Soltype]
10312 ///
10313 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.analyzesolution>
10314 #[allow(unused_parens)]
10315 pub fn analyze_solution(&self,whichstream_ : i32,whichsol_ : i32) -> Result<(),String> {
10316 self.handle_res(unsafe { MSK_analyzesolution(self.ptr,whichstream_,whichsol_) },"analyze_solution")?;
10317 return Result::Ok(());
10318 } // analyzesolution
10319 /// Appends an affine conic constraint to the task.
10320 ///
10321 /// # Arguments
10322 ///
10323 /// - `domidx_` Domain index.
10324 /// - `afeidxlist_` List of affine expression indexes.
10325 /// - `b_` The vector of constant terms modifying affine expressions. Optional.
10326 ///
10327 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendacc>
10328 #[allow(unused_parens)]
10329 pub fn append_acc(&mut self,domidx_ : i64,afeidxlist_ : &[i64],b_ : &[f64]) -> Result<(),String> {
10330 let numafeidx_ : i64 = afeidxlist_.len() as i64;
10331 if b_.len() > 0 && b_.len() != (numafeidx_).try_into().unwrap() {
10332 return Result::Err("append_acc: Argument 'b' has the wrong length, expected numafeidx_".to_string());
10333 }
10334 self.handle_res(unsafe { MSK_appendacc(self.ptr,domidx_,numafeidx_,afeidxlist_.as_ptr(),if b_.len() == 0 { std::ptr::null() } else { b_.as_ptr() }) },"append_acc")?;
10335 return Result::Ok(());
10336 } // appendacc
10337 /// Appends a number of affine conic constraint to the task.
10338 ///
10339 /// # Arguments
10340 ///
10341 /// - `domidxs_` Domain indices.
10342 /// - `afeidxlist_` List of affine expression indexes.
10343 /// - `b_` The vector of constant terms modifying affine expressions. Optional.
10344 ///
10345 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendaccs>
10346 #[allow(unused_parens)]
10347 pub fn append_accs(&mut self,domidxs_ : &[i64],afeidxlist_ : &[i64],b_ : &[f64]) -> Result<(),String> {
10348 let numaccs_ : i64 = domidxs_.len() as i64;
10349 let numafeidx_ : i64 = afeidxlist_.len() as i64;
10350 if b_.len() > 0 && b_.len() != (numafeidx_).try_into().unwrap() {
10351 return Result::Err("append_accs: Argument 'b' has the wrong length, expected numafeidx_".to_string());
10352 }
10353 self.handle_res(unsafe { MSK_appendaccs(self.ptr,numaccs_,domidxs_.as_ptr(),numafeidx_,afeidxlist_.as_ptr(),if b_.len() == 0 { std::ptr::null() } else { b_.as_ptr() }) },"append_accs")?;
10354 return Result::Ok(());
10355 } // appendaccs
10356 /// Appends an affine conic constraint to the task.
10357 ///
10358 /// # Arguments
10359 ///
10360 /// - `domidx_` Domain index.
10361 /// - `afeidxfirst_` Index of the first affine expression.
10362 /// - `b_` The vector of constant terms modifying affine expressions. Optional.
10363 ///
10364 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendaccseq>
10365 #[allow(unused_parens)]
10366 pub fn append_acc_seq(&mut self,domidx_ : i64,afeidxfirst_ : i64,b_ : &[f64]) -> Result<(),String> {
10367 let mut __tmp_0 : i64 = i64::default();
10368 let __tmp_1 = unsafe { MSK_getdomainn(self.ptr,domidx_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getdomainn")?;
10369 let numafeidx_ : i64 = __tmp_0;
10370 if b_.len() > 0 && b_.len() != (numafeidx_).try_into().unwrap() {
10371 return Result::Err("append_acc_seq: Argument 'b' has the wrong length, expected numafeidx_".to_string());
10372 }
10373 self.handle_res(unsafe { MSK_appendaccseq(self.ptr,domidx_,numafeidx_,afeidxfirst_,if b_.len() == 0 { std::ptr::null() } else { b_.as_ptr() }) },"append_acc_seq")?;
10374 return Result::Ok(());
10375 } // appendaccseq
10376 /// Appends a number of affine conic constraint to the task.
10377 ///
10378 /// # Arguments
10379 ///
10380 /// - `domidxs_` Domain indices.
10381 /// - `numafeidx_` Number of affine expressions in the affine expression list (must equal the sum of dimensions of the domains).
10382 /// - `afeidxfirst_` Index of the first affine expression.
10383 /// - `b_` The vector of constant terms modifying affine expressions. Optional.
10384 ///
10385 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendaccsseq>
10386 #[allow(unused_parens)]
10387 pub fn append_accs_seq(&mut self,domidxs_ : &[i64],numafeidx_ : i64,afeidxfirst_ : i64,b_ : &[f64]) -> Result<(),String> {
10388 let numaccs_ : i64 = domidxs_.len() as i64;
10389 if b_.len() > 0 && b_.len() != (numafeidx_).try_into().unwrap() {
10390 return Result::Err("append_accs_seq: Argument 'b' has the wrong length, expected numafeidx_".to_string());
10391 }
10392 self.handle_res(unsafe { MSK_appendaccsseq(self.ptr,numaccs_,domidxs_.as_ptr(),numafeidx_,afeidxfirst_,if b_.len() == 0 { std::ptr::null() } else { b_.as_ptr() }) },"append_accs_seq")?;
10393 return Result::Ok(());
10394 } // appendaccsseq
10395 /// Appends a number of empty affine expressions to the optimization task.
10396 ///
10397 /// # Arguments
10398 ///
10399 /// - `num_` Number of empty affine expressions which should be appended.
10400 ///
10401 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendafes>
10402 #[allow(unused_parens)]
10403 pub fn append_afes(&mut self,num_ : i64) -> Result<(),String> {
10404 self.handle_res(unsafe { MSK_appendafes(self.ptr,num_) },"append_afes")?;
10405 return Result::Ok(());
10406 } // appendafes
10407 /// Appends semidefinite variables to the problem.
10408 ///
10409 /// # Arguments
10410 ///
10411 /// - `dim_` Dimensions of symmetric matrix variables to be added.
10412 ///
10413 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendbarvars>
10414 #[allow(unused_parens)]
10415 pub fn append_barvars(&mut self,dim_ : &[i32]) -> Result<(),String> {
10416 let num_ : i32 = dim_.len() as i32;
10417 self.handle_res(unsafe { MSK_appendbarvars(self.ptr,num_,dim_.as_ptr()) },"append_barvars")?;
10418 return Result::Ok(());
10419 } // appendbarvars
10420 /// Appends a new conic constraint to the problem.
10421 ///
10422 /// # Arguments
10423 ///
10424 /// - `ct_` Specifies the type of the cone.
10425 ///
10426 /// See [Conetype]
10427 /// - `conepar_` For the power cone it denotes the exponent alpha. For other cone types it is unused and can be set to 0.
10428 /// - `submem_` Variable subscripts of the members in the cone.
10429 ///
10430 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendcone>
10431 #[allow(unused_parens)]
10432 pub fn append_cone(&mut self,ct_ : i32,conepar_ : f64,submem_ : &[i32]) -> Result<(),String> {
10433 let nummem_ : i32 = submem_.len() as i32;
10434 self.handle_res(unsafe { MSK_appendcone(self.ptr,ct_,conepar_,nummem_,submem_.as_ptr()) },"append_cone")?;
10435 return Result::Ok(());
10436 } // appendcone
10437 /// Appends a new conic constraint to the problem.
10438 ///
10439 /// # Arguments
10440 ///
10441 /// - `ct_` Specifies the type of the cone.
10442 ///
10443 /// See [Conetype]
10444 /// - `conepar_` For the power cone it denotes the exponent alpha. For other cone types it is unused and can be set to 0.
10445 /// - `nummem_` Number of member variables in the cone.
10446 /// - `j_` Index of the first variable in the conic constraint.
10447 ///
10448 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendconeseq>
10449 #[allow(unused_parens)]
10450 pub fn append_cone_seq(&mut self,ct_ : i32,conepar_ : f64,nummem_ : i32,j_ : i32) -> Result<(),String> {
10451 self.handle_res(unsafe { MSK_appendconeseq(self.ptr,ct_,conepar_,nummem_,j_) },"append_cone_seq")?;
10452 return Result::Ok(());
10453 } // appendconeseq
10454 /// Appends multiple conic constraints to the problem.
10455 ///
10456 /// # Arguments
10457 ///
10458 /// - `ct_` Specifies the type of the cone.
10459 ///
10460 /// See [Conetype]
10461 /// - `conepar_` For the power cone it denotes the exponent alpha. For other cone types it is unused and can be set to 0.
10462 /// - `nummem_` Numbers of member variables in the cones.
10463 /// - `j_` Index of the first variable in the first cone to be appended.
10464 ///
10465 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendconesseq>
10466 #[allow(unused_parens)]
10467 pub fn append_cones_seq(&mut self,ct_ : &[i32],conepar_ : &[f64],nummem_ : &[i32],j_ : i32) -> Result<(),String> {
10468 let num_ : i32 = std::cmp::min(std::cmp::min(ct_.len(),conepar_.len()),nummem_.len()) as i32;
10469 self.handle_res(unsafe { MSK_appendconesseq(self.ptr,num_,ct_.as_ptr(),conepar_.as_ptr(),nummem_.as_ptr(),j_) },"append_cones_seq")?;
10470 return Result::Ok(());
10471 } // appendconesseq
10472 /// Appends a number of constraints to the optimization task.
10473 ///
10474 /// # Arguments
10475 ///
10476 /// - `num_` Number of constraints which should be appended.
10477 ///
10478 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendcons>
10479 #[allow(unused_parens)]
10480 pub fn append_cons(&mut self,num_ : i32) -> Result<(),String> {
10481 self.handle_res(unsafe { MSK_appendcons(self.ptr,num_) },"append_cons")?;
10482 return Result::Ok(());
10483 } // appendcons
10484 /// Appends a number of empty disjunctive constraints to the task.
10485 ///
10486 /// # Arguments
10487 ///
10488 /// - `num_` Number of empty disjunctive constraints which should be appended.
10489 ///
10490 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appenddjcs>
10491 #[allow(unused_parens)]
10492 pub fn append_djcs(&mut self,num_ : i64) -> Result<(),String> {
10493 self.handle_res(unsafe { MSK_appenddjcs(self.ptr,num_) },"append_djcs")?;
10494 return Result::Ok(());
10495 } // appenddjcs
10496 /// Appends the dual exponential cone domain.
10497 ///
10498 /// # Returns
10499 ///
10500 /// - `domidx` Index of the domain.
10501 ///
10502 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appenddualexpconedomain>
10503 #[allow(unused_parens)]
10504 pub fn append_dual_exp_cone_domain(&mut self) -> Result<i64,String> {
10505 let mut __tmp_0 : i64 = i64::default();
10506 self.handle_res(unsafe { MSK_appenddualexpconedomain(self.ptr,&mut __tmp_0) },"append_dual_exp_cone_domain")?;
10507 return Result::Ok(__tmp_0);
10508 } // appenddualexpconedomain
10509 /// Appends the dual geometric mean cone domain.
10510 ///
10511 /// # Arguments
10512 ///
10513 /// - `n_` Dimension of the domain.
10514 ///
10515 /// # Returns
10516 ///
10517 /// - `domidx` Index of the domain.
10518 ///
10519 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appenddualgeomeanconedomain>
10520 #[allow(unused_parens)]
10521 pub fn append_dual_geo_mean_cone_domain(&mut self,n_ : i64) -> Result<i64,String> {
10522 let mut __tmp_0 : i64 = i64::default();
10523 self.handle_res(unsafe { MSK_appenddualgeomeanconedomain(self.ptr,n_,&mut __tmp_0) },"append_dual_geo_mean_cone_domain")?;
10524 return Result::Ok(__tmp_0);
10525 } // appenddualgeomeanconedomain
10526 /// Appends the dual power cone domain.
10527 ///
10528 /// # Arguments
10529 ///
10530 /// - `n_` Dimension of the domain.
10531 /// - `alpha_` The sequence proportional to exponents. Must be positive.
10532 ///
10533 /// # Returns
10534 ///
10535 /// - `domidx` Index of the domain.
10536 ///
10537 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appenddualpowerconedomain>
10538 #[allow(unused_parens)]
10539 pub fn append_dual_power_cone_domain(&mut self,n_ : i64,alpha_ : &[f64]) -> Result<i64,String> {
10540 let nleft_ : i64 = alpha_.len() as i64;
10541 let mut __tmp_0 : i64 = i64::default();
10542 self.handle_res(unsafe { MSK_appenddualpowerconedomain(self.ptr,n_,nleft_,alpha_.as_ptr(),&mut __tmp_0) },"append_dual_power_cone_domain")?;
10543 return Result::Ok(__tmp_0);
10544 } // appenddualpowerconedomain
10545 /// Appends a sequence of dual power cone domains.
10546 ///
10547 /// # Arguments
10548 ///
10549 /// - `n_` Dimensions of the domains.
10550 /// - `nleft_` Number of variables on the left hand sides.
10551 /// - `alpha_` The sequences proportional to exponents, concatenated for all domains. Must be positive.
10552 /// - `domidxlist_` Indexes of the domains.
10553 ///
10554 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appenddualpowerconedomainseq>
10555 #[allow(unused_parens)]
10556 pub fn append_dual_power_cone_domain_seq(&mut self,n_ : &[i64],nleft_ : &[i64],alpha_ : &[f64],domidxlist_ : &mut[i64]) -> Result<(),String> {
10557 let num_ : i64 = std::cmp::min(n_.len(),nleft_.len()) as i64;
10558 let mut __tmp_0 : i64 = i64::default();
10559 for __tmp_1 in nleft_ { __tmp_0 += __tmp_1; }
10560 if alpha_.len() != (__tmp_0).try_into().unwrap() {
10561 return Result::Err("append_dual_power_cone_domain_seq: Argument 'alpha' has the wrong length, expected __tmp_0".to_string());
10562 }
10563 if domidxlist_.len() != (num_).try_into().unwrap() {
10564 return Result::Err("append_dual_power_cone_domain_seq: Argument 'domidxlist' has the wrong length, expected num_".to_string());
10565 }
10566 self.handle_res(unsafe { MSK_appenddualpowerconedomainseq(self.ptr,num_,n_.as_ptr(),nleft_.as_ptr(),alpha_.as_ptr(),domidxlist_.as_mut_ptr()) },"append_dual_power_cone_domain_seq")?;
10567 return Result::Ok(());
10568 } // appenddualpowerconedomainseq
10569 /// Appends the primal exponential cone domain.
10570 ///
10571 /// # Returns
10572 ///
10573 /// - `domidx` Index of the domain.
10574 ///
10575 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendprimalexpconedomain>
10576 #[allow(unused_parens)]
10577 pub fn append_primal_exp_cone_domain(&mut self) -> Result<i64,String> {
10578 let mut __tmp_0 : i64 = i64::default();
10579 self.handle_res(unsafe { MSK_appendprimalexpconedomain(self.ptr,&mut __tmp_0) },"append_primal_exp_cone_domain")?;
10580 return Result::Ok(__tmp_0);
10581 } // appendprimalexpconedomain
10582 /// Appends the primal geometric mean cone domain.
10583 ///
10584 /// # Arguments
10585 ///
10586 /// - `n_` Dimension of the domain.
10587 ///
10588 /// # Returns
10589 ///
10590 /// - `domidx` Index of the domain.
10591 ///
10592 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendprimalgeomeanconedomain>
10593 #[allow(unused_parens)]
10594 pub fn append_primal_geo_mean_cone_domain(&mut self,n_ : i64) -> Result<i64,String> {
10595 let mut __tmp_0 : i64 = i64::default();
10596 self.handle_res(unsafe { MSK_appendprimalgeomeanconedomain(self.ptr,n_,&mut __tmp_0) },"append_primal_geo_mean_cone_domain")?;
10597 return Result::Ok(__tmp_0);
10598 } // appendprimalgeomeanconedomain
10599 /// Appends the primal power cone domain.
10600 ///
10601 /// # Arguments
10602 ///
10603 /// - `n_` Dimension of the domain.
10604 /// - `alpha_` The sequence proportional to exponents. Must be positive.
10605 ///
10606 /// # Returns
10607 ///
10608 /// - `domidx` Index of the domain.
10609 ///
10610 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendprimalpowerconedomain>
10611 #[allow(unused_parens)]
10612 pub fn append_primal_power_cone_domain(&mut self,n_ : i64,alpha_ : &[f64]) -> Result<i64,String> {
10613 let nleft_ : i64 = alpha_.len() as i64;
10614 let mut __tmp_0 : i64 = i64::default();
10615 self.handle_res(unsafe { MSK_appendprimalpowerconedomain(self.ptr,n_,nleft_,alpha_.as_ptr(),&mut __tmp_0) },"append_primal_power_cone_domain")?;
10616 return Result::Ok(__tmp_0);
10617 } // appendprimalpowerconedomain
10618 /// Appends a sequence of primal power cone domains.
10619 ///
10620 /// # Arguments
10621 ///
10622 /// - `n_` Dimensions of the domains.
10623 /// - `nleft_` Number of variables on the left hand sides.
10624 /// - `alpha_` The sequences proportional to exponents, concatenated for all domains. Must be positive.
10625 /// - `domidxlist_` Indexes of the domains.
10626 ///
10627 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendprimalpowerconedomainseq>
10628 #[allow(unused_parens)]
10629 pub fn append_primal_power_cone_domain_seq(&mut self,n_ : &[i64],nleft_ : &[i64],alpha_ : &[f64],domidxlist_ : &mut[i64]) -> Result<(),String> {
10630 let num_ : i64 = std::cmp::min(n_.len(),nleft_.len()) as i64;
10631 let mut __tmp_0 : i64 = i64::default();
10632 for __tmp_1 in nleft_ { __tmp_0 += __tmp_1; }
10633 if alpha_.len() != (__tmp_0).try_into().unwrap() {
10634 return Result::Err("append_primal_power_cone_domain_seq: Argument 'alpha' has the wrong length, expected __tmp_0".to_string());
10635 }
10636 if domidxlist_.len() != (num_).try_into().unwrap() {
10637 return Result::Err("append_primal_power_cone_domain_seq: Argument 'domidxlist' has the wrong length, expected num_".to_string());
10638 }
10639 self.handle_res(unsafe { MSK_appendprimalpowerconedomainseq(self.ptr,num_,n_.as_ptr(),nleft_.as_ptr(),alpha_.as_ptr(),domidxlist_.as_mut_ptr()) },"append_primal_power_cone_domain_seq")?;
10640 return Result::Ok(());
10641 } // appendprimalpowerconedomainseq
10642 /// Appends the n dimensional quadratic cone domain.
10643 ///
10644 /// # Arguments
10645 ///
10646 /// - `n_` Dimension of the domain.
10647 ///
10648 /// # Returns
10649 ///
10650 /// - `domidx` Index of the domain.
10651 ///
10652 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendquadraticconedomain>
10653 #[allow(unused_parens)]
10654 pub fn append_quadratic_cone_domain(&mut self,n_ : i64) -> Result<i64,String> {
10655 let mut __tmp_0 : i64 = i64::default();
10656 self.handle_res(unsafe { MSK_appendquadraticconedomain(self.ptr,n_,&mut __tmp_0) },"append_quadratic_cone_domain")?;
10657 return Result::Ok(__tmp_0);
10658 } // appendquadraticconedomain
10659 /// Appends the n dimensional real number domain.
10660 ///
10661 /// # Arguments
10662 ///
10663 /// - `n_` Dimension of the domain.
10664 ///
10665 /// # Returns
10666 ///
10667 /// - `domidx` Index of the domain.
10668 ///
10669 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendrdomain>
10670 #[allow(unused_parens)]
10671 pub fn append_r_domain(&mut self,n_ : i64) -> Result<i64,String> {
10672 let mut __tmp_0 : i64 = i64::default();
10673 self.handle_res(unsafe { MSK_appendrdomain(self.ptr,n_,&mut __tmp_0) },"append_r_domain")?;
10674 return Result::Ok(__tmp_0);
10675 } // appendrdomain
10676 /// Appends the n dimensional negative orthant to the list of domains.
10677 ///
10678 /// # Arguments
10679 ///
10680 /// - `n_` Dimension of the domain.
10681 ///
10682 /// # Returns
10683 ///
10684 /// - `domidx` Index of the domain.
10685 ///
10686 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendrminusdomain>
10687 #[allow(unused_parens)]
10688 pub fn append_rminus_domain(&mut self,n_ : i64) -> Result<i64,String> {
10689 let mut __tmp_0 : i64 = i64::default();
10690 self.handle_res(unsafe { MSK_appendrminusdomain(self.ptr,n_,&mut __tmp_0) },"append_rminus_domain")?;
10691 return Result::Ok(__tmp_0);
10692 } // appendrminusdomain
10693 /// Appends the n dimensional positive orthant to the list of domains.
10694 ///
10695 /// # Arguments
10696 ///
10697 /// - `n_` Dimension of the domain.
10698 ///
10699 /// # Returns
10700 ///
10701 /// - `domidx` Index of the domain.
10702 ///
10703 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendrplusdomain>
10704 #[allow(unused_parens)]
10705 pub fn append_rplus_domain(&mut self,n_ : i64) -> Result<i64,String> {
10706 let mut __tmp_0 : i64 = i64::default();
10707 self.handle_res(unsafe { MSK_appendrplusdomain(self.ptr,n_,&mut __tmp_0) },"append_rplus_domain")?;
10708 return Result::Ok(__tmp_0);
10709 } // appendrplusdomain
10710 /// Appends the n dimensional rotated quadratic cone domain.
10711 ///
10712 /// # Arguments
10713 ///
10714 /// - `n_` Dimension of the domain.
10715 ///
10716 /// # Returns
10717 ///
10718 /// - `domidx` Index of the domain.
10719 ///
10720 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendrquadraticconedomain>
10721 #[allow(unused_parens)]
10722 pub fn append_r_quadratic_cone_domain(&mut self,n_ : i64) -> Result<i64,String> {
10723 let mut __tmp_0 : i64 = i64::default();
10724 self.handle_res(unsafe { MSK_appendrquadraticconedomain(self.ptr,n_,&mut __tmp_0) },"append_r_quadratic_cone_domain")?;
10725 return Result::Ok(__tmp_0);
10726 } // appendrquadraticconedomain
10727 /// Appends the n dimensional 0 domain.
10728 ///
10729 /// # Arguments
10730 ///
10731 /// - `n_` Dimension of the domain.
10732 ///
10733 /// # Returns
10734 ///
10735 /// - `domidx` Index of the domain.
10736 ///
10737 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendrzerodomain>
10738 #[allow(unused_parens)]
10739 pub fn append_rzero_domain(&mut self,n_ : i64) -> Result<i64,String> {
10740 let mut __tmp_0 : i64 = i64::default();
10741 self.handle_res(unsafe { MSK_appendrzerodomain(self.ptr,n_,&mut __tmp_0) },"append_rzero_domain")?;
10742 return Result::Ok(__tmp_0);
10743 } // appendrzerodomain
10744 /// Appends a general sparse symmetric matrix to the storage of symmetric matrices.
10745 ///
10746 /// # Arguments
10747 ///
10748 /// - `dim_` Dimension of the symmetric matrix that is appended.
10749 /// - `subi_` Row subscript in the triplets.
10750 /// - `subj_` Column subscripts in the triplets.
10751 /// - `valij_` Values of each triplet.
10752 ///
10753 /// # Returns
10754 ///
10755 /// - `idx` Unique index assigned to the inputted matrix.
10756 ///
10757 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendsparsesymmat>
10758 #[allow(unused_parens)]
10759 pub fn append_sparse_sym_mat(&mut self,dim_ : i32,subi_ : &[i32],subj_ : &[i32],valij_ : &[f64]) -> Result<i64,String> {
10760 let nz_ : i64 = std::cmp::min(std::cmp::min(subi_.len(),subj_.len()),valij_.len()) as i64;
10761 let mut __tmp_0 : i64 = i64::default();
10762 if subi_.len() != subj_.len() || subi_.len() != valij_.len() { return Err("append_sparse_sym_mat: Mismatching lengths if subi, subj and valij".to_string()); }
10763 self.handle_res(unsafe { MSK_appendsparsesymmat(self.ptr,dim_,nz_,subi_.as_ptr(),subj_.as_ptr(),valij_.as_ptr(),&mut __tmp_0) },"append_sparse_sym_mat")?;
10764 return Result::Ok(__tmp_0);
10765 } // appendsparsesymmat
10766 /// Appends a general sparse symmetric matrix to the storage of symmetric matrices.
10767 ///
10768 /// # Arguments
10769 ///
10770 /// - `dims_` Dimensions of the symmetric matrixes.
10771 /// - `nz_` Number of nonzeros for each matrix.
10772 /// - `subi_` Row subscript in the triplets.
10773 /// - `subj_` Column subscripts in the triplets.
10774 /// - `valij_` Values of each triplet.
10775 /// - `idx_` Unique index assigned to the inputted matrix.
10776 ///
10777 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendsparsesymmatlist>
10778 #[allow(unused_parens)]
10779 pub fn append_sparse_sym_mat_list(&mut self,dims_ : &[i32],nz_ : &[i64],subi_ : &[i32],subj_ : &[i32],valij_ : &[f64],idx_ : &mut[i64]) -> Result<(),String> {
10780 let num_ : i32 = std::cmp::min(dims_.len(),nz_.len()) as i32;
10781 let mut __tmp_0 : i64 = i64::default();
10782 for __tmp_1 in nz_ { __tmp_0 += __tmp_1; }
10783 if subi_.len() != (__tmp_0).try_into().unwrap() {
10784 return Result::Err("append_sparse_sym_mat_list: Argument 'subi' has the wrong length, expected __tmp_0".to_string());
10785 }
10786 let mut __tmp_2 : i64 = i64::default();
10787 for __tmp_3 in nz_ { __tmp_2 += __tmp_3; }
10788 if subj_.len() != (__tmp_2).try_into().unwrap() {
10789 return Result::Err("append_sparse_sym_mat_list: Argument 'subj' has the wrong length, expected __tmp_2".to_string());
10790 }
10791 let mut __tmp_4 : i64 = i64::default();
10792 for __tmp_5 in nz_ { __tmp_4 += __tmp_5; }
10793 if valij_.len() != (__tmp_4).try_into().unwrap() {
10794 return Result::Err("append_sparse_sym_mat_list: Argument 'valij' has the wrong length, expected __tmp_4".to_string());
10795 }
10796 if idx_.len() != (num_).try_into().unwrap() {
10797 return Result::Err("append_sparse_sym_mat_list: Argument 'idx' has the wrong length, expected num_".to_string());
10798 }
10799 self.handle_res(unsafe { MSK_appendsparsesymmatlist(self.ptr,num_,dims_.as_ptr(),nz_.as_ptr(),subi_.as_ptr(),subj_.as_ptr(),valij_.as_ptr(),idx_.as_mut_ptr()) },"append_sparse_sym_mat_list")?;
10800 return Result::Ok(());
10801 } // appendsparsesymmatlist
10802 /// Appends the vectorized SVEC PSD cone domain.
10803 ///
10804 /// # Arguments
10805 ///
10806 /// - `n_` Dimension of the domain.
10807 ///
10808 /// # Returns
10809 ///
10810 /// - `domidx` Index of the domain.
10811 ///
10812 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendsvecpsdconedomain>
10813 #[allow(unused_parens)]
10814 pub fn append_svec_psd_cone_domain(&mut self,n_ : i64) -> Result<i64,String> {
10815 let mut __tmp_0 : i64 = i64::default();
10816 self.handle_res(unsafe { MSK_appendsvecpsdconedomain(self.ptr,n_,&mut __tmp_0) },"append_svec_psd_cone_domain")?;
10817 return Result::Ok(__tmp_0);
10818 } // appendsvecpsdconedomain
10819 /// Appends a number of variables to the optimization task.
10820 ///
10821 /// # Arguments
10822 ///
10823 /// - `num_` Number of variables which should be appended.
10824 ///
10825 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.appendvars>
10826 #[allow(unused_parens)]
10827 pub fn append_vars(&mut self,num_ : i32) -> Result<(),String> {
10828 self.handle_res(unsafe { MSK_appendvars(self.ptr,num_) },"append_vars")?;
10829 return Result::Ok(());
10830 } // appendvars
10831 /// Get the optimizer log from a remote job.
10832 ///
10833 /// # Arguments
10834 ///
10835 /// - `addr_` Address of the solver server
10836 /// - `accesstoken_` Access token string.
10837 /// - `token_` Job token
10838 ///
10839 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.asyncgetlog>
10840 #[allow(unused_parens)]
10841 pub fn async_get_log(&mut self,addr_ : &str,accesstoken_ : &str,token_ : &str) -> Result<(),String> {
10842 let __tmp_1 = CString::new(addr_).unwrap();
10843 let __tmp_3 = CString::new(accesstoken_).unwrap();
10844 let __tmp_5 = CString::new(token_).unwrap();
10845 self.handle_res(unsafe { MSK_asyncgetlog(self.ptr,__tmp_1.as_ptr(),__tmp_3.as_ptr(),__tmp_5.as_ptr()) },"async_get_log")?;
10846 return Result::Ok(());
10847 } // asyncgetlog
10848 /// Request a solution from a remote job.
10849 ///
10850 /// # Arguments
10851 ///
10852 /// - `address_` Address of the OptServer.
10853 /// - `accesstoken_` Access token.
10854 /// - `token_` The task token.
10855 /// - `resp_` Is the response code from the remote solver.
10856 ///
10857 /// See [Rescode]
10858 /// - `trm_` Is either OK or a termination response code.
10859 ///
10860 /// See [Rescode]
10861 ///
10862 /// # Returns
10863 ///
10864 /// - `respavailable` Indicates if a remote response is available.
10865 ///
10866 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.asyncgetresult>
10867 #[allow(unused_parens)]
10868 pub fn async_get_result(&mut self,address_ : &str,accesstoken_ : &str,token_ : &str,resp_ : & mut i32,trm_ : & mut i32) -> Result<bool,String> {
10869 let __tmp_1 = CString::new(address_).unwrap();
10870 let __tmp_3 = CString::new(accesstoken_).unwrap();
10871 let __tmp_5 = CString::new(token_).unwrap();
10872 let mut __tmp_6 : i32 = 0;
10873 self.handle_res(unsafe { MSK_asyncgetresult(self.ptr,__tmp_1.as_ptr(),__tmp_3.as_ptr(),__tmp_5.as_ptr(),&mut __tmp_6,resp_,trm_) },"async_get_result")?;
10874 return Result::Ok(__tmp_6 != 0);
10875 } // asyncgetresult
10876 /// Offload the optimization task to a solver server in asynchronous mode.
10877 ///
10878 /// # Arguments
10879 ///
10880 /// - `address_` Address of the OptServer.
10881 /// - `accesstoken_` Access token.
10882 ///
10883 /// # Returns
10884 ///
10885 /// - `token` Returns the task token.
10886 ///
10887 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.asyncoptimize>
10888 #[allow(unused_parens)]
10889 pub fn async_optimize(&mut self,address_ : &str,accesstoken_ : &str) -> Result<String,String> {
10890 let __tmp_1 = CString::new(address_).unwrap();
10891 let __tmp_3 = CString::new(accesstoken_).unwrap();
10892 let mut token_ = Vec::new(); token_.resize(65 as usize,0);
10893 self.handle_res(unsafe { MSK_asyncoptimize(self.ptr,__tmp_1.as_ptr(),__tmp_3.as_ptr(),token_.as_mut_ptr()) },"async_optimize")?;
10894 return Result::Ok(String::from_utf8_lossy(&token_[..token_.iter().position(|&c| c == 0).unwrap_or(65 as usize)]).into_owned());
10895 } // asyncoptimize
10896 /// Requests information about the status of the remote job.
10897 ///
10898 /// # Arguments
10899 ///
10900 /// - `address_` Address of the OptServer.
10901 /// - `accesstoken_` Access token.
10902 /// - `token_` The task token.
10903 /// - `resp_` Is the response code from the remote solver.
10904 ///
10905 /// See [Rescode]
10906 /// - `trm_` Is either OK or a termination response code.
10907 ///
10908 /// See [Rescode]
10909 ///
10910 /// # Returns
10911 ///
10912 /// - `respavailable` Indicates if a remote response is available.
10913 ///
10914 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.asyncpoll>
10915 #[allow(unused_parens)]
10916 pub fn async_poll(&mut self,address_ : &str,accesstoken_ : &str,token_ : &str,resp_ : & mut i32,trm_ : & mut i32) -> Result<bool,String> {
10917 let __tmp_1 = CString::new(address_).unwrap();
10918 let __tmp_3 = CString::new(accesstoken_).unwrap();
10919 let __tmp_5 = CString::new(token_).unwrap();
10920 let mut __tmp_6 : i32 = 0;
10921 self.handle_res(unsafe { MSK_asyncpoll(self.ptr,__tmp_1.as_ptr(),__tmp_3.as_ptr(),__tmp_5.as_ptr(),&mut __tmp_6,resp_,trm_) },"async_poll")?;
10922 return Result::Ok(__tmp_6 != 0);
10923 } // asyncpoll
10924 /// Request that the job identified by the token is terminated.
10925 ///
10926 /// # Arguments
10927 ///
10928 /// - `address_` Address of the OptServer.
10929 /// - `accesstoken_` Access token.
10930 /// - `token_` The task token.
10931 ///
10932 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.asyncstop>
10933 #[allow(unused_parens)]
10934 pub fn async_stop(&mut self,address_ : &str,accesstoken_ : &str,token_ : &str) -> Result<(),String> {
10935 let __tmp_1 = CString::new(address_).unwrap();
10936 let __tmp_3 = CString::new(accesstoken_).unwrap();
10937 let __tmp_5 = CString::new(token_).unwrap();
10938 self.handle_res(unsafe { MSK_asyncstop(self.ptr,__tmp_1.as_ptr(),__tmp_3.as_ptr(),__tmp_5.as_ptr()) },"async_stop")?;
10939 return Result::Ok(());
10940 } // asyncstop
10941 /// Computes conditioning information for the basis matrix.
10942 ///
10943 /// # Arguments
10944 ///
10945 /// - `nrmbasis_` An estimate for the 1-norm of the basis.
10946 /// - `nrminvbasis_` An estimate for the 1-norm of the inverse of the basis.
10947 ///
10948 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.basiscond>
10949 #[allow(unused_parens)]
10950 pub fn basis_cond(&mut self,nrmbasis_ : &mut f64,nrminvbasis_ : &mut f64) -> Result<(),String> {
10951 self.handle_res(unsafe { MSK_basiscond(self.ptr,nrmbasis_,nrminvbasis_) },"basis_cond")?;
10952 return Result::Ok(());
10953 } // basiscond
10954 /// Checks the memory allocated by the task.
10955 ///
10956 /// # Arguments
10957 ///
10958 /// - `file_` File from which the function is called.
10959 /// - `line_` Line in the file from which the function is called.
10960 ///
10961 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.checkmemtask>
10962 #[allow(unused_parens)]
10963 pub fn check_mem(&mut self,file_ : &str,line_ : i32) -> Result<(),String> {
10964 let __tmp_1 = CString::new(file_).unwrap();
10965 self.handle_res(unsafe { MSK_checkmemtask(self.ptr,__tmp_1.as_ptr(),line_) },"check_mem")?;
10966 return Result::Ok(());
10967 } // checkmemtask
10968 /// Changes the bounds for one constraint.
10969 ///
10970 /// # Arguments
10971 ///
10972 /// - `i_` Index of the constraint for which the bounds should be changed.
10973 /// - `lower_` If non-zero, then the lower bound is changed, otherwise the upper bound is changed.
10974 /// - `finite_` If non-zero, then the given value is assumed to be finite.
10975 /// - `value_` New value for the bound.
10976 ///
10977 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.chgconbound>
10978 #[allow(unused_parens)]
10979 pub fn chg_con_bound(&mut self,i_ : i32,lower_ : i32,finite_ : i32,value_ : f64) -> Result<(),String> {
10980 self.handle_res(unsafe { MSK_chgconbound(self.ptr,i_,lower_,finite_,value_) },"chg_con_bound")?;
10981 return Result::Ok(());
10982 } // chgconbound
10983 /// Changes the bounds for one variable.
10984 ///
10985 /// # Arguments
10986 ///
10987 /// - `j_` Index of the variable for which the bounds should be changed.
10988 /// - `lower_` If non-zero, then the lower bound is changed, otherwise the upper bound is changed.
10989 /// - `finite_` If non-zero, then the given value is assumed to be finite.
10990 /// - `value_` New value for the bound.
10991 ///
10992 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.chgvarbound>
10993 #[allow(unused_parens)]
10994 pub fn chg_var_bound(&mut self,j_ : i32,lower_ : i32,finite_ : i32,value_ : f64) -> Result<(),String> {
10995 self.handle_res(unsafe { MSK_chgvarbound(self.ptr,j_,lower_,finite_,value_) },"chg_var_bound")?;
10996 return Result::Ok(());
10997 } // chgvarbound
10998 /// Commits all cached problem changes.
10999 ///
11000 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.commitchanges>
11001 #[allow(unused_parens)]
11002 pub fn commit_changes(&mut self) -> Result<(),String> {
11003 self.handle_res(unsafe { MSK_commitchanges(self.ptr) },"commit_changes")?;
11004 return Result::Ok(());
11005 } // commitchanges
11006 /// Undefine a solution and free the memory it uses.
11007 ///
11008 /// # Arguments
11009 ///
11010 /// - `whichsol_` Selects a solution.
11011 ///
11012 /// See [Soltype]
11013 ///
11014 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.deletesolution>
11015 #[allow(unused_parens)]
11016 pub fn delete_solution(&mut self,whichsol_ : i32) -> Result<(),String> {
11017 self.handle_res(unsafe { MSK_deletesolution(self.ptr,whichsol_) },"delete_solution")?;
11018 return Result::Ok(());
11019 } // deletesolution
11020 /// Performs sensitivity analysis on objective coefficients.
11021 ///
11022 /// # Arguments
11023 ///
11024 /// - `subj_` Indexes of objective coefficients to analyze.
11025 /// - `leftpricej_` Left shadow prices for requested coefficients.
11026 /// - `rightpricej_` Right shadow prices for requested coefficients.
11027 /// - `leftrangej_` Left range for requested coefficients.
11028 /// - `rightrangej_` Right range for requested coefficients.
11029 ///
11030 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.dualsensitivity>
11031 #[allow(unused_parens)]
11032 pub fn dual_sensitivity(&self,subj_ : &[i32],leftpricej_ : &mut[f64],rightpricej_ : &mut[f64],leftrangej_ : &mut[f64],rightrangej_ : &mut[f64]) -> Result<(),String> {
11033 let numj_ : i32 = subj_.len() as i32;
11034 if leftpricej_.len() > 0 && leftpricej_.len() != (numj_).try_into().unwrap() {
11035 return Result::Err("dual_sensitivity: Argument 'leftpricej' has the wrong length, expected numj_".to_string());
11036 }
11037 if rightpricej_.len() > 0 && rightpricej_.len() != (numj_).try_into().unwrap() {
11038 return Result::Err("dual_sensitivity: Argument 'rightpricej' has the wrong length, expected numj_".to_string());
11039 }
11040 if leftrangej_.len() > 0 && leftrangej_.len() != (numj_).try_into().unwrap() {
11041 return Result::Err("dual_sensitivity: Argument 'leftrangej' has the wrong length, expected numj_".to_string());
11042 }
11043 if rightrangej_.len() > 0 && rightrangej_.len() != (numj_).try_into().unwrap() {
11044 return Result::Err("dual_sensitivity: Argument 'rightrangej' has the wrong length, expected numj_".to_string());
11045 }
11046 self.handle_res(unsafe { MSK_dualsensitivity(self.ptr,numj_,subj_.as_ptr(),if leftpricej_.len() == 0 { std::ptr::null_mut() } else { leftpricej_.as_mut_ptr() },if rightpricej_.len() == 0 { std::ptr::null_mut() } else { rightpricej_.as_mut_ptr() },if leftrangej_.len() == 0 { std::ptr::null_mut() } else { leftrangej_.as_mut_ptr() },if rightrangej_.len() == 0 { std::ptr::null_mut() } else { rightrangej_.as_mut_ptr() }) },"dual_sensitivity")?;
11047 return Result::Ok(());
11048 } // dualsensitivity
11049 /// Clears a row in barF
11050 ///
11051 /// # Arguments
11052 ///
11053 /// - `afeidx_` Row index of barF.
11054 ///
11055 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.emptyafebarfrow>
11056 #[allow(unused_parens)]
11057 pub fn empty_afe_barf_row(&mut self,afeidx_ : i64) -> Result<(),String> {
11058 self.handle_res(unsafe { MSK_emptyafebarfrow(self.ptr,afeidx_) },"empty_afe_barf_row")?;
11059 return Result::Ok(());
11060 } // emptyafebarfrow
11061 /// Clears rows in barF.
11062 ///
11063 /// # Arguments
11064 ///
11065 /// - `afeidxlist_` Indices of rows in barF to clear.
11066 ///
11067 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.emptyafebarfrowlist>
11068 #[allow(unused_parens)]
11069 pub fn empty_afe_barf_row_list(&mut self,afeidxlist_ : &[i64]) -> Result<(),String> {
11070 let numafeidx_ : i64 = afeidxlist_.len() as i64;
11071 self.handle_res(unsafe { MSK_emptyafebarfrowlist(self.ptr,numafeidx_,afeidxlist_.as_ptr()) },"empty_afe_barf_row_list")?;
11072 return Result::Ok(());
11073 } // emptyafebarfrowlist
11074 /// Clears a column in F.
11075 ///
11076 /// # Arguments
11077 ///
11078 /// - `varidx_` Variable index.
11079 ///
11080 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.emptyafefcol>
11081 #[allow(unused_parens)]
11082 pub fn empty_afe_f_col(&mut self,varidx_ : i32) -> Result<(),String> {
11083 self.handle_res(unsafe { MSK_emptyafefcol(self.ptr,varidx_) },"empty_afe_f_col")?;
11084 return Result::Ok(());
11085 } // emptyafefcol
11086 /// Clears columns in F.
11087 ///
11088 /// # Arguments
11089 ///
11090 /// - `varidx_` Indices of variables in F to clear.
11091 ///
11092 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.emptyafefcollist>
11093 #[allow(unused_parens)]
11094 pub fn empty_afe_f_col_list(&mut self,varidx_ : &[i32]) -> Result<(),String> {
11095 let numvaridx_ : i64 = varidx_.len() as i64;
11096 self.handle_res(unsafe { MSK_emptyafefcollist(self.ptr,numvaridx_,varidx_.as_ptr()) },"empty_afe_f_col_list")?;
11097 return Result::Ok(());
11098 } // emptyafefcollist
11099 /// Clears a row in F.
11100 ///
11101 /// # Arguments
11102 ///
11103 /// - `afeidx_` Row index.
11104 ///
11105 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.emptyafefrow>
11106 #[allow(unused_parens)]
11107 pub fn empty_afe_f_row(&mut self,afeidx_ : i64) -> Result<(),String> {
11108 self.handle_res(unsafe { MSK_emptyafefrow(self.ptr,afeidx_) },"empty_afe_f_row")?;
11109 return Result::Ok(());
11110 } // emptyafefrow
11111 /// Clears rows in F.
11112 ///
11113 /// # Arguments
11114 ///
11115 /// - `afeidx_` Indices of rows in F to clear.
11116 ///
11117 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.emptyafefrowlist>
11118 #[allow(unused_parens)]
11119 pub fn empty_afe_f_row_list(&mut self,afeidx_ : &[i64]) -> Result<(),String> {
11120 let numafeidx_ : i64 = afeidx_.len() as i64;
11121 self.handle_res(unsafe { MSK_emptyafefrowlist(self.ptr,numafeidx_,afeidx_.as_ptr()) },"empty_afe_f_row_list")?;
11122 return Result::Ok(());
11123 } // emptyafefrowlist
11124 /// Evaluates the activity of an affine conic constraint.
11125 ///
11126 /// # Arguments
11127 ///
11128 /// - `whichsol_` Selects a solution.
11129 ///
11130 /// See [Soltype]
11131 /// - `accidx_` The index of the affine conic constraint.
11132 /// - `activity_` The activity of the affine conic constraint. The array should have length equal to the dimension of the constraint.
11133 ///
11134 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.evaluateacc>
11135 #[allow(unused_parens)]
11136 pub fn evaluate_acc(&self,whichsol_ : i32,accidx_ : i64,activity_ : &mut[f64]) -> Result<(),String> {
11137 let mut __tmp_0 : i64 = i64::default();
11138 let __tmp_1 = unsafe { MSK_getaccn(self.ptr,accidx_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getaccn")?;
11139 if activity_.len() != (__tmp_0).try_into().unwrap() {
11140 return Result::Err("evaluate_acc: Argument 'activity' has the wrong length, expected __tmp_0".to_string());
11141 }
11142 self.handle_res(unsafe { MSK_evaluateacc(self.ptr,whichsol_,accidx_,activity_.as_mut_ptr()) },"evaluate_acc")?;
11143 return Result::Ok(());
11144 } // evaluateacc
11145 /// Evaluates the activities of all affine conic constraints.
11146 ///
11147 /// # Arguments
11148 ///
11149 /// - `whichsol_` Selects a solution.
11150 ///
11151 /// See [Soltype]
11152 /// - `activity_` The activity of affine conic constraints. The array should have length equal to the sum of dimensions of all affine conic constraints.
11153 ///
11154 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.evaluateaccs>
11155 #[allow(unused_parens)]
11156 pub fn evaluate_accs(&self,whichsol_ : i32,activity_ : &mut[f64]) -> Result<(),String> {
11157 let mut __tmp_0 : i64 = i64::default();
11158 let __tmp_1 = unsafe { MSK_getaccntot(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getaccntot")?;
11159 if activity_.len() != (__tmp_0).try_into().unwrap() {
11160 return Result::Err("evaluate_accs: Argument 'activity' has the wrong length, expected __tmp_0".to_string());
11161 }
11162 self.handle_res(unsafe { MSK_evaluateaccs(self.ptr,whichsol_,activity_.as_mut_ptr()) },"evaluate_accs")?;
11163 return Result::Ok(());
11164 } // evaluateaccs
11165 /// Generates systematic names for affine conic constraints.
11166 ///
11167 /// # Arguments
11168 ///
11169 /// - `sub_` Indexes of the affine conic constraints.
11170 /// - `fmt_` The variable name formatting string.
11171 /// - `dims_` Dimensions in the shape.
11172 /// - `sp_` Items that should be named.
11173 /// - `namedaxisidxs_` List if named index axes
11174 /// - `names_` All axis names.
11175 ///
11176 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.generateaccnames>
11177 #[allow(unused_parens)]
11178 pub fn generate_acc_names(&mut self,sub_ : &[i64],fmt_ : &str,dims_ : &[i32],sp_ : &[i64],namedaxisidxs_ : &[i32],names_ : &[String]) -> Result<(),String> {
11179 let num_ : i64 = sub_.len() as i64;
11180 let __tmp_1 = CString::new(fmt_).unwrap();
11181 let ndims_ : i32 = dims_.len() as i32;
11182 if sp_.len() > 0 && sp_.len() != (num_).try_into().unwrap() {
11183 return Result::Err("generate_acc_names: Argument 'sp' has the wrong length, expected num_".to_string());
11184 }
11185 let numnamedaxis_ : i32 = namedaxisidxs_.len() as i32;
11186 let numnames_ : i64 = names_.len() as i64;
11187 let cstr_names : Vec<CString> = names_.iter().map(|s| CString::new(s.as_str()).unwrap()).collect();
11188 let cptr_names : Vec<* const libc::c_char> = cstr_names.iter().map(|s| s.as_ptr()).collect();
11189 self.handle_res(unsafe { MSK_generateaccnames(self.ptr,num_,sub_.as_ptr(),__tmp_1.as_ptr(),ndims_,dims_.as_ptr(),if sp_.len() == 0 { std::ptr::null() } else { sp_.as_ptr() },numnamedaxis_,if namedaxisidxs_.len() == 0 { std::ptr::null() } else { namedaxisidxs_.as_ptr() },numnames_,cptr_names.as_ptr()) },"generate_acc_names")?;
11190 return Result::Ok(());
11191 } // generateaccnames
11192 /// Internal.
11193 ///
11194 /// # Arguments
11195 ///
11196 /// - `subj_` Indexes of the variables.
11197 /// - `fmt_` The variable name formatting string.
11198 /// - `dims_` Dimensions in the shape.
11199 /// - `sp_` Items that should be named.
11200 /// - `namedaxisidxs_` List if named index axes
11201 /// - `names_` All axis names.
11202 ///
11203 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.generatebarvarnames>
11204 #[allow(unused_parens)]
11205 pub fn generate_barvar_names(&mut self,subj_ : &[i32],fmt_ : &str,dims_ : &[i32],sp_ : &[i64],namedaxisidxs_ : &[i32],names_ : &[String]) -> Result<(),String> {
11206 let num_ : i32 = subj_.len() as i32;
11207 let __tmp_1 = CString::new(fmt_).unwrap();
11208 let ndims_ : i32 = dims_.len() as i32;
11209 if sp_.len() > 0 && sp_.len() != (num_).try_into().unwrap() {
11210 return Result::Err("generate_barvar_names: Argument 'sp' has the wrong length, expected num_".to_string());
11211 }
11212 let numnamedaxis_ : i32 = namedaxisidxs_.len() as i32;
11213 let numnames_ : i64 = names_.len() as i64;
11214 let cstr_names : Vec<CString> = names_.iter().map(|s| CString::new(s.as_str()).unwrap()).collect();
11215 let cptr_names : Vec<* const libc::c_char> = cstr_names.iter().map(|s| s.as_ptr()).collect();
11216 self.handle_res(unsafe { MSK_generatebarvarnames(self.ptr,num_,subj_.as_ptr(),__tmp_1.as_ptr(),ndims_,dims_.as_ptr(),if sp_.len() == 0 { std::ptr::null() } else { sp_.as_ptr() },numnamedaxis_,if namedaxisidxs_.len() == 0 { std::ptr::null() } else { namedaxisidxs_.as_ptr() },numnames_,cptr_names.as_ptr()) },"generate_barvar_names")?;
11217 return Result::Ok(());
11218 } // generatebarvarnames
11219 /// Generates systematic names for cone.
11220 ///
11221 /// # Arguments
11222 ///
11223 /// - `subk_` Indexes of the cone.
11224 /// - `fmt_` The cone name formatting string.
11225 /// - `dims_` Dimensions in the shape.
11226 /// - `sp_` Items that should be named.
11227 /// - `namedaxisidxs_` List if named index axes
11228 /// - `names_` All axis names.
11229 ///
11230 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.generateconenames>
11231 #[allow(unused_parens)]
11232 pub fn generate_cone_names(&mut self,subk_ : &[i32],fmt_ : &str,dims_ : &[i32],sp_ : &[i64],namedaxisidxs_ : &[i32],names_ : &[String]) -> Result<(),String> {
11233 let num_ : i32 = subk_.len() as i32;
11234 let __tmp_1 = CString::new(fmt_).unwrap();
11235 let ndims_ : i32 = dims_.len() as i32;
11236 if sp_.len() > 0 && sp_.len() != (num_).try_into().unwrap() {
11237 return Result::Err("generate_cone_names: Argument 'sp' has the wrong length, expected num_".to_string());
11238 }
11239 let numnamedaxis_ : i32 = namedaxisidxs_.len() as i32;
11240 let numnames_ : i64 = names_.len() as i64;
11241 let cstr_names : Vec<CString> = names_.iter().map(|s| CString::new(s.as_str()).unwrap()).collect();
11242 let cptr_names : Vec<* const libc::c_char> = cstr_names.iter().map(|s| s.as_ptr()).collect();
11243 self.handle_res(unsafe { MSK_generateconenames(self.ptr,num_,subk_.as_ptr(),__tmp_1.as_ptr(),ndims_,dims_.as_ptr(),if sp_.len() == 0 { std::ptr::null() } else { sp_.as_ptr() },numnamedaxis_,if namedaxisidxs_.len() == 0 { std::ptr::null() } else { namedaxisidxs_.as_ptr() },numnames_,cptr_names.as_ptr()) },"generate_cone_names")?;
11244 return Result::Ok(());
11245 } // generateconenames
11246 /// Internal.
11247 ///
11248 /// # Arguments
11249 ///
11250 /// - `subi_` Indexes of the constraints.
11251 /// - `fmt_` The constraint name formatting string.
11252 /// - `dims_` Dimensions in the shape.
11253 /// - `sp_` Items that should be named.
11254 /// - `namedaxisidxs_` List if named index axes
11255 /// - `names_` All axis names.
11256 ///
11257 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.generateconnames>
11258 #[allow(unused_parens)]
11259 pub fn generate_con_names(&mut self,subi_ : &[i32],fmt_ : &str,dims_ : &[i32],sp_ : &[i64],namedaxisidxs_ : &[i32],names_ : &[String]) -> Result<(),String> {
11260 let num_ : i32 = subi_.len() as i32;
11261 let __tmp_1 = CString::new(fmt_).unwrap();
11262 let ndims_ : i32 = dims_.len() as i32;
11263 if sp_.len() > 0 && sp_.len() != (num_).try_into().unwrap() {
11264 return Result::Err("generate_con_names: Argument 'sp' has the wrong length, expected num_".to_string());
11265 }
11266 let numnamedaxis_ : i32 = namedaxisidxs_.len() as i32;
11267 let numnames_ : i64 = names_.len() as i64;
11268 let cstr_names : Vec<CString> = names_.iter().map(|s| CString::new(s.as_str()).unwrap()).collect();
11269 let cptr_names : Vec<* const libc::c_char> = cstr_names.iter().map(|s| s.as_ptr()).collect();
11270 self.handle_res(unsafe { MSK_generateconnames(self.ptr,num_,subi_.as_ptr(),__tmp_1.as_ptr(),ndims_,dims_.as_ptr(),if sp_.len() == 0 { std::ptr::null() } else { sp_.as_ptr() },numnamedaxis_,if namedaxisidxs_.len() == 0 { std::ptr::null() } else { namedaxisidxs_.as_ptr() },numnames_,cptr_names.as_ptr()) },"generate_con_names")?;
11271 return Result::Ok(());
11272 } // generateconnames
11273 /// Generates systematic names for affine conic constraints.
11274 ///
11275 /// # Arguments
11276 ///
11277 /// - `sub_` Indexes of the disjunctive constraints.
11278 /// - `fmt_` The variable name formatting string.
11279 /// - `dims_` Dimensions in the shape.
11280 /// - `sp_` Items that should be named.
11281 /// - `namedaxisidxs_` List if named index axes
11282 /// - `names_` All axis names.
11283 ///
11284 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.generatedjcnames>
11285 #[allow(unused_parens)]
11286 pub fn generate_djc_names(&mut self,sub_ : &[i64],fmt_ : &str,dims_ : &[i32],sp_ : &[i64],namedaxisidxs_ : &[i32],names_ : &[String]) -> Result<(),String> {
11287 let num_ : i64 = sub_.len() as i64;
11288 let __tmp_1 = CString::new(fmt_).unwrap();
11289 let ndims_ : i32 = dims_.len() as i32;
11290 if sp_.len() > 0 && sp_.len() != (num_).try_into().unwrap() {
11291 return Result::Err("generate_djc_names: Argument 'sp' has the wrong length, expected num_".to_string());
11292 }
11293 let numnamedaxis_ : i32 = namedaxisidxs_.len() as i32;
11294 let numnames_ : i64 = names_.len() as i64;
11295 let cstr_names : Vec<CString> = names_.iter().map(|s| CString::new(s.as_str()).unwrap()).collect();
11296 let cptr_names : Vec<* const libc::c_char> = cstr_names.iter().map(|s| s.as_ptr()).collect();
11297 self.handle_res(unsafe { MSK_generatedjcnames(self.ptr,num_,sub_.as_ptr(),__tmp_1.as_ptr(),ndims_,dims_.as_ptr(),if sp_.len() == 0 { std::ptr::null() } else { sp_.as_ptr() },numnamedaxis_,if namedaxisidxs_.len() == 0 { std::ptr::null() } else { namedaxisidxs_.as_ptr() },numnames_,cptr_names.as_ptr()) },"generate_djc_names")?;
11298 return Result::Ok(());
11299 } // generatedjcnames
11300 /// Internal.
11301 ///
11302 /// # Arguments
11303 ///
11304 /// - `subj_` Indexes of the variables.
11305 /// - `fmt_` The variable name formatting string.
11306 /// - `dims_` Dimensions in the shape.
11307 /// - `sp_` Items that should be named.
11308 /// - `namedaxisidxs_` List if named index axes
11309 /// - `names_` All axis names.
11310 ///
11311 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.generatevarnames>
11312 #[allow(unused_parens)]
11313 pub fn generate_var_names(&mut self,subj_ : &[i32],fmt_ : &str,dims_ : &[i32],sp_ : &[i64],namedaxisidxs_ : &[i32],names_ : &[String]) -> Result<(),String> {
11314 let num_ : i32 = subj_.len() as i32;
11315 let __tmp_1 = CString::new(fmt_).unwrap();
11316 let ndims_ : i32 = dims_.len() as i32;
11317 if sp_.len() > 0 && sp_.len() != (num_).try_into().unwrap() {
11318 return Result::Err("generate_var_names: Argument 'sp' has the wrong length, expected num_".to_string());
11319 }
11320 let numnamedaxis_ : i32 = namedaxisidxs_.len() as i32;
11321 let numnames_ : i64 = names_.len() as i64;
11322 let cstr_names : Vec<CString> = names_.iter().map(|s| CString::new(s.as_str()).unwrap()).collect();
11323 let cptr_names : Vec<* const libc::c_char> = cstr_names.iter().map(|s| s.as_ptr()).collect();
11324 self.handle_res(unsafe { MSK_generatevarnames(self.ptr,num_,subj_.as_ptr(),__tmp_1.as_ptr(),ndims_,dims_.as_ptr(),if sp_.len() == 0 { std::ptr::null() } else { sp_.as_ptr() },numnamedaxis_,if namedaxisidxs_.len() == 0 { std::ptr::null() } else { namedaxisidxs_.as_ptr() },numnames_,cptr_names.as_ptr()) },"generate_var_names")?;
11325 return Result::Ok(());
11326 } // generatevarnames
11327 /// Obtains the list of affine expressions appearing in the affine conic constraint.
11328 ///
11329 /// # Arguments
11330 ///
11331 /// - `accidx_` Index of the affine conic constraint.
11332 /// - `afeidxlist_` List of indexes of affine expressions appearing in the constraint.
11333 ///
11334 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccafeidxlist>
11335 #[allow(unused_parens)]
11336 pub fn get_acc_afe_idx_list(&self,accidx_ : i64,afeidxlist_ : &mut[i64]) -> Result<(),String> {
11337 let mut __tmp_0 : i64 = i64::default();
11338 let __tmp_1 = unsafe { MSK_getaccn(self.ptr,accidx_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getaccn")?;
11339 if afeidxlist_.len() != (__tmp_0).try_into().unwrap() {
11340 return Result::Err("get_acc_afe_idx_list: Argument 'afeidxlist' has the wrong length, expected __tmp_0".to_string());
11341 }
11342 self.handle_res(unsafe { MSK_getaccafeidxlist(self.ptr,accidx_,afeidxlist_.as_mut_ptr()) },"get_acc_afe_idx_list")?;
11343 return Result::Ok(());
11344 } // getaccafeidxlist
11345 /// Obtains the additional constant term vector appearing in the affine conic constraint.
11346 ///
11347 /// # Arguments
11348 ///
11349 /// - `accidx_` Index of the affine conic constraint.
11350 /// - `b_` The vector b appearing in the constraint.
11351 ///
11352 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccb>
11353 #[allow(unused_parens)]
11354 pub fn get_acc_b(&self,accidx_ : i64,b_ : &mut[f64]) -> Result<(),String> {
11355 let mut __tmp_0 : i64 = i64::default();
11356 let __tmp_1 = unsafe { MSK_getaccn(self.ptr,accidx_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getaccn")?;
11357 if b_.len() != (__tmp_0).try_into().unwrap() {
11358 return Result::Err("get_acc_b: Argument 'b' has the wrong length, expected __tmp_0".to_string());
11359 }
11360 self.handle_res(unsafe { MSK_getaccb(self.ptr,accidx_,b_.as_mut_ptr()) },"get_acc_b")?;
11361 return Result::Ok(());
11362 } // getaccb
11363 /// Obtains barF, implied by the ACCs, in block triplet form.
11364 ///
11365 /// # Arguments
11366 ///
11367 /// - `acc_afe_` Index of the AFE within the concatenated list of AFEs in ACCs.
11368 /// - `bar_var_` Symmetric matrix variable index.
11369 /// - `blk_row_` Block row index.
11370 /// - `blk_col_` Block column index.
11371 /// - `blk_val_` The numerical value associated with each block triplet.
11372 ///
11373 /// # Returns
11374 ///
11375 /// - `numtrip` Number of elements in the block triplet form.
11376 ///
11377 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccbarfblocktriplet>
11378 #[allow(unused_parens)]
11379 pub fn get_acc_barf_block_triplet(&self,acc_afe_ : &mut[i64],bar_var_ : &mut[i32],blk_row_ : &mut[i32],blk_col_ : &mut[i32],blk_val_ : &mut[f64]) -> Result<i64,String> {
11380 let mut __tmp_0 : i64 = i64::default();
11381 let __tmp_1 = unsafe { MSK_getaccbarfnumblocktriplets(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getaccbarfnumblocktriplets")?;
11382 let maxnumtrip_ : i64 = __tmp_0;
11383 let mut __tmp_2 : i64 = i64::default();
11384 if acc_afe_.len() != (maxnumtrip_).try_into().unwrap() {
11385 return Result::Err("get_acc_barf_block_triplet: Argument 'acc_afe' has the wrong length, expected maxnumtrip_".to_string());
11386 }
11387 if bar_var_.len() != (maxnumtrip_).try_into().unwrap() {
11388 return Result::Err("get_acc_barf_block_triplet: Argument 'bar_var' has the wrong length, expected maxnumtrip_".to_string());
11389 }
11390 if blk_row_.len() != (maxnumtrip_).try_into().unwrap() {
11391 return Result::Err("get_acc_barf_block_triplet: Argument 'blk_row' has the wrong length, expected maxnumtrip_".to_string());
11392 }
11393 if blk_col_.len() != (maxnumtrip_).try_into().unwrap() {
11394 return Result::Err("get_acc_barf_block_triplet: Argument 'blk_col' has the wrong length, expected maxnumtrip_".to_string());
11395 }
11396 if blk_val_.len() != (maxnumtrip_).try_into().unwrap() {
11397 return Result::Err("get_acc_barf_block_triplet: Argument 'blk_val' has the wrong length, expected maxnumtrip_".to_string());
11398 }
11399 self.handle_res(unsafe { MSK_getaccbarfblocktriplet(self.ptr,maxnumtrip_,&mut __tmp_2,acc_afe_.as_mut_ptr(),bar_var_.as_mut_ptr(),blk_row_.as_mut_ptr(),blk_col_.as_mut_ptr(),blk_val_.as_mut_ptr()) },"get_acc_barf_block_triplet")?;
11400 return Result::Ok(__tmp_2);
11401 } // getaccbarfblocktriplet
11402 /// Obtains an upper bound on the number of elements in the block triplet form of barf, as used within the ACCs.
11403 ///
11404 /// # Returns
11405 ///
11406 /// - `numtrip` An upper bound on the number of elements in the block triplet form of barf, as used within the ACCs.
11407 ///
11408 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccbarfnumblocktriplets>
11409 #[allow(unused_parens)]
11410 pub fn get_acc_barf_num_block_triplets(&self) -> Result<i64,String> {
11411 let mut __tmp_0 : i64 = i64::default();
11412 self.handle_res(unsafe { MSK_getaccbarfnumblocktriplets(self.ptr,&mut __tmp_0) },"get_acc_barf_num_block_triplets")?;
11413 return Result::Ok(__tmp_0);
11414 } // getaccbarfnumblocktriplets
11415 /// Obtains the domain appearing in the affine conic constraint.
11416 ///
11417 /// # Arguments
11418 ///
11419 /// - `accidx_` The index of the affine conic constraint.
11420 ///
11421 /// # Returns
11422 ///
11423 /// - `domidx` The index of domain in the affine conic constraint.
11424 ///
11425 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccdomain>
11426 #[allow(unused_parens)]
11427 pub fn get_acc_domain(&mut self,accidx_ : i64) -> Result<i64,String> {
11428 let mut __tmp_0 : i64 = i64::default();
11429 self.handle_res(unsafe { MSK_getaccdomain(self.ptr,accidx_,&mut __tmp_0) },"get_acc_domain")?;
11430 return Result::Ok(__tmp_0);
11431 } // getaccdomain
11432 /// Obtains the doty vector for an affine conic constraint.
11433 ///
11434 /// # Arguments
11435 ///
11436 /// - `whichsol_` Selects a solution.
11437 ///
11438 /// See [Soltype]
11439 /// - `accidx_` The index of the affine conic constraint.
11440 /// - `doty_` The dual values for this affine conic constraint. The array should have length equal to the dimension of the constraint.
11441 ///
11442 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccdoty>
11443 #[allow(unused_parens)]
11444 pub fn get_acc_dot_y(&self,whichsol_ : i32,accidx_ : i64,doty_ : &mut[f64]) -> Result<(),String> {
11445 let mut __tmp_0 : i64 = i64::default();
11446 let __tmp_1 = unsafe { MSK_getaccn(self.ptr,accidx_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getaccn")?;
11447 if doty_.len() != (__tmp_0).try_into().unwrap() {
11448 return Result::Err("get_acc_dot_y: Argument 'doty' has the wrong length, expected __tmp_0".to_string());
11449 }
11450 self.handle_res(unsafe { MSK_getaccdoty(self.ptr,whichsol_,accidx_,doty_.as_mut_ptr()) },"get_acc_dot_y")?;
11451 return Result::Ok(());
11452 } // getaccdoty
11453 /// Obtains the doty vector for a solution.
11454 ///
11455 /// # Arguments
11456 ///
11457 /// - `whichsol_` Selects a solution.
11458 ///
11459 /// See [Soltype]
11460 /// - `doty_` The dual values of affine conic constraints. The array should have length equal to the sum of dimensions of all affine conic constraints.
11461 ///
11462 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccdotys>
11463 #[allow(unused_parens)]
11464 pub fn get_acc_dot_y_s(&self,whichsol_ : i32,doty_ : &mut[f64]) -> Result<(),String> {
11465 let mut __tmp_0 : i64 = i64::default();
11466 let __tmp_1 = unsafe { MSK_getaccntot(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getaccntot")?;
11467 if doty_.len() != (__tmp_0).try_into().unwrap() {
11468 return Result::Err("get_acc_dot_y_s: Argument 'doty' has the wrong length, expected __tmp_0".to_string());
11469 }
11470 self.handle_res(unsafe { MSK_getaccdotys(self.ptr,whichsol_,doty_.as_mut_ptr()) },"get_acc_dot_y_s")?;
11471 return Result::Ok(());
11472 } // getaccdotys
11473 /// Obtains the total number of nonzeros in the ACC implied F matrix.
11474 ///
11475 /// # Returns
11476 ///
11477 /// - `accfnnz` Number of nonzeros in the F matrix implied by ACCs.
11478 ///
11479 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccfnumnz>
11480 #[allow(unused_parens)]
11481 pub fn get_acc_f_numnz(&mut self) -> Result<i64,String> {
11482 let mut __tmp_0 : i64 = i64::default();
11483 self.handle_res(unsafe { MSK_getaccfnumnz(self.ptr,&mut __tmp_0) },"get_acc_f_numnz")?;
11484 return Result::Ok(__tmp_0);
11485 } // getaccfnumnz
11486 /// Obtains the F matrix (implied by the AFE ordering within the ACCs) in triplet format.
11487 ///
11488 /// # Arguments
11489 ///
11490 /// - `frow_` Row indices of nonzeros in the implied F matrix.
11491 /// - `fcol_` Column indices of nonzeros in the implied F matrix.
11492 /// - `fval_` Values of nonzero entries in the implied F matrix.
11493 ///
11494 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccftrip>
11495 #[allow(unused_parens)]
11496 pub fn get_acc_f_trip(&mut self,frow_ : &mut[i64],fcol_ : &mut[i32],fval_ : &mut[f64]) -> Result<(),String> {
11497 let mut __tmp_0 : i64 = i64::default();
11498 let __tmp_1 = unsafe { MSK_getaccfnumnz(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getaccfnumnz")?;
11499 if frow_.len() != (__tmp_0).try_into().unwrap() {
11500 return Result::Err("get_acc_f_trip: Argument 'frow' has the wrong length, expected __tmp_0".to_string());
11501 }
11502 let mut __tmp_2 : i64 = i64::default();
11503 let __tmp_3 = unsafe { MSK_getaccfnumnz(self.ptr,&mut __tmp_2) };let _ = self.handle_res(__tmp_3,"getaccfnumnz")?;
11504 if fcol_.len() != (__tmp_2).try_into().unwrap() {
11505 return Result::Err("get_acc_f_trip: Argument 'fcol' has the wrong length, expected __tmp_2".to_string());
11506 }
11507 let mut __tmp_4 : i64 = i64::default();
11508 let __tmp_5 = unsafe { MSK_getaccfnumnz(self.ptr,&mut __tmp_4) };let _ = self.handle_res(__tmp_5,"getaccfnumnz")?;
11509 if fval_.len() != (__tmp_4).try_into().unwrap() {
11510 return Result::Err("get_acc_f_trip: Argument 'fval' has the wrong length, expected __tmp_4".to_string());
11511 }
11512 self.handle_res(unsafe { MSK_getaccftrip(self.ptr,frow_.as_mut_ptr(),fcol_.as_mut_ptr(),fval_.as_mut_ptr()) },"get_acc_f_trip")?;
11513 return Result::Ok(());
11514 } // getaccftrip
11515 /// The g vector as used within the ACCs.
11516 ///
11517 /// # Arguments
11518 ///
11519 /// - `g_` The g vector as used within the ACCs.
11520 ///
11521 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccgvector>
11522 #[allow(unused_parens)]
11523 pub fn get_acc_g_vector(&self,g_ : &mut[f64]) -> Result<(),String> {
11524 let mut __tmp_0 : i64 = i64::default();
11525 let __tmp_1 = unsafe { MSK_getaccntot(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getaccntot")?;
11526 if g_.len() > 0 && g_.len() != (__tmp_0).try_into().unwrap() {
11527 return Result::Err("get_acc_g_vector: Argument 'g' has the wrong length, expected __tmp_0".to_string());
11528 }
11529 self.handle_res(unsafe { MSK_getaccgvector(self.ptr,if g_.len() == 0 { std::ptr::null_mut() } else { g_.as_mut_ptr() }) },"get_acc_g_vector")?;
11530 return Result::Ok(());
11531 } // getaccgvector
11532 /// Obtains the dimension of the affine conic constraint.
11533 ///
11534 /// # Arguments
11535 ///
11536 /// - `accidx_` The index of the affine conic constraint.
11537 ///
11538 /// # Returns
11539 ///
11540 /// - `n` The dimension of the affine conic constraint (equal to the dimension of its domain).
11541 ///
11542 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccn>
11543 #[allow(unused_parens)]
11544 pub fn get_acc_n(&mut self,accidx_ : i64) -> Result<i64,String> {
11545 let mut __tmp_0 : i64 = i64::default();
11546 self.handle_res(unsafe { MSK_getaccn(self.ptr,accidx_,&mut __tmp_0) },"get_acc_n")?;
11547 return Result::Ok(__tmp_0);
11548 } // getaccn
11549 /// Obtains the name of an affine conic constraint.
11550 ///
11551 /// # Arguments
11552 ///
11553 /// - `accidx_` Index of an affine conic constraint.
11554 ///
11555 /// # Returns
11556 ///
11557 /// - `name` Returns the required name.
11558 ///
11559 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccname>
11560 #[allow(unused_parens)]
11561 pub fn get_acc_name(&self,accidx_ : i64) -> Result<String,String> {
11562 let mut __tmp_0 : i32 = i32::default();
11563 let __tmp_1 = unsafe { MSK_getaccnamelen(self.ptr,accidx_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getaccnamelen")?;
11564 let sizename_ : i32 = (1+__tmp_0);
11565 let mut name_ = Vec::new(); name_.resize(sizename_ as usize,0);
11566 self.handle_res(unsafe { MSK_getaccname(self.ptr,accidx_,sizename_,name_.as_mut_ptr()) },"get_acc_name")?;
11567 return Result::Ok(String::from_utf8_lossy(&name_[..name_.iter().position(|&c| c == 0).unwrap_or(sizename_ as usize)]).into_owned());
11568 } // getaccname
11569 /// Obtains the length of the name of an affine conic constraint.
11570 ///
11571 /// # Arguments
11572 ///
11573 /// - `accidx_` Index of an affine conic constraint.
11574 ///
11575 /// # Returns
11576 ///
11577 /// - `len` Returns the length of the indicated name.
11578 ///
11579 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccnamelen>
11580 #[allow(unused_parens)]
11581 pub fn get_acc_name_len(&self,accidx_ : i64) -> Result<i32,String> {
11582 let mut __tmp_0 : i32 = i32::default();
11583 self.handle_res(unsafe { MSK_getaccnamelen(self.ptr,accidx_,&mut __tmp_0) },"get_acc_name_len")?;
11584 return Result::Ok(__tmp_0);
11585 } // getaccnamelen
11586 /// Obtains the total dimension of all affine conic constraints.
11587 ///
11588 /// # Returns
11589 ///
11590 /// - `n` The total dimension of all affine conic constraints.
11591 ///
11592 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccntot>
11593 #[allow(unused_parens)]
11594 pub fn get_acc_n_tot(&mut self) -> Result<i64,String> {
11595 let mut __tmp_0 : i64 = i64::default();
11596 self.handle_res(unsafe { MSK_getaccntot(self.ptr,&mut __tmp_0) },"get_acc_n_tot")?;
11597 return Result::Ok(__tmp_0);
11598 } // getaccntot
11599 /// Obtains full data of all affine conic constraints.
11600 ///
11601 /// # Arguments
11602 ///
11603 /// - `domidxlist_` The list of domains appearing in all affine conic constraints.
11604 /// - `afeidxlist_` The concatenation of index lists of affine expressions appearing in all affine conic constraints.
11605 /// - `b_` The concatenation of vectors b appearing in all affine conic constraints.
11606 ///
11607 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaccs>
11608 #[allow(unused_parens)]
11609 pub fn get_accs(&self,domidxlist_ : &mut[i64],afeidxlist_ : &mut[i64],b_ : &mut[f64]) -> Result<(),String> {
11610 let mut __tmp_0 : i64 = i64::default();
11611 let __tmp_1 = unsafe { MSK_getnumacc(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumacc")?;
11612 if domidxlist_.len() != (__tmp_0).try_into().unwrap() {
11613 return Result::Err("get_accs: Argument 'domidxlist' has the wrong length, expected __tmp_0".to_string());
11614 }
11615 let mut __tmp_2 : i64 = i64::default();
11616 let __tmp_3 = unsafe { MSK_getaccntot(self.ptr,&mut __tmp_2) };let _ = self.handle_res(__tmp_3,"getaccntot")?;
11617 if afeidxlist_.len() != (__tmp_2).try_into().unwrap() {
11618 return Result::Err("get_accs: Argument 'afeidxlist' has the wrong length, expected __tmp_2".to_string());
11619 }
11620 let mut __tmp_4 : i64 = i64::default();
11621 let __tmp_5 = unsafe { MSK_getaccntot(self.ptr,&mut __tmp_4) };let _ = self.handle_res(__tmp_5,"getaccntot")?;
11622 if b_.len() != (__tmp_4).try_into().unwrap() {
11623 return Result::Err("get_accs: Argument 'b' has the wrong length, expected __tmp_4".to_string());
11624 }
11625 self.handle_res(unsafe { MSK_getaccs(self.ptr,domidxlist_.as_mut_ptr(),afeidxlist_.as_mut_ptr(),b_.as_mut_ptr()) },"get_accs")?;
11626 return Result::Ok(());
11627 } // getaccs
11628 /// Obtains one column of the linear constraint matrix.
11629 ///
11630 /// # Arguments
11631 ///
11632 /// - `j_` Index of the column.
11633 /// - `nzj_` Number of non-zeros in the column obtained.
11634 /// - `subj_` Row indices of the non-zeros in the column obtained.
11635 /// - `valj_` Numerical values in the column obtained.
11636 ///
11637 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getacol>
11638 #[allow(unused_parens)]
11639 pub fn get_a_col(&self,j_ : i32,nzj_ : &mut i32,subj_ : &mut[i32],valj_ : &mut[f64]) -> Result<(),String> {
11640 let mut __tmp_1 : i32 = i32::default();
11641 let __tmp_2 = unsafe { MSK_getacolnumnz(self.ptr,j_,&mut __tmp_1) };let _ = self.handle_res(__tmp_2,"getacolnumnz")?;
11642 if subj_.len() != (__tmp_1).try_into().unwrap() {
11643 return Result::Err("get_a_col: Argument 'subj' has the wrong length, expected __tmp_1".to_string());
11644 }
11645 let mut __tmp_3 : i32 = i32::default();
11646 let __tmp_4 = unsafe { MSK_getacolnumnz(self.ptr,j_,&mut __tmp_3) };let _ = self.handle_res(__tmp_4,"getacolnumnz")?;
11647 if valj_.len() != (__tmp_3).try_into().unwrap() {
11648 return Result::Err("get_a_col: Argument 'valj' has the wrong length, expected __tmp_3".to_string());
11649 }
11650 self.handle_res(unsafe { MSK_getacol(self.ptr,j_,nzj_,subj_.as_mut_ptr(),valj_.as_mut_ptr()) },"get_a_col")?;
11651 return Result::Ok(());
11652 } // getacol
11653 /// Obtains the number of non-zero elements in one column of the linear constraint matrix
11654 ///
11655 /// # Arguments
11656 ///
11657 /// - `i_` Index of the column.
11658 ///
11659 /// # Returns
11660 ///
11661 /// - `nzj` Number of non-zeros in the j'th column of (A).
11662 ///
11663 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getacolnumnz>
11664 #[allow(unused_parens)]
11665 pub fn get_a_col_num_nz(&self,i_ : i32) -> Result<i32,String> {
11666 let mut __tmp_0 : i32 = i32::default();
11667 self.handle_res(unsafe { MSK_getacolnumnz(self.ptr,i_,&mut __tmp_0) },"get_a_col_num_nz")?;
11668 return Result::Ok(__tmp_0);
11669 } // getacolnumnz
11670 /// Obtains a sequence of columns from the coefficient matrix.
11671 ///
11672 /// # Arguments
11673 ///
11674 /// - `first_` Index of the first column in the sequence.
11675 /// - `last_` Index of the last column in the sequence plus one.
11676 /// - `ptrb_` Column start pointers.
11677 /// - `ptre_` Column end pointers.
11678 /// - `sub_` Contains the row subscripts.
11679 /// - `val_` Contains the coefficient values.
11680 ///
11681 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getacolslice64>
11682 #[allow(unused_parens)]
11683 pub fn get_a_col_slice(&self,first_ : i32,last_ : i32,ptrb_ : &mut[i64],ptre_ : &mut[i64],sub_ : &mut[i32],val_ : &mut[f64]) -> Result<(),String> {
11684 let mut __tmp_0 : i64 = i64::default();
11685 let __tmp_1 = unsafe { MSK_getacolslicenumnz64(self.ptr,first_,last_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getacolslicenumnz64")?;
11686 let maxnumnz_ : i64 = __tmp_0;
11687 if ptrb_.len() != ((last_-first_)).try_into().unwrap() {
11688 return Result::Err("get_a_col_slice: Argument 'ptrb' has the wrong length, expected (last_-first_)".to_string());
11689 }
11690 if ptre_.len() != ((last_-first_)).try_into().unwrap() {
11691 return Result::Err("get_a_col_slice: Argument 'ptre' has the wrong length, expected (last_-first_)".to_string());
11692 }
11693 if sub_.len() != (maxnumnz_).try_into().unwrap() {
11694 return Result::Err("get_a_col_slice: Argument 'sub' has the wrong length, expected maxnumnz_".to_string());
11695 }
11696 if val_.len() != (maxnumnz_).try_into().unwrap() {
11697 return Result::Err("get_a_col_slice: Argument 'val' has the wrong length, expected maxnumnz_".to_string());
11698 }
11699 self.handle_res(unsafe { MSK_getacolslice64(self.ptr,first_,last_,maxnumnz_,ptrb_.as_mut_ptr(),ptre_.as_mut_ptr(),sub_.as_mut_ptr(),val_.as_mut_ptr()) },"get_a_col_slice")?;
11700 return Result::Ok(());
11701 } // getacolslice64
11702 /// Obtains the number of non-zeros in a slice of columns of the coefficient matrix.
11703 ///
11704 /// # Arguments
11705 ///
11706 /// - `first_` Index of the first column in the sequence.
11707 /// - `last_` Index of the last column plus one in the sequence.
11708 ///
11709 /// # Returns
11710 ///
11711 /// - `numnz` Number of non-zeros in the slice.
11712 ///
11713 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getacolslicenumnz64>
11714 #[allow(unused_parens)]
11715 pub fn get_a_col_slice_num_nz(&self,first_ : i32,last_ : i32) -> Result<i64,String> {
11716 let mut __tmp_0 : i64 = i64::default();
11717 self.handle_res(unsafe { MSK_getacolslicenumnz64(self.ptr,first_,last_,&mut __tmp_0) },"get_a_col_slice_num_nz")?;
11718 return Result::Ok(__tmp_0);
11719 } // getacolslicenumnz64
11720 /// Obtains a sequence of columns from the coefficient matrix in triplet format.
11721 ///
11722 /// # Arguments
11723 ///
11724 /// - `first_` Index of the first column in the sequence.
11725 /// - `last_` Index of the last column in the sequence plus one.
11726 /// - `subi_` Constraint subscripts.
11727 /// - `subj_` Column subscripts.
11728 /// - `val_` Values.
11729 ///
11730 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getacolslicetrip>
11731 #[allow(unused_parens)]
11732 pub fn get_a_col_slice_trip(&self,first_ : i32,last_ : i32,subi_ : &mut[i32],subj_ : &mut[i32],val_ : &mut[f64]) -> Result<(),String> {
11733 let mut __tmp_0 : i64 = i64::default();
11734 let __tmp_1 = unsafe { MSK_getacolslicenumnz64(self.ptr,first_,last_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getacolslicenumnz64")?;
11735 let maxnumnz_ : i64 = __tmp_0;
11736 if subi_.len() > 0 && subi_.len() != (maxnumnz_).try_into().unwrap() {
11737 return Result::Err("get_a_col_slice_trip: Argument 'subi' has the wrong length, expected maxnumnz_".to_string());
11738 }
11739 if subj_.len() > 0 && subj_.len() != (maxnumnz_).try_into().unwrap() {
11740 return Result::Err("get_a_col_slice_trip: Argument 'subj' has the wrong length, expected maxnumnz_".to_string());
11741 }
11742 if val_.len() > 0 && val_.len() != (maxnumnz_).try_into().unwrap() {
11743 return Result::Err("get_a_col_slice_trip: Argument 'val' has the wrong length, expected maxnumnz_".to_string());
11744 }
11745 self.handle_res(unsafe { MSK_getacolslicetrip(self.ptr,first_,last_,maxnumnz_,if subi_.len() == 0 { std::ptr::null_mut() } else { subi_.as_mut_ptr() },if subj_.len() == 0 { std::ptr::null_mut() } else { subj_.as_mut_ptr() },if val_.len() == 0 { std::ptr::null_mut() } else { val_.as_mut_ptr() }) },"get_a_col_slice_trip")?;
11746 return Result::Ok(());
11747 } // getacolslicetrip
11748 /// Obtains barF in block triplet form.
11749 ///
11750 /// # Arguments
11751 ///
11752 /// - `afeidx_` Constraint index.
11753 /// - `barvaridx_` Symmetric matrix variable index.
11754 /// - `subk_` Block row index.
11755 /// - `subl_` Block column index.
11756 /// - `valkl_` The numerical value associated with each block triplet.
11757 ///
11758 /// # Returns
11759 ///
11760 /// - `numtrip` Number of elements in the block triplet form.
11761 ///
11762 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getafebarfblocktriplet>
11763 #[allow(unused_parens)]
11764 pub fn get_afe_barf_block_triplet(&self,afeidx_ : &mut[i64],barvaridx_ : &mut[i32],subk_ : &mut[i32],subl_ : &mut[i32],valkl_ : &mut[f64]) -> Result<i64,String> {
11765 let mut __tmp_0 : i64 = i64::default();
11766 let __tmp_1 = unsafe { MSK_getafebarfnumblocktriplets(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getafebarfnumblocktriplets")?;
11767 let maxnumtrip_ : i64 = __tmp_0;
11768 let mut __tmp_2 : i64 = i64::default();
11769 if afeidx_.len() != (maxnumtrip_).try_into().unwrap() {
11770 return Result::Err("get_afe_barf_block_triplet: Argument 'afeidx' has the wrong length, expected maxnumtrip_".to_string());
11771 }
11772 if barvaridx_.len() != (maxnumtrip_).try_into().unwrap() {
11773 return Result::Err("get_afe_barf_block_triplet: Argument 'barvaridx' has the wrong length, expected maxnumtrip_".to_string());
11774 }
11775 if subk_.len() != (maxnumtrip_).try_into().unwrap() {
11776 return Result::Err("get_afe_barf_block_triplet: Argument 'subk' has the wrong length, expected maxnumtrip_".to_string());
11777 }
11778 if subl_.len() != (maxnumtrip_).try_into().unwrap() {
11779 return Result::Err("get_afe_barf_block_triplet: Argument 'subl' has the wrong length, expected maxnumtrip_".to_string());
11780 }
11781 if valkl_.len() != (maxnumtrip_).try_into().unwrap() {
11782 return Result::Err("get_afe_barf_block_triplet: Argument 'valkl' has the wrong length, expected maxnumtrip_".to_string());
11783 }
11784 self.handle_res(unsafe { MSK_getafebarfblocktriplet(self.ptr,maxnumtrip_,&mut __tmp_2,afeidx_.as_mut_ptr(),barvaridx_.as_mut_ptr(),subk_.as_mut_ptr(),subl_.as_mut_ptr(),valkl_.as_mut_ptr()) },"get_afe_barf_block_triplet")?;
11785 return Result::Ok(__tmp_2);
11786 } // getafebarfblocktriplet
11787 /// Obtains an upper bound on the number of elements in the block triplet form of barf.
11788 ///
11789 /// # Returns
11790 ///
11791 /// - `numtrip` An upper bound on the number of elements in the block triplet form of barf.
11792 ///
11793 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getafebarfnumblocktriplets>
11794 #[allow(unused_parens)]
11795 pub fn get_afe_barf_num_block_triplets(&self) -> Result<i64,String> {
11796 let mut __tmp_0 : i64 = i64::default();
11797 self.handle_res(unsafe { MSK_getafebarfnumblocktriplets(self.ptr,&mut __tmp_0) },"get_afe_barf_num_block_triplets")?;
11798 return Result::Ok(__tmp_0);
11799 } // getafebarfnumblocktriplets
11800 /// Obtains the number of nonzero entries in a row of barF.
11801 ///
11802 /// # Arguments
11803 ///
11804 /// - `afeidx_` Row index of barF.
11805 ///
11806 /// # Returns
11807 ///
11808 /// - `numentr` Number of nonzero entries in a row of barF.
11809 ///
11810 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getafebarfnumrowentries>
11811 #[allow(unused_parens)]
11812 pub fn get_afe_barf_num_row_entries(&mut self,afeidx_ : i64) -> Result<i32,String> {
11813 let mut __tmp_0 : i32 = i32::default();
11814 self.handle_res(unsafe { MSK_getafebarfnumrowentries(self.ptr,afeidx_,&mut __tmp_0) },"get_afe_barf_num_row_entries")?;
11815 return Result::Ok(__tmp_0);
11816 } // getafebarfnumrowentries
11817 /// Obtains nonzero entries in one row of barF.
11818 ///
11819 /// # Arguments
11820 ///
11821 /// - `afeidx_` Row index of barF.
11822 /// - `barvaridx_` Semidefinite variable indices.
11823 /// - `ptrterm_` Pointers to the description of entries.
11824 /// - `numterm_` Number of terms in each entry.
11825 /// - `termidx_` Indices of semidefinite matrices from E.
11826 /// - `termweight_` Weights appearing in the weighted sum representation.
11827 ///
11828 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getafebarfrow>
11829 #[allow(unused_parens)]
11830 pub fn get_afe_barf_row(&mut self,afeidx_ : i64,barvaridx_ : &mut[i32],ptrterm_ : &mut[i64],numterm_ : &mut[i64],termidx_ : &mut[i64],termweight_ : &mut[f64]) -> Result<(),String> {
11831 let mut __tmp_0 : i32 = i32::default();
11832 let mut __tmp_1 : i64 = i64::default();
11833 let __tmp_2 = unsafe { MSK_getafebarfrowinfo(self.ptr,afeidx_,&mut __tmp_0,&mut __tmp_1) };let _ = self.handle_res(__tmp_2,"getafebarfrowinfo")?;
11834 if barvaridx_.len() != (__tmp_0).try_into().unwrap() {
11835 return Result::Err("get_afe_barf_row: Argument 'barvaridx' has the wrong length, expected __tmp_0".to_string());
11836 }
11837 let mut __tmp_3 : i32 = i32::default();
11838 let mut __tmp_4 : i64 = i64::default();
11839 let __tmp_5 = unsafe { MSK_getafebarfrowinfo(self.ptr,afeidx_,&mut __tmp_3,&mut __tmp_4) };let _ = self.handle_res(__tmp_5,"getafebarfrowinfo")?;
11840 if ptrterm_.len() != (__tmp_3).try_into().unwrap() {
11841 return Result::Err("get_afe_barf_row: Argument 'ptrterm' has the wrong length, expected __tmp_3".to_string());
11842 }
11843 let mut __tmp_6 : i32 = i32::default();
11844 let mut __tmp_7 : i64 = i64::default();
11845 let __tmp_8 = unsafe { MSK_getafebarfrowinfo(self.ptr,afeidx_,&mut __tmp_6,&mut __tmp_7) };let _ = self.handle_res(__tmp_8,"getafebarfrowinfo")?;
11846 if numterm_.len() != (__tmp_6).try_into().unwrap() {
11847 return Result::Err("get_afe_barf_row: Argument 'numterm' has the wrong length, expected __tmp_6".to_string());
11848 }
11849 let mut __tmp_9 : i32 = i32::default();
11850 let mut __tmp_10 : i64 = i64::default();
11851 let __tmp_11 = unsafe { MSK_getafebarfrowinfo(self.ptr,afeidx_,&mut __tmp_9,&mut __tmp_10) };let _ = self.handle_res(__tmp_11,"getafebarfrowinfo")?;
11852 if termidx_.len() != (__tmp_10).try_into().unwrap() {
11853 return Result::Err("get_afe_barf_row: Argument 'termidx' has the wrong length, expected __tmp_10".to_string());
11854 }
11855 let mut __tmp_12 : i32 = i32::default();
11856 let mut __tmp_13 : i64 = i64::default();
11857 let __tmp_14 = unsafe { MSK_getafebarfrowinfo(self.ptr,afeidx_,&mut __tmp_12,&mut __tmp_13) };let _ = self.handle_res(__tmp_14,"getafebarfrowinfo")?;
11858 if termweight_.len() != (__tmp_13).try_into().unwrap() {
11859 return Result::Err("get_afe_barf_row: Argument 'termweight' has the wrong length, expected __tmp_13".to_string());
11860 }
11861 self.handle_res(unsafe { MSK_getafebarfrow(self.ptr,afeidx_,barvaridx_.as_mut_ptr(),ptrterm_.as_mut_ptr(),numterm_.as_mut_ptr(),termidx_.as_mut_ptr(),termweight_.as_mut_ptr()) },"get_afe_barf_row")?;
11862 return Result::Ok(());
11863 } // getafebarfrow
11864 /// Obtains information about one row of barF.
11865 ///
11866 /// # Arguments
11867 ///
11868 /// - `afeidx_` Row index of barF.
11869 /// - `numentr_` Number of nonzero entries in a row of barF.
11870 /// - `numterm_` Number of terms in the weighted sums representation of the row of barF.
11871 ///
11872 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getafebarfrowinfo>
11873 #[allow(unused_parens)]
11874 pub fn get_afe_barf_row_info(&mut self,afeidx_ : i64,numentr_ : &mut i32,numterm_ : &mut i64) -> Result<(),String> {
11875 self.handle_res(unsafe { MSK_getafebarfrowinfo(self.ptr,afeidx_,numentr_,numterm_) },"get_afe_barf_row_info")?;
11876 return Result::Ok(());
11877 } // getafebarfrowinfo
11878 /// Obtains the total number of nonzeros in F.
11879 ///
11880 /// # Returns
11881 ///
11882 /// - `numnz` Number of nonzeros in F.
11883 ///
11884 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getafefnumnz>
11885 #[allow(unused_parens)]
11886 pub fn get_afe_f_num_nz(&mut self) -> Result<i64,String> {
11887 let mut __tmp_0 : i64 = i64::default();
11888 self.handle_res(unsafe { MSK_getafefnumnz(self.ptr,&mut __tmp_0) },"get_afe_f_num_nz")?;
11889 return Result::Ok(__tmp_0);
11890 } // getafefnumnz
11891 /// Obtains one row of F in sparse format.
11892 ///
11893 /// # Arguments
11894 ///
11895 /// - `afeidx_` Row index.
11896 /// - `numnz_` Number of non-zeros in the row obtained.
11897 /// - `varidx_` Column indices of the non-zeros in the row obtained.
11898 /// - `val_` Values of the non-zeros in the row obtained.
11899 ///
11900 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getafefrow>
11901 #[allow(unused_parens)]
11902 pub fn get_afe_f_row(&mut self,afeidx_ : i64,numnz_ : &mut i32,varidx_ : &mut[i32],val_ : &mut[f64]) -> Result<(),String> {
11903 let mut __tmp_1 : i32 = i32::default();
11904 let __tmp_2 = unsafe { MSK_getafefrownumnz(self.ptr,afeidx_,&mut __tmp_1) };let _ = self.handle_res(__tmp_2,"getafefrownumnz")?;
11905 if varidx_.len() > 0 && varidx_.len() != (__tmp_1).try_into().unwrap() {
11906 return Result::Err("get_afe_f_row: Argument 'varidx' has the wrong length, expected __tmp_1".to_string());
11907 }
11908 let mut __tmp_3 : i32 = i32::default();
11909 let __tmp_4 = unsafe { MSK_getafefrownumnz(self.ptr,afeidx_,&mut __tmp_3) };let _ = self.handle_res(__tmp_4,"getafefrownumnz")?;
11910 if val_.len() > 0 && val_.len() != (__tmp_3).try_into().unwrap() {
11911 return Result::Err("get_afe_f_row: Argument 'val' has the wrong length, expected __tmp_3".to_string());
11912 }
11913 self.handle_res(unsafe { MSK_getafefrow(self.ptr,afeidx_,numnz_,if varidx_.len() == 0 { std::ptr::null_mut() } else { varidx_.as_mut_ptr() },if val_.len() == 0 { std::ptr::null_mut() } else { val_.as_mut_ptr() }) },"get_afe_f_row")?;
11914 return Result::Ok(());
11915 } // getafefrow
11916 /// Obtains the number of nonzeros in a row of F.
11917 ///
11918 /// # Arguments
11919 ///
11920 /// - `afeidx_` Row index.
11921 ///
11922 /// # Returns
11923 ///
11924 /// - `numnz` Number of non-zeros in the row.
11925 ///
11926 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getafefrownumnz>
11927 #[allow(unused_parens)]
11928 pub fn get_afe_f_row_num_nz(&mut self,afeidx_ : i64) -> Result<i32,String> {
11929 let mut __tmp_0 : i32 = i32::default();
11930 self.handle_res(unsafe { MSK_getafefrownumnz(self.ptr,afeidx_,&mut __tmp_0) },"get_afe_f_row_num_nz")?;
11931 return Result::Ok(__tmp_0);
11932 } // getafefrownumnz
11933 /// Obtains the F matrix in triplet format.
11934 ///
11935 /// # Arguments
11936 ///
11937 /// - `afeidx_` Row indices of nonzeros.
11938 /// - `varidx_` Column indices of nonzeros.
11939 /// - `val_` Values of nonzero entries.
11940 ///
11941 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getafeftrip>
11942 #[allow(unused_parens)]
11943 pub fn get_afe_f_trip(&mut self,afeidx_ : &mut[i64],varidx_ : &mut[i32],val_ : &mut[f64]) -> Result<(),String> {
11944 let mut __tmp_0 : i64 = i64::default();
11945 let __tmp_1 = unsafe { MSK_getafefnumnz(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getafefnumnz")?;
11946 if afeidx_.len() != (__tmp_0).try_into().unwrap() {
11947 return Result::Err("get_afe_f_trip: Argument 'afeidx' has the wrong length, expected __tmp_0".to_string());
11948 }
11949 let mut __tmp_2 : i64 = i64::default();
11950 let __tmp_3 = unsafe { MSK_getafefnumnz(self.ptr,&mut __tmp_2) };let _ = self.handle_res(__tmp_3,"getafefnumnz")?;
11951 if varidx_.len() != (__tmp_2).try_into().unwrap() {
11952 return Result::Err("get_afe_f_trip: Argument 'varidx' has the wrong length, expected __tmp_2".to_string());
11953 }
11954 let mut __tmp_4 : i64 = i64::default();
11955 let __tmp_5 = unsafe { MSK_getafefnumnz(self.ptr,&mut __tmp_4) };let _ = self.handle_res(__tmp_5,"getafefnumnz")?;
11956 if val_.len() != (__tmp_4).try_into().unwrap() {
11957 return Result::Err("get_afe_f_trip: Argument 'val' has the wrong length, expected __tmp_4".to_string());
11958 }
11959 self.handle_res(unsafe { MSK_getafeftrip(self.ptr,afeidx_.as_mut_ptr(),varidx_.as_mut_ptr(),val_.as_mut_ptr()) },"get_afe_f_trip")?;
11960 return Result::Ok(());
11961 } // getafeftrip
11962 /// Obtains a single coefficient in g.
11963 ///
11964 /// # Arguments
11965 ///
11966 /// - `afeidx_` Element index.
11967 ///
11968 /// # Returns
11969 ///
11970 /// - `g` The entry in g.
11971 ///
11972 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getafeg>
11973 #[allow(unused_parens)]
11974 pub fn get_afe_g(&mut self,afeidx_ : i64) -> Result<f64,String> {
11975 let mut __tmp_0 : f64 = f64::default();
11976 self.handle_res(unsafe { MSK_getafeg(self.ptr,afeidx_,&mut __tmp_0) },"get_afe_g")?;
11977 return Result::Ok(__tmp_0);
11978 } // getafeg
11979 /// Obtains a sequence of coefficients from the vector g.
11980 ///
11981 /// # Arguments
11982 ///
11983 /// - `first_` First index in the sequence.
11984 /// - `last_` Last index plus 1 in the sequence.
11985 /// - `g_` The slice of g as a dense vector.
11986 ///
11987 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getafegslice>
11988 #[allow(unused_parens)]
11989 pub fn get_afe_g_slice(&self,first_ : i64,last_ : i64,g_ : &mut[f64]) -> Result<(),String> {
11990 if g_.len() > 0 && g_.len() != ((last_-first_)).try_into().unwrap() {
11991 return Result::Err("get_afe_g_slice: Argument 'g' has the wrong length, expected (last_-first_)".to_string());
11992 }
11993 self.handle_res(unsafe { MSK_getafegslice(self.ptr,first_,last_,if g_.len() == 0 { std::ptr::null_mut() } else { g_.as_mut_ptr() }) },"get_afe_g_slice")?;
11994 return Result::Ok(());
11995 } // getafegslice
11996 /// Obtains a single coefficient in linear constraint matrix.
11997 ///
11998 /// # Arguments
11999 ///
12000 /// - `i_` Row index of the coefficient to be returned.
12001 /// - `j_` Column index of the coefficient to be returned.
12002 ///
12003 /// # Returns
12004 ///
12005 /// - `aij` Returns the requested coefficient.
12006 ///
12007 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getaij>
12008 #[allow(unused_parens)]
12009 pub fn get_aij(&self,i_ : i32,j_ : i32) -> Result<f64,String> {
12010 let mut __tmp_0 : f64 = f64::default();
12011 self.handle_res(unsafe { MSK_getaij(self.ptr,i_,j_,&mut __tmp_0) },"get_aij")?;
12012 return Result::Ok(__tmp_0);
12013 } // getaij
12014 /// Obtains the number non-zeros in a rectangular piece of the linear constraint matrix.
12015 ///
12016 /// # Arguments
12017 ///
12018 /// - `firsti_` Index of the first row in the rectangular piece.
12019 /// - `lasti_` Index of the last row plus one in the rectangular piece.
12020 /// - `firstj_` Index of the first column in the rectangular piece.
12021 /// - `lastj_` Index of the last column plus one in the rectangular piece.
12022 ///
12023 /// # Returns
12024 ///
12025 /// - `numnz` Number of non-zero elements in the rectangular piece of the linear constraint matrix.
12026 ///
12027 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getapiecenumnz>
12028 #[allow(unused_parens)]
12029 pub fn get_a_piece_num_nz(&self,firsti_ : i32,lasti_ : i32,firstj_ : i32,lastj_ : i32) -> Result<i32,String> {
12030 let mut __tmp_0 : i32 = i32::default();
12031 self.handle_res(unsafe { MSK_getapiecenumnz(self.ptr,firsti_,lasti_,firstj_,lastj_,&mut __tmp_0) },"get_a_piece_num_nz")?;
12032 return Result::Ok(__tmp_0);
12033 } // getapiecenumnz
12034 /// Obtains one row of the linear constraint matrix.
12035 ///
12036 /// # Arguments
12037 ///
12038 /// - `i_` Index of the row.
12039 /// - `nzi_` Number of non-zeros in the row obtained.
12040 /// - `subi_` Column indices of the non-zeros in the row obtained.
12041 /// - `vali_` Numerical values of the row obtained.
12042 ///
12043 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getarow>
12044 #[allow(unused_parens)]
12045 pub fn get_a_row(&self,i_ : i32,nzi_ : &mut i32,subi_ : &mut[i32],vali_ : &mut[f64]) -> Result<(),String> {
12046 let mut __tmp_1 : i32 = i32::default();
12047 let __tmp_2 = unsafe { MSK_getarownumnz(self.ptr,i_,&mut __tmp_1) };let _ = self.handle_res(__tmp_2,"getarownumnz")?;
12048 if subi_.len() != (__tmp_1).try_into().unwrap() {
12049 return Result::Err("get_a_row: Argument 'subi' has the wrong length, expected __tmp_1".to_string());
12050 }
12051 let mut __tmp_3 : i32 = i32::default();
12052 let __tmp_4 = unsafe { MSK_getarownumnz(self.ptr,i_,&mut __tmp_3) };let _ = self.handle_res(__tmp_4,"getarownumnz")?;
12053 if vali_.len() != (__tmp_3).try_into().unwrap() {
12054 return Result::Err("get_a_row: Argument 'vali' has the wrong length, expected __tmp_3".to_string());
12055 }
12056 self.handle_res(unsafe { MSK_getarow(self.ptr,i_,nzi_,subi_.as_mut_ptr(),vali_.as_mut_ptr()) },"get_a_row")?;
12057 return Result::Ok(());
12058 } // getarow
12059 /// Obtains the number of non-zero elements in one row of the linear constraint matrix
12060 ///
12061 /// # Arguments
12062 ///
12063 /// - `i_` Index of the row.
12064 ///
12065 /// # Returns
12066 ///
12067 /// - `nzi` Number of non-zeros in the i'th row of `A`.
12068 ///
12069 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getarownumnz>
12070 #[allow(unused_parens)]
12071 pub fn get_a_row_num_nz(&self,i_ : i32) -> Result<i32,String> {
12072 let mut __tmp_0 : i32 = i32::default();
12073 self.handle_res(unsafe { MSK_getarownumnz(self.ptr,i_,&mut __tmp_0) },"get_a_row_num_nz")?;
12074 return Result::Ok(__tmp_0);
12075 } // getarownumnz
12076 /// Obtains a sequence of rows from the coefficient matrix.
12077 ///
12078 /// # Arguments
12079 ///
12080 /// - `first_` Index of the first row in the sequence.
12081 /// - `last_` Index of the last row in the sequence plus one.
12082 /// - `ptrb_` Row start pointers.
12083 /// - `ptre_` Row end pointers.
12084 /// - `sub_` Contains the column subscripts.
12085 /// - `val_` Contains the coefficient values.
12086 ///
12087 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getarowslice64>
12088 #[allow(unused_parens)]
12089 pub fn get_a_row_slice(&self,first_ : i32,last_ : i32,ptrb_ : &mut[i64],ptre_ : &mut[i64],sub_ : &mut[i32],val_ : &mut[f64]) -> Result<(),String> {
12090 let mut __tmp_0 : i64 = i64::default();
12091 let __tmp_1 = unsafe { MSK_getarowslicenumnz64(self.ptr,first_,last_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getarowslicenumnz64")?;
12092 let maxnumnz_ : i64 = __tmp_0;
12093 if ptrb_.len() != ((last_-first_)).try_into().unwrap() {
12094 return Result::Err("get_a_row_slice: Argument 'ptrb' has the wrong length, expected (last_-first_)".to_string());
12095 }
12096 if ptre_.len() != ((last_-first_)).try_into().unwrap() {
12097 return Result::Err("get_a_row_slice: Argument 'ptre' has the wrong length, expected (last_-first_)".to_string());
12098 }
12099 if sub_.len() != (maxnumnz_).try_into().unwrap() {
12100 return Result::Err("get_a_row_slice: Argument 'sub' has the wrong length, expected maxnumnz_".to_string());
12101 }
12102 if val_.len() != (maxnumnz_).try_into().unwrap() {
12103 return Result::Err("get_a_row_slice: Argument 'val' has the wrong length, expected maxnumnz_".to_string());
12104 }
12105 self.handle_res(unsafe { MSK_getarowslice64(self.ptr,first_,last_,maxnumnz_,ptrb_.as_mut_ptr(),ptre_.as_mut_ptr(),sub_.as_mut_ptr(),val_.as_mut_ptr()) },"get_a_row_slice")?;
12106 return Result::Ok(());
12107 } // getarowslice64
12108 /// Obtains the number of non-zeros in a slice of rows of the coefficient matrix.
12109 ///
12110 /// # Arguments
12111 ///
12112 /// - `first_` Index of the first row in the sequence.
12113 /// - `last_` Index of the last row plus one in the sequence.
12114 ///
12115 /// # Returns
12116 ///
12117 /// - `numnz` Number of non-zeros in the slice.
12118 ///
12119 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getarowslicenumnz64>
12120 #[allow(unused_parens)]
12121 pub fn get_a_row_slice_num_nz(&self,first_ : i32,last_ : i32) -> Result<i64,String> {
12122 let mut __tmp_0 : i64 = i64::default();
12123 self.handle_res(unsafe { MSK_getarowslicenumnz64(self.ptr,first_,last_,&mut __tmp_0) },"get_a_row_slice_num_nz")?;
12124 return Result::Ok(__tmp_0);
12125 } // getarowslicenumnz64
12126 /// Obtains a sequence of rows from the coefficient matrix in sparse triplet format.
12127 ///
12128 /// # Arguments
12129 ///
12130 /// - `first_` Index of the first row in the sequence.
12131 /// - `last_` Index of the last row in the sequence plus one.
12132 /// - `subi_` Constraint subscripts.
12133 /// - `subj_` Column subscripts.
12134 /// - `val_` Values.
12135 ///
12136 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getarowslicetrip>
12137 #[allow(unused_parens)]
12138 pub fn get_a_row_slice_trip(&self,first_ : i32,last_ : i32,subi_ : &mut[i32],subj_ : &mut[i32],val_ : &mut[f64]) -> Result<(),String> {
12139 let mut __tmp_0 : i64 = i64::default();
12140 let __tmp_1 = unsafe { MSK_getarowslicenumnz64(self.ptr,first_,last_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getarowslicenumnz64")?;
12141 let maxnumnz_ : i64 = __tmp_0;
12142 if subi_.len() > 0 && subi_.len() != (maxnumnz_).try_into().unwrap() {
12143 return Result::Err("get_a_row_slice_trip: Argument 'subi' has the wrong length, expected maxnumnz_".to_string());
12144 }
12145 if subj_.len() > 0 && subj_.len() != (maxnumnz_).try_into().unwrap() {
12146 return Result::Err("get_a_row_slice_trip: Argument 'subj' has the wrong length, expected maxnumnz_".to_string());
12147 }
12148 if val_.len() > 0 && val_.len() != (maxnumnz_).try_into().unwrap() {
12149 return Result::Err("get_a_row_slice_trip: Argument 'val' has the wrong length, expected maxnumnz_".to_string());
12150 }
12151 self.handle_res(unsafe { MSK_getarowslicetrip(self.ptr,first_,last_,maxnumnz_,if subi_.len() == 0 { std::ptr::null_mut() } else { subi_.as_mut_ptr() },if subj_.len() == 0 { std::ptr::null_mut() } else { subj_.as_mut_ptr() },if val_.len() == 0 { std::ptr::null_mut() } else { val_.as_mut_ptr() }) },"get_a_row_slice_trip")?;
12152 return Result::Ok(());
12153 } // getarowslicetrip
12154 /// Obtains the A matrix in sparse triplet format.
12155 ///
12156 /// # Arguments
12157 ///
12158 /// - `subi_` Constraint subscripts.
12159 /// - `subj_` Column subscripts.
12160 /// - `val_` Values.
12161 ///
12162 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getatrip>
12163 #[allow(unused_parens)]
12164 pub fn get_a_trip(&self,subi_ : &mut[i32],subj_ : &mut[i32],val_ : &mut[f64]) -> Result<(),String> {
12165 let mut __tmp_0 : i64 = i64::default();
12166 let __tmp_1 = unsafe { MSK_getnumanz64(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumanz64")?;
12167 let maxnumnz_ : i64 = __tmp_0;
12168 if subi_.len() > 0 && subi_.len() != (maxnumnz_).try_into().unwrap() {
12169 return Result::Err("get_a_trip: Argument 'subi' has the wrong length, expected maxnumnz_".to_string());
12170 }
12171 if subj_.len() > 0 && subj_.len() != (maxnumnz_).try_into().unwrap() {
12172 return Result::Err("get_a_trip: Argument 'subj' has the wrong length, expected maxnumnz_".to_string());
12173 }
12174 if val_.len() > 0 && val_.len() != (maxnumnz_).try_into().unwrap() {
12175 return Result::Err("get_a_trip: Argument 'val' has the wrong length, expected maxnumnz_".to_string());
12176 }
12177 self.handle_res(unsafe { MSK_getatrip(self.ptr,maxnumnz_,if subi_.len() == 0 { std::ptr::null_mut() } else { subi_.as_mut_ptr() },if subj_.len() == 0 { std::ptr::null_mut() } else { subj_.as_mut_ptr() },if val_.len() == 0 { std::ptr::null_mut() } else { val_.as_mut_ptr() }) },"get_a_trip")?;
12178 return Result::Ok(());
12179 } // getatrip
12180 /// Gets the current A matrix truncation threshold.
12181 ///
12182 /// # Arguments
12183 ///
12184 /// - `tolzero_` Truncation tolerance.
12185 ///
12186 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getatruncatetol>
12187 #[allow(unused_parens)]
12188 pub fn get_a_truncate_tol(&self,tolzero_ : &mut[f64]) -> Result<(),String> {
12189 if tolzero_.len() != (1).try_into().unwrap() {
12190 return Result::Err("get_a_truncate_tol: Argument 'tolzero' has the wrong length, expected 1".to_string());
12191 }
12192 self.handle_res(unsafe { MSK_getatruncatetol(self.ptr,tolzero_.as_mut_ptr()) },"get_a_truncate_tol")?;
12193 return Result::Ok(());
12194 } // getatruncatetol
12195 /// Obtains barA in block triplet form.
12196 ///
12197 /// # Arguments
12198 ///
12199 /// - `subi_` Constraint index.
12200 /// - `subj_` Symmetric matrix variable index.
12201 /// - `subk_` Block row index.
12202 /// - `subl_` Block column index.
12203 /// - `valijkl_` The numerical value associated with each block triplet.
12204 ///
12205 /// # Returns
12206 ///
12207 /// - `num` Number of elements in the block triplet form.
12208 ///
12209 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarablocktriplet>
12210 #[allow(unused_parens)]
12211 pub fn get_bara_block_triplet(&self,subi_ : &mut[i32],subj_ : &mut[i32],subk_ : &mut[i32],subl_ : &mut[i32],valijkl_ : &mut[f64]) -> Result<i64,String> {
12212 let mut __tmp_0 : i64 = i64::default();
12213 let __tmp_1 = unsafe { MSK_getnumbarablocktriplets(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumbarablocktriplets")?;
12214 let maxnum_ : i64 = __tmp_0;
12215 let mut __tmp_2 : i64 = i64::default();
12216 if subi_.len() != (maxnum_).try_into().unwrap() {
12217 return Result::Err("get_bara_block_triplet: Argument 'subi' has the wrong length, expected maxnum_".to_string());
12218 }
12219 if subj_.len() != (maxnum_).try_into().unwrap() {
12220 return Result::Err("get_bara_block_triplet: Argument 'subj' has the wrong length, expected maxnum_".to_string());
12221 }
12222 if subk_.len() != (maxnum_).try_into().unwrap() {
12223 return Result::Err("get_bara_block_triplet: Argument 'subk' has the wrong length, expected maxnum_".to_string());
12224 }
12225 if subl_.len() != (maxnum_).try_into().unwrap() {
12226 return Result::Err("get_bara_block_triplet: Argument 'subl' has the wrong length, expected maxnum_".to_string());
12227 }
12228 if valijkl_.len() != (maxnum_).try_into().unwrap() {
12229 return Result::Err("get_bara_block_triplet: Argument 'valijkl' has the wrong length, expected maxnum_".to_string());
12230 }
12231 self.handle_res(unsafe { MSK_getbarablocktriplet(self.ptr,maxnum_,&mut __tmp_2,subi_.as_mut_ptr(),subj_.as_mut_ptr(),subk_.as_mut_ptr(),subl_.as_mut_ptr(),valijkl_.as_mut_ptr()) },"get_bara_block_triplet")?;
12232 return Result::Ok(__tmp_2);
12233 } // getbarablocktriplet
12234 /// Obtains information about an element in barA.
12235 ///
12236 /// # Arguments
12237 ///
12238 /// - `idx_` Position of the element in the vectorized form.
12239 /// - `i_` Row index of the element at position idx.
12240 /// - `j_` Column index of the element at position idx.
12241 /// - `sub_` A list indexes of the elements from symmetric matrix storage that appear in the weighted sum.
12242 /// - `weights_` The weights associated with each term in the weighted sum.
12243 ///
12244 /// # Returns
12245 ///
12246 /// - `num` Number of terms in weighted sum that forms the element.
12247 ///
12248 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbaraidx>
12249 #[allow(unused_parens)]
12250 pub fn get_bara_idx(&self,idx_ : i64,i_ : &mut i32,j_ : &mut i32,sub_ : &mut[i64],weights_ : &mut[f64]) -> Result<i64,String> {
12251 let mut __tmp_0 : i64 = i64::default();
12252 let __tmp_1 = unsafe { MSK_getbaraidxinfo(self.ptr,idx_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getbaraidxinfo")?;
12253 let maxnum_ : i64 = __tmp_0;
12254 let mut __tmp_4 : i64 = i64::default();
12255 if sub_.len() != (maxnum_).try_into().unwrap() {
12256 return Result::Err("get_bara_idx: Argument 'sub' has the wrong length, expected maxnum_".to_string());
12257 }
12258 if weights_.len() != (maxnum_).try_into().unwrap() {
12259 return Result::Err("get_bara_idx: Argument 'weights' has the wrong length, expected maxnum_".to_string());
12260 }
12261 self.handle_res(unsafe { MSK_getbaraidx(self.ptr,idx_,maxnum_,i_,j_,&mut __tmp_4,sub_.as_mut_ptr(),weights_.as_mut_ptr()) },"get_bara_idx")?;
12262 return Result::Ok(__tmp_4);
12263 } // getbaraidx
12264 /// Obtains information about an element in barA.
12265 ///
12266 /// # Arguments
12267 ///
12268 /// - `idx_` Position of the element in the vectorized form.
12269 /// - `i_` Row index of the element at position idx.
12270 /// - `j_` Column index of the element at position idx.
12271 ///
12272 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbaraidxij>
12273 #[allow(unused_parens)]
12274 pub fn get_bara_idx_i_j(&self,idx_ : i64,i_ : &mut i32,j_ : &mut i32) -> Result<(),String> {
12275 self.handle_res(unsafe { MSK_getbaraidxij(self.ptr,idx_,i_,j_) },"get_bara_idx_i_j")?;
12276 return Result::Ok(());
12277 } // getbaraidxij
12278 /// Obtains the number of terms in the weighted sum that form a particular element in barA.
12279 ///
12280 /// # Arguments
12281 ///
12282 /// - `idx_` The internal position of the element for which information should be obtained.
12283 ///
12284 /// # Returns
12285 ///
12286 /// - `num` Number of terms in the weighted sum that form the specified element in barA.
12287 ///
12288 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbaraidxinfo>
12289 #[allow(unused_parens)]
12290 pub fn get_bara_idx_info(&self,idx_ : i64) -> Result<i64,String> {
12291 let mut __tmp_0 : i64 = i64::default();
12292 self.handle_res(unsafe { MSK_getbaraidxinfo(self.ptr,idx_,&mut __tmp_0) },"get_bara_idx_info")?;
12293 return Result::Ok(__tmp_0);
12294 } // getbaraidxinfo
12295 /// Obtains the sparsity pattern of the barA matrix.
12296 ///
12297 /// # Arguments
12298 ///
12299 /// - `numnz_` Number of nonzero elements in barA.
12300 /// - `idxij_` Position of each nonzero element in the vector representation of barA.
12301 ///
12302 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarasparsity>
12303 #[allow(unused_parens)]
12304 pub fn get_bara_sparsity(&self,numnz_ : &mut i64,idxij_ : &mut[i64]) -> Result<(),String> {
12305 let mut __tmp_0 : i64 = i64::default();
12306 let __tmp_1 = unsafe { MSK_getnumbaranz(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumbaranz")?;
12307 let maxnumnz_ : i64 = __tmp_0;
12308 if idxij_.len() != (maxnumnz_).try_into().unwrap() {
12309 return Result::Err("get_bara_sparsity: Argument 'idxij' has the wrong length, expected maxnumnz_".to_string());
12310 }
12311 self.handle_res(unsafe { MSK_getbarasparsity(self.ptr,maxnumnz_,numnz_,idxij_.as_mut_ptr()) },"get_bara_sparsity")?;
12312 return Result::Ok(());
12313 } // getbarasparsity
12314 /// Obtains barC in block triplet form.
12315 ///
12316 /// # Arguments
12317 ///
12318 /// - `subj_` Symmetric matrix variable index.
12319 /// - `subk_` Block row index.
12320 /// - `subl_` Block column index.
12321 /// - `valjkl_` The numerical value associated with each block triplet.
12322 ///
12323 /// # Returns
12324 ///
12325 /// - `num` Number of elements in the block triplet form.
12326 ///
12327 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarcblocktriplet>
12328 #[allow(unused_parens)]
12329 pub fn get_barc_block_triplet(&self,subj_ : &mut[i32],subk_ : &mut[i32],subl_ : &mut[i32],valjkl_ : &mut[f64]) -> Result<i64,String> {
12330 let mut __tmp_0 : i64 = i64::default();
12331 let __tmp_1 = unsafe { MSK_getnumbarcblocktriplets(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumbarcblocktriplets")?;
12332 let maxnum_ : i64 = __tmp_0;
12333 let mut __tmp_2 : i64 = i64::default();
12334 if subj_.len() != (maxnum_).try_into().unwrap() {
12335 return Result::Err("get_barc_block_triplet: Argument 'subj' has the wrong length, expected maxnum_".to_string());
12336 }
12337 if subk_.len() != (maxnum_).try_into().unwrap() {
12338 return Result::Err("get_barc_block_triplet: Argument 'subk' has the wrong length, expected maxnum_".to_string());
12339 }
12340 if subl_.len() != (maxnum_).try_into().unwrap() {
12341 return Result::Err("get_barc_block_triplet: Argument 'subl' has the wrong length, expected maxnum_".to_string());
12342 }
12343 if valjkl_.len() != (maxnum_).try_into().unwrap() {
12344 return Result::Err("get_barc_block_triplet: Argument 'valjkl' has the wrong length, expected maxnum_".to_string());
12345 }
12346 self.handle_res(unsafe { MSK_getbarcblocktriplet(self.ptr,maxnum_,&mut __tmp_2,subj_.as_mut_ptr(),subk_.as_mut_ptr(),subl_.as_mut_ptr(),valjkl_.as_mut_ptr()) },"get_barc_block_triplet")?;
12347 return Result::Ok(__tmp_2);
12348 } // getbarcblocktriplet
12349 /// Obtains information about an element in barc.
12350 ///
12351 /// # Arguments
12352 ///
12353 /// - `idx_` Index of the element for which information should be obtained.
12354 /// - `j_` Row index in barc.
12355 /// - `num_` Number of terms in the weighted sum.
12356 /// - `sub_` Elements appearing the weighted sum.
12357 /// - `weights_` Weights of terms in the weighted sum.
12358 ///
12359 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarcidx>
12360 #[allow(unused_parens)]
12361 pub fn get_barc_idx(&self,idx_ : i64,j_ : &mut i32,num_ : &mut i64,sub_ : &mut[i64],weights_ : &mut[f64]) -> Result<(),String> {
12362 let mut __tmp_0 : i64 = i64::default();
12363 let __tmp_1 = unsafe { MSK_getbarcidxinfo(self.ptr,idx_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getbarcidxinfo")?;
12364 let maxnum_ : i64 = __tmp_0;
12365 if sub_.len() != (maxnum_).try_into().unwrap() {
12366 return Result::Err("get_barc_idx: Argument 'sub' has the wrong length, expected maxnum_".to_string());
12367 }
12368 if weights_.len() != (maxnum_).try_into().unwrap() {
12369 return Result::Err("get_barc_idx: Argument 'weights' has the wrong length, expected maxnum_".to_string());
12370 }
12371 self.handle_res(unsafe { MSK_getbarcidx(self.ptr,idx_,maxnum_,j_,num_,sub_.as_mut_ptr(),weights_.as_mut_ptr()) },"get_barc_idx")?;
12372 return Result::Ok(());
12373 } // getbarcidx
12374 /// Obtains information about an element in barc.
12375 ///
12376 /// # Arguments
12377 ///
12378 /// - `idx_` Index of the element for which information should be obtained. The value is an index of a symmetric sparse variable.
12379 ///
12380 /// # Returns
12381 ///
12382 /// - `num` Number of terms that appear in the weighted sum that forms the requested element.
12383 ///
12384 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarcidxinfo>
12385 #[allow(unused_parens)]
12386 pub fn get_barc_idx_info(&self,idx_ : i64) -> Result<i64,String> {
12387 let mut __tmp_0 : i64 = i64::default();
12388 self.handle_res(unsafe { MSK_getbarcidxinfo(self.ptr,idx_,&mut __tmp_0) },"get_barc_idx_info")?;
12389 return Result::Ok(__tmp_0);
12390 } // getbarcidxinfo
12391 /// Obtains the row index of an element in barc.
12392 ///
12393 /// # Arguments
12394 ///
12395 /// - `idx_` Index of the element for which information should be obtained.
12396 ///
12397 /// # Returns
12398 ///
12399 /// - `j` Row index in barc.
12400 ///
12401 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarcidxj>
12402 #[allow(unused_parens)]
12403 pub fn get_barc_idx_j(&self,idx_ : i64) -> Result<i32,String> {
12404 let mut __tmp_0 : i32 = i32::default();
12405 self.handle_res(unsafe { MSK_getbarcidxj(self.ptr,idx_,&mut __tmp_0) },"get_barc_idx_j")?;
12406 return Result::Ok(__tmp_0);
12407 } // getbarcidxj
12408 /// Get the positions of the nonzero elements in barc.
12409 ///
12410 /// # Arguments
12411 ///
12412 /// - `numnz_` Number of nonzero elements in barc.
12413 /// - `idxj_` Internal positions of the nonzeros elements in barc.
12414 ///
12415 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarcsparsity>
12416 #[allow(unused_parens)]
12417 pub fn get_barc_sparsity(&self,numnz_ : &mut i64,idxj_ : &mut[i64]) -> Result<(),String> {
12418 let mut __tmp_0 : i64 = i64::default();
12419 let __tmp_1 = unsafe { MSK_getnumbarcnz(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumbarcnz")?;
12420 let maxnumnz_ : i64 = __tmp_0;
12421 if idxj_.len() != (maxnumnz_).try_into().unwrap() {
12422 return Result::Err("get_barc_sparsity: Argument 'idxj' has the wrong length, expected maxnumnz_".to_string());
12423 }
12424 self.handle_res(unsafe { MSK_getbarcsparsity(self.ptr,maxnumnz_,numnz_,idxj_.as_mut_ptr()) },"get_barc_sparsity")?;
12425 return Result::Ok(());
12426 } // getbarcsparsity
12427 /// Obtains the dual solution for a semidefinite variable.
12428 ///
12429 /// # Arguments
12430 ///
12431 /// - `whichsol_` Selects a solution.
12432 ///
12433 /// See [Soltype]
12434 /// - `j_` Index of the semidefinite variable.
12435 /// - `barsj_` Value of the j'th dual variable of barx.
12436 ///
12437 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarsj>
12438 #[allow(unused_parens)]
12439 pub fn get_bars_j(&self,whichsol_ : i32,j_ : i32,barsj_ : &mut[f64]) -> Result<(),String> {
12440 let mut __tmp_0 : i64 = i64::default();
12441 let __tmp_1 = unsafe { MSK_getlenbarvarj(self.ptr,j_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getlenbarvarj")?;
12442 if barsj_.len() != (__tmp_0).try_into().unwrap() {
12443 return Result::Err("get_bars_j: Argument 'barsj' has the wrong length, expected __tmp_0".to_string());
12444 }
12445 self.handle_res(unsafe { MSK_getbarsj(self.ptr,whichsol_,j_,barsj_.as_mut_ptr()) },"get_bars_j")?;
12446 return Result::Ok(());
12447 } // getbarsj
12448 /// Obtains the dual solution for a sequence of semidefinite variables.
12449 ///
12450 /// # Arguments
12451 ///
12452 /// - `whichsol_` Selects a solution.
12453 ///
12454 /// See [Soltype]
12455 /// - `first_` Index of the first semidefinite variable in the slice.
12456 /// - `last_` Index of the last semidefinite variable in the slice plus one.
12457 /// - `slicesize_` Denotes the length of the array barsslice.
12458 /// - `barsslice_` Dual solution values of symmetric matrix variables in the slice, stored sequentially.
12459 ///
12460 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarsslice>
12461 #[allow(unused_parens)]
12462 pub fn get_bars_slice(&self,whichsol_ : i32,first_ : i32,last_ : i32,slicesize_ : i64,barsslice_ : &mut[f64]) -> Result<(),String> {
12463 if barsslice_.len() != (slicesize_).try_into().unwrap() {
12464 return Result::Err("get_bars_slice: Argument 'barsslice' has the wrong length, expected slicesize_".to_string());
12465 }
12466 self.handle_res(unsafe { MSK_getbarsslice(self.ptr,whichsol_,first_,last_,slicesize_,barsslice_.as_mut_ptr()) },"get_bars_slice")?;
12467 return Result::Ok(());
12468 } // getbarsslice
12469 /// Obtains the name of a semidefinite variable.
12470 ///
12471 /// # Arguments
12472 ///
12473 /// - `i_` Index of the variable.
12474 ///
12475 /// # Returns
12476 ///
12477 /// - `name` The requested name is copied to this buffer.
12478 ///
12479 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarvarname>
12480 #[allow(unused_parens)]
12481 pub fn get_barvar_name(&self,i_ : i32) -> Result<String,String> {
12482 let mut __tmp_0 : i32 = i32::default();
12483 let __tmp_1 = unsafe { MSK_getbarvarnamelen(self.ptr,i_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getbarvarnamelen")?;
12484 let sizename_ : i32 = (1+__tmp_0);
12485 let mut name_ = Vec::new(); name_.resize(sizename_ as usize,0);
12486 self.handle_res(unsafe { MSK_getbarvarname(self.ptr,i_,sizename_,name_.as_mut_ptr()) },"get_barvar_name")?;
12487 return Result::Ok(String::from_utf8_lossy(&name_[..name_.iter().position(|&c| c == 0).unwrap_or(sizename_ as usize)]).into_owned());
12488 } // getbarvarname
12489 /// Obtains the index of semidefinite variable from its name.
12490 ///
12491 /// # Arguments
12492 ///
12493 /// - `somename_` The name of the variable.
12494 /// - `asgn_` Non-zero if the name somename is assigned to some semidefinite variable.
12495 ///
12496 /// # Returns
12497 ///
12498 /// - `index` The index of a semidefinite variable with the name somename (if one exists).
12499 ///
12500 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarvarnameindex>
12501 #[allow(unused_parens)]
12502 pub fn get_barvar_name_index(&self,somename_ : &str,asgn_ : &mut i32) -> Result<i32,String> {
12503 let __tmp_1 = CString::new(somename_).unwrap();
12504 let mut __tmp_3 : i32 = i32::default();
12505 self.handle_res(unsafe { MSK_getbarvarnameindex(self.ptr,__tmp_1.as_ptr(),asgn_,&mut __tmp_3) },"get_barvar_name_index")?;
12506 return Result::Ok(__tmp_3);
12507 } // getbarvarnameindex
12508 /// Obtains the length of the name of a semidefinite variable.
12509 ///
12510 /// # Arguments
12511 ///
12512 /// - `i_` Index of the variable.
12513 ///
12514 /// # Returns
12515 ///
12516 /// - `len` Returns the length of the indicated name.
12517 ///
12518 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarvarnamelen>
12519 #[allow(unused_parens)]
12520 pub fn get_barvar_name_len(&self,i_ : i32) -> Result<i32,String> {
12521 let mut __tmp_0 : i32 = i32::default();
12522 self.handle_res(unsafe { MSK_getbarvarnamelen(self.ptr,i_,&mut __tmp_0) },"get_barvar_name_len")?;
12523 return Result::Ok(__tmp_0);
12524 } // getbarvarnamelen
12525 /// Obtains the primal solution for a semidefinite variable.
12526 ///
12527 /// # Arguments
12528 ///
12529 /// - `whichsol_` Selects a solution.
12530 ///
12531 /// See [Soltype]
12532 /// - `j_` Index of the semidefinite variable.
12533 /// - `barxj_` Value of the j'th variable of barx.
12534 ///
12535 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarxj>
12536 #[allow(unused_parens)]
12537 pub fn get_barx_j(&self,whichsol_ : i32,j_ : i32,barxj_ : &mut[f64]) -> Result<(),String> {
12538 let mut __tmp_0 : i64 = i64::default();
12539 let __tmp_1 = unsafe { MSK_getlenbarvarj(self.ptr,j_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getlenbarvarj")?;
12540 if barxj_.len() != (__tmp_0).try_into().unwrap() {
12541 return Result::Err("get_barx_j: Argument 'barxj' has the wrong length, expected __tmp_0".to_string());
12542 }
12543 self.handle_res(unsafe { MSK_getbarxj(self.ptr,whichsol_,j_,barxj_.as_mut_ptr()) },"get_barx_j")?;
12544 return Result::Ok(());
12545 } // getbarxj
12546 /// Obtains the primal solution for a sequence of semidefinite variables.
12547 ///
12548 /// # Arguments
12549 ///
12550 /// - `whichsol_` Selects a solution.
12551 ///
12552 /// See [Soltype]
12553 /// - `first_` Index of the first semidefinite variable in the slice.
12554 /// - `last_` Index of the last semidefinite variable in the slice plus one.
12555 /// - `slicesize_` Denotes the length of the array barxslice.
12556 /// - `barxslice_` Solution values of symmetric matrix variables in the slice, stored sequentially.
12557 ///
12558 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbarxslice>
12559 #[allow(unused_parens)]
12560 pub fn get_barx_slice(&self,whichsol_ : i32,first_ : i32,last_ : i32,slicesize_ : i64,barxslice_ : &mut[f64]) -> Result<(),String> {
12561 if barxslice_.len() != (slicesize_).try_into().unwrap() {
12562 return Result::Err("get_barx_slice: Argument 'barxslice' has the wrong length, expected slicesize_".to_string());
12563 }
12564 self.handle_res(unsafe { MSK_getbarxslice(self.ptr,whichsol_,first_,last_,slicesize_,barxslice_.as_mut_ptr()) },"get_barx_slice")?;
12565 return Result::Ok(());
12566 } // getbarxslice
12567 /// Obtains all objective coefficients.
12568 ///
12569 /// # Arguments
12570 ///
12571 /// - `c_` Linear terms of the objective as a dense vector. The length is the number of variables.
12572 ///
12573 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getc>
12574 #[allow(unused_parens)]
12575 pub fn get_c(&self,c_ : &mut[f64]) -> Result<(),String> {
12576 let mut __tmp_0 : i32 = i32::default();
12577 let __tmp_1 = unsafe { MSK_getnumvar(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumvar")?;
12578 if c_.len() > 0 && c_.len() != (__tmp_0).try_into().unwrap() {
12579 return Result::Err("get_c: Argument 'c' has the wrong length, expected __tmp_0".to_string());
12580 }
12581 self.handle_res(unsafe { MSK_getc(self.ptr,if c_.len() == 0 { std::ptr::null_mut() } else { c_.as_mut_ptr() }) },"get_c")?;
12582 return Result::Ok(());
12583 } // getc
12584 /// Obtains the fixed term in the objective.
12585 ///
12586 /// # Returns
12587 ///
12588 /// - `cfix` Fixed term in the objective.
12589 ///
12590 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getcfix>
12591 #[allow(unused_parens)]
12592 pub fn get_cfix(&self) -> Result<f64,String> {
12593 let mut __tmp_0 : f64 = f64::default();
12594 self.handle_res(unsafe { MSK_getcfix(self.ptr,&mut __tmp_0) },"get_cfix")?;
12595 return Result::Ok(__tmp_0);
12596 } // getcfix
12597 /// Obtains one objective coefficient.
12598 ///
12599 /// # Arguments
12600 ///
12601 /// - `j_` Index of the variable for which the c coefficient should be obtained.
12602 ///
12603 /// # Returns
12604 ///
12605 /// - `cj` The c coefficient value.
12606 ///
12607 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getcj>
12608 #[allow(unused_parens)]
12609 pub fn get_c_j(&self,j_ : i32) -> Result<f64,String> {
12610 let mut __tmp_0 : f64 = f64::default();
12611 self.handle_res(unsafe { MSK_getcj(self.ptr,j_,&mut __tmp_0) },"get_c_j")?;
12612 return Result::Ok(__tmp_0);
12613 } // getcj
12614 /// Obtains a sequence of coefficients from the objective.
12615 ///
12616 /// # Arguments
12617 ///
12618 /// - `subj_` A list of variable indexes.
12619 /// - `c_` Linear terms of the requested list of the objective as a dense vector.
12620 ///
12621 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getclist>
12622 #[allow(unused_parens)]
12623 pub fn get_c_list(&self,subj_ : &[i32],c_ : &mut[f64]) -> Result<(),String> {
12624 let num_ : i32 = subj_.len() as i32;
12625 if c_.len() != (num_).try_into().unwrap() {
12626 return Result::Err("get_c_list: Argument 'c' has the wrong length, expected num_".to_string());
12627 }
12628 self.handle_res(unsafe { MSK_getclist(self.ptr,num_,subj_.as_ptr(),c_.as_mut_ptr()) },"get_c_list")?;
12629 return Result::Ok(());
12630 } // getclist
12631 /// Obtains bound information for one constraint.
12632 ///
12633 /// # Arguments
12634 ///
12635 /// - `i_` Index of the constraint for which the bound information should be obtained.
12636 /// - `bk_` Bound keys.
12637 ///
12638 /// See [Boundkey]
12639 /// - `bl_` Values for lower bounds.
12640 /// - `bu_` Values for upper bounds.
12641 ///
12642 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getconbound>
12643 #[allow(unused_parens)]
12644 pub fn get_con_bound(&self,i_ : i32,bk_ : & mut i32,bl_ : &mut f64,bu_ : &mut f64) -> Result<(),String> {
12645 self.handle_res(unsafe { MSK_getconbound(self.ptr,i_,bk_,bl_,bu_) },"get_con_bound")?;
12646 return Result::Ok(());
12647 } // getconbound
12648 /// Obtains bounds information for a slice of the constraints.
12649 ///
12650 /// # Arguments
12651 ///
12652 /// - `first_` First index in the sequence.
12653 /// - `last_` Last index plus 1 in the sequence.
12654 /// - `bk_` Bound keys.
12655 ///
12656 /// See [Boundkey]
12657 /// - `bl_` Values for lower bounds.
12658 /// - `bu_` Values for upper bounds.
12659 ///
12660 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getconboundslice>
12661 #[allow(unused_parens)]
12662 pub fn get_con_bound_slice(&self,first_ : i32,last_ : i32,bk_ : &mut[i32],bl_ : &mut[f64],bu_ : &mut[f64]) -> Result<(),String> {
12663 if bk_.len() != ((last_-first_)).try_into().unwrap() {
12664 return Result::Err("get_con_bound_slice: Argument 'bk' has the wrong length, expected (last_-first_)".to_string());
12665 }
12666 if bl_.len() > 0 && bl_.len() != ((last_-first_)).try_into().unwrap() {
12667 return Result::Err("get_con_bound_slice: Argument 'bl' has the wrong length, expected (last_-first_)".to_string());
12668 }
12669 if bu_.len() > 0 && bu_.len() != ((last_-first_)).try_into().unwrap() {
12670 return Result::Err("get_con_bound_slice: Argument 'bu' has the wrong length, expected (last_-first_)".to_string());
12671 }
12672 self.handle_res(unsafe { MSK_getconboundslice(self.ptr,first_,last_,bk_.as_mut_ptr(),if bl_.len() == 0 { std::ptr::null_mut() } else { bl_.as_mut_ptr() },if bu_.len() == 0 { std::ptr::null_mut() } else { bu_.as_mut_ptr() }) },"get_con_bound_slice")?;
12673 return Result::Ok(());
12674 } // getconboundslice
12675 /// Obtains a cone.
12676 ///
12677 /// # Arguments
12678 ///
12679 /// - `k_` Index of the cone.
12680 /// - `ct_` Specifies the type of the cone.
12681 ///
12682 /// See [Conetype]
12683 /// - `conepar_` For the power cone it denotes the exponent alpha. For other cone types it is unused and can be set to 0.
12684 /// - `nummem_` Number of member variables in the cone.
12685 /// - `submem_` Variable subscripts of the members in the cone.
12686 ///
12687 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getcone>
12688 #[allow(unused_parens)]
12689 pub fn get_cone(&mut self,k_ : i32,ct_ : & mut i32,conepar_ : &mut f64,nummem_ : &mut i32,submem_ : &mut[i32]) -> Result<(),String> {
12690 let mut __tmp_3 : i32 = i32::default();
12691 let mut __tmp_4 : f64 = f64::default();
12692 let mut __tmp_5 : i32 = i32::default();
12693 let __tmp_6 = unsafe { MSK_getconeinfo(self.ptr,k_,&mut __tmp_3,&mut __tmp_4,&mut __tmp_5) };let _ = self.handle_res(__tmp_6,"getconeinfo")?;
12694 if submem_.len() > 0 && submem_.len() != (__tmp_5).try_into().unwrap() {
12695 return Result::Err("get_cone: Argument 'submem' has the wrong length, expected __tmp_5".to_string());
12696 }
12697 self.handle_res(unsafe { MSK_getcone(self.ptr,k_,ct_,conepar_,nummem_,if submem_.len() == 0 { std::ptr::null_mut() } else { submem_.as_mut_ptr() }) },"get_cone")?;
12698 return Result::Ok(());
12699 } // getcone
12700 /// Obtains information about a cone.
12701 ///
12702 /// # Arguments
12703 ///
12704 /// - `k_` Index of the cone.
12705 /// - `ct_` Specifies the type of the cone.
12706 ///
12707 /// See [Conetype]
12708 /// - `conepar_` For the power cone it denotes the exponent alpha. For other cone types it is unused and can be set to 0.
12709 /// - `nummem_` Number of member variables in the cone.
12710 ///
12711 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getconeinfo>
12712 #[allow(unused_parens)]
12713 pub fn get_cone_info(&self,k_ : i32,ct_ : & mut i32,conepar_ : &mut f64,nummem_ : &mut i32) -> Result<(),String> {
12714 self.handle_res(unsafe { MSK_getconeinfo(self.ptr,k_,ct_,conepar_,nummem_) },"get_cone_info")?;
12715 return Result::Ok(());
12716 } // getconeinfo
12717 /// Obtains the name of a cone.
12718 ///
12719 /// # Arguments
12720 ///
12721 /// - `i_` Index of the cone.
12722 ///
12723 /// # Returns
12724 ///
12725 /// - `name` The required name.
12726 ///
12727 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getconename>
12728 #[allow(unused_parens)]
12729 pub fn get_cone_name(&self,i_ : i32) -> Result<String,String> {
12730 let mut __tmp_0 : i32 = i32::default();
12731 let __tmp_1 = unsafe { MSK_getconenamelen(self.ptr,i_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getconenamelen")?;
12732 let sizename_ : i32 = (1+__tmp_0);
12733 let mut name_ = Vec::new(); name_.resize(sizename_ as usize,0);
12734 self.handle_res(unsafe { MSK_getconename(self.ptr,i_,sizename_,name_.as_mut_ptr()) },"get_cone_name")?;
12735 return Result::Ok(String::from_utf8_lossy(&name_[..name_.iter().position(|&c| c == 0).unwrap_or(sizename_ as usize)]).into_owned());
12736 } // getconename
12737 /// Checks whether the name has been assigned to any cone.
12738 ///
12739 /// # Arguments
12740 ///
12741 /// - `somename_` The name which should be checked.
12742 /// - `asgn_` Is non-zero if the name somename is assigned to some cone.
12743 ///
12744 /// # Returns
12745 ///
12746 /// - `index` If the name somename is assigned to some cone, this is the index of the cone.
12747 ///
12748 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getconenameindex>
12749 #[allow(unused_parens)]
12750 pub fn get_cone_name_index(&self,somename_ : &str,asgn_ : &mut i32) -> Result<i32,String> {
12751 let __tmp_1 = CString::new(somename_).unwrap();
12752 let mut __tmp_3 : i32 = i32::default();
12753 self.handle_res(unsafe { MSK_getconenameindex(self.ptr,__tmp_1.as_ptr(),asgn_,&mut __tmp_3) },"get_cone_name_index")?;
12754 return Result::Ok(__tmp_3);
12755 } // getconenameindex
12756 /// Obtains the length of the name of a cone.
12757 ///
12758 /// # Arguments
12759 ///
12760 /// - `i_` Index of the cone.
12761 ///
12762 /// # Returns
12763 ///
12764 /// - `len` Returns the length of the indicated name.
12765 ///
12766 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getconenamelen>
12767 #[allow(unused_parens)]
12768 pub fn get_cone_name_len(&self,i_ : i32) -> Result<i32,String> {
12769 let mut __tmp_0 : i32 = i32::default();
12770 self.handle_res(unsafe { MSK_getconenamelen(self.ptr,i_,&mut __tmp_0) },"get_cone_name_len")?;
12771 return Result::Ok(__tmp_0);
12772 } // getconenamelen
12773 /// Obtains the name of a constraint.
12774 ///
12775 /// # Arguments
12776 ///
12777 /// - `i_` Index of the constraint.
12778 ///
12779 /// # Returns
12780 ///
12781 /// - `name` The required name.
12782 ///
12783 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getconname>
12784 #[allow(unused_parens)]
12785 pub fn get_con_name(&self,i_ : i32) -> Result<String,String> {
12786 let mut __tmp_0 : i32 = i32::default();
12787 let __tmp_1 = unsafe { MSK_getconnamelen(self.ptr,i_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getconnamelen")?;
12788 let sizename_ : i32 = (1+__tmp_0);
12789 let mut name_ = Vec::new(); name_.resize(sizename_ as usize,0);
12790 self.handle_res(unsafe { MSK_getconname(self.ptr,i_,sizename_,name_.as_mut_ptr()) },"get_con_name")?;
12791 return Result::Ok(String::from_utf8_lossy(&name_[..name_.iter().position(|&c| c == 0).unwrap_or(sizename_ as usize)]).into_owned());
12792 } // getconname
12793 /// Checks whether the name has been assigned to any constraint.
12794 ///
12795 /// # Arguments
12796 ///
12797 /// - `somename_` The name which should be checked.
12798 /// - `asgn_` Is non-zero if the name somename is assigned to some constraint.
12799 ///
12800 /// # Returns
12801 ///
12802 /// - `index` If the name somename is assigned to a constraint, then return the index of the constraint.
12803 ///
12804 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getconnameindex>
12805 #[allow(unused_parens)]
12806 pub fn get_con_name_index(&self,somename_ : &str,asgn_ : &mut i32) -> Result<i32,String> {
12807 let __tmp_1 = CString::new(somename_).unwrap();
12808 let mut __tmp_3 : i32 = i32::default();
12809 self.handle_res(unsafe { MSK_getconnameindex(self.ptr,__tmp_1.as_ptr(),asgn_,&mut __tmp_3) },"get_con_name_index")?;
12810 return Result::Ok(__tmp_3);
12811 } // getconnameindex
12812 /// Obtains the length of the name of a constraint.
12813 ///
12814 /// # Arguments
12815 ///
12816 /// - `i_` Index of the constraint.
12817 ///
12818 /// # Returns
12819 ///
12820 /// - `len` Returns the length of the indicated name.
12821 ///
12822 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getconnamelen>
12823 #[allow(unused_parens)]
12824 pub fn get_con_name_len(&self,i_ : i32) -> Result<i32,String> {
12825 let mut __tmp_0 : i32 = i32::default();
12826 self.handle_res(unsafe { MSK_getconnamelen(self.ptr,i_,&mut __tmp_0) },"get_con_name_len")?;
12827 return Result::Ok(__tmp_0);
12828 } // getconnamelen
12829 /// Obtains a sequence of coefficients from the objective.
12830 ///
12831 /// # Arguments
12832 ///
12833 /// - `first_` First index in the sequence.
12834 /// - `last_` Last index plus 1 in the sequence.
12835 /// - `c_` Linear terms of the requested slice of the objective as a dense vector.
12836 ///
12837 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getcslice>
12838 #[allow(unused_parens)]
12839 pub fn get_c_slice(&self,first_ : i32,last_ : i32,c_ : &mut[f64]) -> Result<(),String> {
12840 if c_.len() > 0 && c_.len() != ((last_-first_)).try_into().unwrap() {
12841 return Result::Err("get_c_slice: Argument 'c' has the wrong length, expected (last_-first_)".to_string());
12842 }
12843 self.handle_res(unsafe { MSK_getcslice(self.ptr,first_,last_,if c_.len() == 0 { std::ptr::null_mut() } else { c_.as_mut_ptr() }) },"get_c_slice")?;
12844 return Result::Ok(());
12845 } // getcslice
12846 /// Obtains the dimension of a symmetric matrix variable.
12847 ///
12848 /// # Arguments
12849 ///
12850 /// - `j_` Index of the semidefinite variable whose dimension is requested.
12851 ///
12852 /// # Returns
12853 ///
12854 /// - `dimbarvarj` The dimension of the j'th semidefinite variable.
12855 ///
12856 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdimbarvarj>
12857 #[allow(unused_parens)]
12858 pub fn get_dim_barvar_j(&self,j_ : i32) -> Result<i32,String> {
12859 let mut __tmp_0 : i32 = i32::default();
12860 self.handle_res(unsafe { MSK_getdimbarvarj(self.ptr,j_,&mut __tmp_0) },"get_dim_barvar_j")?;
12861 return Result::Ok(__tmp_0);
12862 } // getdimbarvarj
12863 /// Obtains the list of affine expression indexes in a disjunctive constraint.
12864 ///
12865 /// # Arguments
12866 ///
12867 /// - `djcidx_` Index of the disjunctive constraint.
12868 /// - `afeidxlist_` List of affine expression indexes.
12869 ///
12870 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjcafeidxlist>
12871 #[allow(unused_parens)]
12872 pub fn get_djc_afe_idx_list(&self,djcidx_ : i64,afeidxlist_ : &mut[i64]) -> Result<(),String> {
12873 let mut __tmp_0 : i64 = i64::default();
12874 let __tmp_1 = unsafe { MSK_getdjcnumafe(self.ptr,djcidx_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getdjcnumafe")?;
12875 if afeidxlist_.len() != (__tmp_0).try_into().unwrap() {
12876 return Result::Err("get_djc_afe_idx_list: Argument 'afeidxlist' has the wrong length, expected __tmp_0".to_string());
12877 }
12878 self.handle_res(unsafe { MSK_getdjcafeidxlist(self.ptr,djcidx_,afeidxlist_.as_mut_ptr()) },"get_djc_afe_idx_list")?;
12879 return Result::Ok(());
12880 } // getdjcafeidxlist
12881 /// Obtains the optional constant term vector of a disjunctive constraint.
12882 ///
12883 /// # Arguments
12884 ///
12885 /// - `djcidx_` Index of the disjunctive constraint.
12886 /// - `b_` The vector b.
12887 ///
12888 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjcb>
12889 #[allow(unused_parens)]
12890 pub fn get_djc_b(&self,djcidx_ : i64,b_ : &mut[f64]) -> Result<(),String> {
12891 let mut __tmp_0 : i64 = i64::default();
12892 let __tmp_1 = unsafe { MSK_getdjcnumafe(self.ptr,djcidx_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getdjcnumafe")?;
12893 if b_.len() != (__tmp_0).try_into().unwrap() {
12894 return Result::Err("get_djc_b: Argument 'b' has the wrong length, expected __tmp_0".to_string());
12895 }
12896 self.handle_res(unsafe { MSK_getdjcb(self.ptr,djcidx_,b_.as_mut_ptr()) },"get_djc_b")?;
12897 return Result::Ok(());
12898 } // getdjcb
12899 /// Obtains the list of domain indexes in a disjunctive constraint.
12900 ///
12901 /// # Arguments
12902 ///
12903 /// - `djcidx_` Index of the disjunctive constraint.
12904 /// - `domidxlist_` List of term sizes.
12905 ///
12906 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjcdomainidxlist>
12907 #[allow(unused_parens)]
12908 pub fn get_djc_domain_idx_list(&self,djcidx_ : i64,domidxlist_ : &mut[i64]) -> Result<(),String> {
12909 let mut __tmp_0 : i64 = i64::default();
12910 let __tmp_1 = unsafe { MSK_getdjcnumdomain(self.ptr,djcidx_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getdjcnumdomain")?;
12911 if domidxlist_.len() != (__tmp_0).try_into().unwrap() {
12912 return Result::Err("get_djc_domain_idx_list: Argument 'domidxlist' has the wrong length, expected __tmp_0".to_string());
12913 }
12914 self.handle_res(unsafe { MSK_getdjcdomainidxlist(self.ptr,djcidx_,domidxlist_.as_mut_ptr()) },"get_djc_domain_idx_list")?;
12915 return Result::Ok(());
12916 } // getdjcdomainidxlist
12917 /// Obtains the name of a disjunctive constraint.
12918 ///
12919 /// # Arguments
12920 ///
12921 /// - `djcidx_` Index of a disjunctive constraint.
12922 ///
12923 /// # Returns
12924 ///
12925 /// - `name` Returns the required name.
12926 ///
12927 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjcname>
12928 #[allow(unused_parens)]
12929 pub fn get_djc_name(&self,djcidx_ : i64) -> Result<String,String> {
12930 let mut __tmp_0 : i32 = i32::default();
12931 let __tmp_1 = unsafe { MSK_getdjcnamelen(self.ptr,djcidx_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getdjcnamelen")?;
12932 let sizename_ : i32 = (1+__tmp_0);
12933 let mut name_ = Vec::new(); name_.resize(sizename_ as usize,0);
12934 self.handle_res(unsafe { MSK_getdjcname(self.ptr,djcidx_,sizename_,name_.as_mut_ptr()) },"get_djc_name")?;
12935 return Result::Ok(String::from_utf8_lossy(&name_[..name_.iter().position(|&c| c == 0).unwrap_or(sizename_ as usize)]).into_owned());
12936 } // getdjcname
12937 /// Obtains the length of the name of a disjunctive constraint.
12938 ///
12939 /// # Arguments
12940 ///
12941 /// - `djcidx_` Index of a disjunctive constraint.
12942 ///
12943 /// # Returns
12944 ///
12945 /// - `len` Returns the length of the indicated name.
12946 ///
12947 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjcnamelen>
12948 #[allow(unused_parens)]
12949 pub fn get_djc_name_len(&self,djcidx_ : i64) -> Result<i32,String> {
12950 let mut __tmp_0 : i32 = i32::default();
12951 self.handle_res(unsafe { MSK_getdjcnamelen(self.ptr,djcidx_,&mut __tmp_0) },"get_djc_name_len")?;
12952 return Result::Ok(__tmp_0);
12953 } // getdjcnamelen
12954 /// Obtains the number of affine expressions in the disjunctive constraint.
12955 ///
12956 /// # Arguments
12957 ///
12958 /// - `djcidx_` Index of the disjunctive constraint.
12959 ///
12960 /// # Returns
12961 ///
12962 /// - `numafe` Number of affine expressions in the disjunctive constraint.
12963 ///
12964 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjcnumafe>
12965 #[allow(unused_parens)]
12966 pub fn get_djc_num_afe(&mut self,djcidx_ : i64) -> Result<i64,String> {
12967 let mut __tmp_0 : i64 = i64::default();
12968 self.handle_res(unsafe { MSK_getdjcnumafe(self.ptr,djcidx_,&mut __tmp_0) },"get_djc_num_afe")?;
12969 return Result::Ok(__tmp_0);
12970 } // getdjcnumafe
12971 /// Obtains the number of affine expressions in all disjunctive constraints.
12972 ///
12973 /// # Returns
12974 ///
12975 /// - `numafetot` Number of affine expressions in all disjunctive constraints.
12976 ///
12977 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjcnumafetot>
12978 #[allow(unused_parens)]
12979 pub fn get_djc_num_afe_tot(&mut self) -> Result<i64,String> {
12980 let mut __tmp_0 : i64 = i64::default();
12981 self.handle_res(unsafe { MSK_getdjcnumafetot(self.ptr,&mut __tmp_0) },"get_djc_num_afe_tot")?;
12982 return Result::Ok(__tmp_0);
12983 } // getdjcnumafetot
12984 /// Obtains the number of domains in the disjunctive constraint.
12985 ///
12986 /// # Arguments
12987 ///
12988 /// - `djcidx_` Index of the disjunctive constraint.
12989 ///
12990 /// # Returns
12991 ///
12992 /// - `numdomain` Number of domains in the disjunctive constraint.
12993 ///
12994 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjcnumdomain>
12995 #[allow(unused_parens)]
12996 pub fn get_djc_num_domain(&mut self,djcidx_ : i64) -> Result<i64,String> {
12997 let mut __tmp_0 : i64 = i64::default();
12998 self.handle_res(unsafe { MSK_getdjcnumdomain(self.ptr,djcidx_,&mut __tmp_0) },"get_djc_num_domain")?;
12999 return Result::Ok(__tmp_0);
13000 } // getdjcnumdomain
13001 /// Obtains the number of domains in all disjunctive constraints.
13002 ///
13003 /// # Returns
13004 ///
13005 /// - `numdomaintot` Number of domains in all disjunctive constraints.
13006 ///
13007 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjcnumdomaintot>
13008 #[allow(unused_parens)]
13009 pub fn get_djc_num_domain_tot(&mut self) -> Result<i64,String> {
13010 let mut __tmp_0 : i64 = i64::default();
13011 self.handle_res(unsafe { MSK_getdjcnumdomaintot(self.ptr,&mut __tmp_0) },"get_djc_num_domain_tot")?;
13012 return Result::Ok(__tmp_0);
13013 } // getdjcnumdomaintot
13014 /// Obtains the number terms in the disjunctive constraint.
13015 ///
13016 /// # Arguments
13017 ///
13018 /// - `djcidx_` Index of the disjunctive constraint.
13019 ///
13020 /// # Returns
13021 ///
13022 /// - `numterm` Number of terms in the disjunctive constraint.
13023 ///
13024 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjcnumterm>
13025 #[allow(unused_parens)]
13026 pub fn get_djc_num_term(&mut self,djcidx_ : i64) -> Result<i64,String> {
13027 let mut __tmp_0 : i64 = i64::default();
13028 self.handle_res(unsafe { MSK_getdjcnumterm(self.ptr,djcidx_,&mut __tmp_0) },"get_djc_num_term")?;
13029 return Result::Ok(__tmp_0);
13030 } // getdjcnumterm
13031 /// Obtains the number of terms in all disjunctive constraints.
13032 ///
13033 /// # Returns
13034 ///
13035 /// - `numtermtot` Total number of terms in all disjunctive constraints.
13036 ///
13037 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjcnumtermtot>
13038 #[allow(unused_parens)]
13039 pub fn get_djc_num_term_tot(&mut self) -> Result<i64,String> {
13040 let mut __tmp_0 : i64 = i64::default();
13041 self.handle_res(unsafe { MSK_getdjcnumtermtot(self.ptr,&mut __tmp_0) },"get_djc_num_term_tot")?;
13042 return Result::Ok(__tmp_0);
13043 } // getdjcnumtermtot
13044 /// Obtains full data of all disjunctive constraints.
13045 ///
13046 /// # Arguments
13047 ///
13048 /// - `domidxlist_` The concatenation of index lists of domains appearing in all disjunctive constraints.
13049 /// - `afeidxlist_` The concatenation of index lists of affine expressions appearing in all disjunctive constraints.
13050 /// - `b_` The concatenation of vectors b appearing in all disjunctive constraints.
13051 /// - `termsizelist_` The concatenation of lists of term sizes appearing in all disjunctive constraints.
13052 /// - `numterms_` The number of terms in each of the disjunctive constraints.
13053 ///
13054 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjcs>
13055 #[allow(unused_parens)]
13056 pub fn get_djcs(&self,domidxlist_ : &mut[i64],afeidxlist_ : &mut[i64],b_ : &mut[f64],termsizelist_ : &mut[i64],numterms_ : &mut[i64]) -> Result<(),String> {
13057 let mut __tmp_0 : i64 = i64::default();
13058 let __tmp_1 = unsafe { MSK_getdjcnumdomaintot(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getdjcnumdomaintot")?;
13059 if domidxlist_.len() != (__tmp_0).try_into().unwrap() {
13060 return Result::Err("get_djcs: Argument 'domidxlist' has the wrong length, expected __tmp_0".to_string());
13061 }
13062 let mut __tmp_2 : i64 = i64::default();
13063 let __tmp_3 = unsafe { MSK_getdjcnumafetot(self.ptr,&mut __tmp_2) };let _ = self.handle_res(__tmp_3,"getdjcnumafetot")?;
13064 if afeidxlist_.len() != (__tmp_2).try_into().unwrap() {
13065 return Result::Err("get_djcs: Argument 'afeidxlist' has the wrong length, expected __tmp_2".to_string());
13066 }
13067 let mut __tmp_4 : i64 = i64::default();
13068 let __tmp_5 = unsafe { MSK_getdjcnumafetot(self.ptr,&mut __tmp_4) };let _ = self.handle_res(__tmp_5,"getdjcnumafetot")?;
13069 if b_.len() != (__tmp_4).try_into().unwrap() {
13070 return Result::Err("get_djcs: Argument 'b' has the wrong length, expected __tmp_4".to_string());
13071 }
13072 let mut __tmp_6 : i64 = i64::default();
13073 let __tmp_7 = unsafe { MSK_getdjcnumtermtot(self.ptr,&mut __tmp_6) };let _ = self.handle_res(__tmp_7,"getdjcnumtermtot")?;
13074 if termsizelist_.len() != (__tmp_6).try_into().unwrap() {
13075 return Result::Err("get_djcs: Argument 'termsizelist' has the wrong length, expected __tmp_6".to_string());
13076 }
13077 let mut __tmp_8 : i64 = i64::default();
13078 let __tmp_9 = unsafe { MSK_getnumdjc(self.ptr,&mut __tmp_8) };let _ = self.handle_res(__tmp_9,"getnumdjc")?;
13079 if numterms_.len() != (__tmp_8).try_into().unwrap() {
13080 return Result::Err("get_djcs: Argument 'numterms' has the wrong length, expected __tmp_8".to_string());
13081 }
13082 self.handle_res(unsafe { MSK_getdjcs(self.ptr,domidxlist_.as_mut_ptr(),afeidxlist_.as_mut_ptr(),b_.as_mut_ptr(),termsizelist_.as_mut_ptr(),numterms_.as_mut_ptr()) },"get_djcs")?;
13083 return Result::Ok(());
13084 } // getdjcs
13085 /// Obtains the list of term sizes in a disjunctive constraint.
13086 ///
13087 /// # Arguments
13088 ///
13089 /// - `djcidx_` Index of the disjunctive constraint.
13090 /// - `termsizelist_` List of term sizes.
13091 ///
13092 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdjctermsizelist>
13093 #[allow(unused_parens)]
13094 pub fn get_djc_term_size_list(&self,djcidx_ : i64,termsizelist_ : &mut[i64]) -> Result<(),String> {
13095 let mut __tmp_0 : i64 = i64::default();
13096 let __tmp_1 = unsafe { MSK_getdjcnumterm(self.ptr,djcidx_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getdjcnumterm")?;
13097 if termsizelist_.len() != (__tmp_0).try_into().unwrap() {
13098 return Result::Err("get_djc_term_size_list: Argument 'termsizelist' has the wrong length, expected __tmp_0".to_string());
13099 }
13100 self.handle_res(unsafe { MSK_getdjctermsizelist(self.ptr,djcidx_,termsizelist_.as_mut_ptr()) },"get_djc_term_size_list")?;
13101 return Result::Ok(());
13102 } // getdjctermsizelist
13103 /// Obtains the dimension of the domain.
13104 ///
13105 /// # Arguments
13106 ///
13107 /// - `domidx_` Index of the domain.
13108 ///
13109 /// # Returns
13110 ///
13111 /// - `n` Dimension of the domain.
13112 ///
13113 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdomainn>
13114 #[allow(unused_parens)]
13115 pub fn get_domain_n(&self,domidx_ : i64) -> Result<i64,String> {
13116 let mut __tmp_0 : i64 = i64::default();
13117 self.handle_res(unsafe { MSK_getdomainn(self.ptr,domidx_,&mut __tmp_0) },"get_domain_n")?;
13118 return Result::Ok(__tmp_0);
13119 } // getdomainn
13120 /// Obtains the name of a domain.
13121 ///
13122 /// # Arguments
13123 ///
13124 /// - `domidx_` Index of a domain.
13125 ///
13126 /// # Returns
13127 ///
13128 /// - `name` Returns the required name.
13129 ///
13130 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdomainname>
13131 #[allow(unused_parens)]
13132 pub fn get_domain_name(&self,domidx_ : i64) -> Result<String,String> {
13133 let mut __tmp_0 : i32 = i32::default();
13134 let __tmp_1 = unsafe { MSK_getdomainnamelen(self.ptr,domidx_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getdomainnamelen")?;
13135 let sizename_ : i32 = (1+__tmp_0);
13136 let mut name_ = Vec::new(); name_.resize(sizename_ as usize,0);
13137 self.handle_res(unsafe { MSK_getdomainname(self.ptr,domidx_,sizename_,name_.as_mut_ptr()) },"get_domain_name")?;
13138 return Result::Ok(String::from_utf8_lossy(&name_[..name_.iter().position(|&c| c == 0).unwrap_or(sizename_ as usize)]).into_owned());
13139 } // getdomainname
13140 /// Obtains the length of the name of a domain.
13141 ///
13142 /// # Arguments
13143 ///
13144 /// - `domidx_` Index of a domain.
13145 ///
13146 /// # Returns
13147 ///
13148 /// - `len` Returns the length of the indicated name.
13149 ///
13150 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdomainnamelen>
13151 #[allow(unused_parens)]
13152 pub fn get_domain_name_len(&self,domidx_ : i64) -> Result<i32,String> {
13153 let mut __tmp_0 : i32 = i32::default();
13154 self.handle_res(unsafe { MSK_getdomainnamelen(self.ptr,domidx_,&mut __tmp_0) },"get_domain_name_len")?;
13155 return Result::Ok(__tmp_0);
13156 } // getdomainnamelen
13157 /// Returns the type of the domain.
13158 ///
13159 /// # Arguments
13160 ///
13161 /// - `domidx_` Index of the domain.
13162 ///
13163 /// # Returns
13164 ///
13165 /// - `domtype` The type of the domain.
13166 ///
13167 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdomaintype>
13168 #[allow(unused_parens)]
13169 pub fn get_domain_type(&self,domidx_ : i64) -> Result<i32,String> {
13170 let mut __tmp_0 : i32 = 0;
13171 self.handle_res(unsafe { MSK_getdomaintype(self.ptr,domidx_,&mut __tmp_0) },"get_domain_type")?;
13172 return Result::Ok(__tmp_0);
13173 } // getdomaintype
13174 /// Obtains a double information item.
13175 ///
13176 /// # Arguments
13177 ///
13178 /// - `whichdinf_` Specifies a double information item.
13179 ///
13180 /// See [Dinfitem]
13181 ///
13182 /// # Returns
13183 ///
13184 /// - `dvalue` The value of the required double information item.
13185 ///
13186 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdouinf>
13187 #[allow(unused_parens)]
13188 pub fn get_dou_inf(&self,whichdinf_ : i32) -> Result<f64,String> {
13189 let mut __tmp_0 : f64 = f64::default();
13190 self.handle_res(unsafe { MSK_getdouinf(self.ptr,whichdinf_,&mut __tmp_0) },"get_dou_inf")?;
13191 return Result::Ok(__tmp_0);
13192 } // getdouinf
13193 /// Obtains a double parameter.
13194 ///
13195 /// # Arguments
13196 ///
13197 /// - `param_` Which parameter.
13198 ///
13199 /// See [Dparam]
13200 ///
13201 /// # Returns
13202 ///
13203 /// - `parvalue` Parameter value.
13204 ///
13205 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdouparam>
13206 #[allow(unused_parens)]
13207 pub fn get_dou_param(&self,param_ : i32) -> Result<f64,String> {
13208 let mut __tmp_0 : f64 = f64::default();
13209 self.handle_res(unsafe { MSK_getdouparam(self.ptr,param_,&mut __tmp_0) },"get_dou_param")?;
13210 return Result::Ok(__tmp_0);
13211 } // getdouparam
13212 /// Computes the dual objective value associated with the solution.
13213 ///
13214 /// # Arguments
13215 ///
13216 /// - `whichsol_` Selects a solution.
13217 ///
13218 /// See [Soltype]
13219 ///
13220 /// # Returns
13221 ///
13222 /// - `dualobj` Objective value corresponding to the dual solution.
13223 ///
13224 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdualobj>
13225 #[allow(unused_parens)]
13226 pub fn get_dual_obj(&self,whichsol_ : i32) -> Result<f64,String> {
13227 let mut __tmp_0 : f64 = f64::default();
13228 self.handle_res(unsafe { MSK_getdualobj(self.ptr,whichsol_,&mut __tmp_0) },"get_dual_obj")?;
13229 return Result::Ok(__tmp_0);
13230 } // getdualobj
13231 /// Compute norms of the dual solution.
13232 ///
13233 /// # Arguments
13234 ///
13235 /// - `whichsol_` Selects a solution.
13236 ///
13237 /// See [Soltype]
13238 /// - `nrmy_` The norm of the y vector.
13239 /// - `nrmslc_` The norm of the slc vector.
13240 /// - `nrmsuc_` The norm of the suc vector.
13241 /// - `nrmslx_` The norm of the slx vector.
13242 /// - `nrmsux_` The norm of the sux vector.
13243 /// - `nrmsnx_` The norm of the snx vector.
13244 /// - `nrmbars_` The norm of the bars vector.
13245 ///
13246 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdualsolutionnorms>
13247 #[allow(unused_parens)]
13248 pub fn get_dual_solution_norms(&self,whichsol_ : i32,nrmy_ : &mut f64,nrmslc_ : &mut f64,nrmsuc_ : &mut f64,nrmslx_ : &mut f64,nrmsux_ : &mut f64,nrmsnx_ : &mut f64,nrmbars_ : &mut f64) -> Result<(),String> {
13249 self.handle_res(unsafe { MSK_getdualsolutionnorms(self.ptr,whichsol_,nrmy_,nrmslc_,nrmsuc_,nrmslx_,nrmsux_,nrmsnx_,nrmbars_) },"get_dual_solution_norms")?;
13250 return Result::Ok(());
13251 } // getdualsolutionnorms
13252 /// Computes the violation of the dual solution for set of affine conic constraints.
13253 ///
13254 /// # Arguments
13255 ///
13256 /// - `whichsol_` Selects a solution.
13257 ///
13258 /// See [Soltype]
13259 /// - `accidxlist_` An array of indexes of conic constraints.
13260 /// - `viol_` List of violations corresponding to sub.
13261 ///
13262 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdviolacc>
13263 #[allow(unused_parens)]
13264 pub fn get_dviol_acc(&self,whichsol_ : i32,accidxlist_ : &[i64],viol_ : &mut[f64]) -> Result<(),String> {
13265 let numaccidx_ : i64 = accidxlist_.len() as i64;
13266 if viol_.len() != (numaccidx_).try_into().unwrap() {
13267 return Result::Err("get_dviol_acc: Argument 'viol' has the wrong length, expected numaccidx_".to_string());
13268 }
13269 self.handle_res(unsafe { MSK_getdviolacc(self.ptr,whichsol_,numaccidx_,accidxlist_.as_ptr(),viol_.as_mut_ptr()) },"get_dviol_acc")?;
13270 return Result::Ok(());
13271 } // getdviolacc
13272 /// Computes the violation of dual solution for a set of semidefinite variables.
13273 ///
13274 /// # Arguments
13275 ///
13276 /// - `whichsol_` Selects a solution.
13277 ///
13278 /// See [Soltype]
13279 /// - `sub_` An array of indexes of barx variables.
13280 /// - `viol_` List of violations corresponding to sub.
13281 ///
13282 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdviolbarvar>
13283 #[allow(unused_parens)]
13284 pub fn get_dviol_barvar(&self,whichsol_ : i32,sub_ : &[i32],viol_ : &mut[f64]) -> Result<(),String> {
13285 let num_ : i32 = sub_.len() as i32;
13286 if viol_.len() != (num_).try_into().unwrap() {
13287 return Result::Err("get_dviol_barvar: Argument 'viol' has the wrong length, expected num_".to_string());
13288 }
13289 self.handle_res(unsafe { MSK_getdviolbarvar(self.ptr,whichsol_,num_,sub_.as_ptr(),viol_.as_mut_ptr()) },"get_dviol_barvar")?;
13290 return Result::Ok(());
13291 } // getdviolbarvar
13292 /// Computes the violation of a dual solution associated with a set of constraints.
13293 ///
13294 /// # Arguments
13295 ///
13296 /// - `whichsol_` Selects a solution.
13297 ///
13298 /// See [Soltype]
13299 /// - `sub_` An array of indexes of constraints.
13300 /// - `viol_` List of violations corresponding to sub.
13301 ///
13302 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdviolcon>
13303 #[allow(unused_parens)]
13304 pub fn get_dviol_con(&self,whichsol_ : i32,sub_ : &[i32],viol_ : &mut[f64]) -> Result<(),String> {
13305 let num_ : i32 = sub_.len() as i32;
13306 if viol_.len() != (num_).try_into().unwrap() {
13307 return Result::Err("get_dviol_con: Argument 'viol' has the wrong length, expected num_".to_string());
13308 }
13309 self.handle_res(unsafe { MSK_getdviolcon(self.ptr,whichsol_,num_,sub_.as_ptr(),viol_.as_mut_ptr()) },"get_dviol_con")?;
13310 return Result::Ok(());
13311 } // getdviolcon
13312 /// Computes the violation of a solution for set of dual conic constraints.
13313 ///
13314 /// # Arguments
13315 ///
13316 /// - `whichsol_` Selects a solution.
13317 ///
13318 /// See [Soltype]
13319 /// - `sub_` An array of indexes of conic constraints.
13320 /// - `viol_` List of violations corresponding to sub.
13321 ///
13322 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdviolcones>
13323 #[allow(unused_parens)]
13324 pub fn get_dviol_cones(&self,whichsol_ : i32,sub_ : &[i32],viol_ : &mut[f64]) -> Result<(),String> {
13325 let num_ : i32 = sub_.len() as i32;
13326 if viol_.len() != (num_).try_into().unwrap() {
13327 return Result::Err("get_dviol_cones: Argument 'viol' has the wrong length, expected num_".to_string());
13328 }
13329 self.handle_res(unsafe { MSK_getdviolcones(self.ptr,whichsol_,num_,sub_.as_ptr(),viol_.as_mut_ptr()) },"get_dviol_cones")?;
13330 return Result::Ok(());
13331 } // getdviolcones
13332 /// Computes the violation of a dual solution associated with a set of scalar variables.
13333 ///
13334 /// # Arguments
13335 ///
13336 /// - `whichsol_` Selects a solution.
13337 ///
13338 /// See [Soltype]
13339 /// - `sub_` An array of indexes of x variables.
13340 /// - `viol_` List of violations corresponding to sub.
13341 ///
13342 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getdviolvar>
13343 #[allow(unused_parens)]
13344 pub fn get_dviol_var(&self,whichsol_ : i32,sub_ : &[i32],viol_ : &mut[f64]) -> Result<(),String> {
13345 let num_ : i32 = sub_.len() as i32;
13346 if viol_.len() != (num_).try_into().unwrap() {
13347 return Result::Err("get_dviol_var: Argument 'viol' has the wrong length, expected num_".to_string());
13348 }
13349 self.handle_res(unsafe { MSK_getdviolvar(self.ptr,whichsol_,num_,sub_.as_ptr(),viol_.as_mut_ptr()) },"get_dviol_var")?;
13350 return Result::Ok(());
13351 } // getdviolvar
13352 /// Obtains the index of a named information item.
13353 ///
13354 /// # Arguments
13355 ///
13356 /// - `inftype_` Type of the information item.
13357 ///
13358 /// See [Inftype]
13359 /// - `infname_` Name of the information item.
13360 ///
13361 /// # Returns
13362 ///
13363 /// - `infindex` The item index.
13364 ///
13365 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getinfindex>
13366 #[allow(unused_parens)]
13367 pub fn get_inf_index(&self,inftype_ : i32,infname_ : &str) -> Result<i32,String> {
13368 let __tmp_1 = CString::new(infname_).unwrap();
13369 let mut __tmp_2 : i32 = i32::default();
13370 self.handle_res(unsafe { MSK_getinfindex(self.ptr,inftype_,__tmp_1.as_ptr(),&mut __tmp_2) },"get_inf_index")?;
13371 return Result::Ok(__tmp_2);
13372 } // getinfindex
13373 /// Obtains the maximum index of an information item of a given type.
13374 ///
13375 /// # Arguments
13376 ///
13377 /// - `inftype_` Type of the information item.
13378 ///
13379 /// See [Inftype]
13380 /// - `infmax_` The maximum index (plus 1) requested.
13381 ///
13382 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getinfmax>
13383 #[allow(unused_parens)]
13384 pub fn get_inf_max(&self,inftype_ : i32,infmax_ : &mut[i32]) -> Result<(),String> {
13385 if infmax_.len() > 0 && infmax_.len() != (Value::MAX_STR_LEN).try_into().unwrap() {
13386 return Result::Err("get_inf_max: Argument 'infmax' has the wrong length, expected Value::MAX_STR_LEN".to_string());
13387 }
13388 self.handle_res(unsafe { MSK_getinfmax(self.ptr,inftype_,if infmax_.len() == 0 { std::ptr::null_mut() } else { infmax_.as_mut_ptr() }) },"get_inf_max")?;
13389 return Result::Ok(());
13390 } // getinfmax
13391 /// Obtains the name of an information item.
13392 ///
13393 /// # Arguments
13394 ///
13395 /// - `inftype_` Type of the information item.
13396 ///
13397 /// See [Inftype]
13398 /// - `whichinf_` An information item.
13399 ///
13400 /// # Returns
13401 ///
13402 /// - `infname` Name of the information item.
13403 ///
13404 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getinfname>
13405 #[allow(unused_parens)]
13406 pub fn get_inf_name(&self,inftype_ : i32,whichinf_ : i32) -> Result<String,String> {
13407 let mut infname_ = Vec::new(); infname_.resize(Value::MAX_STR_LEN as usize,0);
13408 self.handle_res(unsafe { MSK_getinfname(self.ptr,inftype_,whichinf_,infname_.as_mut_ptr()) },"get_inf_name")?;
13409 return Result::Ok(String::from_utf8_lossy(&infname_[..infname_.iter().position(|&c| c == 0).unwrap_or(Value::MAX_STR_LEN as usize)]).into_owned());
13410 } // getinfname
13411 /// Obtains an integer information item.
13412 ///
13413 /// # Arguments
13414 ///
13415 /// - `whichiinf_` Specifies an integer information item.
13416 ///
13417 /// See [Iinfitem]
13418 ///
13419 /// # Returns
13420 ///
13421 /// - `ivalue` The value of the required integer information item.
13422 ///
13423 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getintinf>
13424 #[allow(unused_parens)]
13425 pub fn get_int_inf(&self,whichiinf_ : i32) -> Result<i32,String> {
13426 let mut __tmp_0 : i32 = i32::default();
13427 self.handle_res(unsafe { MSK_getintinf(self.ptr,whichiinf_,&mut __tmp_0) },"get_int_inf")?;
13428 return Result::Ok(__tmp_0);
13429 } // getintinf
13430 /// Obtains an integer parameter.
13431 ///
13432 /// # Arguments
13433 ///
13434 /// - `param_` Which parameter.
13435 ///
13436 /// See [Iparam]
13437 ///
13438 /// # Returns
13439 ///
13440 /// - `parvalue` Parameter value.
13441 ///
13442 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getintparam>
13443 #[allow(unused_parens)]
13444 pub fn get_int_param(&self,param_ : i32) -> Result<i32,String> {
13445 let mut __tmp_0 : i32 = i32::default();
13446 self.handle_res(unsafe { MSK_getintparam(self.ptr,param_,&mut __tmp_0) },"get_int_param")?;
13447 return Result::Ok(__tmp_0);
13448 } // getintparam
13449 /// Obtains the length of one semidefinite variable.
13450 ///
13451 /// # Arguments
13452 ///
13453 /// - `j_` Index of the semidefinite variable whose length if requested.
13454 ///
13455 /// # Returns
13456 ///
13457 /// - `lenbarvarj` Number of scalar elements in the lower triangular part of the semidefinite variable.
13458 ///
13459 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getlenbarvarj>
13460 #[allow(unused_parens)]
13461 pub fn get_len_barvar_j(&self,j_ : i32) -> Result<i64,String> {
13462 let mut __tmp_0 : i64 = i64::default();
13463 self.handle_res(unsafe { MSK_getlenbarvarj(self.ptr,j_,&mut __tmp_0) },"get_len_barvar_j")?;
13464 return Result::Ok(__tmp_0);
13465 } // getlenbarvarj
13466 /// Obtains a long integer information item.
13467 ///
13468 /// # Arguments
13469 ///
13470 /// - `whichliinf_` Specifies a long information item.
13471 ///
13472 /// See [Liinfitem]
13473 ///
13474 /// # Returns
13475 ///
13476 /// - `ivalue` The value of the required long integer information item.
13477 ///
13478 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getlintinf>
13479 #[allow(unused_parens)]
13480 pub fn get_lint_inf(&self,whichliinf_ : i32) -> Result<i64,String> {
13481 let mut __tmp_0 : i64 = i64::default();
13482 self.handle_res(unsafe { MSK_getlintinf(self.ptr,whichliinf_,&mut __tmp_0) },"get_lint_inf")?;
13483 return Result::Ok(__tmp_0);
13484 } // getlintinf
13485 /// Obtains an integer parameter.
13486 ///
13487 /// # Arguments
13488 ///
13489 /// - `param_` Which parameter.
13490 ///
13491 /// See [Iparam]
13492 ///
13493 /// # Returns
13494 ///
13495 /// - `parvalue` Parameter value.
13496 ///
13497 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getlintparam>
13498 #[allow(unused_parens)]
13499 pub fn get_lint_param(&self,param_ : i32) -> Result<i64,String> {
13500 let mut __tmp_0 : i64 = i64::default();
13501 self.handle_res(unsafe { MSK_getlintparam(self.ptr,param_,&mut __tmp_0) },"get_lint_param")?;
13502 return Result::Ok(__tmp_0);
13503 } // getlintparam
13504 /// Obtains the maximum length (not including terminating zero character) of any objective, constraint, variable, domain or cone name.
13505 ///
13506 /// # Arguments
13507 ///
13508 /// - `maxlen_` The maximum length of any name.
13509 ///
13510 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getmaxnamelen>
13511 #[allow(unused_parens)]
13512 pub fn get_max_name_len(&self,maxlen_ : &mut i32) -> Result<(),String> {
13513 self.handle_res(unsafe { MSK_getmaxnamelen(self.ptr,maxlen_) },"get_max_name_len")?;
13514 return Result::Ok(());
13515 } // getmaxnamelen
13516 /// Obtains number of preallocated non-zeros in the linear constraint matrix.
13517 ///
13518 /// # Returns
13519 ///
13520 /// - `maxnumanz` Number of preallocated non-zero linear matrix elements.
13521 ///
13522 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getmaxnumanz64>
13523 #[allow(unused_parens)]
13524 pub fn get_max_num_a_nz(&self) -> Result<i64,String> {
13525 let mut __tmp_0 : i64 = i64::default();
13526 self.handle_res(unsafe { MSK_getmaxnumanz64(self.ptr,&mut __tmp_0) },"get_max_num_a_nz")?;
13527 return Result::Ok(__tmp_0);
13528 } // getmaxnumanz64
13529 /// Obtains maximum number of symmetric matrix variables for which space is currently preallocated.
13530 ///
13531 /// # Returns
13532 ///
13533 /// - `maxnumbarvar` Maximum number of symmetric matrix variables for which space is currently preallocated.
13534 ///
13535 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getmaxnumbarvar>
13536 #[allow(unused_parens)]
13537 pub fn get_max_num_barvar(&self) -> Result<i32,String> {
13538 let mut __tmp_0 : i32 = i32::default();
13539 self.handle_res(unsafe { MSK_getmaxnumbarvar(self.ptr,&mut __tmp_0) },"get_max_num_barvar")?;
13540 return Result::Ok(__tmp_0);
13541 } // getmaxnumbarvar
13542 /// Obtains the number of preallocated constraints in the optimization task.
13543 ///
13544 /// # Returns
13545 ///
13546 /// - `maxnumcon` Number of preallocated constraints in the optimization task.
13547 ///
13548 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getmaxnumcon>
13549 #[allow(unused_parens)]
13550 pub fn get_max_num_con(&self) -> Result<i32,String> {
13551 let mut __tmp_0 : i32 = i32::default();
13552 self.handle_res(unsafe { MSK_getmaxnumcon(self.ptr,&mut __tmp_0) },"get_max_num_con")?;
13553 return Result::Ok(__tmp_0);
13554 } // getmaxnumcon
13555 /// Obtains the number of preallocated cones in the optimization task.
13556 ///
13557 /// # Arguments
13558 ///
13559 /// - `maxnumcone_` Number of preallocated conic constraints in the optimization task.
13560 ///
13561 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getmaxnumcone>
13562 #[allow(unused_parens)]
13563 pub fn get_max_num_cone(&self,maxnumcone_ : &mut i32) -> Result<(),String> {
13564 self.handle_res(unsafe { MSK_getmaxnumcone(self.ptr,maxnumcone_) },"get_max_num_cone")?;
13565 return Result::Ok(());
13566 } // getmaxnumcone
13567 /// Obtains the number of preallocated non-zeros for all quadratic terms in objective and constraints.
13568 ///
13569 /// # Arguments
13570 ///
13571 /// - `maxnumqnz_` Number of non-zero elements preallocated in quadratic coefficient matrices.
13572 ///
13573 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getmaxnumqnz64>
13574 #[allow(unused_parens)]
13575 pub fn get_max_num_q_nz(&self,maxnumqnz_ : &mut i64) -> Result<(),String> {
13576 self.handle_res(unsafe { MSK_getmaxnumqnz64(self.ptr,maxnumqnz_) },"get_max_num_q_nz")?;
13577 return Result::Ok(());
13578 } // getmaxnumqnz64
13579 /// Obtains the maximum number variables allowed.
13580 ///
13581 /// # Returns
13582 ///
13583 /// - `maxnumvar` Number of preallocated variables in the optimization task.
13584 ///
13585 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getmaxnumvar>
13586 #[allow(unused_parens)]
13587 pub fn get_max_num_var(&self) -> Result<i32,String> {
13588 let mut __tmp_0 : i32 = i32::default();
13589 self.handle_res(unsafe { MSK_getmaxnumvar(self.ptr,&mut __tmp_0) },"get_max_num_var")?;
13590 return Result::Ok(__tmp_0);
13591 } // getmaxnumvar
13592 /// Obtains information about the amount of memory used by a task.
13593 ///
13594 /// # Arguments
13595 ///
13596 /// - `meminuse_` Amount of memory currently used by the task.
13597 /// - `maxmemuse_` Maximum amount of memory used by the task until now.
13598 ///
13599 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getmemusagetask>
13600 #[allow(unused_parens)]
13601 pub fn get_mem_usage(&self,meminuse_ : &mut i64,maxmemuse_ : &mut i64) -> Result<(),String> {
13602 self.handle_res(unsafe { MSK_getmemusagetask(self.ptr,meminuse_,maxmemuse_) },"get_mem_usage")?;
13603 return Result::Ok(());
13604 } // getmemusagetask
13605 /// Obtains the number of threads used by the mixed integer optimizer.
13606 ///
13607 /// # Returns
13608 ///
13609 /// - `numthreads` The number of threads.
13610 ///
13611 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getmionumthreads>
13612 #[allow(unused_parens)]
13613 pub fn get_mio_num_threads(&self) -> Result<i32,String> {
13614 let mut __tmp_0 : i32 = i32::default();
13615 self.handle_res(unsafe { MSK_getmionumthreads(self.ptr,&mut __tmp_0) },"get_mio_num_threads")?;
13616 return Result::Ok(__tmp_0);
13617 } // getmionumthreads
13618 /// Obtains a named double information item.
13619 ///
13620 /// # Arguments
13621 ///
13622 /// - `infitemname_` The name of a double information item.
13623 /// - `dvalue_` The value of the required double information item.
13624 ///
13625 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnadouinf>
13626 #[allow(unused_parens)]
13627 pub fn get_na_dou_inf(&self,infitemname_ : &str,dvalue_ : &mut f64) -> Result<(),String> {
13628 let __tmp_1 = CString::new(infitemname_).unwrap();
13629 self.handle_res(unsafe { MSK_getnadouinf(self.ptr,__tmp_1.as_ptr(),dvalue_) },"get_na_dou_inf")?;
13630 return Result::Ok(());
13631 } // getnadouinf
13632 /// Obtains a double parameter.
13633 ///
13634 /// # Arguments
13635 ///
13636 /// - `paramname_` Name of a parameter.
13637 /// - `parvalue_` Parameter value.
13638 ///
13639 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnadouparam>
13640 #[allow(unused_parens)]
13641 pub fn get_na_dou_param(&self,paramname_ : &str,parvalue_ : &mut f64) -> Result<(),String> {
13642 let __tmp_1 = CString::new(paramname_).unwrap();
13643 self.handle_res(unsafe { MSK_getnadouparam(self.ptr,__tmp_1.as_ptr(),parvalue_) },"get_na_dou_param")?;
13644 return Result::Ok(());
13645 } // getnadouparam
13646 /// Obtains a named integer information item.
13647 ///
13648 /// # Arguments
13649 ///
13650 /// - `infitemname_` The name of an integer information item.
13651 /// - `ivalue_` The value of the required integer information item.
13652 ///
13653 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnaintinf>
13654 #[allow(unused_parens)]
13655 pub fn get_na_int_inf(&self,infitemname_ : &str,ivalue_ : &mut i32) -> Result<(),String> {
13656 let __tmp_1 = CString::new(infitemname_).unwrap();
13657 self.handle_res(unsafe { MSK_getnaintinf(self.ptr,__tmp_1.as_ptr(),ivalue_) },"get_na_int_inf")?;
13658 return Result::Ok(());
13659 } // getnaintinf
13660 /// Obtains an integer parameter.
13661 ///
13662 /// # Arguments
13663 ///
13664 /// - `paramname_` Name of a parameter.
13665 /// - `parvalue_` Parameter value.
13666 ///
13667 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnaintparam>
13668 #[allow(unused_parens)]
13669 pub fn get_na_int_param(&self,paramname_ : &str,parvalue_ : &mut i32) -> Result<(),String> {
13670 let __tmp_1 = CString::new(paramname_).unwrap();
13671 self.handle_res(unsafe { MSK_getnaintparam(self.ptr,__tmp_1.as_ptr(),parvalue_) },"get_na_int_param")?;
13672 return Result::Ok(());
13673 } // getnaintparam
13674 /// Obtains a string parameter.
13675 ///
13676 /// # Arguments
13677 ///
13678 /// - `paramname_` Name of a parameter.
13679 /// - `sizeparamname_` Size of the name buffer.
13680 /// - `len_` Returns the length of the parameter value.
13681 ///
13682 /// # Returns
13683 ///
13684 /// - `parvalue` Parameter value.
13685 ///
13686 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnastrparam>
13687 #[allow(unused_parens)]
13688 pub fn get_na_str_param(&self,paramname_ : &str,sizeparamname_ : i32,len_ : &mut i32) -> Result<String,String> {
13689 let __tmp_1 = CString::new(paramname_).unwrap();
13690 let mut parvalue_ = Vec::new(); parvalue_.resize(sizeparamname_ as usize,0);
13691 self.handle_res(unsafe { MSK_getnastrparam(self.ptr,__tmp_1.as_ptr(),sizeparamname_,len_,parvalue_.as_mut_ptr()) },"get_na_str_param")?;
13692 return Result::Ok(String::from_utf8_lossy(&parvalue_[..parvalue_.iter().position(|&c| c == 0).unwrap_or(sizeparamname_ as usize)]).into_owned());
13693 } // getnastrparam
13694 /// Obtains the number of affine conic constraints.
13695 ///
13696 /// # Returns
13697 ///
13698 /// - `num` The number of affine conic constraints.
13699 ///
13700 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumacc>
13701 #[allow(unused_parens)]
13702 pub fn get_num_acc(&mut self) -> Result<i64,String> {
13703 let mut __tmp_0 : i64 = i64::default();
13704 self.handle_res(unsafe { MSK_getnumacc(self.ptr,&mut __tmp_0) },"get_num_acc")?;
13705 return Result::Ok(__tmp_0);
13706 } // getnumacc
13707 /// Obtains the number of affine expressions.
13708 ///
13709 /// # Returns
13710 ///
13711 /// - `numafe` Number of affine expressions.
13712 ///
13713 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumafe>
13714 #[allow(unused_parens)]
13715 pub fn get_num_afe(&mut self) -> Result<i64,String> {
13716 let mut __tmp_0 : i64 = i64::default();
13717 self.handle_res(unsafe { MSK_getnumafe(self.ptr,&mut __tmp_0) },"get_num_afe")?;
13718 return Result::Ok(__tmp_0);
13719 } // getnumafe
13720 /// Obtains the number of non-zeros in the coefficient matrix.
13721 ///
13722 /// # Returns
13723 ///
13724 /// - `numanz` Number of non-zero elements in the linear constraint matrix.
13725 ///
13726 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumanz64>
13727 #[allow(unused_parens)]
13728 pub fn getnumanz(&self) -> Result<i64,String> {
13729 let mut __tmp_0 : i64 = i64::default();
13730 self.handle_res(unsafe { MSK_getnumanz64(self.ptr,&mut __tmp_0) },"getnumanz")?;
13731 return Result::Ok(__tmp_0);
13732 } // getnumanz64
13733 /// Obtains an upper bound on the number of scalar elements in the block triplet form of bara.
13734 ///
13735 /// # Returns
13736 ///
13737 /// - `num` An upper bound on the number of elements in the block triplet form of bara.
13738 ///
13739 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumbarablocktriplets>
13740 #[allow(unused_parens)]
13741 pub fn get_num_bara_block_triplets(&self) -> Result<i64,String> {
13742 let mut __tmp_0 : i64 = i64::default();
13743 self.handle_res(unsafe { MSK_getnumbarablocktriplets(self.ptr,&mut __tmp_0) },"get_num_bara_block_triplets")?;
13744 return Result::Ok(__tmp_0);
13745 } // getnumbarablocktriplets
13746 /// Get the number of nonzero elements in barA.
13747 ///
13748 /// # Returns
13749 ///
13750 /// - `nz` The number of nonzero block elements in barA.
13751 ///
13752 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumbaranz>
13753 #[allow(unused_parens)]
13754 pub fn get_num_bara_nz(&self) -> Result<i64,String> {
13755 let mut __tmp_0 : i64 = i64::default();
13756 self.handle_res(unsafe { MSK_getnumbaranz(self.ptr,&mut __tmp_0) },"get_num_bara_nz")?;
13757 return Result::Ok(__tmp_0);
13758 } // getnumbaranz
13759 /// Obtains an upper bound on the number of elements in the block triplet form of barc.
13760 ///
13761 /// # Returns
13762 ///
13763 /// - `num` An upper bound on the number of elements in the block triplet form of barc.
13764 ///
13765 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumbarcblocktriplets>
13766 #[allow(unused_parens)]
13767 pub fn get_num_barc_block_triplets(&self) -> Result<i64,String> {
13768 let mut __tmp_0 : i64 = i64::default();
13769 self.handle_res(unsafe { MSK_getnumbarcblocktriplets(self.ptr,&mut __tmp_0) },"get_num_barc_block_triplets")?;
13770 return Result::Ok(__tmp_0);
13771 } // getnumbarcblocktriplets
13772 /// Obtains the number of nonzero elements in barc.
13773 ///
13774 /// # Returns
13775 ///
13776 /// - `nz` The number of nonzero elements in barc.
13777 ///
13778 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumbarcnz>
13779 #[allow(unused_parens)]
13780 pub fn get_num_barc_nz(&self) -> Result<i64,String> {
13781 let mut __tmp_0 : i64 = i64::default();
13782 self.handle_res(unsafe { MSK_getnumbarcnz(self.ptr,&mut __tmp_0) },"get_num_barc_nz")?;
13783 return Result::Ok(__tmp_0);
13784 } // getnumbarcnz
13785 /// Obtains the number of semidefinite variables.
13786 ///
13787 /// # Returns
13788 ///
13789 /// - `numbarvar` Number of semidefinite variables in the problem.
13790 ///
13791 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumbarvar>
13792 #[allow(unused_parens)]
13793 pub fn get_num_barvar(&self) -> Result<i32,String> {
13794 let mut __tmp_0 : i32 = i32::default();
13795 self.handle_res(unsafe { MSK_getnumbarvar(self.ptr,&mut __tmp_0) },"get_num_barvar")?;
13796 return Result::Ok(__tmp_0);
13797 } // getnumbarvar
13798 /// Obtains the number of constraints.
13799 ///
13800 /// # Returns
13801 ///
13802 /// - `numcon` Number of constraints.
13803 ///
13804 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumcon>
13805 #[allow(unused_parens)]
13806 pub fn get_num_con(&self) -> Result<i32,String> {
13807 let mut __tmp_0 : i32 = i32::default();
13808 self.handle_res(unsafe { MSK_getnumcon(self.ptr,&mut __tmp_0) },"get_num_con")?;
13809 return Result::Ok(__tmp_0);
13810 } // getnumcon
13811 /// Obtains the number of cones.
13812 ///
13813 /// # Returns
13814 ///
13815 /// - `numcone` Number of conic constraints.
13816 ///
13817 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumcone>
13818 #[allow(unused_parens)]
13819 pub fn get_num_cone(&self) -> Result<i32,String> {
13820 let mut __tmp_0 : i32 = i32::default();
13821 self.handle_res(unsafe { MSK_getnumcone(self.ptr,&mut __tmp_0) },"get_num_cone")?;
13822 return Result::Ok(__tmp_0);
13823 } // getnumcone
13824 /// Obtains the number of members in a cone.
13825 ///
13826 /// # Arguments
13827 ///
13828 /// - `k_` Index of the cone.
13829 /// - `nummem_` Number of member variables in the cone.
13830 ///
13831 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumconemem>
13832 #[allow(unused_parens)]
13833 pub fn get_num_cone_mem(&self,k_ : i32,nummem_ : &mut i32) -> Result<(),String> {
13834 self.handle_res(unsafe { MSK_getnumconemem(self.ptr,k_,nummem_) },"get_num_cone_mem")?;
13835 return Result::Ok(());
13836 } // getnumconemem
13837 /// Obtains the number of disjunctive constraints.
13838 ///
13839 /// # Returns
13840 ///
13841 /// - `num` The number of disjunctive constraints.
13842 ///
13843 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumdjc>
13844 #[allow(unused_parens)]
13845 pub fn get_num_djc(&mut self) -> Result<i64,String> {
13846 let mut __tmp_0 : i64 = i64::default();
13847 self.handle_res(unsafe { MSK_getnumdjc(self.ptr,&mut __tmp_0) },"get_num_djc")?;
13848 return Result::Ok(__tmp_0);
13849 } // getnumdjc
13850 /// Obtain the number of domains defined.
13851 ///
13852 /// # Returns
13853 ///
13854 /// - `numdomain` Number of domains in the task.
13855 ///
13856 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumdomain>
13857 #[allow(unused_parens)]
13858 pub fn get_num_domain(&mut self) -> Result<i64,String> {
13859 let mut __tmp_0 : i64 = i64::default();
13860 self.handle_res(unsafe { MSK_getnumdomain(self.ptr,&mut __tmp_0) },"get_num_domain")?;
13861 return Result::Ok(__tmp_0);
13862 } // getnumdomain
13863 /// Obtains the number of integer-constrained variables.
13864 ///
13865 /// # Returns
13866 ///
13867 /// - `numintvar` Number of integer variables.
13868 ///
13869 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumintvar>
13870 #[allow(unused_parens)]
13871 pub fn get_num_int_var(&self) -> Result<i32,String> {
13872 let mut __tmp_0 : i32 = i32::default();
13873 self.handle_res(unsafe { MSK_getnumintvar(self.ptr,&mut __tmp_0) },"get_num_int_var")?;
13874 return Result::Ok(__tmp_0);
13875 } // getnumintvar
13876 /// Obtains the number of parameters of a given type.
13877 ///
13878 /// # Arguments
13879 ///
13880 /// - `partype_` Parameter type.
13881 ///
13882 /// See [Parametertype]
13883 ///
13884 /// # Returns
13885 ///
13886 /// - `numparam` Returns the number of parameters of the requested type.
13887 ///
13888 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumparam>
13889 #[allow(unused_parens)]
13890 pub fn get_num_param(&self,partype_ : i32) -> Result<i32,String> {
13891 let mut __tmp_0 : i32 = i32::default();
13892 self.handle_res(unsafe { MSK_getnumparam(self.ptr,partype_,&mut __tmp_0) },"get_num_param")?;
13893 return Result::Ok(__tmp_0);
13894 } // getnumparam
13895 /// Obtains the number of non-zero quadratic terms in a constraint.
13896 ///
13897 /// # Arguments
13898 ///
13899 /// - `k_` Index of the constraint for which the number quadratic terms should be obtained.
13900 ///
13901 /// # Returns
13902 ///
13903 /// - `numqcnz` Number of quadratic terms.
13904 ///
13905 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumqconknz64>
13906 #[allow(unused_parens)]
13907 pub fn get_num_q_con_k_nz(&self,k_ : i32) -> Result<i64,String> {
13908 let mut __tmp_0 : i64 = i64::default();
13909 self.handle_res(unsafe { MSK_getnumqconknz64(self.ptr,k_,&mut __tmp_0) },"get_num_q_con_k_nz")?;
13910 return Result::Ok(__tmp_0);
13911 } // getnumqconknz64
13912 /// Obtains the number of non-zero quadratic terms in the objective.
13913 ///
13914 /// # Returns
13915 ///
13916 /// - `numqonz` Number of non-zero elements in the quadratic objective terms.
13917 ///
13918 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumqobjnz64>
13919 #[allow(unused_parens)]
13920 pub fn get_num_q_obj_nz(&self) -> Result<i64,String> {
13921 let mut __tmp_0 : i64 = i64::default();
13922 self.handle_res(unsafe { MSK_getnumqobjnz64(self.ptr,&mut __tmp_0) },"get_num_q_obj_nz")?;
13923 return Result::Ok(__tmp_0);
13924 } // getnumqobjnz64
13925 /// Obtains the number of symmetric matrices stored.
13926 ///
13927 /// # Returns
13928 ///
13929 /// - `num` The number of symmetric sparse matrices.
13930 ///
13931 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumsymmat>
13932 #[allow(unused_parens)]
13933 pub fn get_num_sym_mat(&self) -> Result<i64,String> {
13934 let mut __tmp_0 : i64 = i64::default();
13935 self.handle_res(unsafe { MSK_getnumsymmat(self.ptr,&mut __tmp_0) },"get_num_sym_mat")?;
13936 return Result::Ok(__tmp_0);
13937 } // getnumsymmat
13938 /// Obtains the number of variables.
13939 ///
13940 /// # Returns
13941 ///
13942 /// - `numvar` Number of variables.
13943 ///
13944 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getnumvar>
13945 #[allow(unused_parens)]
13946 pub fn get_num_var(&self) -> Result<i32,String> {
13947 let mut __tmp_0 : i32 = i32::default();
13948 self.handle_res(unsafe { MSK_getnumvar(self.ptr,&mut __tmp_0) },"get_num_var")?;
13949 return Result::Ok(__tmp_0);
13950 } // getnumvar
13951 /// Obtains the name assigned to the objective function.
13952 ///
13953 /// # Returns
13954 ///
13955 /// - `objname` Assigned the objective name.
13956 ///
13957 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getobjname>
13958 #[allow(unused_parens)]
13959 pub fn get_obj_name(&self) -> Result<String,String> {
13960 let mut __tmp_0 : i32 = i32::default();
13961 let __tmp_1 = unsafe { MSK_getobjnamelen(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getobjnamelen")?;
13962 let sizeobjname_ : i32 = (1+__tmp_0);
13963 let mut objname_ = Vec::new(); objname_.resize(sizeobjname_ as usize,0);
13964 self.handle_res(unsafe { MSK_getobjname(self.ptr,sizeobjname_,objname_.as_mut_ptr()) },"get_obj_name")?;
13965 return Result::Ok(String::from_utf8_lossy(&objname_[..objname_.iter().position(|&c| c == 0).unwrap_or(sizeobjname_ as usize)]).into_owned());
13966 } // getobjname
13967 /// Obtains the length of the name assigned to the objective function.
13968 ///
13969 /// # Returns
13970 ///
13971 /// - `len` Assigned the length of the objective name.
13972 ///
13973 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getobjnamelen>
13974 #[allow(unused_parens)]
13975 pub fn get_obj_name_len(&self) -> Result<i32,String> {
13976 let mut __tmp_0 : i32 = i32::default();
13977 self.handle_res(unsafe { MSK_getobjnamelen(self.ptr,&mut __tmp_0) },"get_obj_name_len")?;
13978 return Result::Ok(__tmp_0);
13979 } // getobjnamelen
13980 /// Gets the objective sense.
13981 ///
13982 /// # Returns
13983 ///
13984 /// - `sense` The returned objective sense.
13985 ///
13986 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getobjsense>
13987 #[allow(unused_parens)]
13988 pub fn get_obj_sense(&self) -> Result<i32,String> {
13989 let mut __tmp_0 : i32 = 0;
13990 self.handle_res(unsafe { MSK_getobjsense(self.ptr,&mut __tmp_0) },"get_obj_sense")?;
13991 return Result::Ok(__tmp_0);
13992 } // getobjsense
13993 /// Obtains the maximum index of a parameter of a given type.
13994 ///
13995 /// # Arguments
13996 ///
13997 /// - `partype_` Parameter type.
13998 ///
13999 /// See [Parametertype]
14000 ///
14001 /// # Returns
14002 ///
14003 /// - `parammax` The maximum index (plus 1) of the given parameter type.
14004 ///
14005 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getparammax>
14006 #[allow(unused_parens)]
14007 pub fn get_param_max(&self,partype_ : i32) -> Result<i32,String> {
14008 let mut __tmp_0 : i32 = i32::default();
14009 self.handle_res(unsafe { MSK_getparammax(self.ptr,partype_,&mut __tmp_0) },"get_param_max")?;
14010 return Result::Ok(__tmp_0);
14011 } // getparammax
14012 /// Obtains the name of a parameter.
14013 ///
14014 /// # Arguments
14015 ///
14016 /// - `partype_` Parameter type.
14017 ///
14018 /// See [Parametertype]
14019 /// - `param_` Which parameter.
14020 ///
14021 /// # Returns
14022 ///
14023 /// - `parname` Parameter name.
14024 ///
14025 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getparamname>
14026 #[allow(unused_parens)]
14027 pub fn get_param_name(&self,partype_ : i32,param_ : i32) -> Result<String,String> {
14028 let mut parname_ = Vec::new(); parname_.resize(Value::MAX_STR_LEN as usize,0);
14029 self.handle_res(unsafe { MSK_getparamname(self.ptr,partype_,param_,parname_.as_mut_ptr()) },"get_param_name")?;
14030 return Result::Ok(String::from_utf8_lossy(&parname_[..parname_.iter().position(|&c| c == 0).unwrap_or(Value::MAX_STR_LEN as usize)]).into_owned());
14031 } // getparamname
14032 /// Obtains the exponent vector of a power domain.
14033 ///
14034 /// # Arguments
14035 ///
14036 /// - `domidx_` Index of the domain.
14037 /// - `alpha_` The exponent vector of the domain.
14038 ///
14039 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getpowerdomainalpha>
14040 #[allow(unused_parens)]
14041 pub fn get_power_domain_alpha(&mut self,domidx_ : i64,alpha_ : &mut[f64]) -> Result<(),String> {
14042 let mut __tmp_0 : i64 = i64::default();
14043 let mut __tmp_1 : i64 = i64::default();
14044 let __tmp_2 = unsafe { MSK_getpowerdomaininfo(self.ptr,domidx_,&mut __tmp_0,&mut __tmp_1) };let _ = self.handle_res(__tmp_2,"getpowerdomaininfo")?;
14045 if alpha_.len() != (__tmp_1).try_into().unwrap() {
14046 return Result::Err("get_power_domain_alpha: Argument 'alpha' has the wrong length, expected __tmp_1".to_string());
14047 }
14048 self.handle_res(unsafe { MSK_getpowerdomainalpha(self.ptr,domidx_,alpha_.as_mut_ptr()) },"get_power_domain_alpha")?;
14049 return Result::Ok(());
14050 } // getpowerdomainalpha
14051 /// Obtains structural information about a power domain.
14052 ///
14053 /// # Arguments
14054 ///
14055 /// - `domidx_` Index of the domain.
14056 /// - `n_` Dimension of the domain.
14057 /// - `nleft_` Number of variables on the left hand side.
14058 ///
14059 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getpowerdomaininfo>
14060 #[allow(unused_parens)]
14061 pub fn get_power_domain_info(&mut self,domidx_ : i64,n_ : &mut i64,nleft_ : &mut i64) -> Result<(),String> {
14062 self.handle_res(unsafe { MSK_getpowerdomaininfo(self.ptr,domidx_,n_,nleft_) },"get_power_domain_info")?;
14063 return Result::Ok(());
14064 } // getpowerdomaininfo
14065 /// Computes the primal objective value for the desired solution.
14066 ///
14067 /// # Arguments
14068 ///
14069 /// - `whichsol_` Selects a solution.
14070 ///
14071 /// See [Soltype]
14072 ///
14073 /// # Returns
14074 ///
14075 /// - `primalobj` Objective value corresponding to the primal solution.
14076 ///
14077 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getprimalobj>
14078 #[allow(unused_parens)]
14079 pub fn get_primal_obj(&self,whichsol_ : i32) -> Result<f64,String> {
14080 let mut __tmp_0 : f64 = f64::default();
14081 self.handle_res(unsafe { MSK_getprimalobj(self.ptr,whichsol_,&mut __tmp_0) },"get_primal_obj")?;
14082 return Result::Ok(__tmp_0);
14083 } // getprimalobj
14084 /// Compute norms of the primal solution.
14085 ///
14086 /// # Arguments
14087 ///
14088 /// - `whichsol_` Selects a solution.
14089 ///
14090 /// See [Soltype]
14091 /// - `nrmxc_` The norm of the xc vector.
14092 /// - `nrmxx_` The norm of the xx vector.
14093 /// - `nrmbarx_` The norm of the barX vector.
14094 ///
14095 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getprimalsolutionnorms>
14096 #[allow(unused_parens)]
14097 pub fn get_primal_solution_norms(&self,whichsol_ : i32,nrmxc_ : &mut f64,nrmxx_ : &mut f64,nrmbarx_ : &mut f64) -> Result<(),String> {
14098 self.handle_res(unsafe { MSK_getprimalsolutionnorms(self.ptr,whichsol_,nrmxc_,nrmxx_,nrmbarx_) },"get_primal_solution_norms")?;
14099 return Result::Ok(());
14100 } // getprimalsolutionnorms
14101 /// Obtains the problem type.
14102 ///
14103 /// # Returns
14104 ///
14105 /// - `probtype` The problem type.
14106 ///
14107 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getprobtype>
14108 #[allow(unused_parens)]
14109 pub fn get_prob_type(&self) -> Result<i32,String> {
14110 let mut __tmp_0 : i32 = 0;
14111 self.handle_res(unsafe { MSK_getprobtype(self.ptr,&mut __tmp_0) },"get_prob_type")?;
14112 return Result::Ok(__tmp_0);
14113 } // getprobtype
14114 /// Obtains the problem status.
14115 ///
14116 /// # Arguments
14117 ///
14118 /// - `whichsol_` Selects a solution.
14119 ///
14120 /// See [Soltype]
14121 ///
14122 /// # Returns
14123 ///
14124 /// - `problemsta` Problem status.
14125 ///
14126 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getprosta>
14127 #[allow(unused_parens)]
14128 pub fn get_pro_sta(&self,whichsol_ : i32) -> Result<i32,String> {
14129 let mut __tmp_0 : i32 = 0;
14130 self.handle_res(unsafe { MSK_getprosta(self.ptr,whichsol_,&mut __tmp_0) },"get_pro_sta")?;
14131 return Result::Ok(__tmp_0);
14132 } // getprosta
14133 /// Computes the violation of a solution for set of affine conic constraints.
14134 ///
14135 /// # Arguments
14136 ///
14137 /// - `whichsol_` Selects a solution.
14138 ///
14139 /// See [Soltype]
14140 /// - `accidxlist_` An array of indexes of conic constraints.
14141 /// - `viol_` List of violations corresponding to sub.
14142 ///
14143 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getpviolacc>
14144 #[allow(unused_parens)]
14145 pub fn get_pviol_acc(&self,whichsol_ : i32,accidxlist_ : &[i64],viol_ : &mut[f64]) -> Result<(),String> {
14146 let numaccidx_ : i64 = accidxlist_.len() as i64;
14147 if viol_.len() != (numaccidx_).try_into().unwrap() {
14148 return Result::Err("get_pviol_acc: Argument 'viol' has the wrong length, expected numaccidx_".to_string());
14149 }
14150 self.handle_res(unsafe { MSK_getpviolacc(self.ptr,whichsol_,numaccidx_,accidxlist_.as_ptr(),viol_.as_mut_ptr()) },"get_pviol_acc")?;
14151 return Result::Ok(());
14152 } // getpviolacc
14153 /// Computes the violation of a primal solution for a list of semidefinite variables.
14154 ///
14155 /// # Arguments
14156 ///
14157 /// - `whichsol_` Selects a solution.
14158 ///
14159 /// See [Soltype]
14160 /// - `sub_` An array of indexes of barX variables.
14161 /// - `viol_` List of violations corresponding to sub.
14162 ///
14163 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getpviolbarvar>
14164 #[allow(unused_parens)]
14165 pub fn get_pviol_barvar(&self,whichsol_ : i32,sub_ : &[i32],viol_ : &mut[f64]) -> Result<(),String> {
14166 let num_ : i32 = sub_.len() as i32;
14167 if viol_.len() != (num_).try_into().unwrap() {
14168 return Result::Err("get_pviol_barvar: Argument 'viol' has the wrong length, expected num_".to_string());
14169 }
14170 self.handle_res(unsafe { MSK_getpviolbarvar(self.ptr,whichsol_,num_,sub_.as_ptr(),viol_.as_mut_ptr()) },"get_pviol_barvar")?;
14171 return Result::Ok(());
14172 } // getpviolbarvar
14173 /// Computes the violation of a primal solution associated to a constraint.
14174 ///
14175 /// # Arguments
14176 ///
14177 /// - `whichsol_` Selects a solution.
14178 ///
14179 /// See [Soltype]
14180 /// - `sub_` An array of indexes of constraints.
14181 /// - `viol_` List of violations corresponding to sub.
14182 ///
14183 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getpviolcon>
14184 #[allow(unused_parens)]
14185 pub fn get_pviol_con(&self,whichsol_ : i32,sub_ : &[i32],viol_ : &mut[f64]) -> Result<(),String> {
14186 let num_ : i32 = sub_.len() as i32;
14187 if viol_.len() != (num_).try_into().unwrap() {
14188 return Result::Err("get_pviol_con: Argument 'viol' has the wrong length, expected num_".to_string());
14189 }
14190 self.handle_res(unsafe { MSK_getpviolcon(self.ptr,whichsol_,num_,sub_.as_ptr(),viol_.as_mut_ptr()) },"get_pviol_con")?;
14191 return Result::Ok(());
14192 } // getpviolcon
14193 /// Computes the violation of a solution for set of conic constraints.
14194 ///
14195 /// # Arguments
14196 ///
14197 /// - `whichsol_` Selects a solution.
14198 ///
14199 /// See [Soltype]
14200 /// - `sub_` An array of indexes of conic constraints.
14201 /// - `viol_` List of violations corresponding to sub.
14202 ///
14203 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getpviolcones>
14204 #[allow(unused_parens)]
14205 pub fn get_pviol_cones(&self,whichsol_ : i32,sub_ : &[i32],viol_ : &mut[f64]) -> Result<(),String> {
14206 let num_ : i32 = sub_.len() as i32;
14207 if viol_.len() != (num_).try_into().unwrap() {
14208 return Result::Err("get_pviol_cones: Argument 'viol' has the wrong length, expected num_".to_string());
14209 }
14210 self.handle_res(unsafe { MSK_getpviolcones(self.ptr,whichsol_,num_,sub_.as_ptr(),viol_.as_mut_ptr()) },"get_pviol_cones")?;
14211 return Result::Ok(());
14212 } // getpviolcones
14213 /// Computes the violation of a solution for set of disjunctive constraints.
14214 ///
14215 /// # Arguments
14216 ///
14217 /// - `whichsol_` Selects a solution.
14218 ///
14219 /// See [Soltype]
14220 /// - `djcidxlist_` An array of indexes of disjunctive constraints.
14221 /// - `viol_` List of violations corresponding to sub.
14222 ///
14223 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getpvioldjc>
14224 #[allow(unused_parens)]
14225 pub fn get_pviol_djc(&self,whichsol_ : i32,djcidxlist_ : &[i64],viol_ : &mut[f64]) -> Result<(),String> {
14226 let numdjcidx_ : i64 = djcidxlist_.len() as i64;
14227 if viol_.len() != (numdjcidx_).try_into().unwrap() {
14228 return Result::Err("get_pviol_djc: Argument 'viol' has the wrong length, expected numdjcidx_".to_string());
14229 }
14230 self.handle_res(unsafe { MSK_getpvioldjc(self.ptr,whichsol_,numdjcidx_,djcidxlist_.as_ptr(),viol_.as_mut_ptr()) },"get_pviol_djc")?;
14231 return Result::Ok(());
14232 } // getpvioldjc
14233 /// Computes the violation of a primal solution for a list of scalar variables.
14234 ///
14235 /// # Arguments
14236 ///
14237 /// - `whichsol_` Selects a solution.
14238 ///
14239 /// See [Soltype]
14240 /// - `sub_` An array of indexes of x variables.
14241 /// - `viol_` List of violations corresponding to sub.
14242 ///
14243 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getpviolvar>
14244 #[allow(unused_parens)]
14245 pub fn get_pviol_var(&self,whichsol_ : i32,sub_ : &[i32],viol_ : &mut[f64]) -> Result<(),String> {
14246 let num_ : i32 = sub_.len() as i32;
14247 if viol_.len() != (num_).try_into().unwrap() {
14248 return Result::Err("get_pviol_var: Argument 'viol' has the wrong length, expected num_".to_string());
14249 }
14250 self.handle_res(unsafe { MSK_getpviolvar(self.ptr,whichsol_,num_,sub_.as_ptr(),viol_.as_mut_ptr()) },"get_pviol_var")?;
14251 return Result::Ok(());
14252 } // getpviolvar
14253 /// Obtains all the quadratic terms in a constraint.
14254 ///
14255 /// # Arguments
14256 ///
14257 /// - `k_` Which constraint.
14258 /// - `qcsubi_` Row subscripts for quadratic constraint matrix.
14259 /// - `qcsubj_` Column subscripts for quadratic constraint matrix.
14260 /// - `qcval_` Quadratic constraint coefficient values.
14261 ///
14262 /// # Returns
14263 ///
14264 /// - `numqcnz` Number of quadratic terms.
14265 ///
14266 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getqconk64>
14267 #[allow(unused_parens)]
14268 pub fn get_q_con_k(&self,k_ : i32,qcsubi_ : &mut[i32],qcsubj_ : &mut[i32],qcval_ : &mut[f64]) -> Result<i64,String> {
14269 let mut __tmp_0 : i64 = i64::default();
14270 let __tmp_1 = unsafe { MSK_getnumqconknz64(self.ptr,k_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumqconknz64")?;
14271 let maxnumqcnz_ : i64 = __tmp_0;
14272 let mut __tmp_2 : i64 = i64::default();
14273 let mut __tmp_3 : i64 = i64::default();
14274 let __tmp_4 = unsafe { MSK_getnumqconknz64(self.ptr,k_,&mut __tmp_3) };let _ = self.handle_res(__tmp_4,"getnumqconknz64")?;
14275 if qcsubi_.len() != (__tmp_3).try_into().unwrap() {
14276 return Result::Err("get_q_con_k: Argument 'qcsubi' has the wrong length, expected __tmp_3".to_string());
14277 }
14278 let mut __tmp_5 : i64 = i64::default();
14279 let __tmp_6 = unsafe { MSK_getnumqconknz64(self.ptr,k_,&mut __tmp_5) };let _ = self.handle_res(__tmp_6,"getnumqconknz64")?;
14280 if qcsubj_.len() != (__tmp_5).try_into().unwrap() {
14281 return Result::Err("get_q_con_k: Argument 'qcsubj' has the wrong length, expected __tmp_5".to_string());
14282 }
14283 let mut __tmp_7 : i64 = i64::default();
14284 let __tmp_8 = unsafe { MSK_getnumqconknz64(self.ptr,k_,&mut __tmp_7) };let _ = self.handle_res(__tmp_8,"getnumqconknz64")?;
14285 if qcval_.len() != (__tmp_7).try_into().unwrap() {
14286 return Result::Err("get_q_con_k: Argument 'qcval' has the wrong length, expected __tmp_7".to_string());
14287 }
14288 self.handle_res(unsafe { MSK_getqconk64(self.ptr,k_,maxnumqcnz_,&mut __tmp_2,qcsubi_.as_mut_ptr(),qcsubj_.as_mut_ptr(),qcval_.as_mut_ptr()) },"get_q_con_k")?;
14289 return Result::Ok(__tmp_2);
14290 } // getqconk64
14291 /// Obtains all the quadratic terms in the objective.
14292 ///
14293 /// # Arguments
14294 ///
14295 /// - `numqonz_` Number of non-zero elements in the quadratic objective terms.
14296 /// - `qosubi_` Row subscripts for quadratic objective coefficients.
14297 /// - `qosubj_` Column subscripts for quadratic objective coefficients.
14298 /// - `qoval_` Quadratic objective coefficient values.
14299 ///
14300 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getqobj64>
14301 #[allow(unused_parens)]
14302 pub fn get_q_obj(&self,numqonz_ : &mut i64,qosubi_ : &mut[i32],qosubj_ : &mut[i32],qoval_ : &mut[f64]) -> Result<(),String> {
14303 let mut __tmp_0 : i64 = i64::default();
14304 let __tmp_1 = unsafe { MSK_getnumqobjnz64(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumqobjnz64")?;
14305 let maxnumqonz_ : i64 = __tmp_0;
14306 if qosubi_.len() != (maxnumqonz_).try_into().unwrap() {
14307 return Result::Err("get_q_obj: Argument 'qosubi' has the wrong length, expected maxnumqonz_".to_string());
14308 }
14309 if qosubj_.len() != (maxnumqonz_).try_into().unwrap() {
14310 return Result::Err("get_q_obj: Argument 'qosubj' has the wrong length, expected maxnumqonz_".to_string());
14311 }
14312 if qoval_.len() != (maxnumqonz_).try_into().unwrap() {
14313 return Result::Err("get_q_obj: Argument 'qoval' has the wrong length, expected maxnumqonz_".to_string());
14314 }
14315 self.handle_res(unsafe { MSK_getqobj64(self.ptr,maxnumqonz_,numqonz_,qosubi_.as_mut_ptr(),qosubj_.as_mut_ptr(),qoval_.as_mut_ptr()) },"get_q_obj")?;
14316 return Result::Ok(());
14317 } // getqobj64
14318 /// Obtains one coefficient from the quadratic term of the objective
14319 ///
14320 /// # Arguments
14321 ///
14322 /// - `i_` Row index of the coefficient.
14323 /// - `j_` Column index of coefficient.
14324 ///
14325 /// # Returns
14326 ///
14327 /// - `qoij` The required coefficient.
14328 ///
14329 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getqobjij>
14330 #[allow(unused_parens)]
14331 pub fn get_q_obj_i_j(&self,i_ : i32,j_ : i32) -> Result<f64,String> {
14332 let mut __tmp_0 : f64 = f64::default();
14333 self.handle_res(unsafe { MSK_getqobjij(self.ptr,i_,j_,&mut __tmp_0) },"get_q_obj_i_j")?;
14334 return Result::Ok(__tmp_0);
14335 } // getqobjij
14336 /// Obtains the reduced costs for a sequence of variables.
14337 ///
14338 /// # Arguments
14339 ///
14340 /// - `whichsol_` Selects a solution.
14341 ///
14342 /// See [Soltype]
14343 /// - `first_` The index of the first variable in the sequence.
14344 /// - `last_` The index of the last variable in the sequence plus 1.
14345 /// - `redcosts_` Returns the requested reduced costs.
14346 ///
14347 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getreducedcosts>
14348 #[allow(unused_parens)]
14349 pub fn get_reduced_costs(&self,whichsol_ : i32,first_ : i32,last_ : i32,redcosts_ : &mut[f64]) -> Result<(),String> {
14350 if redcosts_.len() > 0 && redcosts_.len() != ((last_-first_)).try_into().unwrap() {
14351 return Result::Err("get_reduced_costs: Argument 'redcosts' has the wrong length, expected (last_-first_)".to_string());
14352 }
14353 self.handle_res(unsafe { MSK_getreducedcosts(self.ptr,whichsol_,first_,last_,if redcosts_.len() == 0 { std::ptr::null_mut() } else { redcosts_.as_mut_ptr() }) },"get_reduced_costs")?;
14354 return Result::Ok(());
14355 } // getreducedcosts
14356 /// Obtains the status keys for the constraints.
14357 ///
14358 /// # Arguments
14359 ///
14360 /// - `whichsol_` Selects a solution.
14361 ///
14362 /// See [Soltype]
14363 /// - `skc_` Status keys for the constraints.
14364 ///
14365 /// See [Stakey]
14366 ///
14367 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getskc>
14368 #[allow(unused_parens)]
14369 pub fn get_skc(&self,whichsol_ : i32,skc_ : &mut[i32]) -> Result<(),String> {
14370 let mut __tmp_0 : i32 = i32::default();
14371 let __tmp_1 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumcon")?;
14372 if skc_.len() != (__tmp_0).try_into().unwrap() {
14373 return Result::Err("get_skc: Argument 'skc' has the wrong length, expected __tmp_0".to_string());
14374 }
14375 self.handle_res(unsafe { MSK_getskc(self.ptr,whichsol_,skc_.as_mut_ptr()) },"get_skc")?;
14376 return Result::Ok(());
14377 } // getskc
14378 /// Obtains the status keys for a slice of the constraints.
14379 ///
14380 /// # Arguments
14381 ///
14382 /// - `whichsol_` Selects a solution.
14383 ///
14384 /// See [Soltype]
14385 /// - `first_` First index in the sequence.
14386 /// - `last_` Last index plus 1 in the sequence.
14387 /// - `skc_` Status keys for the constraints.
14388 ///
14389 /// See [Stakey]
14390 ///
14391 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getskcslice>
14392 #[allow(unused_parens)]
14393 pub fn get_skc_slice(&self,whichsol_ : i32,first_ : i32,last_ : i32,skc_ : &mut[i32]) -> Result<(),String> {
14394 if skc_.len() != ((last_-first_)).try_into().unwrap() {
14395 return Result::Err("get_skc_slice: Argument 'skc' has the wrong length, expected (last_-first_)".to_string());
14396 }
14397 self.handle_res(unsafe { MSK_getskcslice(self.ptr,whichsol_,first_,last_,skc_.as_mut_ptr()) },"get_skc_slice")?;
14398 return Result::Ok(());
14399 } // getskcslice
14400 /// Obtains the status keys for the conic constraints.
14401 ///
14402 /// # Arguments
14403 ///
14404 /// - `whichsol_` Selects a solution.
14405 ///
14406 /// See [Soltype]
14407 /// - `skn_` Status keys for the conic constraints.
14408 ///
14409 /// See [Stakey]
14410 ///
14411 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getskn>
14412 #[allow(unused_parens)]
14413 pub fn get_skn(&self,whichsol_ : i32,skn_ : &mut[i32]) -> Result<(),String> {
14414 let mut __tmp_0 : i32 = i32::default();
14415 let __tmp_1 = unsafe { MSK_getnumcone(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumcone")?;
14416 if skn_.len() != (__tmp_0).try_into().unwrap() {
14417 return Result::Err("get_skn: Argument 'skn' has the wrong length, expected __tmp_0".to_string());
14418 }
14419 self.handle_res(unsafe { MSK_getskn(self.ptr,whichsol_,skn_.as_mut_ptr()) },"get_skn")?;
14420 return Result::Ok(());
14421 } // getskn
14422 /// Obtains the status keys for the scalar variables.
14423 ///
14424 /// # Arguments
14425 ///
14426 /// - `whichsol_` Selects a solution.
14427 ///
14428 /// See [Soltype]
14429 /// - `skx_` Status keys for the variables.
14430 ///
14431 /// See [Stakey]
14432 ///
14433 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getskx>
14434 #[allow(unused_parens)]
14435 pub fn get_skx(&self,whichsol_ : i32,skx_ : &mut[i32]) -> Result<(),String> {
14436 let mut __tmp_0 : i32 = i32::default();
14437 let __tmp_1 = unsafe { MSK_getnumvar(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumvar")?;
14438 if skx_.len() != (__tmp_0).try_into().unwrap() {
14439 return Result::Err("get_skx: Argument 'skx' has the wrong length, expected __tmp_0".to_string());
14440 }
14441 self.handle_res(unsafe { MSK_getskx(self.ptr,whichsol_,skx_.as_mut_ptr()) },"get_skx")?;
14442 return Result::Ok(());
14443 } // getskx
14444 /// Obtains the status keys for a slice of the scalar variables.
14445 ///
14446 /// # Arguments
14447 ///
14448 /// - `whichsol_` Selects a solution.
14449 ///
14450 /// See [Soltype]
14451 /// - `first_` First index in the sequence.
14452 /// - `last_` Last index plus 1 in the sequence.
14453 /// - `skx_` Status keys for the variables.
14454 ///
14455 /// See [Stakey]
14456 ///
14457 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getskxslice>
14458 #[allow(unused_parens)]
14459 pub fn get_skx_slice(&self,whichsol_ : i32,first_ : i32,last_ : i32,skx_ : &mut[i32]) -> Result<(),String> {
14460 if skx_.len() != ((last_-first_)).try_into().unwrap() {
14461 return Result::Err("get_skx_slice: Argument 'skx' has the wrong length, expected (last_-first_)".to_string());
14462 }
14463 self.handle_res(unsafe { MSK_getskxslice(self.ptr,whichsol_,first_,last_,skx_.as_mut_ptr()) },"get_skx_slice")?;
14464 return Result::Ok(());
14465 } // getskxslice
14466 /// Obtains the slc vector for a solution.
14467 ///
14468 /// # Arguments
14469 ///
14470 /// - `whichsol_` Selects a solution.
14471 ///
14472 /// See [Soltype]
14473 /// - `slc_` Dual variables corresponding to the lower bounds on the constraints.
14474 ///
14475 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getslc>
14476 #[allow(unused_parens)]
14477 pub fn get_slc(&self,whichsol_ : i32,slc_ : &mut[f64]) -> Result<(),String> {
14478 let mut __tmp_0 : i32 = i32::default();
14479 let __tmp_1 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumcon")?;
14480 if slc_.len() != (__tmp_0).try_into().unwrap() {
14481 return Result::Err("get_slc: Argument 'slc' has the wrong length, expected __tmp_0".to_string());
14482 }
14483 self.handle_res(unsafe { MSK_getslc(self.ptr,whichsol_,slc_.as_mut_ptr()) },"get_slc")?;
14484 return Result::Ok(());
14485 } // getslc
14486 /// Obtains a slice of the slc vector for a solution.
14487 ///
14488 /// # Arguments
14489 ///
14490 /// - `whichsol_` Selects a solution.
14491 ///
14492 /// See [Soltype]
14493 /// - `first_` First index in the sequence.
14494 /// - `last_` Last index plus 1 in the sequence.
14495 /// - `slc_` Dual variables corresponding to the lower bounds on the constraints.
14496 ///
14497 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getslcslice>
14498 #[allow(unused_parens)]
14499 pub fn get_slc_slice(&self,whichsol_ : i32,first_ : i32,last_ : i32,slc_ : &mut[f64]) -> Result<(),String> {
14500 if slc_.len() > 0 && slc_.len() != ((last_-first_)).try_into().unwrap() {
14501 return Result::Err("get_slc_slice: Argument 'slc' has the wrong length, expected (last_-first_)".to_string());
14502 }
14503 self.handle_res(unsafe { MSK_getslcslice(self.ptr,whichsol_,first_,last_,if slc_.len() == 0 { std::ptr::null_mut() } else { slc_.as_mut_ptr() }) },"get_slc_slice")?;
14504 return Result::Ok(());
14505 } // getslcslice
14506 /// Obtains the slx vector for a solution.
14507 ///
14508 /// # Arguments
14509 ///
14510 /// - `whichsol_` Selects a solution.
14511 ///
14512 /// See [Soltype]
14513 /// - `slx_` Dual variables corresponding to the lower bounds on the variables.
14514 ///
14515 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getslx>
14516 #[allow(unused_parens)]
14517 pub fn get_slx(&self,whichsol_ : i32,slx_ : &mut[f64]) -> Result<(),String> {
14518 let mut __tmp_0 : i32 = i32::default();
14519 let __tmp_1 = unsafe { MSK_getnumvar(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumvar")?;
14520 if slx_.len() != (__tmp_0).try_into().unwrap() {
14521 return Result::Err("get_slx: Argument 'slx' has the wrong length, expected __tmp_0".to_string());
14522 }
14523 self.handle_res(unsafe { MSK_getslx(self.ptr,whichsol_,slx_.as_mut_ptr()) },"get_slx")?;
14524 return Result::Ok(());
14525 } // getslx
14526 /// Obtains a slice of the slx vector for a solution.
14527 ///
14528 /// # Arguments
14529 ///
14530 /// - `whichsol_` Selects a solution.
14531 ///
14532 /// See [Soltype]
14533 /// - `first_` First index in the sequence.
14534 /// - `last_` Last index plus 1 in the sequence.
14535 /// - `slx_` Dual variables corresponding to the lower bounds on the variables.
14536 ///
14537 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getslxslice>
14538 #[allow(unused_parens)]
14539 pub fn get_slx_slice(&self,whichsol_ : i32,first_ : i32,last_ : i32,slx_ : &mut[f64]) -> Result<(),String> {
14540 if slx_.len() > 0 && slx_.len() != ((last_-first_)).try_into().unwrap() {
14541 return Result::Err("get_slx_slice: Argument 'slx' has the wrong length, expected (last_-first_)".to_string());
14542 }
14543 self.handle_res(unsafe { MSK_getslxslice(self.ptr,whichsol_,first_,last_,if slx_.len() == 0 { std::ptr::null_mut() } else { slx_.as_mut_ptr() }) },"get_slx_slice")?;
14544 return Result::Ok(());
14545 } // getslxslice
14546 /// Obtains the snx vector for a solution.
14547 ///
14548 /// # Arguments
14549 ///
14550 /// - `whichsol_` Selects a solution.
14551 ///
14552 /// See [Soltype]
14553 /// - `snx_` Dual variables corresponding to the conic constraints on the variables.
14554 ///
14555 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsnx>
14556 #[allow(unused_parens)]
14557 pub fn get_snx(&self,whichsol_ : i32,snx_ : &mut[f64]) -> Result<(),String> {
14558 let mut __tmp_0 : i32 = i32::default();
14559 let __tmp_1 = unsafe { MSK_getnumvar(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumvar")?;
14560 if snx_.len() != (__tmp_0).try_into().unwrap() {
14561 return Result::Err("get_snx: Argument 'snx' has the wrong length, expected __tmp_0".to_string());
14562 }
14563 self.handle_res(unsafe { MSK_getsnx(self.ptr,whichsol_,snx_.as_mut_ptr()) },"get_snx")?;
14564 return Result::Ok(());
14565 } // getsnx
14566 /// Obtains a slice of the snx vector for a solution.
14567 ///
14568 /// # Arguments
14569 ///
14570 /// - `whichsol_` Selects a solution.
14571 ///
14572 /// See [Soltype]
14573 /// - `first_` First index in the sequence.
14574 /// - `last_` Last index plus 1 in the sequence.
14575 /// - `snx_` Dual variables corresponding to the conic constraints on the variables.
14576 ///
14577 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsnxslice>
14578 #[allow(unused_parens)]
14579 pub fn get_snx_slice(&self,whichsol_ : i32,first_ : i32,last_ : i32,snx_ : &mut[f64]) -> Result<(),String> {
14580 if snx_.len() > 0 && snx_.len() != ((last_-first_)).try_into().unwrap() {
14581 return Result::Err("get_snx_slice: Argument 'snx' has the wrong length, expected (last_-first_)".to_string());
14582 }
14583 self.handle_res(unsafe { MSK_getsnxslice(self.ptr,whichsol_,first_,last_,if snx_.len() == 0 { std::ptr::null_mut() } else { snx_.as_mut_ptr() }) },"get_snx_slice")?;
14584 return Result::Ok(());
14585 } // getsnxslice
14586 /// Obtains the solution status.
14587 ///
14588 /// # Arguments
14589 ///
14590 /// - `whichsol_` Selects a solution.
14591 ///
14592 /// See [Soltype]
14593 ///
14594 /// # Returns
14595 ///
14596 /// - `solutionsta` Solution status.
14597 ///
14598 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsolsta>
14599 #[allow(unused_parens)]
14600 pub fn get_sol_sta(&self,whichsol_ : i32) -> Result<i32,String> {
14601 let mut __tmp_0 : i32 = 0;
14602 self.handle_res(unsafe { MSK_getsolsta(self.ptr,whichsol_,&mut __tmp_0) },"get_sol_sta")?;
14603 return Result::Ok(__tmp_0);
14604 } // getsolsta
14605 /// Obtains the complete solution.
14606 ///
14607 /// # Arguments
14608 ///
14609 /// - `whichsol_` Selects a solution.
14610 ///
14611 /// See [Soltype]
14612 /// - `problemsta_` Problem status.
14613 ///
14614 /// See [Prosta]
14615 /// - `solutionsta_` Solution status.
14616 ///
14617 /// See [Solsta]
14618 /// - `skc_` Status keys for the constraints.
14619 ///
14620 /// See [Stakey]
14621 /// - `skx_` Status keys for the variables.
14622 ///
14623 /// See [Stakey]
14624 /// - `skn_` Status keys for the conic constraints.
14625 ///
14626 /// See [Stakey]
14627 /// - `xc_` Primal constraint solution.
14628 /// - `xx_` Primal variable solution.
14629 /// - `y_` Vector of dual variables corresponding to the constraints.
14630 /// - `slc_` Dual variables corresponding to the lower bounds on the constraints.
14631 /// - `suc_` Dual variables corresponding to the upper bounds on the constraints.
14632 /// - `slx_` Dual variables corresponding to the lower bounds on the variables.
14633 /// - `sux_` Dual variables corresponding to the upper bounds on the variables.
14634 /// - `snx_` Dual variables corresponding to the conic constraints on the variables.
14635 ///
14636 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsolution>
14637 #[allow(unused_parens)]
14638 pub fn get_solution(&self,whichsol_ : i32,problemsta_ : & mut i32,solutionsta_ : & mut i32,skc_ : &mut[i32],skx_ : &mut[i32],skn_ : &mut[i32],xc_ : &mut[f64],xx_ : &mut[f64],y_ : &mut[f64],slc_ : &mut[f64],suc_ : &mut[f64],slx_ : &mut[f64],sux_ : &mut[f64],snx_ : &mut[f64]) -> Result<(),String> {
14639 let mut __tmp_2 : i32 = i32::default();
14640 let __tmp_3 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_2) };let _ = self.handle_res(__tmp_3,"getnumcon")?;
14641 if skc_.len() != (__tmp_2).try_into().unwrap() {
14642 return Result::Err("get_solution: Argument 'skc' has the wrong length, expected __tmp_2".to_string());
14643 }
14644 let mut __tmp_4 : i32 = i32::default();
14645 let __tmp_5 = unsafe { MSK_getnumvar(self.ptr,&mut __tmp_4) };let _ = self.handle_res(__tmp_5,"getnumvar")?;
14646 if skx_.len() != (__tmp_4).try_into().unwrap() {
14647 return Result::Err("get_solution: Argument 'skx' has the wrong length, expected __tmp_4".to_string());
14648 }
14649 let mut __tmp_6 : i32 = i32::default();
14650 let __tmp_7 = unsafe { MSK_getnumcone(self.ptr,&mut __tmp_6) };let _ = self.handle_res(__tmp_7,"getnumcone")?;
14651 if skn_.len() != (__tmp_6).try_into().unwrap() {
14652 return Result::Err("get_solution: Argument 'skn' has the wrong length, expected __tmp_6".to_string());
14653 }
14654 let mut __tmp_8 : i32 = i32::default();
14655 let __tmp_9 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_8) };let _ = self.handle_res(__tmp_9,"getnumcon")?;
14656 if xc_.len() > 0 && xc_.len() != (__tmp_8).try_into().unwrap() {
14657 return Result::Err("get_solution: Argument 'xc' has the wrong length, expected __tmp_8".to_string());
14658 }
14659 let mut __tmp_10 : i32 = i32::default();
14660 let __tmp_11 = unsafe { MSK_getnumvar(self.ptr,&mut __tmp_10) };let _ = self.handle_res(__tmp_11,"getnumvar")?;
14661 if xx_.len() > 0 && xx_.len() != (__tmp_10).try_into().unwrap() {
14662 return Result::Err("get_solution: Argument 'xx' has the wrong length, expected __tmp_10".to_string());
14663 }
14664 let mut __tmp_12 : i32 = i32::default();
14665 let __tmp_13 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_12) };let _ = self.handle_res(__tmp_13,"getnumcon")?;
14666 if y_.len() > 0 && y_.len() != (__tmp_12).try_into().unwrap() {
14667 return Result::Err("get_solution: Argument 'y' has the wrong length, expected __tmp_12".to_string());
14668 }
14669 let mut __tmp_14 : i32 = i32::default();
14670 let __tmp_15 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_14) };let _ = self.handle_res(__tmp_15,"getnumcon")?;
14671 if slc_.len() > 0 && slc_.len() != (__tmp_14).try_into().unwrap() {
14672 return Result::Err("get_solution: Argument 'slc' has the wrong length, expected __tmp_14".to_string());
14673 }
14674 let mut __tmp_16 : i32 = i32::default();
14675 let __tmp_17 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_16) };let _ = self.handle_res(__tmp_17,"getnumcon")?;
14676 if suc_.len() > 0 && suc_.len() != (__tmp_16).try_into().unwrap() {
14677 return Result::Err("get_solution: Argument 'suc' has the wrong length, expected __tmp_16".to_string());
14678 }
14679 let mut __tmp_18 : i32 = i32::default();
14680 let __tmp_19 = unsafe { MSK_getnumvar(self.ptr,&mut __tmp_18) };let _ = self.handle_res(__tmp_19,"getnumvar")?;
14681 if slx_.len() > 0 && slx_.len() != (__tmp_18).try_into().unwrap() {
14682 return Result::Err("get_solution: Argument 'slx' has the wrong length, expected __tmp_18".to_string());
14683 }
14684 let mut __tmp_20 : i32 = i32::default();
14685 let __tmp_21 = unsafe { MSK_getnumvar(self.ptr,&mut __tmp_20) };let _ = self.handle_res(__tmp_21,"getnumvar")?;
14686 if sux_.len() > 0 && sux_.len() != (__tmp_20).try_into().unwrap() {
14687 return Result::Err("get_solution: Argument 'sux' has the wrong length, expected __tmp_20".to_string());
14688 }
14689 let mut __tmp_22 : i32 = i32::default();
14690 let __tmp_23 = unsafe { MSK_getnumvar(self.ptr,&mut __tmp_22) };let _ = self.handle_res(__tmp_23,"getnumvar")?;
14691 if snx_.len() > 0 && snx_.len() != (__tmp_22).try_into().unwrap() {
14692 return Result::Err("get_solution: Argument 'snx' has the wrong length, expected __tmp_22".to_string());
14693 }
14694 self.handle_res(unsafe { MSK_getsolution(self.ptr,whichsol_,problemsta_,solutionsta_,skc_.as_mut_ptr(),skx_.as_mut_ptr(),skn_.as_mut_ptr(),if xc_.len() == 0 { std::ptr::null_mut() } else { xc_.as_mut_ptr() },if xx_.len() == 0 { std::ptr::null_mut() } else { xx_.as_mut_ptr() },if y_.len() == 0 { std::ptr::null_mut() } else { y_.as_mut_ptr() },if slc_.len() == 0 { std::ptr::null_mut() } else { slc_.as_mut_ptr() },if suc_.len() == 0 { std::ptr::null_mut() } else { suc_.as_mut_ptr() },if slx_.len() == 0 { std::ptr::null_mut() } else { slx_.as_mut_ptr() },if sux_.len() == 0 { std::ptr::null_mut() } else { sux_.as_mut_ptr() },if snx_.len() == 0 { std::ptr::null_mut() } else { snx_.as_mut_ptr() }) },"get_solution")?;
14695 return Result::Ok(());
14696 } // getsolution
14697 /// Obtains information about of a solution.
14698 ///
14699 /// # Arguments
14700 ///
14701 /// - `whichsol_` Selects a solution.
14702 ///
14703 /// See [Soltype]
14704 /// - `pobj_` The primal objective value.
14705 /// - `pviolcon_` Maximal primal bound violation for a xc variable.
14706 /// - `pviolvar_` Maximal primal bound violation for a xx variable.
14707 /// - `pviolbarvar_` Maximal primal bound violation for a barx variable.
14708 /// - `pviolcone_` Maximal primal violation of the solution with respect to the conic constraints.
14709 /// - `pviolitg_` Maximal violation in the integer constraints.
14710 /// - `dobj_` Dual objective value.
14711 /// - `dviolcon_` Maximal dual bound violation for a xc variable.
14712 /// - `dviolvar_` Maximal dual bound violation for a xx variable.
14713 /// - `dviolbarvar_` Maximal dual bound violation for a bars variable.
14714 /// - `dviolcone_` Maximum violation of the dual solution in the dual conic constraints.
14715 ///
14716 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsolutioninfo>
14717 #[allow(unused_parens)]
14718 pub fn get_solution_info(&self,whichsol_ : i32,pobj_ : &mut f64,pviolcon_ : &mut f64,pviolvar_ : &mut f64,pviolbarvar_ : &mut f64,pviolcone_ : &mut f64,pviolitg_ : &mut f64,dobj_ : &mut f64,dviolcon_ : &mut f64,dviolvar_ : &mut f64,dviolbarvar_ : &mut f64,dviolcone_ : &mut f64) -> Result<(),String> {
14719 self.handle_res(unsafe { MSK_getsolutioninfo(self.ptr,whichsol_,pobj_,pviolcon_,pviolvar_,pviolbarvar_,pviolcone_,pviolitg_,dobj_,dviolcon_,dviolvar_,dviolbarvar_,dviolcone_) },"get_solution_info")?;
14720 return Result::Ok(());
14721 } // getsolutioninfo
14722 /// Obtains information about of a solution.
14723 ///
14724 /// # Arguments
14725 ///
14726 /// - `whichsol_` Selects a solution.
14727 ///
14728 /// See [Soltype]
14729 /// - `pobj_` The primal objective value.
14730 /// - `pviolcon_` Maximal primal bound violation for a xc variable.
14731 /// - `pviolvar_` Maximal primal bound violation for a xx variable.
14732 /// - `pviolbarvar_` Maximal primal bound violation for a barx variable.
14733 /// - `pviolcone_` Maximal primal violation of the solution with respect to the conic constraints.
14734 /// - `pviolacc_` Maximal primal violation of the solution with respect to the affine conic constraints.
14735 /// - `pvioldjc_` Maximal primal violation of the solution with respect to the disjunctive constraints.
14736 /// - `pviolitg_` Maximal violation in the integer constraints.
14737 /// - `dobj_` Dual objective value.
14738 /// - `dviolcon_` Maximal dual bound violation for a xc variable.
14739 /// - `dviolvar_` Maximal dual bound violation for a xx variable.
14740 /// - `dviolbarvar_` Maximal dual bound violation for a bars variable.
14741 /// - `dviolcone_` Maximum violation of the dual solution in the dual conic constraints.
14742 /// - `dviolacc_` Maximum violation of the dual solution in the dual affine conic constraints.
14743 ///
14744 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsolutioninfonew>
14745 #[allow(unused_parens)]
14746 pub fn get_solution_info_new(&self,whichsol_ : i32,pobj_ : &mut f64,pviolcon_ : &mut f64,pviolvar_ : &mut f64,pviolbarvar_ : &mut f64,pviolcone_ : &mut f64,pviolacc_ : &mut f64,pvioldjc_ : &mut f64,pviolitg_ : &mut f64,dobj_ : &mut f64,dviolcon_ : &mut f64,dviolvar_ : &mut f64,dviolbarvar_ : &mut f64,dviolcone_ : &mut f64,dviolacc_ : &mut f64) -> Result<(),String> {
14747 self.handle_res(unsafe { MSK_getsolutioninfonew(self.ptr,whichsol_,pobj_,pviolcon_,pviolvar_,pviolbarvar_,pviolcone_,pviolacc_,pvioldjc_,pviolitg_,dobj_,dviolcon_,dviolvar_,dviolbarvar_,dviolcone_,dviolacc_) },"get_solution_info_new")?;
14748 return Result::Ok(());
14749 } // getsolutioninfonew
14750 /// Obtains the complete solution.
14751 ///
14752 /// # Arguments
14753 ///
14754 /// - `whichsol_` Selects a solution.
14755 ///
14756 /// See [Soltype]
14757 /// - `problemsta_` Problem status.
14758 ///
14759 /// See [Prosta]
14760 /// - `solutionsta_` Solution status.
14761 ///
14762 /// See [Solsta]
14763 /// - `skc_` Status keys for the constraints.
14764 ///
14765 /// See [Stakey]
14766 /// - `skx_` Status keys for the variables.
14767 ///
14768 /// See [Stakey]
14769 /// - `skn_` Status keys for the conic constraints.
14770 ///
14771 /// See [Stakey]
14772 /// - `xc_` Primal constraint solution.
14773 /// - `xx_` Primal variable solution.
14774 /// - `y_` Vector of dual variables corresponding to the constraints.
14775 /// - `slc_` Dual variables corresponding to the lower bounds on the constraints.
14776 /// - `suc_` Dual variables corresponding to the upper bounds on the constraints.
14777 /// - `slx_` Dual variables corresponding to the lower bounds on the variables.
14778 /// - `sux_` Dual variables corresponding to the upper bounds on the variables.
14779 /// - `snx_` Dual variables corresponding to the conic constraints on the variables.
14780 /// - `doty_` Dual variables corresponding to affine conic constraints.
14781 ///
14782 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsolutionnew>
14783 #[allow(unused_parens)]
14784 pub fn get_solution_new(&self,whichsol_ : i32,problemsta_ : & mut i32,solutionsta_ : & mut i32,skc_ : &mut[i32],skx_ : &mut[i32],skn_ : &mut[i32],xc_ : &mut[f64],xx_ : &mut[f64],y_ : &mut[f64],slc_ : &mut[f64],suc_ : &mut[f64],slx_ : &mut[f64],sux_ : &mut[f64],snx_ : &mut[f64],doty_ : &mut[f64]) -> Result<(),String> {
14785 let mut __tmp_2 : i32 = i32::default();
14786 let __tmp_3 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_2) };let _ = self.handle_res(__tmp_3,"getnumcon")?;
14787 if skc_.len() != (__tmp_2).try_into().unwrap() {
14788 return Result::Err("get_solution_new: Argument 'skc' has the wrong length, expected __tmp_2".to_string());
14789 }
14790 let mut __tmp_4 : i32 = i32::default();
14791 let __tmp_5 = unsafe { MSK_getnumvar(self.ptr,&mut __tmp_4) };let _ = self.handle_res(__tmp_5,"getnumvar")?;
14792 if skx_.len() != (__tmp_4).try_into().unwrap() {
14793 return Result::Err("get_solution_new: Argument 'skx' has the wrong length, expected __tmp_4".to_string());
14794 }
14795 let mut __tmp_6 : i32 = i32::default();
14796 let __tmp_7 = unsafe { MSK_getnumcone(self.ptr,&mut __tmp_6) };let _ = self.handle_res(__tmp_7,"getnumcone")?;
14797 if skn_.len() != (__tmp_6).try_into().unwrap() {
14798 return Result::Err("get_solution_new: Argument 'skn' has the wrong length, expected __tmp_6".to_string());
14799 }
14800 let mut __tmp_8 : i32 = i32::default();
14801 let __tmp_9 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_8) };let _ = self.handle_res(__tmp_9,"getnumcon")?;
14802 if xc_.len() > 0 && xc_.len() != (__tmp_8).try_into().unwrap() {
14803 return Result::Err("get_solution_new: Argument 'xc' has the wrong length, expected __tmp_8".to_string());
14804 }
14805 let mut __tmp_10 : i32 = i32::default();
14806 let __tmp_11 = unsafe { MSK_getnumvar(self.ptr,&mut __tmp_10) };let _ = self.handle_res(__tmp_11,"getnumvar")?;
14807 if xx_.len() > 0 && xx_.len() != (__tmp_10).try_into().unwrap() {
14808 return Result::Err("get_solution_new: Argument 'xx' has the wrong length, expected __tmp_10".to_string());
14809 }
14810 let mut __tmp_12 : i32 = i32::default();
14811 let __tmp_13 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_12) };let _ = self.handle_res(__tmp_13,"getnumcon")?;
14812 if y_.len() > 0 && y_.len() != (__tmp_12).try_into().unwrap() {
14813 return Result::Err("get_solution_new: Argument 'y' has the wrong length, expected __tmp_12".to_string());
14814 }
14815 let mut __tmp_14 : i32 = i32::default();
14816 let __tmp_15 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_14) };let _ = self.handle_res(__tmp_15,"getnumcon")?;
14817 if slc_.len() > 0 && slc_.len() != (__tmp_14).try_into().unwrap() {
14818 return Result::Err("get_solution_new: Argument 'slc' has the wrong length, expected __tmp_14".to_string());
14819 }
14820 let mut __tmp_16 : i32 = i32::default();
14821 let __tmp_17 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_16) };let _ = self.handle_res(__tmp_17,"getnumcon")?;
14822 if suc_.len() > 0 && suc_.len() != (__tmp_16).try_into().unwrap() {
14823 return Result::Err("get_solution_new: Argument 'suc' has the wrong length, expected __tmp_16".to_string());
14824 }
14825 let mut __tmp_18 : i32 = i32::default();
14826 let __tmp_19 = unsafe { MSK_getnumvar(self.ptr,&mut __tmp_18) };let _ = self.handle_res(__tmp_19,"getnumvar")?;
14827 if slx_.len() > 0 && slx_.len() != (__tmp_18).try_into().unwrap() {
14828 return Result::Err("get_solution_new: Argument 'slx' has the wrong length, expected __tmp_18".to_string());
14829 }
14830 let mut __tmp_20 : i32 = i32::default();
14831 let __tmp_21 = unsafe { MSK_getnumvar(self.ptr,&mut __tmp_20) };let _ = self.handle_res(__tmp_21,"getnumvar")?;
14832 if sux_.len() > 0 && sux_.len() != (__tmp_20).try_into().unwrap() {
14833 return Result::Err("get_solution_new: Argument 'sux' has the wrong length, expected __tmp_20".to_string());
14834 }
14835 let mut __tmp_22 : i32 = i32::default();
14836 let __tmp_23 = unsafe { MSK_getnumvar(self.ptr,&mut __tmp_22) };let _ = self.handle_res(__tmp_23,"getnumvar")?;
14837 if snx_.len() > 0 && snx_.len() != (__tmp_22).try_into().unwrap() {
14838 return Result::Err("get_solution_new: Argument 'snx' has the wrong length, expected __tmp_22".to_string());
14839 }
14840 let mut __tmp_24 : i64 = i64::default();
14841 let __tmp_25 = unsafe { MSK_getaccntot(self.ptr,&mut __tmp_24) };let _ = self.handle_res(__tmp_25,"getaccntot")?;
14842 if doty_.len() > 0 && doty_.len() != (__tmp_24).try_into().unwrap() {
14843 return Result::Err("get_solution_new: Argument 'doty' has the wrong length, expected __tmp_24".to_string());
14844 }
14845 self.handle_res(unsafe { MSK_getsolutionnew(self.ptr,whichsol_,problemsta_,solutionsta_,skc_.as_mut_ptr(),skx_.as_mut_ptr(),skn_.as_mut_ptr(),if xc_.len() == 0 { std::ptr::null_mut() } else { xc_.as_mut_ptr() },if xx_.len() == 0 { std::ptr::null_mut() } else { xx_.as_mut_ptr() },if y_.len() == 0 { std::ptr::null_mut() } else { y_.as_mut_ptr() },if slc_.len() == 0 { std::ptr::null_mut() } else { slc_.as_mut_ptr() },if suc_.len() == 0 { std::ptr::null_mut() } else { suc_.as_mut_ptr() },if slx_.len() == 0 { std::ptr::null_mut() } else { slx_.as_mut_ptr() },if sux_.len() == 0 { std::ptr::null_mut() } else { sux_.as_mut_ptr() },if snx_.len() == 0 { std::ptr::null_mut() } else { snx_.as_mut_ptr() },if doty_.len() == 0 { std::ptr::null_mut() } else { doty_.as_mut_ptr() }) },"get_solution_new")?;
14846 return Result::Ok(());
14847 } // getsolutionnew
14848 /// Obtains a slice of the solution.
14849 ///
14850 /// # Arguments
14851 ///
14852 /// - `whichsol_` Selects a solution.
14853 ///
14854 /// See [Soltype]
14855 /// - `solitem_` Which part of the solution is required.
14856 ///
14857 /// See [Solitem]
14858 /// - `first_` First index in the sequence.
14859 /// - `last_` Last index plus 1 in the sequence.
14860 /// - `values_` The values of the requested solution elements.
14861 ///
14862 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsolutionslice>
14863 #[allow(unused_parens)]
14864 pub fn get_solution_slice(&self,whichsol_ : i32,solitem_ : i32,first_ : i32,last_ : i32,values_ : &mut[f64]) -> Result<(),String> {
14865 if values_.len() > 0 && values_.len() != ((last_-first_)).try_into().unwrap() {
14866 return Result::Err("get_solution_slice: Argument 'values' has the wrong length, expected (last_-first_)".to_string());
14867 }
14868 self.handle_res(unsafe { MSK_getsolutionslice(self.ptr,whichsol_,solitem_,first_,last_,if values_.len() == 0 { std::ptr::null_mut() } else { values_.as_mut_ptr() }) },"get_solution_slice")?;
14869 return Result::Ok(());
14870 } // getsolutionslice
14871 /// Gets a single symmetric matrix from the matrix store.
14872 ///
14873 /// # Arguments
14874 ///
14875 /// - `idx_` Index of the matrix to retrieve.
14876 /// - `subi_` Row subscripts of the matrix non-zero elements.
14877 /// - `subj_` Column subscripts of the matrix non-zero elements.
14878 /// - `valij_` Coefficients of the matrix non-zero elements.
14879 ///
14880 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsparsesymmat>
14881 #[allow(unused_parens)]
14882 pub fn get_sparse_sym_mat(&self,idx_ : i64,subi_ : &mut[i32],subj_ : &mut[i32],valij_ : &mut[f64]) -> Result<(),String> {
14883 let mut __tmp_0 : i32 = i32::default();
14884 let mut __tmp_1 : i64 = i64::default();
14885 let mut __tmp_2 : i32 = i32::default();
14886 let __tmp_3 = unsafe { MSK_getsymmatinfo(self.ptr,idx_,&mut __tmp_0,&mut __tmp_1,&mut __tmp_2) };let _ = self.handle_res(__tmp_3,"getsymmatinfo")?;
14887 let maxlen_ : i64 = __tmp_1;
14888 if subi_.len() > 0 && subi_.len() != (maxlen_).try_into().unwrap() {
14889 return Result::Err("get_sparse_sym_mat: Argument 'subi' has the wrong length, expected maxlen_".to_string());
14890 }
14891 if subj_.len() > 0 && subj_.len() != (maxlen_).try_into().unwrap() {
14892 return Result::Err("get_sparse_sym_mat: Argument 'subj' has the wrong length, expected maxlen_".to_string());
14893 }
14894 if valij_.len() > 0 && valij_.len() != (maxlen_).try_into().unwrap() {
14895 return Result::Err("get_sparse_sym_mat: Argument 'valij' has the wrong length, expected maxlen_".to_string());
14896 }
14897 self.handle_res(unsafe { MSK_getsparsesymmat(self.ptr,idx_,maxlen_,if subi_.len() == 0 { std::ptr::null_mut() } else { subi_.as_mut_ptr() },if subj_.len() == 0 { std::ptr::null_mut() } else { subj_.as_mut_ptr() },if valij_.len() == 0 { std::ptr::null_mut() } else { valij_.as_mut_ptr() }) },"get_sparse_sym_mat")?;
14898 return Result::Ok(());
14899 } // getsparsesymmat
14900 /// Obtains the value of a string parameter.
14901 ///
14902 /// # Arguments
14903 ///
14904 /// - `param_` Which parameter.
14905 ///
14906 /// See [Sparam]
14907 /// - `len_` The length of the parameter value.
14908 ///
14909 /// # Returns
14910 ///
14911 /// - `parvalue` If this is not a null pointer, the parameter value is stored here.
14912 ///
14913 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getstrparam>
14914 #[allow(unused_parens)]
14915 pub fn get_str_param(&self,param_ : i32,len_ : &mut i32) -> Result<String,String> {
14916 let mut __tmp_0 : i32 = i32::default();
14917 let __tmp_1 = unsafe { MSK_getstrparamlen(self.ptr,param_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getstrparamlen")?;
14918 let maxlen_ : i32 = (1+__tmp_0);
14919 let mut parvalue_ = Vec::new(); parvalue_.resize(maxlen_ as usize,0);
14920 self.handle_res(unsafe { MSK_getstrparam(self.ptr,param_,maxlen_,len_,parvalue_.as_mut_ptr()) },"get_str_param")?;
14921 return Result::Ok(String::from_utf8_lossy(&parvalue_[..parvalue_.iter().position(|&c| c == 0).unwrap_or(maxlen_ as usize)]).into_owned());
14922 } // getstrparam
14923 /// Obtains the length of a string parameter.
14924 ///
14925 /// # Arguments
14926 ///
14927 /// - `param_` Which parameter.
14928 ///
14929 /// See [Sparam]
14930 ///
14931 /// # Returns
14932 ///
14933 /// - `len` The length of the parameter value.
14934 ///
14935 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getstrparamlen>
14936 #[allow(unused_parens)]
14937 pub fn get_str_param_len(&self,param_ : i32) -> Result<i32,String> {
14938 let mut __tmp_0 : i32 = i32::default();
14939 self.handle_res(unsafe { MSK_getstrparamlen(self.ptr,param_,&mut __tmp_0) },"get_str_param_len")?;
14940 return Result::Ok(__tmp_0);
14941 } // getstrparamlen
14942 /// Obtains the suc vector for a solution.
14943 ///
14944 /// # Arguments
14945 ///
14946 /// - `whichsol_` Selects a solution.
14947 ///
14948 /// See [Soltype]
14949 /// - `suc_` Dual variables corresponding to the upper bounds on the constraints.
14950 ///
14951 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsuc>
14952 #[allow(unused_parens)]
14953 pub fn get_suc(&self,whichsol_ : i32,suc_ : &mut[f64]) -> Result<(),String> {
14954 let mut __tmp_0 : i32 = i32::default();
14955 let __tmp_1 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumcon")?;
14956 if suc_.len() != (__tmp_0).try_into().unwrap() {
14957 return Result::Err("get_suc: Argument 'suc' has the wrong length, expected __tmp_0".to_string());
14958 }
14959 self.handle_res(unsafe { MSK_getsuc(self.ptr,whichsol_,suc_.as_mut_ptr()) },"get_suc")?;
14960 return Result::Ok(());
14961 } // getsuc
14962 /// Obtains a slice of the suc vector for a solution.
14963 ///
14964 /// # Arguments
14965 ///
14966 /// - `whichsol_` Selects a solution.
14967 ///
14968 /// See [Soltype]
14969 /// - `first_` First index in the sequence.
14970 /// - `last_` Last index plus 1 in the sequence.
14971 /// - `suc_` Dual variables corresponding to the upper bounds on the constraints.
14972 ///
14973 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsucslice>
14974 #[allow(unused_parens)]
14975 pub fn get_suc_slice(&self,whichsol_ : i32,first_ : i32,last_ : i32,suc_ : &mut[f64]) -> Result<(),String> {
14976 if suc_.len() > 0 && suc_.len() != ((last_-first_)).try_into().unwrap() {
14977 return Result::Err("get_suc_slice: Argument 'suc' has the wrong length, expected (last_-first_)".to_string());
14978 }
14979 self.handle_res(unsafe { MSK_getsucslice(self.ptr,whichsol_,first_,last_,if suc_.len() == 0 { std::ptr::null_mut() } else { suc_.as_mut_ptr() }) },"get_suc_slice")?;
14980 return Result::Ok(());
14981 } // getsucslice
14982 /// Obtains the sux vector for a solution.
14983 ///
14984 /// # Arguments
14985 ///
14986 /// - `whichsol_` Selects a solution.
14987 ///
14988 /// See [Soltype]
14989 /// - `sux_` Dual variables corresponding to the upper bounds on the variables.
14990 ///
14991 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsux>
14992 #[allow(unused_parens)]
14993 pub fn get_sux(&self,whichsol_ : i32,sux_ : &mut[f64]) -> Result<(),String> {
14994 let mut __tmp_0 : i32 = i32::default();
14995 let __tmp_1 = unsafe { MSK_getnumvar(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumvar")?;
14996 if sux_.len() != (__tmp_0).try_into().unwrap() {
14997 return Result::Err("get_sux: Argument 'sux' has the wrong length, expected __tmp_0".to_string());
14998 }
14999 self.handle_res(unsafe { MSK_getsux(self.ptr,whichsol_,sux_.as_mut_ptr()) },"get_sux")?;
15000 return Result::Ok(());
15001 } // getsux
15002 /// Obtains a slice of the sux vector for a solution.
15003 ///
15004 /// # Arguments
15005 ///
15006 /// - `whichsol_` Selects a solution.
15007 ///
15008 /// See [Soltype]
15009 /// - `first_` First index in the sequence.
15010 /// - `last_` Last index plus 1 in the sequence.
15011 /// - `sux_` Dual variables corresponding to the upper bounds on the variables.
15012 ///
15013 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsuxslice>
15014 #[allow(unused_parens)]
15015 pub fn get_sux_slice(&self,whichsol_ : i32,first_ : i32,last_ : i32,sux_ : &mut[f64]) -> Result<(),String> {
15016 if sux_.len() > 0 && sux_.len() != ((last_-first_)).try_into().unwrap() {
15017 return Result::Err("get_sux_slice: Argument 'sux' has the wrong length, expected (last_-first_)".to_string());
15018 }
15019 self.handle_res(unsafe { MSK_getsuxslice(self.ptr,whichsol_,first_,last_,if sux_.len() == 0 { std::ptr::null_mut() } else { sux_.as_mut_ptr() }) },"get_sux_slice")?;
15020 return Result::Ok(());
15021 } // getsuxslice
15022 /// Obtains a cone type string identifier.
15023 ///
15024 /// # Arguments
15025 ///
15026 /// - `i_` Index.
15027 /// - `value_` The corresponding value.
15028 ///
15029 /// # Returns
15030 ///
15031 /// - `name` Name of the i'th symbolic constant.
15032 ///
15033 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsymbcon>
15034 #[allow(unused_parens)]
15035 pub fn get_symb_con(&self,i_ : i32,value_ : &mut i32) -> Result<String,String> {
15036 let sizevalue_ : i32 = Value::MAX_STR_LEN;
15037 let mut name_ = Vec::new(); name_.resize(Value::MAX_STR_LEN as usize,0);
15038 self.handle_res(unsafe { MSK_getsymbcon(self.ptr,i_,sizevalue_,name_.as_mut_ptr(),value_) },"get_symb_con")?;
15039 return Result::Ok(String::from_utf8_lossy(&name_[..name_.iter().position(|&c| c == 0).unwrap_or(Value::MAX_STR_LEN as usize)]).into_owned());
15040 } // getsymbcon
15041 /// Obtains information about a matrix from the symmetric matrix storage.
15042 ///
15043 /// # Arguments
15044 ///
15045 /// - `idx_` Index of the matrix for which information is requested.
15046 /// - `dim_` Returns the dimension of the requested matrix.
15047 /// - `nz_` Returns the number of non-zeros in the requested matrix.
15048 /// - `mattype_` Returns the type of the requested matrix.
15049 ///
15050 /// See [Symmattype]
15051 ///
15052 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getsymmatinfo>
15053 #[allow(unused_parens)]
15054 pub fn get_sym_mat_info(&self,idx_ : i64,dim_ : &mut i32,nz_ : &mut i64,mattype_ : & mut i32) -> Result<(),String> {
15055 self.handle_res(unsafe { MSK_getsymmatinfo(self.ptr,idx_,dim_,nz_,mattype_) },"get_sym_mat_info")?;
15056 return Result::Ok(());
15057 } // getsymmatinfo
15058 /// Obtains the task name.
15059 ///
15060 /// # Returns
15061 ///
15062 /// - `taskname` Returns the task name.
15063 ///
15064 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.gettaskname>
15065 #[allow(unused_parens)]
15066 pub fn get_task_name(&self) -> Result<String,String> {
15067 let mut __tmp_0 : i32 = i32::default();
15068 let __tmp_1 = unsafe { MSK_gettasknamelen(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"gettasknamelen")?;
15069 let sizetaskname_ : i32 = (1+__tmp_0);
15070 let mut taskname_ = Vec::new(); taskname_.resize(sizetaskname_ as usize,0);
15071 self.handle_res(unsafe { MSK_gettaskname(self.ptr,sizetaskname_,taskname_.as_mut_ptr()) },"get_task_name")?;
15072 return Result::Ok(String::from_utf8_lossy(&taskname_[..taskname_.iter().position(|&c| c == 0).unwrap_or(sizetaskname_ as usize)]).into_owned());
15073 } // gettaskname
15074 /// Obtains the length the task name.
15075 ///
15076 /// # Returns
15077 ///
15078 /// - `len` Returns the length of the task name.
15079 ///
15080 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.gettasknamelen>
15081 #[allow(unused_parens)]
15082 pub fn get_task_name_len(&self) -> Result<i32,String> {
15083 let mut __tmp_0 : i32 = i32::default();
15084 self.handle_res(unsafe { MSK_gettasknamelen(self.ptr,&mut __tmp_0) },"get_task_name_len")?;
15085 return Result::Ok(__tmp_0);
15086 } // gettasknamelen
15087 /// Obtains bound information for one variable.
15088 ///
15089 /// # Arguments
15090 ///
15091 /// - `i_` Index of the variable for which the bound information should be obtained.
15092 /// - `bk_` Bound keys.
15093 ///
15094 /// See [Boundkey]
15095 /// - `bl_` Values for lower bounds.
15096 /// - `bu_` Values for upper bounds.
15097 ///
15098 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getvarbound>
15099 #[allow(unused_parens)]
15100 pub fn get_var_bound(&self,i_ : i32,bk_ : & mut i32,bl_ : &mut f64,bu_ : &mut f64) -> Result<(),String> {
15101 self.handle_res(unsafe { MSK_getvarbound(self.ptr,i_,bk_,bl_,bu_) },"get_var_bound")?;
15102 return Result::Ok(());
15103 } // getvarbound
15104 /// Obtains bounds information for a slice of the variables.
15105 ///
15106 /// # Arguments
15107 ///
15108 /// - `first_` First index in the sequence.
15109 /// - `last_` Last index plus 1 in the sequence.
15110 /// - `bk_` Bound keys.
15111 ///
15112 /// See [Boundkey]
15113 /// - `bl_` Values for lower bounds.
15114 /// - `bu_` Values for upper bounds.
15115 ///
15116 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getvarboundslice>
15117 #[allow(unused_parens)]
15118 pub fn get_var_bound_slice(&self,first_ : i32,last_ : i32,bk_ : &mut[i32],bl_ : &mut[f64],bu_ : &mut[f64]) -> Result<(),String> {
15119 if bk_.len() != ((last_-first_)).try_into().unwrap() {
15120 return Result::Err("get_var_bound_slice: Argument 'bk' has the wrong length, expected (last_-first_)".to_string());
15121 }
15122 if bl_.len() > 0 && bl_.len() != ((last_-first_)).try_into().unwrap() {
15123 return Result::Err("get_var_bound_slice: Argument 'bl' has the wrong length, expected (last_-first_)".to_string());
15124 }
15125 if bu_.len() > 0 && bu_.len() != ((last_-first_)).try_into().unwrap() {
15126 return Result::Err("get_var_bound_slice: Argument 'bu' has the wrong length, expected (last_-first_)".to_string());
15127 }
15128 self.handle_res(unsafe { MSK_getvarboundslice(self.ptr,first_,last_,bk_.as_mut_ptr(),if bl_.len() == 0 { std::ptr::null_mut() } else { bl_.as_mut_ptr() },if bu_.len() == 0 { std::ptr::null_mut() } else { bu_.as_mut_ptr() }) },"get_var_bound_slice")?;
15129 return Result::Ok(());
15130 } // getvarboundslice
15131 /// Obtains the name of a variable.
15132 ///
15133 /// # Arguments
15134 ///
15135 /// - `j_` Index of a variable.
15136 ///
15137 /// # Returns
15138 ///
15139 /// - `name` Returns the required name.
15140 ///
15141 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getvarname>
15142 #[allow(unused_parens)]
15143 pub fn get_var_name(&self,j_ : i32) -> Result<String,String> {
15144 let mut __tmp_0 : i32 = i32::default();
15145 let __tmp_1 = unsafe { MSK_getvarnamelen(self.ptr,j_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getvarnamelen")?;
15146 let sizename_ : i32 = (1+__tmp_0);
15147 let mut name_ = Vec::new(); name_.resize(sizename_ as usize,0);
15148 self.handle_res(unsafe { MSK_getvarname(self.ptr,j_,sizename_,name_.as_mut_ptr()) },"get_var_name")?;
15149 return Result::Ok(String::from_utf8_lossy(&name_[..name_.iter().position(|&c| c == 0).unwrap_or(sizename_ as usize)]).into_owned());
15150 } // getvarname
15151 /// Checks whether the name has been assigned to any variable.
15152 ///
15153 /// # Arguments
15154 ///
15155 /// - `somename_` The name which should be checked.
15156 /// - `asgn_` Is non-zero if the name somename is assigned to a variable.
15157 ///
15158 /// # Returns
15159 ///
15160 /// - `index` If the name somename is assigned to a variable, then return the index of the variable.
15161 ///
15162 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getvarnameindex>
15163 #[allow(unused_parens)]
15164 pub fn get_var_name_index(&self,somename_ : &str,asgn_ : &mut i32) -> Result<i32,String> {
15165 let __tmp_1 = CString::new(somename_).unwrap();
15166 let mut __tmp_3 : i32 = i32::default();
15167 self.handle_res(unsafe { MSK_getvarnameindex(self.ptr,__tmp_1.as_ptr(),asgn_,&mut __tmp_3) },"get_var_name_index")?;
15168 return Result::Ok(__tmp_3);
15169 } // getvarnameindex
15170 /// Obtains the length of the name of a variable.
15171 ///
15172 /// # Arguments
15173 ///
15174 /// - `i_` Index of a variable.
15175 ///
15176 /// # Returns
15177 ///
15178 /// - `len` Returns the length of the indicated name.
15179 ///
15180 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getvarnamelen>
15181 #[allow(unused_parens)]
15182 pub fn get_var_name_len(&self,i_ : i32) -> Result<i32,String> {
15183 let mut __tmp_0 : i32 = i32::default();
15184 self.handle_res(unsafe { MSK_getvarnamelen(self.ptr,i_,&mut __tmp_0) },"get_var_name_len")?;
15185 return Result::Ok(__tmp_0);
15186 } // getvarnamelen
15187 /// Gets the variable type of one variable.
15188 ///
15189 /// # Arguments
15190 ///
15191 /// - `j_` Index of the variable.
15192 ///
15193 /// # Returns
15194 ///
15195 /// - `vartype` Variable type of variable index j.
15196 ///
15197 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getvartype>
15198 #[allow(unused_parens)]
15199 pub fn get_var_type(&self,j_ : i32) -> Result<i32,String> {
15200 let mut __tmp_0 : i32 = 0;
15201 self.handle_res(unsafe { MSK_getvartype(self.ptr,j_,&mut __tmp_0) },"get_var_type")?;
15202 return Result::Ok(__tmp_0);
15203 } // getvartype
15204 /// Obtains the variable type for one or more variables.
15205 ///
15206 /// # Arguments
15207 ///
15208 /// - `subj_` A list of variable indexes.
15209 /// - `vartype_` Returns the variables types corresponding the variable indexes requested.
15210 ///
15211 /// See [Variabletype]
15212 ///
15213 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getvartypelist>
15214 #[allow(unused_parens)]
15215 pub fn get_var_type_list(&self,subj_ : &[i32],vartype_ : &mut[i32]) -> Result<(),String> {
15216 let num_ : i32 = subj_.len() as i32;
15217 if vartype_.len() != (num_).try_into().unwrap() {
15218 return Result::Err("get_var_type_list: Argument 'vartype' has the wrong length, expected num_".to_string());
15219 }
15220 self.handle_res(unsafe { MSK_getvartypelist(self.ptr,num_,subj_.as_ptr(),vartype_.as_mut_ptr()) },"get_var_type_list")?;
15221 return Result::Ok(());
15222 } // getvartypelist
15223 /// Obtains the xc vector for a solution.
15224 ///
15225 /// # Arguments
15226 ///
15227 /// - `whichsol_` Selects a solution.
15228 ///
15229 /// See [Soltype]
15230 /// - `xc_` Primal constraint solution.
15231 ///
15232 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getxc>
15233 #[allow(unused_parens)]
15234 pub fn get_xc(&self,whichsol_ : i32,xc_ : &mut[f64]) -> Result<(),String> {
15235 let mut __tmp_0 : i32 = i32::default();
15236 let __tmp_1 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumcon")?;
15237 if xc_.len() != (__tmp_0).try_into().unwrap() {
15238 return Result::Err("get_xc: Argument 'xc' has the wrong length, expected __tmp_0".to_string());
15239 }
15240 self.handle_res(unsafe { MSK_getxc(self.ptr,whichsol_,xc_.as_mut_ptr()) },"get_xc")?;
15241 return Result::Ok(());
15242 } // getxc
15243 /// Obtains a slice of the xc vector for a solution.
15244 ///
15245 /// # Arguments
15246 ///
15247 /// - `whichsol_` Selects a solution.
15248 ///
15249 /// See [Soltype]
15250 /// - `first_` First index in the sequence.
15251 /// - `last_` Last index plus 1 in the sequence.
15252 /// - `xc_` Primal constraint solution.
15253 ///
15254 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getxcslice>
15255 #[allow(unused_parens)]
15256 pub fn get_xc_slice(&self,whichsol_ : i32,first_ : i32,last_ : i32,xc_ : &mut[f64]) -> Result<(),String> {
15257 if xc_.len() > 0 && xc_.len() != ((last_-first_)).try_into().unwrap() {
15258 return Result::Err("get_xc_slice: Argument 'xc' has the wrong length, expected (last_-first_)".to_string());
15259 }
15260 self.handle_res(unsafe { MSK_getxcslice(self.ptr,whichsol_,first_,last_,if xc_.len() == 0 { std::ptr::null_mut() } else { xc_.as_mut_ptr() }) },"get_xc_slice")?;
15261 return Result::Ok(());
15262 } // getxcslice
15263 /// Obtains the xx vector for a solution.
15264 ///
15265 /// # Arguments
15266 ///
15267 /// - `whichsol_` Selects a solution.
15268 ///
15269 /// See [Soltype]
15270 /// - `xx_` Primal variable solution.
15271 ///
15272 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getxx>
15273 #[allow(unused_parens)]
15274 pub fn get_xx(&self,whichsol_ : i32,xx_ : &mut[f64]) -> Result<(),String> {
15275 let mut __tmp_0 : i32 = i32::default();
15276 let __tmp_1 = unsafe { MSK_getnumvar(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumvar")?;
15277 if xx_.len() != (__tmp_0).try_into().unwrap() {
15278 return Result::Err("get_xx: Argument 'xx' has the wrong length, expected __tmp_0".to_string());
15279 }
15280 self.handle_res(unsafe { MSK_getxx(self.ptr,whichsol_,xx_.as_mut_ptr()) },"get_xx")?;
15281 return Result::Ok(());
15282 } // getxx
15283 /// Obtains a slice of the xx vector for a solution.
15284 ///
15285 /// # Arguments
15286 ///
15287 /// - `whichsol_` Selects a solution.
15288 ///
15289 /// See [Soltype]
15290 /// - `first_` First index in the sequence.
15291 /// - `last_` Last index plus 1 in the sequence.
15292 /// - `xx_` Primal variable solution.
15293 ///
15294 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getxxslice>
15295 #[allow(unused_parens)]
15296 pub fn get_xx_slice(&self,whichsol_ : i32,first_ : i32,last_ : i32,xx_ : &mut[f64]) -> Result<(),String> {
15297 if xx_.len() > 0 && xx_.len() != ((last_-first_)).try_into().unwrap() {
15298 return Result::Err("get_xx_slice: Argument 'xx' has the wrong length, expected (last_-first_)".to_string());
15299 }
15300 self.handle_res(unsafe { MSK_getxxslice(self.ptr,whichsol_,first_,last_,if xx_.len() == 0 { std::ptr::null_mut() } else { xx_.as_mut_ptr() }) },"get_xx_slice")?;
15301 return Result::Ok(());
15302 } // getxxslice
15303 /// Obtains the y vector for a solution.
15304 ///
15305 /// # Arguments
15306 ///
15307 /// - `whichsol_` Selects a solution.
15308 ///
15309 /// See [Soltype]
15310 /// - `y_` Vector of dual variables corresponding to the constraints.
15311 ///
15312 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.gety>
15313 #[allow(unused_parens)]
15314 pub fn get_y(&self,whichsol_ : i32,y_ : &mut[f64]) -> Result<(),String> {
15315 let mut __tmp_0 : i32 = i32::default();
15316 let __tmp_1 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumcon")?;
15317 if y_.len() != (__tmp_0).try_into().unwrap() {
15318 return Result::Err("get_y: Argument 'y' has the wrong length, expected __tmp_0".to_string());
15319 }
15320 self.handle_res(unsafe { MSK_gety(self.ptr,whichsol_,y_.as_mut_ptr()) },"get_y")?;
15321 return Result::Ok(());
15322 } // gety
15323 /// Obtains a slice of the y vector for a solution.
15324 ///
15325 /// # Arguments
15326 ///
15327 /// - `whichsol_` Selects a solution.
15328 ///
15329 /// See [Soltype]
15330 /// - `first_` First index in the sequence.
15331 /// - `last_` Last index plus 1 in the sequence.
15332 /// - `y_` Vector of dual variables corresponding to the constraints.
15333 ///
15334 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getyslice>
15335 #[allow(unused_parens)]
15336 pub fn get_y_slice(&self,whichsol_ : i32,first_ : i32,last_ : i32,y_ : &mut[f64]) -> Result<(),String> {
15337 if y_.len() > 0 && y_.len() != ((last_-first_)).try_into().unwrap() {
15338 return Result::Err("get_y_slice: Argument 'y' has the wrong length, expected (last_-first_)".to_string());
15339 }
15340 self.handle_res(unsafe { MSK_getyslice(self.ptr,whichsol_,first_,last_,if y_.len() == 0 { std::ptr::null_mut() } else { y_.as_mut_ptr() }) },"get_y_slice")?;
15341 return Result::Ok(());
15342 } // getyslice
15343 /// Prints the infeasibility report to an output stream.
15344 ///
15345 /// # Arguments
15346 ///
15347 /// - `whichstream_` Index of the stream.
15348 ///
15349 /// See [Streamtype]
15350 /// - `whichsol_` Selects a solution.
15351 ///
15352 /// See [Soltype]
15353 ///
15354 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.infeasibilityreport>
15355 #[allow(unused_parens)]
15356 pub fn infeasibility_report(&mut self,whichstream_ : i32,whichsol_ : i32) -> Result<(),String> {
15357 self.handle_res(unsafe { MSK_infeasibilityreport(self.ptr,whichstream_,whichsol_) },"infeasibility_report")?;
15358 return Result::Ok(());
15359 } // infeasibilityreport
15360 /// Prepare a task for basis solver.
15361 ///
15362 /// # Arguments
15363 ///
15364 /// - `basis_` The array of basis indexes to use.
15365 ///
15366 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.initbasissolve>
15367 #[allow(unused_parens)]
15368 pub fn init_basis_solve(&mut self,basis_ : &mut[i32]) -> Result<(),String> {
15369 let mut __tmp_0 : i32 = i32::default();
15370 let __tmp_1 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumcon")?;
15371 if basis_.len() > 0 && basis_.len() != (__tmp_0).try_into().unwrap() {
15372 return Result::Err("init_basis_solve: Argument 'basis' has the wrong length, expected __tmp_0".to_string());
15373 }
15374 self.handle_res(unsafe { MSK_initbasissolve(self.ptr,if basis_.len() == 0 { std::ptr::null_mut() } else { basis_.as_mut_ptr() }) },"init_basis_solve")?;
15375 return Result::Ok(());
15376 } // initbasissolve
15377 /// Input the linear part of an optimization task in one function call.
15378 ///
15379 /// # Arguments
15380 ///
15381 /// - `maxnumcon_` Number of preallocated constraints in the optimization task.
15382 /// - `maxnumvar_` Number of preallocated variables in the optimization task.
15383 /// - `c_` Linear terms of the objective as a dense vector. The length is the number of variables.
15384 /// - `cfix_` Fixed term in the objective.
15385 /// - `aptrb_` Row or column start pointers.
15386 /// - `aptre_` Row or column end pointers.
15387 /// - `asub_` Coefficient subscripts.
15388 /// - `aval_` Coefficient values.
15389 /// - `bkc_` Bound keys for the constraints.
15390 ///
15391 /// See [Boundkey]
15392 /// - `blc_` Lower bounds for the constraints.
15393 /// - `buc_` Upper bounds for the constraints.
15394 /// - `bkx_` Bound keys for the variables.
15395 ///
15396 /// See [Boundkey]
15397 /// - `blx_` Lower bounds for the variables.
15398 /// - `bux_` Upper bounds for the variables.
15399 ///
15400 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.inputdata64>
15401 #[allow(unused_parens)]
15402 pub fn input_data(&mut self,maxnumcon_ : i32,maxnumvar_ : i32,c_ : &[f64],cfix_ : f64,aptrb_ : &[i64],aptre_ : &[i64],asub_ : &[i32],aval_ : &[f64],bkc_ : &[i32],blc_ : &[f64],buc_ : &[f64],bkx_ : &[i32],blx_ : &[f64],bux_ : &[f64]) -> Result<(),String> {
15403 let numcon_ : i32 = std::cmp::min(std::cmp::min(buc_.len(),blc_.len()),bkc_.len()) as i32;
15404 let numvar_ : i32 = std::cmp::min(std::cmp::min(std::cmp::min(std::cmp::min(std::cmp::min(c_.len(),bux_.len()),blx_.len()),bkx_.len()),aptrb_.len()),aptre_.len()) as i32;
15405 if asub_.len() != aval_.len() { return Err("input_data: Mismatching asub/aval lengths".to_string()); }
15406 if aptrb_.len() != aptre_.len() { return Err("input_data: Mismatching aptrb/aptre lengths".to_string()); }
15407 if ! aptrb_.iter().zip(aptre_.iter()).all(|(a,b)| *a <= *b) { return Err("input_data: Invalid aptrb/aptre construction".to_string()); }
15408 if let Some(v) = aptrb_.iter().min() { if *v < 0 { return Err("input_data: Invalid aptrb construction".to_string()); } }
15409 if let Some(v) = aptre_.iter().max() { if *v as usize > asub_.len() { return Err("input_data: Invalid aptre construction".to_string()); } }
15410 self.handle_res(unsafe { MSK_inputdata64(self.ptr,maxnumcon_,maxnumvar_,numcon_,numvar_,if c_.len() == 0 { std::ptr::null() } else { c_.as_ptr() },cfix_,aptrb_.as_ptr(),aptre_.as_ptr(),asub_.as_ptr(),aval_.as_ptr(),bkc_.as_ptr(),blc_.as_ptr(),buc_.as_ptr(),bkx_.as_ptr(),blx_.as_ptr(),bux_.as_ptr()) },"input_data")?;
15411 return Result::Ok(());
15412 } // inputdata64
15413 /// Checks a double parameter name.
15414 ///
15415 /// # Arguments
15416 ///
15417 /// - `parname_` Parameter name.
15418 /// - `param_` Returns the parameter corresponding to the name, if one exists.
15419 ///
15420 /// See [Dparam]
15421 ///
15422 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.isdouparname>
15423 #[allow(unused_parens)]
15424 pub fn is_dou_par_name(&self,parname_ : &str,param_ : & mut i32) -> Result<(),String> {
15425 let __tmp_1 = CString::new(parname_).unwrap();
15426 self.handle_res(unsafe { MSK_isdouparname(self.ptr,__tmp_1.as_ptr(),param_) },"is_dou_par_name")?;
15427 return Result::Ok(());
15428 } // isdouparname
15429 /// Checks an integer parameter name.
15430 ///
15431 /// # Arguments
15432 ///
15433 /// - `parname_` Parameter name.
15434 /// - `param_` Returns the parameter corresponding to the name, if one exists.
15435 ///
15436 /// See [Iparam]
15437 ///
15438 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.isintparname>
15439 #[allow(unused_parens)]
15440 pub fn is_int_par_name(&self,parname_ : &str,param_ : & mut i32) -> Result<(),String> {
15441 let __tmp_1 = CString::new(parname_).unwrap();
15442 self.handle_res(unsafe { MSK_isintparname(self.ptr,__tmp_1.as_ptr(),param_) },"is_int_par_name")?;
15443 return Result::Ok(());
15444 } // isintparname
15445 /// Checks a string parameter name.
15446 ///
15447 /// # Arguments
15448 ///
15449 /// - `parname_` Parameter name.
15450 /// - `param_` Returns the parameter corresponding to the name, if one exists.
15451 ///
15452 /// See [Sparam]
15453 ///
15454 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.isstrparname>
15455 #[allow(unused_parens)]
15456 pub fn is_str_par_name(&self,parname_ : &str,param_ : & mut i32) -> Result<(),String> {
15457 let __tmp_1 = CString::new(parname_).unwrap();
15458 self.handle_res(unsafe { MSK_isstrparname(self.ptr,__tmp_1.as_ptr(),param_) },"is_str_par_name")?;
15459 return Result::Ok(());
15460 } // isstrparname
15461 /// Directs all output from a task stream to a file.
15462 ///
15463 /// # Arguments
15464 ///
15465 /// - `whichstream_` Index of the stream.
15466 ///
15467 /// See [Streamtype]
15468 /// - `filename_` A valid file name.
15469 /// - `append_` If this argument is 0 the output file will be overwritten, otherwise it will be appended to.
15470 ///
15471 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.linkfiletotaskstream>
15472 #[allow(unused_parens)]
15473 pub fn link_file_to_stream(&mut self,whichstream_ : i32,filename_ : &str,append_ : i32) -> Result<(),String> {
15474 let __tmp_1 = CString::new(filename_).unwrap();
15475 self.handle_res(unsafe { MSK_linkfiletotaskstream(self.ptr,whichstream_,__tmp_1.as_ptr(),append_) },"link_file_to_stream")?;
15476 return Result::Ok(());
15477 } // linkfiletotaskstream
15478 /// Prints a short summary of a specified solution.
15479 ///
15480 /// # Arguments
15481 ///
15482 /// - `whichstream_` Index of the stream.
15483 ///
15484 /// See [Streamtype]
15485 /// - `whichsol_` Selects a solution.
15486 ///
15487 /// See [Soltype]
15488 ///
15489 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.onesolutionsummary>
15490 #[allow(unused_parens)]
15491 pub fn one_solution_summary(&self,whichstream_ : i32,whichsol_ : i32) -> Result<(),String> {
15492 self.handle_res(unsafe { MSK_onesolutionsummary(self.ptr,whichstream_,whichsol_) },"one_solution_summary")?;
15493 return Result::Ok(());
15494 } // onesolutionsummary
15495 /// Offload the optimization task to a solver server and wait for the solution.
15496 ///
15497 /// # Arguments
15498 ///
15499 /// - `address_` Address of the OptServer.
15500 /// - `accesstoken_` Access token.
15501 ///
15502 /// # Returns
15503 ///
15504 /// - `trmcode` Is either OK or a termination response code.
15505 ///
15506 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.optimizermt>
15507 #[allow(unused_parens)]
15508 pub fn optimize_rmt(&mut self,address_ : &str,accesstoken_ : &str) -> Result<i32,String> {
15509 let __tmp_1 = CString::new(address_).unwrap();
15510 let __tmp_3 = CString::new(accesstoken_).unwrap();
15511 let mut __tmp_4 : i32 = 0;
15512 self.handle_res(unsafe { MSK_optimizermt(self.ptr,__tmp_1.as_ptr(),__tmp_3.as_ptr(),&mut __tmp_4) },"optimize_rmt")?;
15513 return Result::Ok(__tmp_4);
15514 } // optimizermt
15515 /// Prints a short summary with optimizer statistics from last optimization.
15516 ///
15517 /// # Arguments
15518 ///
15519 /// - `whichstream_` Index of the stream.
15520 ///
15521 /// See [Streamtype]
15522 ///
15523 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.optimizersummary>
15524 #[allow(unused_parens)]
15525 pub fn optimizer_summary(&self,whichstream_ : i32) -> Result<(),String> {
15526 self.handle_res(unsafe { MSK_optimizersummary(self.ptr,whichstream_) },"optimizer_summary")?;
15527 return Result::Ok(());
15528 } // optimizersummary
15529 /// Optimizes the problem.
15530 ///
15531 /// # Returns
15532 ///
15533 /// - `trmcode` Is either OK or a termination response code.
15534 ///
15535 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.optimizetrm>
15536 #[allow(unused_parens)]
15537 pub fn optimize(&mut self) -> Result<i32,String> {
15538 let mut __tmp_0 : i32 = 0;
15539 self.handle_res(unsafe { MSK_optimizetrm(self.ptr,&mut __tmp_0) },"optimize")?;
15540 return Result::Ok(__tmp_0);
15541 } // optimizetrm
15542 /// Repairs a primal infeasible optimization problem by adjusting the bounds on the constraints and variables.
15543 ///
15544 /// # Arguments
15545 ///
15546 /// - `wlc_` Weights associated with relaxing lower bounds on the constraints.
15547 /// - `wuc_` Weights associated with relaxing the upper bound on the constraints.
15548 /// - `wlx_` Weights associated with relaxing the lower bounds of the variables.
15549 /// - `wux_` Weights associated with relaxing the upper bounds of variables.
15550 ///
15551 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.primalrepair>
15552 #[allow(unused_parens)]
15553 pub fn primal_repair(&mut self,wlc_ : &[f64],wuc_ : &[f64],wlx_ : &[f64],wux_ : &[f64]) -> Result<(),String> {
15554 let mut __tmp_0 : i32 = i32::default();
15555 let __tmp_1 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumcon")?;
15556 if wlc_.len() > 0 && wlc_.len() != (__tmp_0).try_into().unwrap() {
15557 return Result::Err("primal_repair: Argument 'wlc' has the wrong length, expected __tmp_0".to_string());
15558 }
15559 let mut __tmp_2 : i32 = i32::default();
15560 let __tmp_3 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_2) };let _ = self.handle_res(__tmp_3,"getnumcon")?;
15561 if wuc_.len() > 0 && wuc_.len() != (__tmp_2).try_into().unwrap() {
15562 return Result::Err("primal_repair: Argument 'wuc' has the wrong length, expected __tmp_2".to_string());
15563 }
15564 let mut __tmp_4 : i32 = i32::default();
15565 let __tmp_5 = unsafe { MSK_getnumvar(self.ptr,&mut __tmp_4) };let _ = self.handle_res(__tmp_5,"getnumvar")?;
15566 if wlx_.len() > 0 && wlx_.len() != (__tmp_4).try_into().unwrap() {
15567 return Result::Err("primal_repair: Argument 'wlx' has the wrong length, expected __tmp_4".to_string());
15568 }
15569 let mut __tmp_6 : i32 = i32::default();
15570 let __tmp_7 = unsafe { MSK_getnumvar(self.ptr,&mut __tmp_6) };let _ = self.handle_res(__tmp_7,"getnumvar")?;
15571 if wux_.len() > 0 && wux_.len() != (__tmp_6).try_into().unwrap() {
15572 return Result::Err("primal_repair: Argument 'wux' has the wrong length, expected __tmp_6".to_string());
15573 }
15574 self.handle_res(unsafe { MSK_primalrepair(self.ptr,if wlc_.len() == 0 { std::ptr::null() } else { wlc_.as_ptr() },if wuc_.len() == 0 { std::ptr::null() } else { wuc_.as_ptr() },if wlx_.len() == 0 { std::ptr::null() } else { wlx_.as_ptr() },if wux_.len() == 0 { std::ptr::null() } else { wux_.as_ptr() }) },"primal_repair")?;
15575 return Result::Ok(());
15576 } // primalrepair
15577 /// Perform sensitivity analysis on bounds.
15578 ///
15579 /// # Arguments
15580 ///
15581 /// - `subi_` Indexes of constraints to analyze.
15582 /// - `marki_` Mark which constraint bounds to analyze.
15583 ///
15584 /// See [Mark]
15585 /// - `subj_` Indexes of variables to analyze.
15586 /// - `markj_` Mark which variable bounds to analyze.
15587 ///
15588 /// See [Mark]
15589 /// - `leftpricei_` Left shadow price for constraints.
15590 /// - `rightpricei_` Right shadow price for constraints.
15591 /// - `leftrangei_` Left range for constraints.
15592 /// - `rightrangei_` Right range for constraints.
15593 /// - `leftpricej_` Left shadow price for variables.
15594 /// - `rightpricej_` Right shadow price for variables.
15595 /// - `leftrangej_` Left range for variables.
15596 /// - `rightrangej_` Right range for variables.
15597 ///
15598 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.primalsensitivity>
15599 #[allow(unused_parens)]
15600 pub fn primal_sensitivity(&mut self,subi_ : &[i32],marki_ : &[i32],subj_ : &[i32],markj_ : &[i32],leftpricei_ : &mut[f64],rightpricei_ : &mut[f64],leftrangei_ : &mut[f64],rightrangei_ : &mut[f64],leftpricej_ : &mut[f64],rightpricej_ : &mut[f64],leftrangej_ : &mut[f64],rightrangej_ : &mut[f64]) -> Result<(),String> {
15601 let numi_ : i32 = std::cmp::min(subi_.len(),marki_.len()) as i32;
15602 let numj_ : i32 = std::cmp::min(subj_.len(),markj_.len()) as i32;
15603 if leftpricei_.len() > 0 && leftpricei_.len() != (numi_).try_into().unwrap() {
15604 return Result::Err("primal_sensitivity: Argument 'leftpricei' has the wrong length, expected numi_".to_string());
15605 }
15606 if rightpricei_.len() > 0 && rightpricei_.len() != (numi_).try_into().unwrap() {
15607 return Result::Err("primal_sensitivity: Argument 'rightpricei' has the wrong length, expected numi_".to_string());
15608 }
15609 if leftrangei_.len() > 0 && leftrangei_.len() != (numi_).try_into().unwrap() {
15610 return Result::Err("primal_sensitivity: Argument 'leftrangei' has the wrong length, expected numi_".to_string());
15611 }
15612 if rightrangei_.len() > 0 && rightrangei_.len() != (numi_).try_into().unwrap() {
15613 return Result::Err("primal_sensitivity: Argument 'rightrangei' has the wrong length, expected numi_".to_string());
15614 }
15615 if leftpricej_.len() > 0 && leftpricej_.len() != (numj_).try_into().unwrap() {
15616 return Result::Err("primal_sensitivity: Argument 'leftpricej' has the wrong length, expected numj_".to_string());
15617 }
15618 if rightpricej_.len() > 0 && rightpricej_.len() != (numj_).try_into().unwrap() {
15619 return Result::Err("primal_sensitivity: Argument 'rightpricej' has the wrong length, expected numj_".to_string());
15620 }
15621 if leftrangej_.len() > 0 && leftrangej_.len() != (numj_).try_into().unwrap() {
15622 return Result::Err("primal_sensitivity: Argument 'leftrangej' has the wrong length, expected numj_".to_string());
15623 }
15624 if rightrangej_.len() > 0 && rightrangej_.len() != (numj_).try_into().unwrap() {
15625 return Result::Err("primal_sensitivity: Argument 'rightrangej' has the wrong length, expected numj_".to_string());
15626 }
15627 self.handle_res(unsafe { MSK_primalsensitivity(self.ptr,numi_,subi_.as_ptr(),marki_.as_ptr(),numj_,subj_.as_ptr(),markj_.as_ptr(),if leftpricei_.len() == 0 { std::ptr::null_mut() } else { leftpricei_.as_mut_ptr() },if rightpricei_.len() == 0 { std::ptr::null_mut() } else { rightpricei_.as_mut_ptr() },if leftrangei_.len() == 0 { std::ptr::null_mut() } else { leftrangei_.as_mut_ptr() },if rightrangei_.len() == 0 { std::ptr::null_mut() } else { rightrangei_.as_mut_ptr() },if leftpricej_.len() == 0 { std::ptr::null_mut() } else { leftpricej_.as_mut_ptr() },if rightpricej_.len() == 0 { std::ptr::null_mut() } else { rightpricej_.as_mut_ptr() },if leftrangej_.len() == 0 { std::ptr::null_mut() } else { leftrangej_.as_mut_ptr() },if rightrangej_.len() == 0 { std::ptr::null_mut() } else { rightrangej_.as_mut_ptr() }) },"primal_sensitivity")?;
15628 return Result::Ok(());
15629 } // primalsensitivity
15630 /// Prints the current parameter settings.
15631 ///
15632 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.printparam>
15633 #[allow(unused_parens)]
15634 pub fn print_param(&self) -> Result<(),String> {
15635 self.handle_res(unsafe { MSK_printparam(self.ptr) },"print_param")?;
15636 return Result::Ok(());
15637 } // printparam
15638 /// Puts an affine conic constraint.
15639 ///
15640 /// # Arguments
15641 ///
15642 /// - `accidx_` Affine conic constraint index.
15643 /// - `domidx_` Domain index.
15644 /// - `afeidxlist_` List of affine expression indexes.
15645 /// - `b_` The vector of constant terms modifying affine expressions. Optional.
15646 ///
15647 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putacc>
15648 #[allow(unused_parens)]
15649 pub fn put_acc(&mut self,accidx_ : i64,domidx_ : i64,afeidxlist_ : &[i64],b_ : &[f64]) -> Result<(),String> {
15650 let numafeidx_ : i64 = afeidxlist_.len() as i64;
15651 if b_.len() > 0 && b_.len() != (numafeidx_).try_into().unwrap() {
15652 return Result::Err("put_acc: Argument 'b' has the wrong length, expected numafeidx_".to_string());
15653 }
15654 self.handle_res(unsafe { MSK_putacc(self.ptr,accidx_,domidx_,numafeidx_,afeidxlist_.as_ptr(),if b_.len() == 0 { std::ptr::null() } else { b_.as_ptr() }) },"put_acc")?;
15655 return Result::Ok(());
15656 } // putacc
15657 /// Puts the constant vector b in an affine conic constraint.
15658 ///
15659 /// # Arguments
15660 ///
15661 /// - `accidx_` Affine conic constraint index.
15662 /// - `b_` The vector of constant terms modifying affine expressions. Optional.
15663 ///
15664 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putaccb>
15665 #[allow(unused_parens)]
15666 pub fn put_acc_b(&mut self,accidx_ : i64,b_ : &[f64]) -> Result<(),String> {
15667 let lengthb_ : i64 = b_.len() as i64;
15668 self.handle_res(unsafe { MSK_putaccb(self.ptr,accidx_,lengthb_,if b_.len() == 0 { std::ptr::null() } else { b_.as_ptr() }) },"put_acc_b")?;
15669 return Result::Ok(());
15670 } // putaccb
15671 /// Sets one element in the b vector of an affine conic constraint.
15672 ///
15673 /// # Arguments
15674 ///
15675 /// - `accidx_` Affine conic constraint index.
15676 /// - `j_` The index of an element in b to change.
15677 /// - `bj_` The new value of b\[j\].
15678 ///
15679 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putaccbj>
15680 #[allow(unused_parens)]
15681 pub fn put_acc_b_j(&mut self,accidx_ : i64,j_ : i64,bj_ : f64) -> Result<(),String> {
15682 self.handle_res(unsafe { MSK_putaccbj(self.ptr,accidx_,j_,bj_) },"put_acc_b_j")?;
15683 return Result::Ok(());
15684 } // putaccbj
15685 /// Puts the doty vector for a solution.
15686 ///
15687 /// # Arguments
15688 ///
15689 /// - `whichsol_` Selects a solution.
15690 ///
15691 /// See [Soltype]
15692 /// - `accidx_` The index of the affine conic constraint.
15693 /// - `doty_` The dual values for this affine conic constraint. The array should have length equal to the dimension of the constraint.
15694 ///
15695 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putaccdoty>
15696 #[allow(unused_parens)]
15697 pub fn put_acc_dot_y(&self,whichsol_ : i32,accidx_ : i64,doty_ : &mut[f64]) -> Result<(),String> {
15698 let mut __tmp_0 : i64 = i64::default();
15699 let __tmp_1 = unsafe { MSK_getaccn(self.ptr,accidx_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getaccn")?;
15700 if doty_.len() != (__tmp_0).try_into().unwrap() {
15701 return Result::Err("put_acc_dot_y: Argument 'doty' has the wrong length, expected __tmp_0".to_string());
15702 }
15703 self.handle_res(unsafe { MSK_putaccdoty(self.ptr,whichsol_,accidx_,doty_.as_mut_ptr()) },"put_acc_dot_y")?;
15704 return Result::Ok(());
15705 } // putaccdoty
15706 /// Puts a number of affine conic constraints.
15707 ///
15708 /// # Arguments
15709 ///
15710 /// - `accidxs_` Affine conic constraint indices.
15711 /// - `domidxs_` Domain indices.
15712 /// - `afeidxlist_` List of affine expression indexes.
15713 /// - `b_` The vector of constant terms modifying affine expressions. Optional.
15714 ///
15715 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putacclist>
15716 #[allow(unused_parens)]
15717 pub fn put_acc_list(&mut self,accidxs_ : &[i64],domidxs_ : &[i64],afeidxlist_ : &[i64],b_ : &[f64]) -> Result<(),String> {
15718 let numaccs_ : i64 = std::cmp::min(domidxs_.len(),accidxs_.len()) as i64;
15719 let numafeidx_ : i64 = afeidxlist_.len() as i64;
15720 if b_.len() > 0 && b_.len() != (numafeidx_).try_into().unwrap() {
15721 return Result::Err("put_acc_list: Argument 'b' has the wrong length, expected numafeidx_".to_string());
15722 }
15723 self.handle_res(unsafe { MSK_putacclist(self.ptr,numaccs_,accidxs_.as_ptr(),domidxs_.as_ptr(),numafeidx_,afeidxlist_.as_ptr(),if b_.len() == 0 { std::ptr::null() } else { b_.as_ptr() }) },"put_acc_list")?;
15724 return Result::Ok(());
15725 } // putacclist
15726 /// Sets the name of an affine conic constraint.
15727 ///
15728 /// # Arguments
15729 ///
15730 /// - `accidx_` Index of the affine conic constraint.
15731 /// - `name_` The name of the affine conic constraint.
15732 ///
15733 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putaccname>
15734 #[allow(unused_parens)]
15735 pub fn put_acc_name(&mut self,accidx_ : i64,name_ : &str) -> Result<(),String> {
15736 let __tmp_1 = CString::new(name_).unwrap();
15737 self.handle_res(unsafe { MSK_putaccname(self.ptr,accidx_,__tmp_1.as_ptr()) },"put_acc_name")?;
15738 return Result::Ok(());
15739 } // putaccname
15740 /// Replaces all elements in one column of the linear constraint matrix.
15741 ///
15742 /// # Arguments
15743 ///
15744 /// - `j_` Column index.
15745 /// - `subj_` Row indexes of non-zero values in column.
15746 /// - `valj_` New non-zero values of column.
15747 ///
15748 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putacol>
15749 #[allow(unused_parens)]
15750 pub fn put_a_col(&mut self,j_ : i32,subj_ : &[i32],valj_ : &[f64]) -> Result<(),String> {
15751 let nzj_ : i32 = std::cmp::min(subj_.len(),valj_.len()) as i32;
15752 self.handle_res(unsafe { MSK_putacol(self.ptr,j_,nzj_,subj_.as_ptr(),valj_.as_ptr()) },"put_a_col")?;
15753 return Result::Ok(());
15754 } // putacol
15755 /// Replaces all elements in several columns the linear constraint matrix.
15756 ///
15757 /// # Arguments
15758 ///
15759 /// - `sub_` Indexes of columns that should be replaced.
15760 /// - `ptrb_` Array of pointers to the first element in the columns.
15761 /// - `ptre_` Array of pointers to the last element plus one in the columns.
15762 /// - `asub_` Row indexes
15763 /// - `aval_` Coefficient values.
15764 ///
15765 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putacollist64>
15766 #[allow(unused_parens)]
15767 pub fn put_a_col_list(&mut self,sub_ : &[i32],ptrb_ : &[i64],ptre_ : &[i64],asub_ : &[i32],aval_ : &[f64]) -> Result<(),String> {
15768 let num_ : i32 = std::cmp::min(std::cmp::min(sub_.len(),ptrb_.len()),ptre_.len()) as i32;
15769 if asub_.len() != aval_.len() { return Err("put_a_col_list: Mismatching asub/aval lengths".to_string()); }
15770 if ptrb_.len() != ptre_.len() { return Err("put_a_col_list: Mismatching ptrb/ptre lengths".to_string()); }
15771 if ! ptrb_.iter().zip(ptre_.iter()).all(|(a,b)| *a <= *b) { return Err("put_a_col_list: Invalid ptrb/ptre construction".to_string()); }
15772 if let Some(v) = ptrb_.iter().min() { if *v < 0 { return Err("put_a_col_list: Invalid ptrb construction".to_string()); } }
15773 if let Some(v) = ptre_.iter().max() { if *v as usize > asub_.len() { return Err("put_a_col_list: Invalid ptre construction".to_string()); } }
15774 self.handle_res(unsafe { MSK_putacollist64(self.ptr,num_,sub_.as_ptr(),ptrb_.as_ptr(),ptre_.as_ptr(),asub_.as_ptr(),aval_.as_ptr()) },"put_a_col_list")?;
15775 return Result::Ok(());
15776 } // putacollist64
15777 /// Replaces all elements in a sequence of columns the linear constraint matrix.
15778 ///
15779 /// # Arguments
15780 ///
15781 /// - `first_` First column in the slice.
15782 /// - `last_` Last column plus one in the slice.
15783 /// - `ptrb_` Array of pointers to the first element in the columns.
15784 /// - `ptre_` Array of pointers to the last element plus one in the columns.
15785 /// - `asub_` Row indexes
15786 /// - `aval_` Coefficient values.
15787 ///
15788 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putacolslice64>
15789 #[allow(unused_parens)]
15790 pub fn put_a_col_slice(&mut self,first_ : i32,last_ : i32,ptrb_ : &[i64],ptre_ : &[i64],asub_ : &[i32],aval_ : &[f64]) -> Result<(),String> {
15791 if asub_.len() != aval_.len() { return Err("put_a_col_slice: Mismatching asub/aval lengths".to_string()); }
15792 if ptrb_.len() != ptre_.len() { return Err("put_a_col_slice: Mismatching ptrb/ptre lengths".to_string()); }
15793 if ! ptrb_.iter().zip(ptre_.iter()).all(|(a,b)| *a <= *b) { return Err("put_a_col_slice: Invalid ptrb/ptre construction".to_string()); }
15794 if let Some(v) = ptrb_.iter().min() { if *v < 0 { return Err("put_a_col_slice: Invalid ptrb construction".to_string()); } }
15795 if let Some(v) = ptre_.iter().max() { if *v as usize > asub_.len() { return Err("put_a_col_slice: Invalid ptre construction".to_string()); } }
15796 self.handle_res(unsafe { MSK_putacolslice64(self.ptr,first_,last_,ptrb_.as_ptr(),ptre_.as_ptr(),asub_.as_ptr(),aval_.as_ptr()) },"put_a_col_slice")?;
15797 return Result::Ok(());
15798 } // putacolslice64
15799 /// Inputs barF in block triplet form.
15800 ///
15801 /// # Arguments
15802 ///
15803 /// - `afeidx_` Constraint index.
15804 /// - `barvaridx_` Symmetric matrix variable index.
15805 /// - `subk_` Block row index.
15806 /// - `subl_` Block column index.
15807 /// - `valkl_` The numerical value associated with each block triplet.
15808 ///
15809 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putafebarfblocktriplet>
15810 #[allow(unused_parens)]
15811 pub fn put_afe_barf_block_triplet(&mut self,afeidx_ : &[i64],barvaridx_ : &[i32],subk_ : &[i32],subl_ : &[i32],valkl_ : &[f64]) -> Result<(),String> {
15812 let numtrip_ : i64 = std::cmp::min(std::cmp::min(std::cmp::min(std::cmp::min(afeidx_.len(),barvaridx_.len()),subk_.len()),subl_.len()),valkl_.len()) as i64;
15813 if afeidx_.len() != (numtrip_).try_into().unwrap() {
15814 return Result::Err("put_afe_barf_block_triplet: Argument 'afeidx' has the wrong length, expected numtrip_".to_string());
15815 }
15816 if barvaridx_.len() != (numtrip_).try_into().unwrap() {
15817 return Result::Err("put_afe_barf_block_triplet: Argument 'barvaridx' has the wrong length, expected numtrip_".to_string());
15818 }
15819 if subk_.len() != (numtrip_).try_into().unwrap() {
15820 return Result::Err("put_afe_barf_block_triplet: Argument 'subk' has the wrong length, expected numtrip_".to_string());
15821 }
15822 if subl_.len() != (numtrip_).try_into().unwrap() {
15823 return Result::Err("put_afe_barf_block_triplet: Argument 'subl' has the wrong length, expected numtrip_".to_string());
15824 }
15825 if valkl_.len() != (numtrip_).try_into().unwrap() {
15826 return Result::Err("put_afe_barf_block_triplet: Argument 'valkl' has the wrong length, expected numtrip_".to_string());
15827 }
15828 self.handle_res(unsafe { MSK_putafebarfblocktriplet(self.ptr,numtrip_,afeidx_.as_ptr(),barvaridx_.as_ptr(),subk_.as_ptr(),subl_.as_ptr(),valkl_.as_ptr()) },"put_afe_barf_block_triplet")?;
15829 return Result::Ok(());
15830 } // putafebarfblocktriplet
15831 /// Inputs one entry in barF.
15832 ///
15833 /// # Arguments
15834 ///
15835 /// - `afeidx_` Row index of barF.
15836 /// - `barvaridx_` Semidefinite variable index.
15837 /// - `termidx_` Element indices in matrix storage.
15838 /// - `termweight_` Weights in the weighted sum.
15839 ///
15840 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putafebarfentry>
15841 #[allow(unused_parens)]
15842 pub fn put_afe_barf_entry(&mut self,afeidx_ : i64,barvaridx_ : i32,termidx_ : &[i64],termweight_ : &[f64]) -> Result<(),String> {
15843 let numterm_ : i64 = std::cmp::min(termidx_.len(),termweight_.len()) as i64;
15844 self.handle_res(unsafe { MSK_putafebarfentry(self.ptr,afeidx_,barvaridx_,numterm_,termidx_.as_ptr(),termweight_.as_ptr()) },"put_afe_barf_entry")?;
15845 return Result::Ok(());
15846 } // putafebarfentry
15847 /// Inputs a list of entries in barF.
15848 ///
15849 /// # Arguments
15850 ///
15851 /// - `afeidx_` Row indexes of barF.
15852 /// - `barvaridx_` Semidefinite variable indexes.
15853 /// - `numterm_` Number of terms in the weighted sums.
15854 /// - `ptrterm_` Pointer to the terms forming each entry.
15855 /// - `termidx_` Concatenated element indexes in matrix storage.
15856 /// - `termweight_` Concatenated weights in the weighted sum.
15857 ///
15858 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putafebarfentrylist>
15859 #[allow(unused_parens)]
15860 pub fn put_afe_barf_entry_list(&mut self,afeidx_ : &[i64],barvaridx_ : &[i32],numterm_ : &[i64],ptrterm_ : &[i64],termidx_ : &[i64],termweight_ : &[f64]) -> Result<(),String> {
15861 let numafeidx_ : i64 = std::cmp::min(std::cmp::min(std::cmp::min(afeidx_.len(),barvaridx_.len()),numterm_.len()),ptrterm_.len()) as i64;
15862 let lenterm_ : i64 = std::cmp::min(termidx_.len(),termweight_.len()) as i64;
15863 self.handle_res(unsafe { MSK_putafebarfentrylist(self.ptr,numafeidx_,afeidx_.as_ptr(),barvaridx_.as_ptr(),numterm_.as_ptr(),ptrterm_.as_ptr(),lenterm_,termidx_.as_ptr(),termweight_.as_ptr()) },"put_afe_barf_entry_list")?;
15864 return Result::Ok(());
15865 } // putafebarfentrylist
15866 /// Inputs a row of barF.
15867 ///
15868 /// # Arguments
15869 ///
15870 /// - `afeidx_` Row index of barF.
15871 /// - `barvaridx_` Semidefinite variable indexes.
15872 /// - `numterm_` Number of terms in the weighted sums.
15873 /// - `ptrterm_` Pointer to the terms forming each entry.
15874 /// - `termidx_` Concatenated element indexes in matrix storage.
15875 /// - `termweight_` Concatenated weights in the weighted sum.
15876 ///
15877 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putafebarfrow>
15878 #[allow(unused_parens)]
15879 pub fn put_afe_barf_row(&mut self,afeidx_ : i64,barvaridx_ : &[i32],numterm_ : &[i64],ptrterm_ : &[i64],termidx_ : &[i64],termweight_ : &[f64]) -> Result<(),String> {
15880 let numentr_ : i32 = std::cmp::min(std::cmp::min(barvaridx_.len(),numterm_.len()),ptrterm_.len()) as i32;
15881 let lenterm_ : i64 = std::cmp::min(termidx_.len(),termweight_.len()) as i64;
15882 self.handle_res(unsafe { MSK_putafebarfrow(self.ptr,afeidx_,numentr_,barvaridx_.as_ptr(),numterm_.as_ptr(),ptrterm_.as_ptr(),lenterm_,termidx_.as_ptr(),termweight_.as_ptr()) },"put_afe_barf_row")?;
15883 return Result::Ok(());
15884 } // putafebarfrow
15885 /// Replaces all elements in one column of the F matrix in the affine expressions.
15886 ///
15887 /// # Arguments
15888 ///
15889 /// - `varidx_` Column index.
15890 /// - `afeidx_` Row indexes of non-zero values in the column.
15891 /// - `val_` New non-zero values in the column.
15892 ///
15893 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putafefcol>
15894 #[allow(unused_parens)]
15895 pub fn put_afe_f_col(&mut self,varidx_ : i32,afeidx_ : &[i64],val_ : &[f64]) -> Result<(),String> {
15896 let numnz_ : i64 = std::cmp::min(afeidx_.len(),val_.len()) as i64;
15897 self.handle_res(unsafe { MSK_putafefcol(self.ptr,varidx_,numnz_,afeidx_.as_ptr(),val_.as_ptr()) },"put_afe_f_col")?;
15898 return Result::Ok(());
15899 } // putafefcol
15900 /// Replaces one entry in F.
15901 ///
15902 /// # Arguments
15903 ///
15904 /// - `afeidx_` Row index in F.
15905 /// - `varidx_` Column index in F.
15906 /// - `value_` Value of the entry.
15907 ///
15908 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putafefentry>
15909 #[allow(unused_parens)]
15910 pub fn put_afe_f_entry(&mut self,afeidx_ : i64,varidx_ : i32,value_ : f64) -> Result<(),String> {
15911 self.handle_res(unsafe { MSK_putafefentry(self.ptr,afeidx_,varidx_,value_) },"put_afe_f_entry")?;
15912 return Result::Ok(());
15913 } // putafefentry
15914 /// Replaces a list of entries in F.
15915 ///
15916 /// # Arguments
15917 ///
15918 /// - `afeidx_` Row indices in F.
15919 /// - `varidx_` Column indices in F.
15920 /// - `val_` Values of the entries in F.
15921 ///
15922 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putafefentrylist>
15923 #[allow(unused_parens)]
15924 pub fn put_afe_f_entry_list(&mut self,afeidx_ : &[i64],varidx_ : &[i32],val_ : &[f64]) -> Result<(),String> {
15925 let numentr_ : i64 = std::cmp::min(std::cmp::min(afeidx_.len(),varidx_.len()),val_.len()) as i64;
15926 self.handle_res(unsafe { MSK_putafefentrylist(self.ptr,numentr_,afeidx_.as_ptr(),varidx_.as_ptr(),val_.as_ptr()) },"put_afe_f_entry_list")?;
15927 return Result::Ok(());
15928 } // putafefentrylist
15929 /// Replaces all elements in one row of the F matrix in the affine expressions.
15930 ///
15931 /// # Arguments
15932 ///
15933 /// - `afeidx_` Row index.
15934 /// - `varidx_` Column indexes of non-zero values in the row.
15935 /// - `val_` New non-zero values in the row.
15936 ///
15937 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putafefrow>
15938 #[allow(unused_parens)]
15939 pub fn put_afe_f_row(&mut self,afeidx_ : i64,varidx_ : &[i32],val_ : &[f64]) -> Result<(),String> {
15940 let numnz_ : i32 = std::cmp::min(varidx_.len(),val_.len()) as i32;
15941 self.handle_res(unsafe { MSK_putafefrow(self.ptr,afeidx_,numnz_,varidx_.as_ptr(),val_.as_ptr()) },"put_afe_f_row")?;
15942 return Result::Ok(());
15943 } // putafefrow
15944 /// Replaces all elements in a number of rows of the F matrix in the affine expressions.
15945 ///
15946 /// # Arguments
15947 ///
15948 /// - `afeidx_` Row indices.
15949 /// - `numnzrow_` Number of non-zeros in each row.
15950 /// - `ptrrow_` Pointer to the first nonzero in each row.
15951 /// - `varidx_` Column indexes of non-zero values.
15952 /// - `val_` New non-zero values in the rows.
15953 ///
15954 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putafefrowlist>
15955 #[allow(unused_parens)]
15956 pub fn put_afe_f_row_list(&mut self,afeidx_ : &[i64],numnzrow_ : &[i32],ptrrow_ : &[i64],varidx_ : &[i32],val_ : &[f64]) -> Result<(),String> {
15957 let numafeidx_ : i64 = std::cmp::min(std::cmp::min(afeidx_.len(),numnzrow_.len()),ptrrow_.len()) as i64;
15958 let lenidxval_ : i64 = std::cmp::min(varidx_.len(),val_.len()) as i64;
15959 if varidx_.len() != val_.len() { return Err("put_afe_f_row_list: Mismatching varidx/val lengths".to_string()); }
15960 if let Some(v) = numnzrow_.iter().min() { if *v < 0 { return Err("put_afe_f_row_list: Invalid numnzrow value".to_string()); } }
15961 if let Some(v) = ptrrow_.iter().min() { if *v < 0 { return Err("put_afe_f_row_list: Invalid ptrrow value".to_string()); } }
15962 if let Some(v) = ptrrow_.iter().zip(numnzrow_.iter()).map(|(a,b)| *a as usize + *b as usize).max() { if v > varidx_.len() { return Err("put_afe_f_row_list: Invalid ptrrow/numnzrow construction".to_string()); } }
15963 self.handle_res(unsafe { MSK_putafefrowlist(self.ptr,numafeidx_,afeidx_.as_ptr(),numnzrow_.as_ptr(),ptrrow_.as_ptr(),lenidxval_,varidx_.as_ptr(),val_.as_ptr()) },"put_afe_f_row_list")?;
15964 return Result::Ok(());
15965 } // putafefrowlist
15966 /// Replaces one element in the g vector in the affine expressions.
15967 ///
15968 /// # Arguments
15969 ///
15970 /// - `afeidx_` Row index.
15971 /// - `g_` New value for the element of g.
15972 ///
15973 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putafeg>
15974 #[allow(unused_parens)]
15975 pub fn put_afe_g(&mut self,afeidx_ : i64,g_ : f64) -> Result<(),String> {
15976 self.handle_res(unsafe { MSK_putafeg(self.ptr,afeidx_,g_) },"put_afe_g")?;
15977 return Result::Ok(());
15978 } // putafeg
15979 /// Replaces a list of elements in the g vector in the affine expressions.
15980 ///
15981 /// # Arguments
15982 ///
15983 /// - `afeidx_` Indices of entries in g.
15984 /// - `g_` New values for the elements of g.
15985 ///
15986 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putafeglist>
15987 #[allow(unused_parens)]
15988 pub fn put_afe_g_list(&mut self,afeidx_ : &[i64],g_ : &[f64]) -> Result<(),String> {
15989 let numafeidx_ : i64 = std::cmp::min(afeidx_.len(),g_.len()) as i64;
15990 self.handle_res(unsafe { MSK_putafeglist(self.ptr,numafeidx_,afeidx_.as_ptr(),g_.as_ptr()) },"put_afe_g_list")?;
15991 return Result::Ok(());
15992 } // putafeglist
15993 /// Modifies a slice of the vector g.
15994 ///
15995 /// # Arguments
15996 ///
15997 /// - `first_` First index in the sequence.
15998 /// - `last_` Last index plus 1 in the sequence.
15999 /// - `slice_` The slice of g as a dense vector.
16000 ///
16001 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putafegslice>
16002 #[allow(unused_parens)]
16003 pub fn put_afe_g_slice(&mut self,first_ : i64,last_ : i64,slice_ : &[f64]) -> Result<(),String> {
16004 if slice_.len() != ((last_-first_)).try_into().unwrap() {
16005 return Result::Err("put_afe_g_slice: Argument 'slice' has the wrong length, expected (last_-first_)".to_string());
16006 }
16007 self.handle_res(unsafe { MSK_putafegslice(self.ptr,first_,last_,slice_.as_ptr()) },"put_afe_g_slice")?;
16008 return Result::Ok(());
16009 } // putafegslice
16010 /// Changes a single value in the linear coefficient matrix.
16011 ///
16012 /// # Arguments
16013 ///
16014 /// - `i_` Constraint (row) index.
16015 /// - `j_` Variable (column) index.
16016 /// - `aij_` New coefficient.
16017 ///
16018 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putaij>
16019 #[allow(unused_parens)]
16020 pub fn put_aij(&mut self,i_ : i32,j_ : i32,aij_ : f64) -> Result<(),String> {
16021 self.handle_res(unsafe { MSK_putaij(self.ptr,i_,j_,aij_) },"put_aij")?;
16022 return Result::Ok(());
16023 } // putaij
16024 /// Changes one or more coefficients in the linear constraint matrix.
16025 ///
16026 /// # Arguments
16027 ///
16028 /// - `subi_` Constraint (row) indices.
16029 /// - `subj_` Variable (column) indices.
16030 /// - `valij_` New coefficient values.
16031 ///
16032 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putaijlist64>
16033 #[allow(unused_parens)]
16034 pub fn put_aij_list(&mut self,subi_ : &[i32],subj_ : &[i32],valij_ : &[f64]) -> Result<(),String> {
16035 let num_ : i64 = std::cmp::min(std::cmp::min(subi_.len(),subj_.len()),valij_.len()) as i64;
16036 self.handle_res(unsafe { MSK_putaijlist64(self.ptr,num_,subi_.as_ptr(),subj_.as_ptr(),valij_.as_ptr()) },"put_aij_list")?;
16037 return Result::Ok(());
16038 } // putaijlist64
16039 /// Replaces all elements in one row of the linear constraint matrix.
16040 ///
16041 /// # Arguments
16042 ///
16043 /// - `i_` Row index.
16044 /// - `subi_` Column indexes of non-zero values in row.
16045 /// - `vali_` New non-zero values of row.
16046 ///
16047 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putarow>
16048 #[allow(unused_parens)]
16049 pub fn put_a_row(&mut self,i_ : i32,subi_ : &[i32],vali_ : &[f64]) -> Result<(),String> {
16050 let nzi_ : i32 = std::cmp::min(subi_.len(),vali_.len()) as i32;
16051 self.handle_res(unsafe { MSK_putarow(self.ptr,i_,nzi_,subi_.as_ptr(),vali_.as_ptr()) },"put_a_row")?;
16052 return Result::Ok(());
16053 } // putarow
16054 /// Replaces all elements in several rows of the linear constraint matrix.
16055 ///
16056 /// # Arguments
16057 ///
16058 /// - `sub_` Indexes of rows or columns that should be replaced.
16059 /// - `ptrb_` Array of pointers to the first element in the rows.
16060 /// - `ptre_` Array of pointers to the last element plus one in the rows.
16061 /// - `asub_` Variable indexes.
16062 /// - `aval_` Coefficient values.
16063 ///
16064 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putarowlist64>
16065 #[allow(unused_parens)]
16066 pub fn put_a_row_list(&mut self,sub_ : &[i32],ptrb_ : &[i64],ptre_ : &[i64],asub_ : &[i32],aval_ : &[f64]) -> Result<(),String> {
16067 let num_ : i32 = std::cmp::min(std::cmp::min(sub_.len(),ptrb_.len()),ptre_.len()) as i32;
16068 if asub_.len() != aval_.len() { return Err("put_a_row_list: Mismatching asub/aval lengths".to_string()); }
16069 if ptrb_.len() != ptre_.len() { return Err("put_a_row_list: Mismatching ptrb/ptre lengths".to_string()); }
16070 if ! ptrb_.iter().zip(ptre_.iter()).all(|(a,b)| *a <= *b) { return Err("put_a_row_list: Invalid ptrb/ptre construction".to_string()); }
16071 if let Some(v) = ptrb_.iter().min() { if *v < 0 { return Err("put_a_row_list: Invalid ptrb construction".to_string()); } }
16072 if let Some(v) = ptre_.iter().max() { if *v as usize > asub_.len() { return Err("put_a_row_list: Invalid ptre construction".to_string()); } }
16073 self.handle_res(unsafe { MSK_putarowlist64(self.ptr,num_,sub_.as_ptr(),ptrb_.as_ptr(),ptre_.as_ptr(),asub_.as_ptr(),aval_.as_ptr()) },"put_a_row_list")?;
16074 return Result::Ok(());
16075 } // putarowlist64
16076 /// Replaces all elements in several rows the linear constraint matrix.
16077 ///
16078 /// # Arguments
16079 ///
16080 /// - `first_` First row in the slice.
16081 /// - `last_` Last row plus one in the slice.
16082 /// - `ptrb_` Array of pointers to the first element in the rows.
16083 /// - `ptre_` Array of pointers to the last element plus one in the rows.
16084 /// - `asub_` Column indexes of new elements.
16085 /// - `aval_` Coefficient values.
16086 ///
16087 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putarowslice64>
16088 #[allow(unused_parens)]
16089 pub fn put_a_row_slice(&mut self,first_ : i32,last_ : i32,ptrb_ : &[i64],ptre_ : &[i64],asub_ : &[i32],aval_ : &[f64]) -> Result<(),String> {
16090 if ptrb_.len() != ((last_-first_)).try_into().unwrap() {
16091 return Result::Err("put_a_row_slice: Argument 'ptrb' has the wrong length, expected (last_-first_)".to_string());
16092 }
16093 if ptre_.len() != ((last_-first_)).try_into().unwrap() {
16094 return Result::Err("put_a_row_slice: Argument 'ptre' has the wrong length, expected (last_-first_)".to_string());
16095 }
16096 if asub_.len() != aval_.len() { return Err("put_a_row_slice: Mismatching asub/aval lengths".to_string()); }
16097 if ptrb_.len() != ptre_.len() { return Err("put_a_row_slice: Mismatching ptrb/ptre lengths".to_string()); }
16098 if ! ptrb_.iter().zip(ptre_.iter()).all(|(a,b)| *a <= *b) { return Err("put_a_row_slice: Invalid ptrb/ptre construction".to_string()); }
16099 if let Some(v) = ptrb_.iter().min() { if *v < 0 { return Err("put_a_row_slice: Invalid ptrb construction".to_string()); } }
16100 if let Some(v) = ptre_.iter().max() { if *v as usize > asub_.len() { return Err("put_a_row_slice: Invalid ptre construction".to_string()); } }
16101 self.handle_res(unsafe { MSK_putarowslice64(self.ptr,first_,last_,ptrb_.as_ptr(),ptre_.as_ptr(),asub_.as_ptr(),aval_.as_ptr()) },"put_a_row_slice")?;
16102 return Result::Ok(());
16103 } // putarowslice64
16104 /// Truncates all elements in A below a certain tolerance to zero.
16105 ///
16106 /// # Arguments
16107 ///
16108 /// - `tolzero_` Truncation tolerance.
16109 ///
16110 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putatruncatetol>
16111 #[allow(unused_parens)]
16112 pub fn put_a_truncate_tol(&mut self,tolzero_ : f64) -> Result<(),String> {
16113 self.handle_res(unsafe { MSK_putatruncatetol(self.ptr,tolzero_) },"put_a_truncate_tol")?;
16114 return Result::Ok(());
16115 } // putatruncatetol
16116 /// Inputs barA in block triplet form.
16117 ///
16118 /// # Arguments
16119 ///
16120 /// - `subi_` Constraint index.
16121 /// - `subj_` Symmetric matrix variable index.
16122 /// - `subk_` Block row index.
16123 /// - `subl_` Block column index.
16124 /// - `valijkl_` The numerical value associated with each block triplet.
16125 ///
16126 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putbarablocktriplet>
16127 #[allow(unused_parens)]
16128 pub fn put_bara_block_triplet(&mut self,subi_ : &[i32],subj_ : &[i32],subk_ : &[i32],subl_ : &[i32],valijkl_ : &[f64]) -> Result<(),String> {
16129 let num_ : i64 = std::cmp::min(std::cmp::min(std::cmp::min(subj_.len(),subk_.len()),subl_.len()),valijkl_.len()) as i64;
16130 if subi_.len() != (num_).try_into().unwrap() {
16131 return Result::Err("put_bara_block_triplet: Argument 'subi' has the wrong length, expected num_".to_string());
16132 }
16133 if subj_.len() != (num_).try_into().unwrap() {
16134 return Result::Err("put_bara_block_triplet: Argument 'subj' has the wrong length, expected num_".to_string());
16135 }
16136 if subk_.len() != (num_).try_into().unwrap() {
16137 return Result::Err("put_bara_block_triplet: Argument 'subk' has the wrong length, expected num_".to_string());
16138 }
16139 if subl_.len() != (num_).try_into().unwrap() {
16140 return Result::Err("put_bara_block_triplet: Argument 'subl' has the wrong length, expected num_".to_string());
16141 }
16142 if valijkl_.len() != (num_).try_into().unwrap() {
16143 return Result::Err("put_bara_block_triplet: Argument 'valijkl' has the wrong length, expected num_".to_string());
16144 }
16145 self.handle_res(unsafe { MSK_putbarablocktriplet(self.ptr,num_,subi_.as_ptr(),subj_.as_ptr(),subk_.as_ptr(),subl_.as_ptr(),valijkl_.as_ptr()) },"put_bara_block_triplet")?;
16146 return Result::Ok(());
16147 } // putbarablocktriplet
16148 /// Inputs an element of barA.
16149 ///
16150 /// # Arguments
16151 ///
16152 /// - `i_` Row index of barA.
16153 /// - `j_` Column index of barA.
16154 /// - `sub_` Element indexes in matrix storage.
16155 /// - `weights_` Weights in the weighted sum.
16156 ///
16157 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putbaraij>
16158 #[allow(unused_parens)]
16159 pub fn put_bara_ij(&mut self,i_ : i32,j_ : i32,sub_ : &[i64],weights_ : &[f64]) -> Result<(),String> {
16160 let num_ : i64 = std::cmp::min(sub_.len(),weights_.len()) as i64;
16161 self.handle_res(unsafe { MSK_putbaraij(self.ptr,i_,j_,num_,sub_.as_ptr(),weights_.as_ptr()) },"put_bara_ij")?;
16162 return Result::Ok(());
16163 } // putbaraij
16164 /// Inputs list of elements of barA.
16165 ///
16166 /// # Arguments
16167 ///
16168 /// - `subi_` Row index of barA.
16169 /// - `subj_` Column index of barA.
16170 /// - `alphaptrb_` Start entries for terms in the weighted sum.
16171 /// - `alphaptre_` End entries for terms in the weighted sum.
16172 /// - `matidx_` Element indexes in matrix storage.
16173 /// - `weights_` Weights in the weighted sum.
16174 ///
16175 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putbaraijlist>
16176 #[allow(unused_parens)]
16177 pub fn put_bara_ij_list(&mut self,subi_ : &[i32],subj_ : &[i32],alphaptrb_ : &[i64],alphaptre_ : &[i64],matidx_ : &[i64],weights_ : &[f64]) -> Result<(),String> {
16178 let num_ : i32 = std::cmp::min(std::cmp::min(std::cmp::min(subi_.len(),subj_.len()),alphaptrb_.len()),alphaptre_.len()) as i32;
16179 if matidx_.len() != weights_.len() { return Err("put_bara_ij_list: Mismatching matidx/weights lengths".to_string()); }
16180 if alphaptrb_.len() != alphaptre_.len() { return Err("put_bara_ij_list: Mismatching alphaptrb/alphaptre lengths".to_string()); }
16181 if ! alphaptrb_.iter().zip(alphaptre_.iter()).all(|(a,b)| *a <= *b) { return Err("put_bara_ij_list: Invalid alphaptrb/alphaptre construction".to_string()); }
16182 if let Some(v) = alphaptrb_.iter().min() { if *v < 0 { return Err("put_bara_ij_list: Invalid alphaptrb construction".to_string()); } }
16183 if let Some(v) = alphaptre_.iter().max() { if *v as usize > matidx_.len() { return Err("put_bara_ij_list: Invalid alphaptre construction".to_string()); } }
16184 self.handle_res(unsafe { MSK_putbaraijlist(self.ptr,num_,subi_.as_ptr(),subj_.as_ptr(),alphaptrb_.as_ptr(),alphaptre_.as_ptr(),matidx_.as_ptr(),weights_.as_ptr()) },"put_bara_ij_list")?;
16185 return Result::Ok(());
16186 } // putbaraijlist
16187 /// Replace a set of rows of barA
16188 ///
16189 /// # Arguments
16190 ///
16191 /// - `subi_` Row indexes of barA.
16192 /// - `ptrb_` Start of rows in barA.
16193 /// - `ptre_` End of rows in barA.
16194 /// - `subj_` Column index of barA.
16195 /// - `nummat_` Number of entries in weighted sum of matrixes.
16196 /// - `matidx_` Matrix indexes for weighted sum of matrixes.
16197 /// - `weights_` Weights for weighted sum of matrixes.
16198 ///
16199 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putbararowlist>
16200 #[allow(unused_parens)]
16201 pub fn put_bara_row_list(&mut self,subi_ : &[i32],ptrb_ : &[i64],ptre_ : &[i64],subj_ : &[i32],nummat_ : &[i64],matidx_ : &[i64],weights_ : &[f64]) -> Result<(),String> {
16202 let num_ : i32 = std::cmp::min(std::cmp::min(subi_.len(),ptrb_.len()),ptre_.len()) as i32;
16203 if nummat_.len() != (subj_.len()).try_into().unwrap() {
16204 return Result::Err("put_bara_row_list: Argument 'nummat' has the wrong length, expected subj_.len()".to_string());
16205 }
16206 let mut __tmp_0 : i64 = i64::default();
16207 for __tmp_1 in nummat_ { __tmp_0 += __tmp_1; }
16208 if matidx_.len() != (__tmp_0).try_into().unwrap() {
16209 return Result::Err("put_bara_row_list: Argument 'matidx' has the wrong length, expected __tmp_0".to_string());
16210 }
16211 let mut __tmp_2 : i64 = i64::default();
16212 for __tmp_3 in nummat_ { __tmp_2 += __tmp_3; }
16213 if weights_.len() != (__tmp_2).try_into().unwrap() {
16214 return Result::Err("put_bara_row_list: Argument 'weights' has the wrong length, expected __tmp_2".to_string());
16215 }
16216 if subj_.len() != nummat_.len() { return Err("put_bara_row_list: Mismatching subj/nummat lengths".to_string()); }
16217 if ptrb_.len() != ptre_.len() { return Err("put_bara_row_list: Mismatching ptrb/ptre lengths".to_string()); }
16218 if ! ptrb_.iter().zip(ptre_.iter()).all(|(a,b)| *a <= *b) { return Err("put_bara_row_list: Invalid ptrb/ptre construction".to_string()); }
16219 if let Some(v) = ptrb_.iter().min() { if *v < 0 { return Err("put_bara_row_list: Invalid ptrb construction".to_string()); } }
16220 if let Some(v) = ptre_.iter().max() { if *v as usize > subj_.len() { return Err("put_bara_row_list: Invalid ptre construction".to_string()); } }
16221 self.handle_res(unsafe { MSK_putbararowlist(self.ptr,num_,subi_.as_ptr(),ptrb_.as_ptr(),ptre_.as_ptr(),subj_.as_ptr(),nummat_.as_ptr(),matidx_.as_ptr(),weights_.as_ptr()) },"put_bara_row_list")?;
16222 return Result::Ok(());
16223 } // putbararowlist
16224 /// Inputs barC in block triplet form.
16225 ///
16226 /// # Arguments
16227 ///
16228 /// - `subj_` Symmetric matrix variable index.
16229 /// - `subk_` Block row index.
16230 /// - `subl_` Block column index.
16231 /// - `valjkl_` The numerical value associated with each block triplet.
16232 ///
16233 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putbarcblocktriplet>
16234 #[allow(unused_parens)]
16235 pub fn put_barc_block_triplet(&mut self,subj_ : &[i32],subk_ : &[i32],subl_ : &[i32],valjkl_ : &[f64]) -> Result<(),String> {
16236 let num_ : i64 = std::cmp::min(std::cmp::min(std::cmp::min(subj_.len(),subk_.len()),subl_.len()),valjkl_.len()) as i64;
16237 if subj_.len() != (num_).try_into().unwrap() {
16238 return Result::Err("put_barc_block_triplet: Argument 'subj' has the wrong length, expected num_".to_string());
16239 }
16240 if subk_.len() != (num_).try_into().unwrap() {
16241 return Result::Err("put_barc_block_triplet: Argument 'subk' has the wrong length, expected num_".to_string());
16242 }
16243 if subl_.len() != (num_).try_into().unwrap() {
16244 return Result::Err("put_barc_block_triplet: Argument 'subl' has the wrong length, expected num_".to_string());
16245 }
16246 if valjkl_.len() != (num_).try_into().unwrap() {
16247 return Result::Err("put_barc_block_triplet: Argument 'valjkl' has the wrong length, expected num_".to_string());
16248 }
16249 self.handle_res(unsafe { MSK_putbarcblocktriplet(self.ptr,num_,subj_.as_ptr(),subk_.as_ptr(),subl_.as_ptr(),valjkl_.as_ptr()) },"put_barc_block_triplet")?;
16250 return Result::Ok(());
16251 } // putbarcblocktriplet
16252 /// Changes one element in barc.
16253 ///
16254 /// # Arguments
16255 ///
16256 /// - `j_` Index of the element in barc` that should be changed.
16257 /// - `sub_` sub is list of indexes of those symmetric matrices appearing in sum.
16258 /// - `weights_` The weights of the terms in the weighted sum.
16259 ///
16260 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putbarcj>
16261 #[allow(unused_parens)]
16262 pub fn put_barc_j(&mut self,j_ : i32,sub_ : &[i64],weights_ : &[f64]) -> Result<(),String> {
16263 let num_ : i64 = std::cmp::min(sub_.len(),weights_.len()) as i64;
16264 self.handle_res(unsafe { MSK_putbarcj(self.ptr,j_,num_,sub_.as_ptr(),weights_.as_ptr()) },"put_barc_j")?;
16265 return Result::Ok(());
16266 } // putbarcj
16267 /// Sets the dual solution for a semidefinite variable.
16268 ///
16269 /// # Arguments
16270 ///
16271 /// - `whichsol_` Selects a solution.
16272 ///
16273 /// See [Soltype]
16274 /// - `j_` Index of the semidefinite variable.
16275 /// - `barsj_` Value of the j'th variable of barx.
16276 ///
16277 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putbarsj>
16278 #[allow(unused_parens)]
16279 pub fn put_bars_j(&mut self,whichsol_ : i32,j_ : i32,barsj_ : &[f64]) -> Result<(),String> {
16280 let mut __tmp_0 : i64 = i64::default();
16281 let __tmp_1 = unsafe { MSK_getlenbarvarj(self.ptr,j_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getlenbarvarj")?;
16282 if barsj_.len() != (__tmp_0).try_into().unwrap() {
16283 return Result::Err("put_bars_j: Argument 'barsj' has the wrong length, expected __tmp_0".to_string());
16284 }
16285 self.handle_res(unsafe { MSK_putbarsj(self.ptr,whichsol_,j_,barsj_.as_ptr()) },"put_bars_j")?;
16286 return Result::Ok(());
16287 } // putbarsj
16288 /// Sets the name of a semidefinite variable.
16289 ///
16290 /// # Arguments
16291 ///
16292 /// - `j_` Index of the variable.
16293 /// - `name_` The variable name.
16294 ///
16295 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putbarvarname>
16296 #[allow(unused_parens)]
16297 pub fn put_barvar_name(&mut self,j_ : i32,name_ : &str) -> Result<(),String> {
16298 let __tmp_1 = CString::new(name_).unwrap();
16299 self.handle_res(unsafe { MSK_putbarvarname(self.ptr,j_,__tmp_1.as_ptr()) },"put_barvar_name")?;
16300 return Result::Ok(());
16301 } // putbarvarname
16302 /// Sets the primal solution for a semidefinite variable.
16303 ///
16304 /// # Arguments
16305 ///
16306 /// - `whichsol_` Selects a solution.
16307 ///
16308 /// See [Soltype]
16309 /// - `j_` Index of the semidefinite variable.
16310 /// - `barxj_` Value of the j'th variable of barx.
16311 ///
16312 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putbarxj>
16313 #[allow(unused_parens)]
16314 pub fn put_barx_j(&mut self,whichsol_ : i32,j_ : i32,barxj_ : &[f64]) -> Result<(),String> {
16315 let mut __tmp_0 : i64 = i64::default();
16316 let __tmp_1 = unsafe { MSK_getlenbarvarj(self.ptr,j_,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getlenbarvarj")?;
16317 if barxj_.len() != (__tmp_0).try_into().unwrap() {
16318 return Result::Err("put_barx_j: Argument 'barxj' has the wrong length, expected __tmp_0".to_string());
16319 }
16320 self.handle_res(unsafe { MSK_putbarxj(self.ptr,whichsol_,j_,barxj_.as_ptr()) },"put_barx_j")?;
16321 return Result::Ok(());
16322 } // putbarxj
16323 /// Replaces the fixed term in the objective.
16324 ///
16325 /// # Arguments
16326 ///
16327 /// - `cfix_` Fixed term in the objective.
16328 ///
16329 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putcfix>
16330 #[allow(unused_parens)]
16331 pub fn put_cfix(&mut self,cfix_ : f64) -> Result<(),String> {
16332 self.handle_res(unsafe { MSK_putcfix(self.ptr,cfix_) },"put_cfix")?;
16333 return Result::Ok(());
16334 } // putcfix
16335 /// Modifies one linear coefficient in the objective.
16336 ///
16337 /// # Arguments
16338 ///
16339 /// - `j_` Index of the variable whose objective coefficient should be changed.
16340 /// - `cj_` New coefficient value.
16341 ///
16342 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putcj>
16343 #[allow(unused_parens)]
16344 pub fn put_c_j(&mut self,j_ : i32,cj_ : f64) -> Result<(),String> {
16345 self.handle_res(unsafe { MSK_putcj(self.ptr,j_,cj_) },"put_c_j")?;
16346 return Result::Ok(());
16347 } // putcj
16348 /// Modifies a part of the linear objective coefficients.
16349 ///
16350 /// # Arguments
16351 ///
16352 /// - `subj_` Indices of variables for which objective coefficients should be changed.
16353 /// - `val_` New numerical values for the objective coefficients that should be modified.
16354 ///
16355 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putclist>
16356 #[allow(unused_parens)]
16357 pub fn put_c_list(&mut self,subj_ : &[i32],val_ : &[f64]) -> Result<(),String> {
16358 let num_ : i32 = std::cmp::min(subj_.len(),val_.len()) as i32;
16359 self.handle_res(unsafe { MSK_putclist(self.ptr,num_,subj_.as_ptr(),val_.as_ptr()) },"put_c_list")?;
16360 return Result::Ok(());
16361 } // putclist
16362 /// Changes the bound for one constraint.
16363 ///
16364 /// # Arguments
16365 ///
16366 /// - `i_` Index of the constraint.
16367 /// - `bkc_` New bound key.
16368 ///
16369 /// See [Boundkey]
16370 /// - `blc_` New lower bound.
16371 /// - `buc_` New upper bound.
16372 ///
16373 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putconbound>
16374 #[allow(unused_parens)]
16375 pub fn put_con_bound(&mut self,i_ : i32,bkc_ : i32,blc_ : f64,buc_ : f64) -> Result<(),String> {
16376 self.handle_res(unsafe { MSK_putconbound(self.ptr,i_,bkc_,blc_,buc_) },"put_con_bound")?;
16377 return Result::Ok(());
16378 } // putconbound
16379 /// Changes the bounds of a list of constraints.
16380 ///
16381 /// # Arguments
16382 ///
16383 /// - `sub_` List of constraint indexes.
16384 /// - `bkc_` Bound keys for the constraints.
16385 ///
16386 /// See [Boundkey]
16387 /// - `blc_` Lower bounds for the constraints.
16388 /// - `buc_` Upper bounds for the constraints.
16389 ///
16390 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putconboundlist>
16391 #[allow(unused_parens)]
16392 pub fn put_con_bound_list(&mut self,sub_ : &[i32],bkc_ : &[i32],blc_ : &[f64],buc_ : &[f64]) -> Result<(),String> {
16393 let num_ : i32 = std::cmp::min(std::cmp::min(std::cmp::min(sub_.len(),bkc_.len()),blc_.len()),buc_.len()) as i32;
16394 self.handle_res(unsafe { MSK_putconboundlist(self.ptr,num_,sub_.as_ptr(),bkc_.as_ptr(),blc_.as_ptr(),buc_.as_ptr()) },"put_con_bound_list")?;
16395 return Result::Ok(());
16396 } // putconboundlist
16397 /// Changes the bounds of a list of constraints.
16398 ///
16399 /// # Arguments
16400 ///
16401 /// - `sub_` List of constraint indexes.
16402 /// - `bkc_` New bound key for all constraints in the list.
16403 ///
16404 /// See [Boundkey]
16405 /// - `blc_` New lower bound for all constraints in the list.
16406 /// - `buc_` New upper bound for all constraints in the list.
16407 ///
16408 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putconboundlistconst>
16409 #[allow(unused_parens)]
16410 pub fn put_con_bound_list_const(&mut self,sub_ : &[i32],bkc_ : i32,blc_ : f64,buc_ : f64) -> Result<(),String> {
16411 let num_ : i32 = sub_.len() as i32;
16412 self.handle_res(unsafe { MSK_putconboundlistconst(self.ptr,num_,sub_.as_ptr(),bkc_,blc_,buc_) },"put_con_bound_list_const")?;
16413 return Result::Ok(());
16414 } // putconboundlistconst
16415 /// Changes the bounds for a slice of the constraints.
16416 ///
16417 /// # Arguments
16418 ///
16419 /// - `first_` First index in the sequence.
16420 /// - `last_` Last index plus 1 in the sequence.
16421 /// - `bkc_` Bound keys for the constraints.
16422 ///
16423 /// See [Boundkey]
16424 /// - `blc_` Lower bounds for the constraints.
16425 /// - `buc_` Upper bounds for the constraints.
16426 ///
16427 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putconboundslice>
16428 #[allow(unused_parens)]
16429 pub fn put_con_bound_slice(&mut self,first_ : i32,last_ : i32,bkc_ : &[i32],blc_ : &[f64],buc_ : &[f64]) -> Result<(),String> {
16430 if bkc_.len() != ((last_-first_)).try_into().unwrap() {
16431 return Result::Err("put_con_bound_slice: Argument 'bkc' has the wrong length, expected (last_-first_)".to_string());
16432 }
16433 if blc_.len() != ((last_-first_)).try_into().unwrap() {
16434 return Result::Err("put_con_bound_slice: Argument 'blc' has the wrong length, expected (last_-first_)".to_string());
16435 }
16436 if buc_.len() != ((last_-first_)).try_into().unwrap() {
16437 return Result::Err("put_con_bound_slice: Argument 'buc' has the wrong length, expected (last_-first_)".to_string());
16438 }
16439 self.handle_res(unsafe { MSK_putconboundslice(self.ptr,first_,last_,bkc_.as_ptr(),blc_.as_ptr(),buc_.as_ptr()) },"put_con_bound_slice")?;
16440 return Result::Ok(());
16441 } // putconboundslice
16442 /// Changes the bounds for a slice of the constraints.
16443 ///
16444 /// # Arguments
16445 ///
16446 /// - `first_` First index in the sequence.
16447 /// - `last_` Last index plus 1 in the sequence.
16448 /// - `bkc_` New bound key for all constraints in the slice.
16449 ///
16450 /// See [Boundkey]
16451 /// - `blc_` New lower bound for all constraints in the slice.
16452 /// - `buc_` New upper bound for all constraints in the slice.
16453 ///
16454 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putconboundsliceconst>
16455 #[allow(unused_parens)]
16456 pub fn put_con_bound_slice_const(&mut self,first_ : i32,last_ : i32,bkc_ : i32,blc_ : f64,buc_ : f64) -> Result<(),String> {
16457 self.handle_res(unsafe { MSK_putconboundsliceconst(self.ptr,first_,last_,bkc_,blc_,buc_) },"put_con_bound_slice_const")?;
16458 return Result::Ok(());
16459 } // putconboundsliceconst
16460 /// Replaces a conic constraint.
16461 ///
16462 /// # Arguments
16463 ///
16464 /// - `k_` Index of the cone.
16465 /// - `ct_` Specifies the type of the cone.
16466 ///
16467 /// See [Conetype]
16468 /// - `conepar_` For the power cone it denotes the exponent alpha. For other cone types it is unused and can be set to 0.
16469 /// - `submem_` Variable subscripts of the members in the cone.
16470 ///
16471 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putcone>
16472 #[allow(unused_parens)]
16473 pub fn put_cone(&mut self,k_ : i32,ct_ : i32,conepar_ : f64,submem_ : &[i32]) -> Result<(),String> {
16474 let nummem_ : i32 = submem_.len() as i32;
16475 self.handle_res(unsafe { MSK_putcone(self.ptr,k_,ct_,conepar_,nummem_,submem_.as_ptr()) },"put_cone")?;
16476 return Result::Ok(());
16477 } // putcone
16478 /// Sets the name of a cone.
16479 ///
16480 /// # Arguments
16481 ///
16482 /// - `j_` Index of the cone.
16483 /// - `name_` The name of the cone.
16484 ///
16485 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putconename>
16486 #[allow(unused_parens)]
16487 pub fn put_cone_name(&mut self,j_ : i32,name_ : &str) -> Result<(),String> {
16488 let __tmp_1 = CString::new(name_).unwrap();
16489 self.handle_res(unsafe { MSK_putconename(self.ptr,j_,__tmp_1.as_ptr()) },"put_cone_name")?;
16490 return Result::Ok(());
16491 } // putconename
16492 /// Sets the name of a constraint.
16493 ///
16494 /// # Arguments
16495 ///
16496 /// - `i_` Index of the constraint.
16497 /// - `name_` The name of the constraint.
16498 ///
16499 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putconname>
16500 #[allow(unused_parens)]
16501 pub fn put_con_name(&mut self,i_ : i32,name_ : &str) -> Result<(),String> {
16502 let __tmp_1 = CString::new(name_).unwrap();
16503 self.handle_res(unsafe { MSK_putconname(self.ptr,i_,__tmp_1.as_ptr()) },"put_con_name")?;
16504 return Result::Ok(());
16505 } // putconname
16506 /// Sets the primal and dual solution information for a single constraint.
16507 ///
16508 /// # Arguments
16509 ///
16510 /// - `i_` Index of the constraint.
16511 /// - `whichsol_` Selects a solution.
16512 ///
16513 /// See [Soltype]
16514 /// - `sk_` Status key of the constraint.
16515 ///
16516 /// See [Stakey]
16517 /// - `x_` Primal solution value of the constraint.
16518 /// - `sl_` Solution value of the dual variable associated with the lower bound.
16519 /// - `su_` Solution value of the dual variable associated with the upper bound.
16520 ///
16521 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putconsolutioni>
16522 #[allow(unused_parens)]
16523 pub fn put_con_solution_i(&mut self,i_ : i32,whichsol_ : i32,sk_ : i32,x_ : f64,sl_ : f64,su_ : f64) -> Result<(),String> {
16524 self.handle_res(unsafe { MSK_putconsolutioni(self.ptr,i_,whichsol_,sk_,x_,sl_,su_) },"put_con_solution_i")?;
16525 return Result::Ok(());
16526 } // putconsolutioni
16527 /// Modifies a slice of the linear objective coefficients.
16528 ///
16529 /// # Arguments
16530 ///
16531 /// - `first_` First element in the slice of c.
16532 /// - `last_` Last element plus 1 of the slice in c to be changed.
16533 /// - `slice_` New numerical values for the objective coefficients that should be modified.
16534 ///
16535 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putcslice>
16536 #[allow(unused_parens)]
16537 pub fn put_c_slice(&mut self,first_ : i32,last_ : i32,slice_ : &[f64]) -> Result<(),String> {
16538 if slice_.len() != ((last_-first_)).try_into().unwrap() {
16539 return Result::Err("put_c_slice: Argument 'slice' has the wrong length, expected (last_-first_)".to_string());
16540 }
16541 self.handle_res(unsafe { MSK_putcslice(self.ptr,first_,last_,slice_.as_ptr()) },"put_c_slice")?;
16542 return Result::Ok(());
16543 } // putcslice
16544 /// Inputs a disjunctive constraint.
16545 ///
16546 /// # Arguments
16547 ///
16548 /// - `djcidx_` Index of the disjunctive constraint.
16549 /// - `domidxlist_` List of domain indexes.
16550 /// - `afeidxlist_` List of affine expression indexes.
16551 /// - `b_` The vector of constant terms modifying affine expressions.
16552 /// - `termsizelist_` List of term sizes.
16553 ///
16554 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putdjc>
16555 #[allow(unused_parens)]
16556 pub fn put_djc(&mut self,djcidx_ : i64,domidxlist_ : &[i64],afeidxlist_ : &[i64],b_ : &[f64],termsizelist_ : &[i64]) -> Result<(),String> {
16557 let numdomidx_ : i64 = domidxlist_.len() as i64;
16558 let numafeidx_ : i64 = afeidxlist_.len() as i64;
16559 if b_.len() > 0 && b_.len() != (numafeidx_).try_into().unwrap() {
16560 return Result::Err("put_djc: Argument 'b' has the wrong length, expected numafeidx_".to_string());
16561 }
16562 let numterms_ : i64 = termsizelist_.len() as i64;
16563 self.handle_res(unsafe { MSK_putdjc(self.ptr,djcidx_,numdomidx_,domidxlist_.as_ptr(),numafeidx_,afeidxlist_.as_ptr(),if b_.len() == 0 { std::ptr::null() } else { b_.as_ptr() },numterms_,termsizelist_.as_ptr()) },"put_djc")?;
16564 return Result::Ok(());
16565 } // putdjc
16566 /// Sets the name of a disjunctive constraint.
16567 ///
16568 /// # Arguments
16569 ///
16570 /// - `djcidx_` Index of the disjunctive constraint.
16571 /// - `name_` The name of the disjunctive constraint.
16572 ///
16573 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putdjcname>
16574 #[allow(unused_parens)]
16575 pub fn put_djc_name(&mut self,djcidx_ : i64,name_ : &str) -> Result<(),String> {
16576 let __tmp_1 = CString::new(name_).unwrap();
16577 self.handle_res(unsafe { MSK_putdjcname(self.ptr,djcidx_,__tmp_1.as_ptr()) },"put_djc_name")?;
16578 return Result::Ok(());
16579 } // putdjcname
16580 /// Inputs a slice of disjunctive constraints.
16581 ///
16582 /// # Arguments
16583 ///
16584 /// - `idxfirst_` Index of the first disjunctive constraint in the slice.
16585 /// - `idxlast_` Index of the last disjunctive constraint in the slice plus 1.
16586 /// - `domidxlist_` List of domain indexes.
16587 /// - `afeidxlist_` List of affine expression indexes.
16588 /// - `b_` The vector of constant terms modifying affine expressions. Optional.
16589 /// - `termsizelist_` List of term sizes.
16590 /// - `termsindjc_` Number of terms in each of the disjunctive constraints in the slice.
16591 ///
16592 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putdjcslice>
16593 #[allow(unused_parens)]
16594 pub fn put_djc_slice(&mut self,idxfirst_ : i64,idxlast_ : i64,domidxlist_ : &[i64],afeidxlist_ : &[i64],b_ : &[f64],termsizelist_ : &[i64],termsindjc_ : &[i64]) -> Result<(),String> {
16595 let numdomidx_ : i64 = domidxlist_.len() as i64;
16596 let numafeidx_ : i64 = afeidxlist_.len() as i64;
16597 if b_.len() > 0 && b_.len() != (numafeidx_).try_into().unwrap() {
16598 return Result::Err("put_djc_slice: Argument 'b' has the wrong length, expected numafeidx_".to_string());
16599 }
16600 let numterms_ : i64 = termsizelist_.len() as i64;
16601 if termsindjc_.len() != ((idxlast_-idxfirst_)).try_into().unwrap() {
16602 return Result::Err("put_djc_slice: Argument 'termsindjc' has the wrong length, expected (idxlast_-idxfirst_)".to_string());
16603 }
16604 self.handle_res(unsafe { MSK_putdjcslice(self.ptr,idxfirst_,idxlast_,numdomidx_,domidxlist_.as_ptr(),numafeidx_,afeidxlist_.as_ptr(),if b_.len() == 0 { std::ptr::null() } else { b_.as_ptr() },numterms_,termsizelist_.as_ptr(),termsindjc_.as_ptr()) },"put_djc_slice")?;
16605 return Result::Ok(());
16606 } // putdjcslice
16607 /// Sets the name of a domain.
16608 ///
16609 /// # Arguments
16610 ///
16611 /// - `domidx_` Index of the domain.
16612 /// - `name_` The name of the domain.
16613 ///
16614 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putdomainname>
16615 #[allow(unused_parens)]
16616 pub fn put_domain_name(&mut self,domidx_ : i64,name_ : &str) -> Result<(),String> {
16617 let __tmp_1 = CString::new(name_).unwrap();
16618 self.handle_res(unsafe { MSK_putdomainname(self.ptr,domidx_,__tmp_1.as_ptr()) },"put_domain_name")?;
16619 return Result::Ok(());
16620 } // putdomainname
16621 /// Sets a double parameter.
16622 ///
16623 /// # Arguments
16624 ///
16625 /// - `param_` Which parameter.
16626 ///
16627 /// See [Dparam]
16628 /// - `parvalue_` Parameter value.
16629 ///
16630 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putdouparam>
16631 #[allow(unused_parens)]
16632 pub fn put_dou_param(&mut self,param_ : i32,parvalue_ : f64) -> Result<(),String> {
16633 self.handle_res(unsafe { MSK_putdouparam(self.ptr,param_,parvalue_) },"put_dou_param")?;
16634 return Result::Ok(());
16635 } // putdouparam
16636 /// Sets an integer parameter.
16637 ///
16638 /// # Arguments
16639 ///
16640 /// - `param_` Which parameter.
16641 ///
16642 /// See [Iparam]
16643 /// - `parvalue_` Parameter value.
16644 ///
16645 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putintparam>
16646 #[allow(unused_parens)]
16647 pub fn put_int_param(&mut self,param_ : i32,parvalue_ : i32) -> Result<(),String> {
16648 self.handle_res(unsafe { MSK_putintparam(self.ptr,param_,parvalue_) },"put_int_param")?;
16649 return Result::Ok(());
16650 } // putintparam
16651 /// Sets an integer parameter.
16652 ///
16653 /// # Arguments
16654 ///
16655 /// - `param_` Which parameter.
16656 ///
16657 /// See [Iparam]
16658 /// - `parvalue_` Parameter value.
16659 ///
16660 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putlintparam>
16661 #[allow(unused_parens)]
16662 pub fn put_lint_param(&mut self,param_ : i32,parvalue_ : i64) -> Result<(),String> {
16663 self.handle_res(unsafe { MSK_putlintparam(self.ptr,param_,parvalue_) },"put_lint_param")?;
16664 return Result::Ok(());
16665 } // putlintparam
16666 /// Sets the number of preallocated affine conic constraints.
16667 ///
16668 /// # Arguments
16669 ///
16670 /// - `maxnumacc_` Number of preallocated affine conic constraints.
16671 ///
16672 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putmaxnumacc>
16673 #[allow(unused_parens)]
16674 pub fn put_max_num_acc(&mut self,maxnumacc_ : i64) -> Result<(),String> {
16675 self.handle_res(unsafe { MSK_putmaxnumacc(self.ptr,maxnumacc_) },"put_max_num_acc")?;
16676 return Result::Ok(());
16677 } // putmaxnumacc
16678 /// Sets the number of preallocated affine expressions in the optimization task.
16679 ///
16680 /// # Arguments
16681 ///
16682 /// - `maxnumafe_` Number of preallocated affine expressions.
16683 ///
16684 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putmaxnumafe>
16685 #[allow(unused_parens)]
16686 pub fn put_max_num_afe(&mut self,maxnumafe_ : i64) -> Result<(),String> {
16687 self.handle_res(unsafe { MSK_putmaxnumafe(self.ptr,maxnumafe_) },"put_max_num_afe")?;
16688 return Result::Ok(());
16689 } // putmaxnumafe
16690 /// Sets the number of preallocated non-zero entries in the linear coefficient matrix.
16691 ///
16692 /// # Arguments
16693 ///
16694 /// - `maxnumanz_` New size of the storage reserved for storing the linear coefficient matrix.
16695 ///
16696 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putmaxnumanz>
16697 #[allow(unused_parens)]
16698 pub fn put_max_num_a_nz(&mut self,maxnumanz_ : i64) -> Result<(),String> {
16699 self.handle_res(unsafe { MSK_putmaxnumanz(self.ptr,maxnumanz_) },"put_max_num_a_nz")?;
16700 return Result::Ok(());
16701 } // putmaxnumanz
16702 /// Sets the number of preallocated symmetric matrix variables.
16703 ///
16704 /// # Arguments
16705 ///
16706 /// - `maxnumbarvar_` Number of preallocated symmetric matrix variables.
16707 ///
16708 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putmaxnumbarvar>
16709 #[allow(unused_parens)]
16710 pub fn put_max_num_barvar(&mut self,maxnumbarvar_ : i32) -> Result<(),String> {
16711 self.handle_res(unsafe { MSK_putmaxnumbarvar(self.ptr,maxnumbarvar_) },"put_max_num_barvar")?;
16712 return Result::Ok(());
16713 } // putmaxnumbarvar
16714 /// Sets the number of preallocated constraints in the optimization task.
16715 ///
16716 /// # Arguments
16717 ///
16718 /// - `maxnumcon_` Number of preallocated constraints in the optimization task.
16719 ///
16720 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putmaxnumcon>
16721 #[allow(unused_parens)]
16722 pub fn put_max_num_con(&mut self,maxnumcon_ : i32) -> Result<(),String> {
16723 self.handle_res(unsafe { MSK_putmaxnumcon(self.ptr,maxnumcon_) },"put_max_num_con")?;
16724 return Result::Ok(());
16725 } // putmaxnumcon
16726 /// Sets the number of preallocated conic constraints in the optimization task.
16727 ///
16728 /// # Arguments
16729 ///
16730 /// - `maxnumcone_` Number of preallocated conic constraints in the optimization task.
16731 ///
16732 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putmaxnumcone>
16733 #[allow(unused_parens)]
16734 pub fn put_max_num_cone(&mut self,maxnumcone_ : i32) -> Result<(),String> {
16735 self.handle_res(unsafe { MSK_putmaxnumcone(self.ptr,maxnumcone_) },"put_max_num_cone")?;
16736 return Result::Ok(());
16737 } // putmaxnumcone
16738 /// Sets the number of preallocated disjunctive constraints.
16739 ///
16740 /// # Arguments
16741 ///
16742 /// - `maxnumdjc_` Number of preallocated disjunctive constraints in the task.
16743 ///
16744 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putmaxnumdjc>
16745 #[allow(unused_parens)]
16746 pub fn put_max_num_djc(&mut self,maxnumdjc_ : i64) -> Result<(),String> {
16747 self.handle_res(unsafe { MSK_putmaxnumdjc(self.ptr,maxnumdjc_) },"put_max_num_djc")?;
16748 return Result::Ok(());
16749 } // putmaxnumdjc
16750 /// Sets the number of preallocated domains in the optimization task.
16751 ///
16752 /// # Arguments
16753 ///
16754 /// - `maxnumdomain_` Number of preallocated domains.
16755 ///
16756 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putmaxnumdomain>
16757 #[allow(unused_parens)]
16758 pub fn put_max_num_domain(&mut self,maxnumdomain_ : i64) -> Result<(),String> {
16759 self.handle_res(unsafe { MSK_putmaxnumdomain(self.ptr,maxnumdomain_) },"put_max_num_domain")?;
16760 return Result::Ok(());
16761 } // putmaxnumdomain
16762 /// Sets the number of preallocated non-zero entries in quadratic terms.
16763 ///
16764 /// # Arguments
16765 ///
16766 /// - `maxnumqnz_` Number of non-zero elements preallocated in quadratic coefficient matrices.
16767 ///
16768 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putmaxnumqnz>
16769 #[allow(unused_parens)]
16770 pub fn put_max_num_q_nz(&mut self,maxnumqnz_ : i64) -> Result<(),String> {
16771 self.handle_res(unsafe { MSK_putmaxnumqnz(self.ptr,maxnumqnz_) },"put_max_num_q_nz")?;
16772 return Result::Ok(());
16773 } // putmaxnumqnz
16774 /// Sets the number of preallocated variables in the optimization task.
16775 ///
16776 /// # Arguments
16777 ///
16778 /// - `maxnumvar_` Number of preallocated variables in the optimization task.
16779 ///
16780 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putmaxnumvar>
16781 #[allow(unused_parens)]
16782 pub fn put_max_num_var(&mut self,maxnumvar_ : i32) -> Result<(),String> {
16783 self.handle_res(unsafe { MSK_putmaxnumvar(self.ptr,maxnumvar_) },"put_max_num_var")?;
16784 return Result::Ok(());
16785 } // putmaxnumvar
16786 /// Sets a double parameter.
16787 ///
16788 /// # Arguments
16789 ///
16790 /// - `paramname_` Name of a parameter.
16791 /// - `parvalue_` Parameter value.
16792 ///
16793 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putnadouparam>
16794 #[allow(unused_parens)]
16795 pub fn put_na_dou_param(&mut self,paramname_ : &str,parvalue_ : f64) -> Result<(),String> {
16796 let __tmp_1 = CString::new(paramname_).unwrap();
16797 self.handle_res(unsafe { MSK_putnadouparam(self.ptr,__tmp_1.as_ptr(),parvalue_) },"put_na_dou_param")?;
16798 return Result::Ok(());
16799 } // putnadouparam
16800 /// Sets an integer parameter.
16801 ///
16802 /// # Arguments
16803 ///
16804 /// - `paramname_` Name of a parameter.
16805 /// - `parvalue_` Parameter value.
16806 ///
16807 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putnaintparam>
16808 #[allow(unused_parens)]
16809 pub fn put_na_int_param(&mut self,paramname_ : &str,parvalue_ : i32) -> Result<(),String> {
16810 let __tmp_1 = CString::new(paramname_).unwrap();
16811 self.handle_res(unsafe { MSK_putnaintparam(self.ptr,__tmp_1.as_ptr(),parvalue_) },"put_na_int_param")?;
16812 return Result::Ok(());
16813 } // putnaintparam
16814 /// Sets a string parameter.
16815 ///
16816 /// # Arguments
16817 ///
16818 /// - `paramname_` Name of a parameter.
16819 /// - `parvalue_` Parameter value.
16820 ///
16821 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putnastrparam>
16822 #[allow(unused_parens)]
16823 pub fn put_na_str_param(&mut self,paramname_ : &str,parvalue_ : &str) -> Result<(),String> {
16824 let __tmp_1 = CString::new(paramname_).unwrap();
16825 let __tmp_3 = CString::new(parvalue_).unwrap();
16826 self.handle_res(unsafe { MSK_putnastrparam(self.ptr,__tmp_1.as_ptr(),__tmp_3.as_ptr()) },"put_na_str_param")?;
16827 return Result::Ok(());
16828 } // putnastrparam
16829 /// Assigns a new name to the objective.
16830 ///
16831 /// # Arguments
16832 ///
16833 /// - `objname_` Name of the objective.
16834 ///
16835 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putobjname>
16836 #[allow(unused_parens)]
16837 pub fn put_obj_name(&mut self,objname_ : &str) -> Result<(),String> {
16838 let __tmp_1 = CString::new(objname_).unwrap();
16839 self.handle_res(unsafe { MSK_putobjname(self.ptr,__tmp_1.as_ptr()) },"put_obj_name")?;
16840 return Result::Ok(());
16841 } // putobjname
16842 /// Sets the objective sense.
16843 ///
16844 /// # Arguments
16845 ///
16846 /// - `sense_` The objective sense of the task
16847 ///
16848 /// See [Objsense]
16849 ///
16850 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putobjsense>
16851 #[allow(unused_parens)]
16852 pub fn put_obj_sense(&mut self,sense_ : i32) -> Result<(),String> {
16853 self.handle_res(unsafe { MSK_putobjsense(self.ptr,sense_) },"put_obj_sense")?;
16854 return Result::Ok(());
16855 } // putobjsense
16856 /// Specify an OptServer for remote calls.
16857 ///
16858 /// # Arguments
16859 ///
16860 /// - `host_` A URL specifying the optimization server to be used.
16861 ///
16862 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putoptserverhost>
16863 #[allow(unused_parens)]
16864 pub fn put_optserver_host(&mut self,host_ : &str) -> Result<(),String> {
16865 let __tmp_1 = CString::new(host_).unwrap();
16866 self.handle_res(unsafe { MSK_putoptserverhost(self.ptr,__tmp_1.as_ptr()) },"put_optserver_host")?;
16867 return Result::Ok(());
16868 } // putoptserverhost
16869 /// Modifies the value of parameter.
16870 ///
16871 /// # Arguments
16872 ///
16873 /// - `parname_` Parameter name.
16874 /// - `parvalue_` Parameter value.
16875 ///
16876 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putparam>
16877 #[allow(unused_parens)]
16878 pub fn put_param(&mut self,parname_ : &str,parvalue_ : &str) -> Result<(),String> {
16879 let __tmp_1 = CString::new(parname_).unwrap();
16880 let __tmp_3 = CString::new(parvalue_).unwrap();
16881 self.handle_res(unsafe { MSK_putparam(self.ptr,__tmp_1.as_ptr(),__tmp_3.as_ptr()) },"put_param")?;
16882 return Result::Ok(());
16883 } // putparam
16884 /// Replaces all quadratic terms in constraints.
16885 ///
16886 /// # Arguments
16887 ///
16888 /// - `qcsubk_` Constraint subscripts for quadratic coefficients.
16889 /// - `qcsubi_` Row subscripts for quadratic constraint matrix.
16890 /// - `qcsubj_` Column subscripts for quadratic constraint matrix.
16891 /// - `qcval_` Quadratic constraint coefficient values.
16892 ///
16893 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putqcon>
16894 #[allow(unused_parens)]
16895 pub fn put_q_con(&mut self,qcsubk_ : &[i32],qcsubi_ : &[i32],qcsubj_ : &[i32],qcval_ : &[f64]) -> Result<(),String> {
16896 let numqcnz_ : i32 = std::cmp::min(std::cmp::min(qcsubi_.len(),qcsubj_.len()),qcval_.len()) as i32;
16897 self.handle_res(unsafe { MSK_putqcon(self.ptr,numqcnz_,qcsubk_.as_ptr(),qcsubi_.as_ptr(),qcsubj_.as_ptr(),qcval_.as_ptr()) },"put_q_con")?;
16898 return Result::Ok(());
16899 } // putqcon
16900 /// Replaces all quadratic terms in a single constraint.
16901 ///
16902 /// # Arguments
16903 ///
16904 /// - `k_` The constraint in which the new quadratic elements are inserted.
16905 /// - `qcsubi_` Row subscripts for quadratic constraint matrix.
16906 /// - `qcsubj_` Column subscripts for quadratic constraint matrix.
16907 /// - `qcval_` Quadratic constraint coefficient values.
16908 ///
16909 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putqconk>
16910 #[allow(unused_parens)]
16911 pub fn put_q_con_k(&mut self,k_ : i32,qcsubi_ : &[i32],qcsubj_ : &[i32],qcval_ : &[f64]) -> Result<(),String> {
16912 let numqcnz_ : i32 = std::cmp::min(std::cmp::min(qcsubi_.len(),qcsubj_.len()),qcval_.len()) as i32;
16913 if qcsubi_.len() != qcsubj_.len() || qcsubi_.len() != qcval_.len() { return Err("put_q_con_k: Mismatching lengths if qcsubi, qcsubj and qcval".to_string()); }
16914 self.handle_res(unsafe { MSK_putqconk(self.ptr,k_,numqcnz_,qcsubi_.as_ptr(),qcsubj_.as_ptr(),qcval_.as_ptr()) },"put_q_con_k")?;
16915 return Result::Ok(());
16916 } // putqconk
16917 /// Replaces all quadratic terms in the objective.
16918 ///
16919 /// # Arguments
16920 ///
16921 /// - `qosubi_` Row subscripts for quadratic objective coefficients.
16922 /// - `qosubj_` Column subscripts for quadratic objective coefficients.
16923 /// - `qoval_` Quadratic objective coefficient values.
16924 ///
16925 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putqobj>
16926 #[allow(unused_parens)]
16927 pub fn put_q_obj(&mut self,qosubi_ : &[i32],qosubj_ : &[i32],qoval_ : &[f64]) -> Result<(),String> {
16928 let numqonz_ : i32 = std::cmp::min(std::cmp::min(qosubi_.len(),qosubj_.len()),qoval_.len()) as i32;
16929 if qosubi_.len() != qosubj_.len() || qosubi_.len() != qoval_.len() { return Err("put_q_obj: Mismatching lengths if qosubi, qosubj and qoval".to_string()); }
16930 self.handle_res(unsafe { MSK_putqobj(self.ptr,numqonz_,qosubi_.as_ptr(),qosubj_.as_ptr(),qoval_.as_ptr()) },"put_q_obj")?;
16931 return Result::Ok(());
16932 } // putqobj
16933 /// Replaces one coefficient in the quadratic term in the objective.
16934 ///
16935 /// # Arguments
16936 ///
16937 /// - `i_` Row index for the coefficient to be replaced.
16938 /// - `j_` Column index for the coefficient to be replaced.
16939 /// - `qoij_` The new coefficient value.
16940 ///
16941 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putqobjij>
16942 #[allow(unused_parens)]
16943 pub fn put_q_obj_i_j(&mut self,i_ : i32,j_ : i32,qoij_ : f64) -> Result<(),String> {
16944 self.handle_res(unsafe { MSK_putqobjij(self.ptr,i_,j_,qoij_) },"put_q_obj_i_j")?;
16945 return Result::Ok(());
16946 } // putqobjij
16947 /// Sets the status keys for the constraints.
16948 ///
16949 /// # Arguments
16950 ///
16951 /// - `whichsol_` Selects a solution.
16952 ///
16953 /// See [Soltype]
16954 /// - `skc_` Status keys for the constraints.
16955 ///
16956 /// See [Stakey]
16957 ///
16958 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putskc>
16959 #[allow(unused_parens)]
16960 pub fn put_skc(&mut self,whichsol_ : i32,skc_ : &[i32]) -> Result<(),String> {
16961 let mut __tmp_0 : i32 = i32::default();
16962 let __tmp_1 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumcon")?;
16963 if skc_.len() != (__tmp_0).try_into().unwrap() {
16964 return Result::Err("put_skc: Argument 'skc' has the wrong length, expected __tmp_0".to_string());
16965 }
16966 self.handle_res(unsafe { MSK_putskc(self.ptr,whichsol_,skc_.as_ptr()) },"put_skc")?;
16967 return Result::Ok(());
16968 } // putskc
16969 /// Sets the status keys for a slice of the constraints.
16970 ///
16971 /// # Arguments
16972 ///
16973 /// - `whichsol_` Selects a solution.
16974 ///
16975 /// See [Soltype]
16976 /// - `first_` First index in the sequence.
16977 /// - `last_` Last index plus 1 in the sequence.
16978 /// - `skc_` Status keys for the constraints.
16979 ///
16980 /// See [Stakey]
16981 ///
16982 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putskcslice>
16983 #[allow(unused_parens)]
16984 pub fn put_skc_slice(&mut self,whichsol_ : i32,first_ : i32,last_ : i32,skc_ : &[i32]) -> Result<(),String> {
16985 if skc_.len() != ((last_-first_)).try_into().unwrap() {
16986 return Result::Err("put_skc_slice: Argument 'skc' has the wrong length, expected (last_-first_)".to_string());
16987 }
16988 self.handle_res(unsafe { MSK_putskcslice(self.ptr,whichsol_,first_,last_,skc_.as_ptr()) },"put_skc_slice")?;
16989 return Result::Ok(());
16990 } // putskcslice
16991 /// Sets the status keys for the scalar variables.
16992 ///
16993 /// # Arguments
16994 ///
16995 /// - `whichsol_` Selects a solution.
16996 ///
16997 /// See [Soltype]
16998 /// - `skx_` Status keys for the variables.
16999 ///
17000 /// See [Stakey]
17001 ///
17002 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putskx>
17003 #[allow(unused_parens)]
17004 pub fn put_skx(&mut self,whichsol_ : i32,skx_ : &[i32]) -> Result<(),String> {
17005 let mut __tmp_0 : i32 = i32::default();
17006 let __tmp_1 = unsafe { MSK_getnumvar(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumvar")?;
17007 if skx_.len() != (__tmp_0).try_into().unwrap() {
17008 return Result::Err("put_skx: Argument 'skx' has the wrong length, expected __tmp_0".to_string());
17009 }
17010 self.handle_res(unsafe { MSK_putskx(self.ptr,whichsol_,skx_.as_ptr()) },"put_skx")?;
17011 return Result::Ok(());
17012 } // putskx
17013 /// Sets the status keys for a slice of the variables.
17014 ///
17015 /// # Arguments
17016 ///
17017 /// - `whichsol_` Selects a solution.
17018 ///
17019 /// See [Soltype]
17020 /// - `first_` First index in the sequence.
17021 /// - `last_` Last index plus 1 in the sequence.
17022 /// - `skx_` Status keys for the variables.
17023 ///
17024 /// See [Stakey]
17025 ///
17026 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putskxslice>
17027 #[allow(unused_parens)]
17028 pub fn put_skx_slice(&mut self,whichsol_ : i32,first_ : i32,last_ : i32,skx_ : &[i32]) -> Result<(),String> {
17029 if skx_.len() != ((last_-first_)).try_into().unwrap() {
17030 return Result::Err("put_skx_slice: Argument 'skx' has the wrong length, expected (last_-first_)".to_string());
17031 }
17032 self.handle_res(unsafe { MSK_putskxslice(self.ptr,whichsol_,first_,last_,skx_.as_ptr()) },"put_skx_slice")?;
17033 return Result::Ok(());
17034 } // putskxslice
17035 /// Sets the slc vector for a solution.
17036 ///
17037 /// # Arguments
17038 ///
17039 /// - `whichsol_` Selects a solution.
17040 ///
17041 /// See [Soltype]
17042 /// - `slc_` Dual variables corresponding to the lower bounds on the constraints.
17043 ///
17044 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putslc>
17045 #[allow(unused_parens)]
17046 pub fn put_slc(&mut self,whichsol_ : i32,slc_ : &[f64]) -> Result<(),String> {
17047 let mut __tmp_0 : i32 = i32::default();
17048 let __tmp_1 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumcon")?;
17049 if slc_.len() != (__tmp_0).try_into().unwrap() {
17050 return Result::Err("put_slc: Argument 'slc' has the wrong length, expected __tmp_0".to_string());
17051 }
17052 self.handle_res(unsafe { MSK_putslc(self.ptr,whichsol_,slc_.as_ptr()) },"put_slc")?;
17053 return Result::Ok(());
17054 } // putslc
17055 /// Sets a slice of the slc vector for a solution.
17056 ///
17057 /// # Arguments
17058 ///
17059 /// - `whichsol_` Selects a solution.
17060 ///
17061 /// See [Soltype]
17062 /// - `first_` First index in the sequence.
17063 /// - `last_` Last index plus 1 in the sequence.
17064 /// - `slc_` Dual variables corresponding to the lower bounds on the constraints.
17065 ///
17066 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putslcslice>
17067 #[allow(unused_parens)]
17068 pub fn put_slc_slice(&mut self,whichsol_ : i32,first_ : i32,last_ : i32,slc_ : &[f64]) -> Result<(),String> {
17069 if slc_.len() != ((last_-first_)).try_into().unwrap() {
17070 return Result::Err("put_slc_slice: Argument 'slc' has the wrong length, expected (last_-first_)".to_string());
17071 }
17072 self.handle_res(unsafe { MSK_putslcslice(self.ptr,whichsol_,first_,last_,slc_.as_ptr()) },"put_slc_slice")?;
17073 return Result::Ok(());
17074 } // putslcslice
17075 /// Sets the slx vector for a solution.
17076 ///
17077 /// # Arguments
17078 ///
17079 /// - `whichsol_` Selects a solution.
17080 ///
17081 /// See [Soltype]
17082 /// - `slx_` Dual variables corresponding to the lower bounds on the variables.
17083 ///
17084 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putslx>
17085 #[allow(unused_parens)]
17086 pub fn put_slx(&mut self,whichsol_ : i32,slx_ : &[f64]) -> Result<(),String> {
17087 let mut __tmp_0 : i32 = i32::default();
17088 let __tmp_1 = unsafe { MSK_getnumvar(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumvar")?;
17089 if slx_.len() != (__tmp_0).try_into().unwrap() {
17090 return Result::Err("put_slx: Argument 'slx' has the wrong length, expected __tmp_0".to_string());
17091 }
17092 self.handle_res(unsafe { MSK_putslx(self.ptr,whichsol_,slx_.as_ptr()) },"put_slx")?;
17093 return Result::Ok(());
17094 } // putslx
17095 /// Sets a slice of the slx vector for a solution.
17096 ///
17097 /// # Arguments
17098 ///
17099 /// - `whichsol_` Selects a solution.
17100 ///
17101 /// See [Soltype]
17102 /// - `first_` First index in the sequence.
17103 /// - `last_` Last index plus 1 in the sequence.
17104 /// - `slx_` Dual variables corresponding to the lower bounds on the variables.
17105 ///
17106 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putslxslice>
17107 #[allow(unused_parens)]
17108 pub fn put_slx_slice(&mut self,whichsol_ : i32,first_ : i32,last_ : i32,slx_ : &[f64]) -> Result<(),String> {
17109 if slx_.len() != ((last_-first_)).try_into().unwrap() {
17110 return Result::Err("put_slx_slice: Argument 'slx' has the wrong length, expected (last_-first_)".to_string());
17111 }
17112 self.handle_res(unsafe { MSK_putslxslice(self.ptr,whichsol_,first_,last_,slx_.as_ptr()) },"put_slx_slice")?;
17113 return Result::Ok(());
17114 } // putslxslice
17115 /// Sets the snx vector for a solution.
17116 ///
17117 /// # Arguments
17118 ///
17119 /// - `whichsol_` Selects a solution.
17120 ///
17121 /// See [Soltype]
17122 /// - `sux_` Dual variables corresponding to the upper bounds on the variables.
17123 ///
17124 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putsnx>
17125 #[allow(unused_parens)]
17126 pub fn put_snx(&mut self,whichsol_ : i32,sux_ : &[f64]) -> Result<(),String> {
17127 let mut __tmp_0 : i32 = i32::default();
17128 let __tmp_1 = unsafe { MSK_getnumvar(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumvar")?;
17129 if sux_.len() != (__tmp_0).try_into().unwrap() {
17130 return Result::Err("put_snx: Argument 'sux' has the wrong length, expected __tmp_0".to_string());
17131 }
17132 self.handle_res(unsafe { MSK_putsnx(self.ptr,whichsol_,sux_.as_ptr()) },"put_snx")?;
17133 return Result::Ok(());
17134 } // putsnx
17135 /// Sets a slice of the snx vector for a solution.
17136 ///
17137 /// # Arguments
17138 ///
17139 /// - `whichsol_` Selects a solution.
17140 ///
17141 /// See [Soltype]
17142 /// - `first_` First index in the sequence.
17143 /// - `last_` Last index plus 1 in the sequence.
17144 /// - `snx_` Dual variables corresponding to the conic constraints on the variables.
17145 ///
17146 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putsnxslice>
17147 #[allow(unused_parens)]
17148 pub fn put_snx_slice(&mut self,whichsol_ : i32,first_ : i32,last_ : i32,snx_ : &[f64]) -> Result<(),String> {
17149 if snx_.len() != ((last_-first_)).try_into().unwrap() {
17150 return Result::Err("put_snx_slice: Argument 'snx' has the wrong length, expected (last_-first_)".to_string());
17151 }
17152 self.handle_res(unsafe { MSK_putsnxslice(self.ptr,whichsol_,first_,last_,snx_.as_ptr()) },"put_snx_slice")?;
17153 return Result::Ok(());
17154 } // putsnxslice
17155 /// Inserts a solution.
17156 ///
17157 /// # Arguments
17158 ///
17159 /// - `whichsol_` Selects a solution.
17160 ///
17161 /// See [Soltype]
17162 /// - `skc_` Status keys for the constraints.
17163 ///
17164 /// See [Stakey]
17165 /// - `skx_` Status keys for the variables.
17166 ///
17167 /// See [Stakey]
17168 /// - `skn_` Status keys for the conic constraints.
17169 ///
17170 /// See [Stakey]
17171 /// - `xc_` Primal constraint solution.
17172 /// - `xx_` Primal variable solution.
17173 /// - `y_` Vector of dual variables corresponding to the constraints.
17174 /// - `slc_` Dual variables corresponding to the lower bounds on the constraints.
17175 /// - `suc_` Dual variables corresponding to the upper bounds on the constraints.
17176 /// - `slx_` Dual variables corresponding to the lower bounds on the variables.
17177 /// - `sux_` Dual variables corresponding to the upper bounds on the variables.
17178 /// - `snx_` Dual variables corresponding to the conic constraints on the variables.
17179 ///
17180 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putsolution>
17181 #[allow(unused_parens)]
17182 pub fn put_solution(&mut self,whichsol_ : i32,skc_ : &[i32],skx_ : &[i32],skn_ : &[i32],xc_ : &[f64],xx_ : &[f64],y_ : &[f64],slc_ : &[f64],suc_ : &[f64],slx_ : &[f64],sux_ : &[f64],snx_ : &[f64]) -> Result<(),String> {
17183 self.handle_res(unsafe { MSK_putsolution(self.ptr,whichsol_,skc_.as_ptr(),skx_.as_ptr(),skn_.as_ptr(),if xc_.len() == 0 { std::ptr::null() } else { xc_.as_ptr() },if xx_.len() == 0 { std::ptr::null() } else { xx_.as_ptr() },if y_.len() == 0 { std::ptr::null() } else { y_.as_ptr() },if slc_.len() == 0 { std::ptr::null() } else { slc_.as_ptr() },if suc_.len() == 0 { std::ptr::null() } else { suc_.as_ptr() },if slx_.len() == 0 { std::ptr::null() } else { slx_.as_ptr() },if sux_.len() == 0 { std::ptr::null() } else { sux_.as_ptr() },if snx_.len() == 0 { std::ptr::null() } else { snx_.as_ptr() }) },"put_solution")?;
17184 return Result::Ok(());
17185 } // putsolution
17186 /// Inserts a solution.
17187 ///
17188 /// # Arguments
17189 ///
17190 /// - `whichsol_` Selects a solution.
17191 ///
17192 /// See [Soltype]
17193 /// - `skc_` Status keys for the constraints.
17194 ///
17195 /// See [Stakey]
17196 /// - `skx_` Status keys for the variables.
17197 ///
17198 /// See [Stakey]
17199 /// - `skn_` Status keys for the conic constraints.
17200 ///
17201 /// See [Stakey]
17202 /// - `xc_` Primal constraint solution.
17203 /// - `xx_` Primal variable solution.
17204 /// - `y_` Vector of dual variables corresponding to the constraints.
17205 /// - `slc_` Dual variables corresponding to the lower bounds on the constraints.
17206 /// - `suc_` Dual variables corresponding to the upper bounds on the constraints.
17207 /// - `slx_` Dual variables corresponding to the lower bounds on the variables.
17208 /// - `sux_` Dual variables corresponding to the upper bounds on the variables.
17209 /// - `snx_` Dual variables corresponding to the conic constraints on the variables.
17210 /// - `doty_` Dual variables corresponding to affine conic constraints.
17211 ///
17212 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putsolutionnew>
17213 #[allow(unused_parens)]
17214 pub fn put_solution_new(&mut self,whichsol_ : i32,skc_ : &[i32],skx_ : &[i32],skn_ : &[i32],xc_ : &[f64],xx_ : &[f64],y_ : &[f64],slc_ : &[f64],suc_ : &[f64],slx_ : &[f64],sux_ : &[f64],snx_ : &[f64],doty_ : &[f64]) -> Result<(),String> {
17215 self.handle_res(unsafe { MSK_putsolutionnew(self.ptr,whichsol_,skc_.as_ptr(),skx_.as_ptr(),skn_.as_ptr(),if xc_.len() == 0 { std::ptr::null() } else { xc_.as_ptr() },if xx_.len() == 0 { std::ptr::null() } else { xx_.as_ptr() },if y_.len() == 0 { std::ptr::null() } else { y_.as_ptr() },if slc_.len() == 0 { std::ptr::null() } else { slc_.as_ptr() },if suc_.len() == 0 { std::ptr::null() } else { suc_.as_ptr() },if slx_.len() == 0 { std::ptr::null() } else { slx_.as_ptr() },if sux_.len() == 0 { std::ptr::null() } else { sux_.as_ptr() },if snx_.len() == 0 { std::ptr::null() } else { snx_.as_ptr() },if doty_.len() == 0 { std::ptr::null() } else { doty_.as_ptr() }) },"put_solution_new")?;
17216 return Result::Ok(());
17217 } // putsolutionnew
17218 /// Inputs the dual variable of a solution.
17219 ///
17220 /// # Arguments
17221 ///
17222 /// - `i_` Index of the dual variable.
17223 /// - `whichsol_` Selects a solution.
17224 ///
17225 /// See [Soltype]
17226 /// - `y_` Solution value of the dual variable.
17227 ///
17228 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putsolutionyi>
17229 #[allow(unused_parens)]
17230 pub fn put_solution_y_i(&mut self,i_ : i32,whichsol_ : i32,y_ : f64) -> Result<(),String> {
17231 self.handle_res(unsafe { MSK_putsolutionyi(self.ptr,i_,whichsol_,y_) },"put_solution_y_i")?;
17232 return Result::Ok(());
17233 } // putsolutionyi
17234 /// Sets a string parameter.
17235 ///
17236 /// # Arguments
17237 ///
17238 /// - `param_` Which parameter.
17239 ///
17240 /// See [Sparam]
17241 /// - `parvalue_` Parameter value.
17242 ///
17243 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putstrparam>
17244 #[allow(unused_parens)]
17245 pub fn put_str_param(&mut self,param_ : i32,parvalue_ : &str) -> Result<(),String> {
17246 let __tmp_1 = CString::new(parvalue_).unwrap();
17247 self.handle_res(unsafe { MSK_putstrparam(self.ptr,param_,__tmp_1.as_ptr()) },"put_str_param")?;
17248 return Result::Ok(());
17249 } // putstrparam
17250 /// Sets the suc vector for a solution.
17251 ///
17252 /// # Arguments
17253 ///
17254 /// - `whichsol_` Selects a solution.
17255 ///
17256 /// See [Soltype]
17257 /// - `suc_` Dual variables corresponding to the upper bounds on the constraints.
17258 ///
17259 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putsuc>
17260 #[allow(unused_parens)]
17261 pub fn put_suc(&mut self,whichsol_ : i32,suc_ : &[f64]) -> Result<(),String> {
17262 let mut __tmp_0 : i32 = i32::default();
17263 let __tmp_1 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumcon")?;
17264 if suc_.len() != (__tmp_0).try_into().unwrap() {
17265 return Result::Err("put_suc: Argument 'suc' has the wrong length, expected __tmp_0".to_string());
17266 }
17267 self.handle_res(unsafe { MSK_putsuc(self.ptr,whichsol_,suc_.as_ptr()) },"put_suc")?;
17268 return Result::Ok(());
17269 } // putsuc
17270 /// Sets a slice of the suc vector for a solution.
17271 ///
17272 /// # Arguments
17273 ///
17274 /// - `whichsol_` Selects a solution.
17275 ///
17276 /// See [Soltype]
17277 /// - `first_` First index in the sequence.
17278 /// - `last_` Last index plus 1 in the sequence.
17279 /// - `suc_` Dual variables corresponding to the upper bounds on the constraints.
17280 ///
17281 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putsucslice>
17282 #[allow(unused_parens)]
17283 pub fn put_suc_slice(&mut self,whichsol_ : i32,first_ : i32,last_ : i32,suc_ : &[f64]) -> Result<(),String> {
17284 if suc_.len() != ((last_-first_)).try_into().unwrap() {
17285 return Result::Err("put_suc_slice: Argument 'suc' has the wrong length, expected (last_-first_)".to_string());
17286 }
17287 self.handle_res(unsafe { MSK_putsucslice(self.ptr,whichsol_,first_,last_,suc_.as_ptr()) },"put_suc_slice")?;
17288 return Result::Ok(());
17289 } // putsucslice
17290 /// Sets the sux vector for a solution.
17291 ///
17292 /// # Arguments
17293 ///
17294 /// - `whichsol_` Selects a solution.
17295 ///
17296 /// See [Soltype]
17297 /// - `sux_` Dual variables corresponding to the upper bounds on the variables.
17298 ///
17299 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putsux>
17300 #[allow(unused_parens)]
17301 pub fn put_sux(&mut self,whichsol_ : i32,sux_ : &[f64]) -> Result<(),String> {
17302 let mut __tmp_0 : i32 = i32::default();
17303 let __tmp_1 = unsafe { MSK_getnumvar(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumvar")?;
17304 if sux_.len() != (__tmp_0).try_into().unwrap() {
17305 return Result::Err("put_sux: Argument 'sux' has the wrong length, expected __tmp_0".to_string());
17306 }
17307 self.handle_res(unsafe { MSK_putsux(self.ptr,whichsol_,sux_.as_ptr()) },"put_sux")?;
17308 return Result::Ok(());
17309 } // putsux
17310 /// Sets a slice of the sux vector for a solution.
17311 ///
17312 /// # Arguments
17313 ///
17314 /// - `whichsol_` Selects a solution.
17315 ///
17316 /// See [Soltype]
17317 /// - `first_` First index in the sequence.
17318 /// - `last_` Last index plus 1 in the sequence.
17319 /// - `sux_` Dual variables corresponding to the upper bounds on the variables.
17320 ///
17321 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putsuxslice>
17322 #[allow(unused_parens)]
17323 pub fn put_sux_slice(&mut self,whichsol_ : i32,first_ : i32,last_ : i32,sux_ : &[f64]) -> Result<(),String> {
17324 if sux_.len() != ((last_-first_)).try_into().unwrap() {
17325 return Result::Err("put_sux_slice: Argument 'sux' has the wrong length, expected (last_-first_)".to_string());
17326 }
17327 self.handle_res(unsafe { MSK_putsuxslice(self.ptr,whichsol_,first_,last_,sux_.as_ptr()) },"put_sux_slice")?;
17328 return Result::Ok(());
17329 } // putsuxslice
17330 /// Assigns a new name to the task.
17331 ///
17332 /// # Arguments
17333 ///
17334 /// - `taskname_` Name assigned to the task.
17335 ///
17336 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.puttaskname>
17337 #[allow(unused_parens)]
17338 pub fn put_task_name(&mut self,taskname_ : &str) -> Result<(),String> {
17339 let __tmp_1 = CString::new(taskname_).unwrap();
17340 self.handle_res(unsafe { MSK_puttaskname(self.ptr,__tmp_1.as_ptr()) },"put_task_name")?;
17341 return Result::Ok(());
17342 } // puttaskname
17343 /// Changes the bounds for one variable.
17344 ///
17345 /// # Arguments
17346 ///
17347 /// - `j_` Index of the variable.
17348 /// - `bkx_` New bound key.
17349 ///
17350 /// See [Boundkey]
17351 /// - `blx_` New lower bound.
17352 /// - `bux_` New upper bound.
17353 ///
17354 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putvarbound>
17355 #[allow(unused_parens)]
17356 pub fn put_var_bound(&mut self,j_ : i32,bkx_ : i32,blx_ : f64,bux_ : f64) -> Result<(),String> {
17357 self.handle_res(unsafe { MSK_putvarbound(self.ptr,j_,bkx_,blx_,bux_) },"put_var_bound")?;
17358 return Result::Ok(());
17359 } // putvarbound
17360 /// Changes the bounds of a list of variables.
17361 ///
17362 /// # Arguments
17363 ///
17364 /// - `sub_` List of variable indexes.
17365 /// - `bkx_` Bound keys for the variables.
17366 ///
17367 /// See [Boundkey]
17368 /// - `blx_` Lower bounds for the variables.
17369 /// - `bux_` Upper bounds for the variables.
17370 ///
17371 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putvarboundlist>
17372 #[allow(unused_parens)]
17373 pub fn put_var_bound_list(&mut self,sub_ : &[i32],bkx_ : &[i32],blx_ : &[f64],bux_ : &[f64]) -> Result<(),String> {
17374 let num_ : i32 = std::cmp::min(std::cmp::min(std::cmp::min(sub_.len(),bkx_.len()),blx_.len()),bux_.len()) as i32;
17375 self.handle_res(unsafe { MSK_putvarboundlist(self.ptr,num_,sub_.as_ptr(),bkx_.as_ptr(),blx_.as_ptr(),bux_.as_ptr()) },"put_var_bound_list")?;
17376 return Result::Ok(());
17377 } // putvarboundlist
17378 /// Changes the bounds of a list of variables.
17379 ///
17380 /// # Arguments
17381 ///
17382 /// - `sub_` List of variable indexes.
17383 /// - `bkx_` New bound key for all variables in the list.
17384 ///
17385 /// See [Boundkey]
17386 /// - `blx_` New lower bound for all variables in the list.
17387 /// - `bux_` New upper bound for all variables in the list.
17388 ///
17389 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putvarboundlistconst>
17390 #[allow(unused_parens)]
17391 pub fn put_var_bound_list_const(&mut self,sub_ : &[i32],bkx_ : i32,blx_ : f64,bux_ : f64) -> Result<(),String> {
17392 let num_ : i32 = sub_.len() as i32;
17393 self.handle_res(unsafe { MSK_putvarboundlistconst(self.ptr,num_,sub_.as_ptr(),bkx_,blx_,bux_) },"put_var_bound_list_const")?;
17394 return Result::Ok(());
17395 } // putvarboundlistconst
17396 /// Changes the bounds for a slice of the variables.
17397 ///
17398 /// # Arguments
17399 ///
17400 /// - `first_` First index in the sequence.
17401 /// - `last_` Last index plus 1 in the sequence.
17402 /// - `bkx_` Bound keys for the variables.
17403 ///
17404 /// See [Boundkey]
17405 /// - `blx_` Lower bounds for the variables.
17406 /// - `bux_` Upper bounds for the variables.
17407 ///
17408 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putvarboundslice>
17409 #[allow(unused_parens)]
17410 pub fn put_var_bound_slice(&mut self,first_ : i32,last_ : i32,bkx_ : &[i32],blx_ : &[f64],bux_ : &[f64]) -> Result<(),String> {
17411 if bkx_.len() != ((last_-first_)).try_into().unwrap() {
17412 return Result::Err("put_var_bound_slice: Argument 'bkx' has the wrong length, expected (last_-first_)".to_string());
17413 }
17414 if blx_.len() != ((last_-first_)).try_into().unwrap() {
17415 return Result::Err("put_var_bound_slice: Argument 'blx' has the wrong length, expected (last_-first_)".to_string());
17416 }
17417 if bux_.len() != ((last_-first_)).try_into().unwrap() {
17418 return Result::Err("put_var_bound_slice: Argument 'bux' has the wrong length, expected (last_-first_)".to_string());
17419 }
17420 self.handle_res(unsafe { MSK_putvarboundslice(self.ptr,first_,last_,bkx_.as_ptr(),blx_.as_ptr(),bux_.as_ptr()) },"put_var_bound_slice")?;
17421 return Result::Ok(());
17422 } // putvarboundslice
17423 /// Changes the bounds for a slice of the variables.
17424 ///
17425 /// # Arguments
17426 ///
17427 /// - `first_` First index in the sequence.
17428 /// - `last_` Last index plus 1 in the sequence.
17429 /// - `bkx_` New bound key for all variables in the slice.
17430 ///
17431 /// See [Boundkey]
17432 /// - `blx_` New lower bound for all variables in the slice.
17433 /// - `bux_` New upper bound for all variables in the slice.
17434 ///
17435 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putvarboundsliceconst>
17436 #[allow(unused_parens)]
17437 pub fn put_var_bound_slice_const(&mut self,first_ : i32,last_ : i32,bkx_ : i32,blx_ : f64,bux_ : f64) -> Result<(),String> {
17438 self.handle_res(unsafe { MSK_putvarboundsliceconst(self.ptr,first_,last_,bkx_,blx_,bux_) },"put_var_bound_slice_const")?;
17439 return Result::Ok(());
17440 } // putvarboundsliceconst
17441 /// Sets the name of a variable.
17442 ///
17443 /// # Arguments
17444 ///
17445 /// - `j_` Index of the variable.
17446 /// - `name_` The variable name.
17447 ///
17448 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putvarname>
17449 #[allow(unused_parens)]
17450 pub fn put_var_name(&mut self,j_ : i32,name_ : &str) -> Result<(),String> {
17451 let __tmp_1 = CString::new(name_).unwrap();
17452 self.handle_res(unsafe { MSK_putvarname(self.ptr,j_,__tmp_1.as_ptr()) },"put_var_name")?;
17453 return Result::Ok(());
17454 } // putvarname
17455 /// Sets the primal and dual solution information for a single variable.
17456 ///
17457 /// # Arguments
17458 ///
17459 /// - `j_` Index of the variable.
17460 /// - `whichsol_` Selects a solution.
17461 ///
17462 /// See [Soltype]
17463 /// - `sk_` Status key of the variable.
17464 ///
17465 /// See [Stakey]
17466 /// - `x_` Primal solution value of the variable.
17467 /// - `sl_` Solution value of the dual variable associated with the lower bound.
17468 /// - `su_` Solution value of the dual variable associated with the upper bound.
17469 /// - `sn_` Solution value of the dual variable associated with the conic constraint.
17470 ///
17471 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putvarsolutionj>
17472 #[allow(unused_parens)]
17473 pub fn put_var_solution_j(&mut self,j_ : i32,whichsol_ : i32,sk_ : i32,x_ : f64,sl_ : f64,su_ : f64,sn_ : f64) -> Result<(),String> {
17474 self.handle_res(unsafe { MSK_putvarsolutionj(self.ptr,j_,whichsol_,sk_,x_,sl_,su_,sn_) },"put_var_solution_j")?;
17475 return Result::Ok(());
17476 } // putvarsolutionj
17477 /// Sets the variable type of one variable.
17478 ///
17479 /// # Arguments
17480 ///
17481 /// - `j_` Index of the variable.
17482 /// - `vartype_` The new variable type.
17483 ///
17484 /// See [Variabletype]
17485 ///
17486 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putvartype>
17487 #[allow(unused_parens)]
17488 pub fn put_var_type(&mut self,j_ : i32,vartype_ : i32) -> Result<(),String> {
17489 self.handle_res(unsafe { MSK_putvartype(self.ptr,j_,vartype_) },"put_var_type")?;
17490 return Result::Ok(());
17491 } // putvartype
17492 /// Sets the variable type for one or more variables.
17493 ///
17494 /// # Arguments
17495 ///
17496 /// - `subj_` A list of variable indexes for which the variable type should be changed.
17497 /// - `vartype_` A list of variable types.
17498 ///
17499 /// See [Variabletype]
17500 ///
17501 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putvartypelist>
17502 #[allow(unused_parens)]
17503 pub fn put_var_type_list(&mut self,subj_ : &[i32],vartype_ : &[i32]) -> Result<(),String> {
17504 let num_ : i32 = std::cmp::min(subj_.len(),vartype_.len()) as i32;
17505 self.handle_res(unsafe { MSK_putvartypelist(self.ptr,num_,subj_.as_ptr(),vartype_.as_ptr()) },"put_var_type_list")?;
17506 return Result::Ok(());
17507 } // putvartypelist
17508 /// Sets the xc vector for a solution.
17509 ///
17510 /// # Arguments
17511 ///
17512 /// - `whichsol_` Selects a solution.
17513 ///
17514 /// See [Soltype]
17515 /// - `xc_` Primal constraint solution.
17516 ///
17517 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putxc>
17518 #[allow(unused_parens)]
17519 pub fn put_xc(&mut self,whichsol_ : i32,xc_ : &mut[f64]) -> Result<(),String> {
17520 let mut __tmp_0 : i32 = i32::default();
17521 let __tmp_1 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumcon")?;
17522 if xc_.len() != (__tmp_0).try_into().unwrap() {
17523 return Result::Err("put_xc: Argument 'xc' has the wrong length, expected __tmp_0".to_string());
17524 }
17525 self.handle_res(unsafe { MSK_putxc(self.ptr,whichsol_,xc_.as_mut_ptr()) },"put_xc")?;
17526 return Result::Ok(());
17527 } // putxc
17528 /// Sets a slice of the xc vector for a solution.
17529 ///
17530 /// # Arguments
17531 ///
17532 /// - `whichsol_` Selects a solution.
17533 ///
17534 /// See [Soltype]
17535 /// - `first_` First index in the sequence.
17536 /// - `last_` Last index plus 1 in the sequence.
17537 /// - `xc_` Primal constraint solution.
17538 ///
17539 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putxcslice>
17540 #[allow(unused_parens)]
17541 pub fn put_xc_slice(&mut self,whichsol_ : i32,first_ : i32,last_ : i32,xc_ : &[f64]) -> Result<(),String> {
17542 if xc_.len() != ((last_-first_)).try_into().unwrap() {
17543 return Result::Err("put_xc_slice: Argument 'xc' has the wrong length, expected (last_-first_)".to_string());
17544 }
17545 self.handle_res(unsafe { MSK_putxcslice(self.ptr,whichsol_,first_,last_,xc_.as_ptr()) },"put_xc_slice")?;
17546 return Result::Ok(());
17547 } // putxcslice
17548 /// Sets the xx vector for a solution.
17549 ///
17550 /// # Arguments
17551 ///
17552 /// - `whichsol_` Selects a solution.
17553 ///
17554 /// See [Soltype]
17555 /// - `xx_` Primal variable solution.
17556 ///
17557 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putxx>
17558 #[allow(unused_parens)]
17559 pub fn put_xx(&mut self,whichsol_ : i32,xx_ : &[f64]) -> Result<(),String> {
17560 let mut __tmp_0 : i32 = i32::default();
17561 let __tmp_1 = unsafe { MSK_getnumvar(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumvar")?;
17562 if xx_.len() != (__tmp_0).try_into().unwrap() {
17563 return Result::Err("put_xx: Argument 'xx' has the wrong length, expected __tmp_0".to_string());
17564 }
17565 self.handle_res(unsafe { MSK_putxx(self.ptr,whichsol_,xx_.as_ptr()) },"put_xx")?;
17566 return Result::Ok(());
17567 } // putxx
17568 /// Sets a slice of the xx vector for a solution.
17569 ///
17570 /// # Arguments
17571 ///
17572 /// - `whichsol_` Selects a solution.
17573 ///
17574 /// See [Soltype]
17575 /// - `first_` First index in the sequence.
17576 /// - `last_` Last index plus 1 in the sequence.
17577 /// - `xx_` Primal variable solution.
17578 ///
17579 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putxxslice>
17580 #[allow(unused_parens)]
17581 pub fn put_xx_slice(&mut self,whichsol_ : i32,first_ : i32,last_ : i32,xx_ : &[f64]) -> Result<(),String> {
17582 if xx_.len() != ((last_-first_)).try_into().unwrap() {
17583 return Result::Err("put_xx_slice: Argument 'xx' has the wrong length, expected (last_-first_)".to_string());
17584 }
17585 self.handle_res(unsafe { MSK_putxxslice(self.ptr,whichsol_,first_,last_,xx_.as_ptr()) },"put_xx_slice")?;
17586 return Result::Ok(());
17587 } // putxxslice
17588 /// Sets the y vector for a solution.
17589 ///
17590 /// # Arguments
17591 ///
17592 /// - `whichsol_` Selects a solution.
17593 ///
17594 /// See [Soltype]
17595 /// - `y_` Vector of dual variables corresponding to the constraints.
17596 ///
17597 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.puty>
17598 #[allow(unused_parens)]
17599 pub fn put_y(&mut self,whichsol_ : i32,y_ : &[f64]) -> Result<(),String> {
17600 let mut __tmp_0 : i32 = i32::default();
17601 let __tmp_1 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumcon")?;
17602 if y_.len() != (__tmp_0).try_into().unwrap() {
17603 return Result::Err("put_y: Argument 'y' has the wrong length, expected __tmp_0".to_string());
17604 }
17605 self.handle_res(unsafe { MSK_puty(self.ptr,whichsol_,y_.as_ptr()) },"put_y")?;
17606 return Result::Ok(());
17607 } // puty
17608 /// Sets a slice of the y vector for a solution.
17609 ///
17610 /// # Arguments
17611 ///
17612 /// - `whichsol_` Selects a solution.
17613 ///
17614 /// See [Soltype]
17615 /// - `first_` First index in the sequence.
17616 /// - `last_` Last index plus 1 in the sequence.
17617 /// - `y_` Vector of dual variables corresponding to the constraints.
17618 ///
17619 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putyslice>
17620 #[allow(unused_parens)]
17621 pub fn put_y_slice(&mut self,whichsol_ : i32,first_ : i32,last_ : i32,y_ : &[f64]) -> Result<(),String> {
17622 if y_.len() != ((last_-first_)).try_into().unwrap() {
17623 return Result::Err("put_y_slice: Argument 'y' has the wrong length, expected (last_-first_)".to_string());
17624 }
17625 self.handle_res(unsafe { MSK_putyslice(self.ptr,whichsol_,first_,last_,y_.as_ptr()) },"put_y_slice")?;
17626 return Result::Ok(());
17627 } // putyslice
17628 /// Read a binary dump of the task solution and information items.
17629 ///
17630 /// # Arguments
17631 ///
17632 /// - `filename_` A valid file name.
17633 /// - `compress_` Data compression type.
17634 ///
17635 /// See [Compresstype]
17636 ///
17637 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readbsolution>
17638 #[allow(unused_parens)]
17639 pub fn read_b_solution(&self,filename_ : &str,compress_ : i32) -> Result<(),String> {
17640 let __tmp_1 = CString::new(filename_).unwrap();
17641 self.handle_res(unsafe { MSK_readbsolution(self.ptr,__tmp_1.as_ptr(),compress_) },"read_b_solution")?;
17642 return Result::Ok(());
17643 } // readbsolution
17644 /// Reads problem data from a file.
17645 ///
17646 /// # Arguments
17647 ///
17648 /// - `filename_` A valid file name.
17649 ///
17650 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readdataautoformat>
17651 #[allow(unused_parens)]
17652 pub fn read_data(&mut self,filename_ : &str) -> Result<(),String> {
17653 let __tmp_1 = CString::new(filename_).unwrap();
17654 self.handle_res(unsafe { MSK_readdataautoformat(self.ptr,__tmp_1.as_ptr()) },"read_data")?;
17655 return Result::Ok(());
17656 } // readdataautoformat
17657 /// Reads problem data from a file.
17658 ///
17659 /// # Arguments
17660 ///
17661 /// - `filename_` A valid file name.
17662 /// - `format_` File data format.
17663 ///
17664 /// See [Dataformat]
17665 /// - `compress_` File compression type.
17666 ///
17667 /// See [Compresstype]
17668 ///
17669 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readdataformat>
17670 #[allow(unused_parens)]
17671 pub fn read_data_format(&mut self,filename_ : &str,format_ : i32,compress_ : i32) -> Result<(),String> {
17672 let __tmp_1 = CString::new(filename_).unwrap();
17673 self.handle_res(unsafe { MSK_readdataformat(self.ptr,__tmp_1.as_ptr(),format_,compress_) },"read_data_format")?;
17674 return Result::Ok(());
17675 } // readdataformat
17676 /// Reads a solution from a JSOL file.
17677 ///
17678 /// # Arguments
17679 ///
17680 /// - `filename_` A valid file name.
17681 ///
17682 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readjsonsol>
17683 #[allow(unused_parens)]
17684 pub fn read_json_sol(&mut self,filename_ : &str) -> Result<(),String> {
17685 let __tmp_1 = CString::new(filename_).unwrap();
17686 self.handle_res(unsafe { MSK_readjsonsol(self.ptr,__tmp_1.as_ptr()) },"read_json_sol")?;
17687 return Result::Ok(());
17688 } // readjsonsol
17689 /// Load task data from a string in JSON format.
17690 ///
17691 /// # Arguments
17692 ///
17693 /// - `data_` Problem data in text format.
17694 ///
17695 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readjsonstring>
17696 #[allow(unused_parens)]
17697 pub fn read_json_string(&mut self,data_ : &str) -> Result<(),String> {
17698 let __tmp_1 = CString::new(data_).unwrap();
17699 self.handle_res(unsafe { MSK_readjsonstring(self.ptr,__tmp_1.as_ptr()) },"read_json_string")?;
17700 return Result::Ok(());
17701 } // readjsonstring
17702 /// Load task data from a string in LP format.
17703 ///
17704 /// # Arguments
17705 ///
17706 /// - `data_` Problem data in text format.
17707 ///
17708 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readlpstring>
17709 #[allow(unused_parens)]
17710 pub fn read_lp_string(&mut self,data_ : &str) -> Result<(),String> {
17711 let __tmp_1 = CString::new(data_).unwrap();
17712 self.handle_res(unsafe { MSK_readlpstring(self.ptr,__tmp_1.as_ptr()) },"read_lp_string")?;
17713 return Result::Ok(());
17714 } // readlpstring
17715 /// Load task data from a string in OPF format.
17716 ///
17717 /// # Arguments
17718 ///
17719 /// - `data_` Problem data in text format.
17720 ///
17721 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readopfstring>
17722 #[allow(unused_parens)]
17723 pub fn read_opf_string(&mut self,data_ : &str) -> Result<(),String> {
17724 let __tmp_1 = CString::new(data_).unwrap();
17725 self.handle_res(unsafe { MSK_readopfstring(self.ptr,__tmp_1.as_ptr()) },"read_opf_string")?;
17726 return Result::Ok(());
17727 } // readopfstring
17728 /// Reads a parameter file.
17729 ///
17730 /// # Arguments
17731 ///
17732 /// - `filename_` A valid file name.
17733 ///
17734 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readparamfile>
17735 #[allow(unused_parens)]
17736 pub fn read_param_file(&mut self,filename_ : &str) -> Result<(),String> {
17737 let __tmp_1 = CString::new(filename_).unwrap();
17738 self.handle_res(unsafe { MSK_readparamfile(self.ptr,__tmp_1.as_ptr()) },"read_param_file")?;
17739 return Result::Ok(());
17740 } // readparamfile
17741 /// Load task data from a string in PTF format.
17742 ///
17743 /// # Arguments
17744 ///
17745 /// - `data_` Problem data in text format.
17746 ///
17747 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readptfstring>
17748 #[allow(unused_parens)]
17749 pub fn read_ptf_string(&mut self,data_ : &str) -> Result<(),String> {
17750 let __tmp_1 = CString::new(data_).unwrap();
17751 self.handle_res(unsafe { MSK_readptfstring(self.ptr,__tmp_1.as_ptr()) },"read_ptf_string")?;
17752 return Result::Ok(());
17753 } // readptfstring
17754 /// Reads a solution from a file.
17755 ///
17756 /// # Arguments
17757 ///
17758 /// - `whichsol_` Selects a solution.
17759 ///
17760 /// See [Soltype]
17761 /// - `filename_` A valid file name.
17762 ///
17763 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readsolution>
17764 #[allow(unused_parens)]
17765 pub fn read_solution(&mut self,whichsol_ : i32,filename_ : &str) -> Result<(),String> {
17766 let __tmp_1 = CString::new(filename_).unwrap();
17767 self.handle_res(unsafe { MSK_readsolution(self.ptr,whichsol_,__tmp_1.as_ptr()) },"read_solution")?;
17768 return Result::Ok(());
17769 } // readsolution
17770 /// Read solution file in format determined by the filename
17771 ///
17772 /// # Arguments
17773 ///
17774 /// - `filename_` A valid file name.
17775 ///
17776 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readsolutionfile>
17777 #[allow(unused_parens)]
17778 pub fn read_solution_file(&self,filename_ : &str) -> Result<(),String> {
17779 let __tmp_1 = CString::new(filename_).unwrap();
17780 self.handle_res(unsafe { MSK_readsolutionfile(self.ptr,__tmp_1.as_ptr()) },"read_solution_file")?;
17781 return Result::Ok(());
17782 } // readsolutionfile
17783 /// Prints information about last file read.
17784 ///
17785 /// # Arguments
17786 ///
17787 /// - `whichstream_` Index of the stream.
17788 ///
17789 /// See [Streamtype]
17790 ///
17791 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readsummary>
17792 #[allow(unused_parens)]
17793 pub fn read_summary(&mut self,whichstream_ : i32) -> Result<(),String> {
17794 self.handle_res(unsafe { MSK_readsummary(self.ptr,whichstream_) },"read_summary")?;
17795 return Result::Ok(());
17796 } // readsummary
17797 /// Load task data from a file.
17798 ///
17799 /// # Arguments
17800 ///
17801 /// - `filename_` A valid file name.
17802 ///
17803 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.readtask>
17804 #[allow(unused_parens)]
17805 pub fn read_task(&mut self,filename_ : &str) -> Result<(),String> {
17806 let __tmp_1 = CString::new(filename_).unwrap();
17807 self.handle_res(unsafe { MSK_readtask(self.ptr,__tmp_1.as_ptr()) },"read_task")?;
17808 return Result::Ok(());
17809 } // readtask
17810 /// Removes a number of symmetric matrices.
17811 ///
17812 /// # Arguments
17813 ///
17814 /// - `subset_` Indexes of symmetric matrices which should be removed.
17815 ///
17816 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.removebarvars>
17817 #[allow(unused_parens)]
17818 pub fn remove_barvars(&mut self,subset_ : &[i32]) -> Result<(),String> {
17819 let num_ : i32 = subset_.len() as i32;
17820 self.handle_res(unsafe { MSK_removebarvars(self.ptr,num_,subset_.as_ptr()) },"remove_barvars")?;
17821 return Result::Ok(());
17822 } // removebarvars
17823 /// Removes a number of conic constraints from the problem.
17824 ///
17825 /// # Arguments
17826 ///
17827 /// - `subset_` Indexes of cones which should be removed.
17828 ///
17829 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.removecones>
17830 #[allow(unused_parens)]
17831 pub fn remove_cones(&mut self,subset_ : &[i32]) -> Result<(),String> {
17832 let num_ : i32 = subset_.len() as i32;
17833 self.handle_res(unsafe { MSK_removecones(self.ptr,num_,subset_.as_ptr()) },"remove_cones")?;
17834 return Result::Ok(());
17835 } // removecones
17836 /// Removes a number of constraints.
17837 ///
17838 /// # Arguments
17839 ///
17840 /// - `subset_` Indexes of constraints which should be removed.
17841 ///
17842 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.removecons>
17843 #[allow(unused_parens)]
17844 pub fn remove_cons(&mut self,subset_ : &[i32]) -> Result<(),String> {
17845 let num_ : i32 = subset_.len() as i32;
17846 self.handle_res(unsafe { MSK_removecons(self.ptr,num_,subset_.as_ptr()) },"remove_cons")?;
17847 return Result::Ok(());
17848 } // removecons
17849 /// Removes a number of variables.
17850 ///
17851 /// # Arguments
17852 ///
17853 /// - `subset_` Indexes of variables which should be removed.
17854 ///
17855 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.removevars>
17856 #[allow(unused_parens)]
17857 pub fn remove_vars(&mut self,subset_ : &[i32]) -> Result<(),String> {
17858 let num_ : i32 = subset_.len() as i32;
17859 self.handle_res(unsafe { MSK_removevars(self.ptr,num_,subset_.as_ptr()) },"remove_vars")?;
17860 return Result::Ok(());
17861 } // removevars
17862 /// Resets a double parameter to its default value.
17863 ///
17864 /// # Arguments
17865 ///
17866 /// - `param_` Which parameter.
17867 ///
17868 /// See [Dparam]
17869 ///
17870 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.resetdouparam>
17871 #[allow(unused_parens)]
17872 pub fn reset_dou_param(&mut self,param_ : i32) -> Result<(),String> {
17873 self.handle_res(unsafe { MSK_resetdouparam(self.ptr,param_) },"reset_dou_param")?;
17874 return Result::Ok(());
17875 } // resetdouparam
17876 /// Resets an integer parameter to its default value.
17877 ///
17878 /// # Arguments
17879 ///
17880 /// - `param_` Which parameter.
17881 ///
17882 /// See [Iparam]
17883 ///
17884 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.resetintparam>
17885 #[allow(unused_parens)]
17886 pub fn reset_int_param(&mut self,param_ : i32) -> Result<(),String> {
17887 self.handle_res(unsafe { MSK_resetintparam(self.ptr,param_) },"reset_int_param")?;
17888 return Result::Ok(());
17889 } // resetintparam
17890 /// Resets all parameter values.
17891 ///
17892 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.resetparameters>
17893 #[allow(unused_parens)]
17894 pub fn reset_parameters(&mut self) -> Result<(),String> {
17895 self.handle_res(unsafe { MSK_resetparameters(self.ptr) },"reset_parameters")?;
17896 return Result::Ok(());
17897 } // resetparameters
17898 /// Resets a string parameter to its defalt value.
17899 ///
17900 /// # Arguments
17901 ///
17902 /// - `param_` Which parameter.
17903 ///
17904 /// See [Sparam]
17905 ///
17906 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.resetstrparam>
17907 #[allow(unused_parens)]
17908 pub fn reset_str_param(&mut self,param_ : i32) -> Result<(),String> {
17909 self.handle_res(unsafe { MSK_resetstrparam(self.ptr,param_) },"reset_str_param")?;
17910 return Result::Ok(());
17911 } // resetstrparam
17912 /// Resizes an optimization task.
17913 ///
17914 /// # Arguments
17915 ///
17916 /// - `maxnumcon_` New maximum number of constraints.
17917 /// - `maxnumvar_` New maximum number of variables.
17918 /// - `maxnumcone_` New maximum number of cones.
17919 /// - `maxnumanz_` New maximum number of linear non-zero elements.
17920 /// - `maxnumqnz_` New maximum number of quadratic non-zeros elements.
17921 ///
17922 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.resizetask>
17923 #[allow(unused_parens)]
17924 pub fn resize_task(&mut self,maxnumcon_ : i32,maxnumvar_ : i32,maxnumcone_ : i32,maxnumanz_ : i64,maxnumqnz_ : i64) -> Result<(),String> {
17925 self.handle_res(unsafe { MSK_resizetask(self.ptr,maxnumcon_,maxnumvar_,maxnumcone_,maxnumanz_,maxnumqnz_) },"resize_task")?;
17926 return Result::Ok(());
17927 } // resizetask
17928 /// Creates a sensitivity report.
17929 ///
17930 /// # Arguments
17931 ///
17932 /// - `whichstream_` Index of the stream.
17933 ///
17934 /// See [Streamtype]
17935 ///
17936 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.sensitivityreport>
17937 #[allow(unused_parens)]
17938 pub fn sensitivity_report(&self,whichstream_ : i32) -> Result<(),String> {
17939 self.handle_res(unsafe { MSK_sensitivityreport(self.ptr,whichstream_) },"sensitivity_report")?;
17940 return Result::Ok(());
17941 } // sensitivityreport
17942 /// Checks whether a solution is defined.
17943 ///
17944 /// # Arguments
17945 ///
17946 /// - `whichsol_` Selects a solution.
17947 ///
17948 /// See [Soltype]
17949 ///
17950 /// # Returns
17951 ///
17952 /// - `isdef` Is non-zero if the requested solution is defined.
17953 ///
17954 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.solutiondef>
17955 #[allow(unused_parens)]
17956 pub fn solution_def(&self,whichsol_ : i32) -> Result<bool,String> {
17957 let mut __tmp_0 : i32 = 0;
17958 self.handle_res(unsafe { MSK_solutiondef(self.ptr,whichsol_,&mut __tmp_0) },"solution_def")?;
17959 return Result::Ok(__tmp_0 != 0);
17960 } // solutiondef
17961 /// Prints a short summary of the current solutions.
17962 ///
17963 /// # Arguments
17964 ///
17965 /// - `whichstream_` Index of the stream.
17966 ///
17967 /// See [Streamtype]
17968 ///
17969 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.solutionsummary>
17970 #[allow(unused_parens)]
17971 pub fn solution_summary(&self,whichstream_ : i32) -> Result<(),String> {
17972 self.handle_res(unsafe { MSK_solutionsummary(self.ptr,whichstream_) },"solution_summary")?;
17973 return Result::Ok(());
17974 } // solutionsummary
17975 /// Solve a linear equation system involving a basis matrix.
17976 ///
17977 /// # Arguments
17978 ///
17979 /// - `transp_` Controls which problem formulation is solved.
17980 /// - `numnz_` Input (number of non-zeros in right-hand side).
17981 /// - `sub_` Input (indexes of non-zeros in right-hand side) and output (indexes of non-zeros in solution vector).
17982 /// - `val_` Input (right-hand side values) and output (solution vector values).
17983 ///
17984 /// # Returns
17985 ///
17986 /// - `numnzout` Output (number of non-zeros in solution vector).
17987 ///
17988 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.solvewithbasis>
17989 #[allow(unused_parens)]
17990 pub fn solve_with_basis(&mut self,transp_ : bool,numnz_ : i32,sub_ : &mut[i32],val_ : &mut[f64]) -> Result<i32,String> {
17991 let mut __tmp_0 : i32 = i32::default();
17992 let __tmp_1 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_0) };let _ = self.handle_res(__tmp_1,"getnumcon")?;
17993 if sub_.len() != (__tmp_0).try_into().unwrap() {
17994 return Result::Err("solve_with_basis: Argument 'sub' has the wrong length, expected __tmp_0".to_string());
17995 }
17996 let mut __tmp_2 : i32 = i32::default();
17997 let __tmp_3 = unsafe { MSK_getnumcon(self.ptr,&mut __tmp_2) };let _ = self.handle_res(__tmp_3,"getnumcon")?;
17998 if val_.len() != (__tmp_2).try_into().unwrap() {
17999 return Result::Err("solve_with_basis: Argument 'val' has the wrong length, expected __tmp_2".to_string());
18000 }
18001 let mut __tmp_4 : i32 = i32::default();
18002 self.handle_res(unsafe { MSK_solvewithbasis(self.ptr,transp_,numnz_,sub_.as_mut_ptr(),val_.as_mut_ptr(),&mut __tmp_4) },"solve_with_basis")?;
18003 return Result::Ok(__tmp_4);
18004 } // solvewithbasis
18005 /// Obtains a cone type code.
18006 ///
18007 /// # Arguments
18008 ///
18009 /// - `str_` String corresponding to the cone type code.
18010 /// - `conetype_` The cone type corresponding to str.
18011 ///
18012 /// See [Conetype]
18013 ///
18014 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.strtoconetype>
18015 #[allow(unused_parens)]
18016 pub fn str_to_cone_type(&self,str_ : &str,conetype_ : & mut i32) -> Result<(),String> {
18017 let __tmp_1 = CString::new(str_).unwrap();
18018 self.handle_res(unsafe { MSK_strtoconetype(self.ptr,__tmp_1.as_ptr(),conetype_) },"str_to_cone_type")?;
18019 return Result::Ok(());
18020 } // strtoconetype
18021 /// Obtains a status key.
18022 ///
18023 /// # Arguments
18024 ///
18025 /// - `str_` A status key abbreviation string.
18026 /// - `sk_` Status key corresponding to the string.
18027 ///
18028 /// See [Stakey]
18029 ///
18030 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.strtosk>
18031 #[allow(unused_parens)]
18032 pub fn str_to_sk(&self,str_ : &str,sk_ : & mut i32) -> Result<(),String> {
18033 let __tmp_1 = CString::new(str_).unwrap();
18034 self.handle_res(unsafe { MSK_strtosk(self.ptr,__tmp_1.as_ptr(),sk_) },"str_to_sk")?;
18035 return Result::Ok(());
18036 } // strtosk
18037 /// In-place reformulation of a QCQO to a conic quadratic problem.
18038 ///
18039 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.toconic>
18040 #[allow(unused_parens)]
18041 pub fn toconic(&mut self) -> Result<(),String> {
18042 self.handle_res(unsafe { MSK_toconic(self.ptr) },"toconic")?;
18043 return Result::Ok(());
18044 } // toconic
18045 /// Disconnects a user-defined function from a task stream.
18046 ///
18047 /// # Arguments
18048 ///
18049 /// - `whichstream_` Index of the stream.
18050 ///
18051 /// See [Streamtype]
18052 ///
18053 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.unlinkfuncfromtaskstream>
18054 #[allow(unused_parens)]
18055 pub fn unlink_func_from_stream(&mut self,whichstream_ : i32) -> Result<(),String> {
18056 self.handle_res(unsafe { MSK_unlinkfuncfromtaskstream(self.ptr,whichstream_) },"unlink_func_from_stream")?;
18057 return Result::Ok(());
18058 } // unlinkfuncfromtaskstream
18059 /// Update the information items related to the solution.
18060 ///
18061 /// # Arguments
18062 ///
18063 /// - `whichsol_` Selects a solution.
18064 ///
18065 /// See [Soltype]
18066 ///
18067 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.updatesolutioninfo>
18068 #[allow(unused_parens)]
18069 pub fn update_solution_info(&mut self,whichsol_ : i32) -> Result<(),String> {
18070 self.handle_res(unsafe { MSK_updatesolutioninfo(self.ptr,whichsol_) },"update_solution_info")?;
18071 return Result::Ok(());
18072 } // updatesolutioninfo
18073 /// Checks a parameter name.
18074 ///
18075 /// # Arguments
18076 ///
18077 /// - `parname_` Parameter name.
18078 /// - `partype_` Parameter type.
18079 ///
18080 /// See [Parametertype]
18081 /// - `param_` Which parameter.
18082 ///
18083 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.whichparam>
18084 #[allow(unused_parens)]
18085 pub fn which_param(&self,parname_ : &str,partype_ : & mut i32,param_ : &mut i32) -> Result<(),String> {
18086 let __tmp_1 = CString::new(parname_).unwrap();
18087 self.handle_res(unsafe { MSK_whichparam(self.ptr,__tmp_1.as_ptr(),partype_,param_) },"which_param")?;
18088 return Result::Ok(());
18089 } // whichparam
18090 /// Write a binary dump of the task solution and information items.
18091 ///
18092 /// # Arguments
18093 ///
18094 /// - `filename_` A valid file name.
18095 /// - `compress_` Data compression type.
18096 ///
18097 /// See [Compresstype]
18098 ///
18099 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.writebsolution>
18100 #[allow(unused_parens)]
18101 pub fn write_b_solution(&self,filename_ : &str,compress_ : i32) -> Result<(),String> {
18102 let __tmp_1 = CString::new(filename_).unwrap();
18103 self.handle_res(unsafe { MSK_writebsolution(self.ptr,__tmp_1.as_ptr(),compress_) },"write_b_solution")?;
18104 return Result::Ok(());
18105 } // writebsolution
18106 /// Writes problem data to a file.
18107 ///
18108 /// # Arguments
18109 ///
18110 /// - `filename_` A valid file name.
18111 ///
18112 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.writedata>
18113 #[allow(unused_parens)]
18114 pub fn write_data(&self,filename_ : &str) -> Result<(),String> {
18115 let __tmp_1 = CString::new(filename_).unwrap();
18116 self.handle_res(unsafe { MSK_writedata(self.ptr,__tmp_1.as_ptr()) },"write_data")?;
18117 return Result::Ok(());
18118 } // writedata
18119 /// Writes a solution to a JSON file.
18120 ///
18121 /// # Arguments
18122 ///
18123 /// - `filename_` A valid file name.
18124 ///
18125 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.writejsonsol>
18126 #[allow(unused_parens)]
18127 pub fn write_json_sol(&self,filename_ : &str) -> Result<(),String> {
18128 let __tmp_1 = CString::new(filename_).unwrap();
18129 self.handle_res(unsafe { MSK_writejsonsol(self.ptr,__tmp_1.as_ptr()) },"write_json_sol")?;
18130 return Result::Ok(());
18131 } // writejsonsol
18132 /// Writes all the parameters to a parameter file.
18133 ///
18134 /// # Arguments
18135 ///
18136 /// - `filename_` A valid file name.
18137 ///
18138 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.writeparamfile>
18139 #[allow(unused_parens)]
18140 pub fn write_param_file(&self,filename_ : &str) -> Result<(),String> {
18141 let __tmp_1 = CString::new(filename_).unwrap();
18142 self.handle_res(unsafe { MSK_writeparamfile(self.ptr,__tmp_1.as_ptr()) },"write_param_file")?;
18143 return Result::Ok(());
18144 } // writeparamfile
18145 /// Write a solution to a file.
18146 ///
18147 /// # Arguments
18148 ///
18149 /// - `whichsol_` Selects a solution.
18150 ///
18151 /// See [Soltype]
18152 /// - `filename_` A valid file name.
18153 ///
18154 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.writesolution>
18155 #[allow(unused_parens)]
18156 pub fn write_solution(&self,whichsol_ : i32,filename_ : &str) -> Result<(),String> {
18157 let __tmp_1 = CString::new(filename_).unwrap();
18158 self.handle_res(unsafe { MSK_writesolution(self.ptr,whichsol_,__tmp_1.as_ptr()) },"write_solution")?;
18159 return Result::Ok(());
18160 } // writesolution
18161 /// Write solution file in format determined by the filename
18162 ///
18163 /// # Arguments
18164 ///
18165 /// - `filename_` A valid file name.
18166 ///
18167 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.writesolutionfile>
18168 #[allow(unused_parens)]
18169 pub fn write_solution_file(&self,filename_ : &str) -> Result<(),String> {
18170 let __tmp_1 = CString::new(filename_).unwrap();
18171 self.handle_res(unsafe { MSK_writesolutionfile(self.ptr,__tmp_1.as_ptr()) },"write_solution_file")?;
18172 return Result::Ok(());
18173 } // writesolutionfile
18174 /// Appends a record to the statistics file.
18175 ///
18176 /// # Arguments
18177 ///
18178 /// - `filename_` A valid file name.
18179 ///
18180 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.writestat>
18181 #[allow(unused_parens)]
18182 pub fn write_stat(&mut self,filename_ : &str) -> Result<(),String> {
18183 let __tmp_1 = CString::new(filename_).unwrap();
18184 self.handle_res(unsafe { MSK_writestat(self.ptr,__tmp_1.as_ptr()) },"write_stat")?;
18185 return Result::Ok(());
18186 } // writestat
18187 /// Write a complete binary dump of the task data.
18188 ///
18189 /// # Arguments
18190 ///
18191 /// - `filename_` A valid file name.
18192 ///
18193 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.writetask>
18194 #[allow(unused_parens)]
18195 pub fn write_task(&self,filename_ : &str) -> Result<(),String> {
18196 let __tmp_1 = CString::new(filename_).unwrap();
18197 self.handle_res(unsafe { MSK_writetask(self.ptr,__tmp_1.as_ptr()) },"write_task")?;
18198 return Result::Ok(());
18199 } // writetask
18200 /// Internal
18201 ///
18202 /// # Arguments
18203 ///
18204 /// - `filename_` A valid file name.
18205 /// - `compress_` Data compression type.
18206 ///
18207 /// See [Compresstype]
18208 ///
18209 /// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.writetasksolverresult_file>
18210 #[allow(unused_parens)]
18211 pub fn write_task_solver_result_file(&self,filename_ : &str,compress_ : i32) -> Result<(),String> {
18212 let __tmp_1 = CString::new(filename_).unwrap();
18213 self.handle_res(unsafe { MSK_writetasksolverresult_file(self.ptr,__tmp_1.as_ptr(),compress_) },"write_task_solver_result_file")?;
18214 return Result::Ok(());
18215 } // writetasksolverresult_file
18216
18217}
18218
18219impl Drop for Env
18220{
18221 fn drop( & mut self)
18222 {
18223 let mut env = self.ptr;
18224 unsafe { MSK_deleteenv(& mut env); };
18225 }
18226}
18227
18228impl Drop for Task
18229{
18230 fn drop( & mut self)
18231 {
18232 let mut task = self.ptr;
18233 unsafe { MSK_deletetask(& mut task) };
18234 }
18235}
18236
18237
18238/// Computes vector addition and multiplication by a scalar.
18239///
18240/// # Arguments
18241///
18242/// - `n_` Length of the vectors.
18243/// - `alpha_` The scalar that multiplies x.
18244/// - `x_` The x vector.
18245/// - `y_` The y vector.
18246///
18247/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.axpy>
18248#[allow(unused_parens)]
18249pub fn axpy(n_ : i32,alpha_ : f64,x_ : &[f64],y_ : &mut[f64]) -> Result<(),String> {
18250 if x_.len() != (n_).try_into().unwrap() {
18251 return Result::Err("axpy: Argument 'x' has the wrong length, expected n_".to_string());
18252 }
18253 if y_.len() != (n_).try_into().unwrap() {
18254 return Result::Err("axpy: Argument 'y' has the wrong length, expected n_".to_string());
18255 }
18256 handle_res_static(unsafe { MSK_axpy(std::ptr::null(),n_,alpha_,x_.as_ptr(),y_.as_mut_ptr()) },"axpy")?;
18257 return Result::Ok(());
18258} // axpy
18259/// Check in all unused license features to the license token server.
18260///
18261/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.checkinall>
18262#[allow(unused_parens)]
18263pub fn check_in_all() -> Result<(),String> {
18264 handle_res_static(unsafe { MSK_checkinall(std::ptr::null()) },"check_in_all")?;
18265 return Result::Ok(());
18266} // checkinall
18267/// Check in a license feature back to the license server ahead of time.
18268///
18269/// # Arguments
18270///
18271/// - `feature_` Feature to check in to the license system.
18272///
18273/// See [Feature]
18274///
18275/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.checkinlicense>
18276#[allow(unused_parens)]
18277pub fn check_in_license(feature_ : i32) -> Result<(),String> {
18278 handle_res_static(unsafe { MSK_checkinlicense(std::ptr::null(),feature_) },"check_in_license")?;
18279 return Result::Ok(());
18280} // checkinlicense
18281/// Check out a license feature from the license server ahead of time.
18282///
18283/// # Arguments
18284///
18285/// - `feature_` Feature to check out from the license system.
18286///
18287/// See [Feature]
18288///
18289/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.checkoutlicense>
18290#[allow(unused_parens)]
18291pub fn check_out_license(feature_ : i32) -> Result<(),String> {
18292 handle_res_static(unsafe { MSK_checkoutlicense(std::ptr::null(),feature_) },"check_out_license")?;
18293 return Result::Ok(());
18294} // checkoutlicense
18295/// Compares a version of the MOSEK DLL with a specified version.
18296///
18297/// # Arguments
18298///
18299/// - `major_` Major version number.
18300/// - `minor_` Minor version number.
18301/// - `revision_` Revision number.
18302///
18303/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.checkversion>
18304#[allow(unused_parens)]
18305pub fn check_version(major_ : i32,minor_ : i32,revision_ : i32) -> Result<(),String> {
18306 handle_res_static(unsafe { MSK_checkversion(std::ptr::null(),major_,minor_,revision_) },"check_version")?;
18307 return Result::Ok(());
18308} // checkversion
18309/// Computes a Cholesky factorization of sparse matrix.
18310///
18311/// # Arguments
18312///
18313/// - `numthreads_` The number threads that can be used to do the computation. 0 means the code makes the choice.
18314/// - `ordermethod_` If nonzero, then a sparsity preserving ordering will be employed.
18315/// - `tolsingular_` A positive parameter controlling when a pivot is declared zero.
18316/// - `anzc_` anzc\[j\] is the number of nonzeros in the jth column of A.
18317/// - `aptrc_` aptrc\[j\] is a pointer to the first element in column j.
18318/// - `asubc_` Row indexes for each column stored in increasing order.
18319/// - `avalc_` The value corresponding to row indexed stored in asubc.
18320/// - `perm_` Permutation array used to specify the permutation matrix P computed by the function.
18321/// - `diag_` The diagonal elements of matrix D.
18322/// - `lnzc_` lnzc\[j\] is the number of non zero elements in column j.
18323/// - `lptrc_` lptrc\[j\] is a pointer to the first row index and value in column j.
18324/// - `lensubnval_` Number of elements in lsubc and lvalc.
18325/// - `lsubc_` Row indexes for each column stored in increasing order.
18326/// - `lvalc_` The values corresponding to row indexed stored in lsubc.
18327///
18328/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.computesparsecholesky>
18329#[allow(unused_parens)]
18330pub fn compute_sparse_cholesky(numthreads_ : i32,ordermethod_ : i32,tolsingular_ : f64,anzc_ : &[i32],aptrc_ : &[i64],asubc_ : &[i32],avalc_ : &[f64],perm_ : &mut Vec<i32>,diag_ : &mut Vec<f64>,lnzc_ : &mut Vec<i32>,lptrc_ : &mut Vec<i64>,lensubnval_ : &mut i64,lsubc_ : &mut Vec<i32>,lvalc_ : &mut Vec<f64>) -> Result<(),String> {
18331 let n_ : i32 = std::cmp::min(anzc_.len(),aptrc_.len()) as i32;
18332 let mut __tmp_0 : * const i32 = std::ptr::null();
18333 let mut __tmp_1 : * const f64 = std::ptr::null();
18334 let mut __tmp_2 : * const i32 = std::ptr::null();
18335 let mut __tmp_3 : * const i64 = std::ptr::null();
18336 let mut __tmp_5 : * const i32 = std::ptr::null();
18337 let mut __tmp_6 : * const f64 = std::ptr::null();
18338 handle_res_static(unsafe { MSK_computesparsecholesky(std::ptr::null(),numthreads_,ordermethod_,tolsingular_,n_,anzc_.as_ptr(),aptrc_.as_ptr(),asubc_.as_ptr(),avalc_.as_ptr(),& mut __tmp_0,& mut __tmp_1,& mut __tmp_2,& mut __tmp_3,lensubnval_,& mut __tmp_5,& mut __tmp_6) },"compute_sparse_cholesky")?;
18339 let len_perm_ : usize = n_.try_into().unwrap_or(0);
18340 perm_.resize(len_perm_,Default::default());
18341 perm_.clone_from_slice(unsafe { std::slice::from_raw_parts(__tmp_0,len_perm_) } );
18342 let _ = unsafe { MSK_freeenv(std::ptr::null(),__tmp_0 as * mut u8); };
18343 let len_diag_ : usize = n_.try_into().unwrap_or(0);
18344 diag_.resize(len_diag_,Default::default());
18345 diag_.clone_from_slice(unsafe { std::slice::from_raw_parts(__tmp_1,len_diag_) } );
18346 let _ = unsafe { MSK_freeenv(std::ptr::null(),__tmp_1 as * mut u8); };
18347 let len_lnzc_ : usize = n_.try_into().unwrap_or(0);
18348 lnzc_.resize(len_lnzc_,Default::default());
18349 lnzc_.clone_from_slice(unsafe { std::slice::from_raw_parts(__tmp_2,len_lnzc_) } );
18350 let _ = unsafe { MSK_freeenv(std::ptr::null(),__tmp_2 as * mut u8); };
18351 let len_lptrc_ : usize = n_.try_into().unwrap_or(0);
18352 lptrc_.resize(len_lptrc_,Default::default());
18353 lptrc_.clone_from_slice(unsafe { std::slice::from_raw_parts(__tmp_3,len_lptrc_) } );
18354 let _ = unsafe { MSK_freeenv(std::ptr::null(),__tmp_3 as * mut u8); };
18355 let len_lsubc_ : usize = (*lensubnval_).try_into().unwrap_or(0);
18356 lsubc_.resize(len_lsubc_,Default::default());
18357 lsubc_.clone_from_slice(unsafe { std::slice::from_raw_parts(__tmp_5,len_lsubc_) } );
18358 let _ = unsafe { MSK_freeenv(std::ptr::null(),__tmp_5 as * mut u8); };
18359 let len_lvalc_ : usize = (*lensubnval_).try_into().unwrap_or(0);
18360 lvalc_.resize(len_lvalc_,Default::default());
18361 lvalc_.clone_from_slice(unsafe { std::slice::from_raw_parts(__tmp_6,len_lvalc_) } );
18362 let _ = unsafe { MSK_freeenv(std::ptr::null(),__tmp_6 as * mut u8); };
18363 return Result::Ok(());
18364} // computesparsecholesky
18365/// Computes the inner product of two vectors.
18366///
18367/// # Arguments
18368///
18369/// - `n_` Length of the vectors.
18370/// - `x_` The x vector.
18371/// - `y_` The y vector.
18372/// - `xty_` The result of the inner product.
18373///
18374/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.dot>
18375#[allow(unused_parens)]
18376pub fn dot(n_ : i32,x_ : &[f64],y_ : &[f64],xty_ : &mut f64) -> Result<(),String> {
18377 if x_.len() != (n_).try_into().unwrap() {
18378 return Result::Err("dot: Argument 'x' has the wrong length, expected n_".to_string());
18379 }
18380 if y_.len() != (n_).try_into().unwrap() {
18381 return Result::Err("dot: Argument 'y' has the wrong length, expected n_".to_string());
18382 }
18383 handle_res_static(unsafe { MSK_dot(std::ptr::null(),n_,x_.as_ptr(),y_.as_ptr(),xty_) },"dot")?;
18384 return Result::Ok(());
18385} // dot
18386/// Prints an intro to message stream.
18387///
18388/// # Arguments
18389///
18390/// - `longver_` If non-zero, then the intro is slightly longer.
18391///
18392/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.echointro>
18393#[allow(unused_parens)]
18394pub fn echo_intro(longver_ : i32) -> Result<(),String> {
18395 handle_res_static(unsafe { MSK_echointro(std::ptr::null(),longver_) },"echo_intro")?;
18396 return Result::Ok(());
18397} // echointro
18398/// Enable reference counting for environments.
18399///
18400/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.enablegarcolenv>
18401#[allow(unused_parens)]
18402pub fn enable_gar_col_env() -> Result<(),String> {
18403 handle_res_static(unsafe { MSK_enablegarcolenv(std::ptr::null()) },"enable_gar_col_env")?;
18404 return Result::Ok(());
18405} // enablegarcolenv
18406/// Reports when the first license feature expires.
18407///
18408/// # Arguments
18409///
18410/// - `expiry_` If nonnegative, then it is the minimum number days to expiry of any feature that has been checked out.
18411///
18412/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.expirylicenses>
18413#[allow(unused_parens)]
18414pub fn expirylicenses(expiry_ : &mut i64) -> Result<(),String> {
18415 handle_res_static(unsafe { MSK_expirylicenses(std::ptr::null(),expiry_) },"expirylicenses")?;
18416 return Result::Ok(());
18417} // expirylicenses
18418/// Performs a dense matrix multiplication.
18419///
18420/// # Arguments
18421///
18422/// - `transa_` Indicates whether the matrix A must be transposed.
18423///
18424/// See [Transpose]
18425/// - `transb_` Indicates whether the matrix B must be transposed.
18426///
18427/// See [Transpose]
18428/// - `m_` Indicates the number of rows of matrix C.
18429/// - `n_` Indicates the number of columns of matrix C.
18430/// - `k_` Specifies the common dimension along which op(A) and op(B) are multiplied.
18431/// - `alpha_` A scalar value multiplying the result of the matrix multiplication.
18432/// - `a_` The pointer to the array storing matrix A in a column-major format.
18433/// - `b_` The pointer to the array storing matrix B in a column-major format.
18434/// - `beta_` A scalar value that multiplies C.
18435/// - `c_` The pointer to the array storing matrix C in a column-major format.
18436///
18437/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.gemm>
18438#[allow(unused_parens)]
18439pub fn gemm(transa_ : i32,transb_ : i32,m_ : i32,n_ : i32,k_ : i32,alpha_ : f64,a_ : &[f64],b_ : &[f64],beta_ : f64,c_ : &mut[f64]) -> Result<(),String> {
18440 if a_.len() != ((m_*k_)).try_into().unwrap() {
18441 return Result::Err("gemm: Argument 'a' has the wrong length, expected (m_*k_)".to_string());
18442 }
18443 if b_.len() != ((k_*n_)).try_into().unwrap() {
18444 return Result::Err("gemm: Argument 'b' has the wrong length, expected (k_*n_)".to_string());
18445 }
18446 if c_.len() != ((m_*n_)).try_into().unwrap() {
18447 return Result::Err("gemm: Argument 'c' has the wrong length, expected (m_*n_)".to_string());
18448 }
18449 handle_res_static(unsafe { MSK_gemm(std::ptr::null(),transa_,transb_,m_,n_,k_,alpha_,a_.as_ptr(),b_.as_ptr(),beta_,c_.as_mut_ptr()) },"gemm")?;
18450 return Result::Ok(());
18451} // gemm
18452/// Computes dense matrix times a dense vector product.
18453///
18454/// # Arguments
18455///
18456/// - `transa_` Indicates whether the matrix A must be transposed.
18457///
18458/// See [Transpose]
18459/// - `m_` Specifies the number of rows of the matrix A.
18460/// - `n_` Specifies the number of columns of the matrix A.
18461/// - `alpha_` A scalar value multiplying the matrix A.
18462/// - `a_` A pointer to the array storing matrix A in a column-major format.
18463/// - `x_` A pointer to the array storing the vector x.
18464/// - `beta_` A scalar value multiplying the vector y.
18465/// - `y_` A pointer to the array storing the vector y.
18466///
18467/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.gemv>
18468#[allow(unused_parens)]
18469pub fn gemv(transa_ : i32,m_ : i32,n_ : i32,alpha_ : f64,a_ : &[f64],x_ : &[f64],beta_ : f64,y_ : &mut[f64]) -> Result<(),String> {
18470 if a_.len() != ((n_*m_)).try_into().unwrap() {
18471 return Result::Err("gemv: Argument 'a' has the wrong length, expected (n_*m_)".to_string());
18472 }
18473 let __tmp_0 = if ((transa_==Transpose::NO)) {
18474 n_
18475 }
18476 else {
18477 m_
18478 };
18479 if x_.len() != (__tmp_0).try_into().unwrap() {
18480 return Result::Err("gemv: Argument 'x' has the wrong length, expected __tmp_0".to_string());
18481 }
18482 let __tmp_1 = if ((transa_==Transpose::NO)) {
18483 m_
18484 }
18485 else {
18486 n_
18487 };
18488 if y_.len() != (__tmp_1).try_into().unwrap() {
18489 return Result::Err("gemv: Argument 'y' has the wrong length, expected __tmp_1".to_string());
18490 }
18491 handle_res_static(unsafe { MSK_gemv(std::ptr::null(),transa_,m_,n_,alpha_,a_.as_ptr(),x_.as_ptr(),beta_,y_.as_mut_ptr()) },"gemv")?;
18492 return Result::Ok(());
18493} // gemv
18494/// Obtains build information.
18495///
18496/// # Returns
18497///
18498/// - `buildstate` State of binaries, i.e. a debug, release candidate or final release.
18499/// - `builddate` Date when the binaries were built.
18500///
18501/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getbuildinfo>
18502#[allow(unused_parens)]
18503pub fn get_build_info() -> Result<(String,String),String> {
18504 let mut buildstate_ = Vec::new(); buildstate_.resize(Value::MAX_STR_LEN as usize,0);
18505 let mut builddate_ = Vec::new(); builddate_.resize(Value::MAX_STR_LEN as usize,0);
18506 handle_res_static(unsafe { MSK_getbuildinfo(buildstate_.as_mut_ptr(),builddate_.as_mut_ptr()) },"get_build_info")?;
18507 return Result::Ok((String::from_utf8_lossy(&buildstate_[..buildstate_.iter().position(|&c| c == 0).unwrap_or(Value::MAX_STR_LEN as usize)]).into_owned(),String::from_utf8_lossy(&builddate_[..builddate_.iter().position(|&c| c == 0).unwrap_or(Value::MAX_STR_LEN as usize)]).into_owned()));
18508} // getbuildinfo
18509/// Obtains a short description of a response code.
18510///
18511/// # Arguments
18512///
18513/// - `code_` A valid response code.
18514///
18515/// See [Rescode]
18516///
18517/// # Returns
18518///
18519/// - `symname` Symbolic name corresponding to the code.
18520/// - `str` Obtains a short description of a response code.
18521///
18522/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getcodedesc>
18523#[allow(unused_parens)]
18524pub fn get_code_desc(code_ : i32) -> Result<(String,String),String> {
18525 let mut symname_ = Vec::new(); symname_.resize(Value::MAX_STR_LEN as usize,0);
18526 let mut str_ = Vec::new(); str_.resize(Value::MAX_STR_LEN as usize,0);
18527 handle_res_static(unsafe { MSK_getcodedesc(code_,symname_.as_mut_ptr(),str_.as_mut_ptr()) },"get_code_desc")?;
18528 return Result::Ok((String::from_utf8_lossy(&symname_[..symname_.iter().position(|&c| c == 0).unwrap_or(Value::MAX_STR_LEN as usize)]).into_owned(),String::from_utf8_lossy(&str_[..str_.iter().position(|&c| c == 0).unwrap_or(Value::MAX_STR_LEN as usize)]).into_owned()));
18529} // getcodedesc
18530/// Obtain the class of a response code.
18531///
18532/// # Arguments
18533///
18534/// - `r_` A response code indicating the result of function call.
18535///
18536/// See [Rescode]
18537/// - `rc_` The response class.
18538///
18539/// See [Rescodetype]
18540///
18541/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getresponseclass>
18542#[allow(unused_parens)]
18543pub fn get_response_class(r_ : i32,rc_ : & mut i32) -> Result<(),String> {
18544 handle_res_static(unsafe { MSK_getresponseclass(r_,rc_) },"get_response_class")?;
18545 return Result::Ok(());
18546} // getresponseclass
18547/// Obtains MOSEK version information.
18548///
18549/// # Arguments
18550///
18551/// - `major_` Major version number.
18552/// - `minor_` Minor version number.
18553/// - `revision_` Revision number.
18554///
18555/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.getversion>
18556#[allow(unused_parens)]
18557pub fn get_version(major_ : &mut i32,minor_ : &mut i32,revision_ : &mut i32) -> Result<(),String> {
18558 handle_res_static(unsafe { MSK_getversion(major_,minor_,revision_) },"get_version")?;
18559 return Result::Ok(());
18560} // getversion
18561/// Finalize global env.
18562///
18563/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.globalenvfinalize>
18564#[allow(unused_parens)]
18565pub fn global_env_finalize() -> Result<(),String> {
18566 handle_res_static(unsafe { MSK_globalenvfinalize() },"global_env_finalize")?;
18567 return Result::Ok(());
18568} // globalenvfinalize
18569/// Initialize global env.
18570///
18571/// # Arguments
18572///
18573/// - `maxnumalloc_` If it is nonnegative then it is the maximum number of alloacations allowed.
18574/// - `dbgfile_` A user-defined file debug file.
18575///
18576/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.globalenvinitialize>
18577#[allow(unused_parens)]
18578pub fn global_env_initialize(maxnumalloc_ : i64,dbgfile_ : &str) -> Result<(),String> {
18579 let __tmp_1 = CString::new(dbgfile_).unwrap();
18580 handle_res_static(unsafe { MSK_globalenvinitialize(maxnumalloc_,__tmp_1.as_ptr()) },"global_env_initialize")?;
18581 return Result::Ok(());
18582} // globalenvinitialize
18583/// Return true if value is considered infinity by MOSEK.
18584///
18585/// # Arguments
18586///
18587/// - `value_` The value to be checked
18588///
18589/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.isinfinity>
18590#[allow(unused_parens)]
18591pub fn is_infinity(value_ : f64) -> Result<(),String> {
18592 handle_res_static(unsafe { MSK_isinfinity(value_) },"is_infinity")?;
18593 return Result::Ok(());
18594} // isinfinity
18595/// Stops all threads and delete all handles used by the license system.
18596///
18597/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.licensecleanup>
18598#[allow(unused_parens)]
18599pub fn license_cleanup() -> Result<(),String> {
18600 handle_res_static(unsafe { MSK_licensecleanup() },"license_cleanup")?;
18601 return Result::Ok(());
18602} // licensecleanup
18603/// Directs all output from a stream to a file.
18604///
18605/// # Arguments
18606///
18607/// - `whichstream_` Index of the stream.
18608///
18609/// See [Streamtype]
18610/// - `filename_` A valid file name.
18611/// - `append_` If this argument is 0 the file will be overwritten, otherwise it will be appended to.
18612///
18613/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.linkfiletoenvstream>
18614#[allow(unused_parens)]
18615pub fn link_file_to_stream(whichstream_ : i32,filename_ : &str,append_ : i32) -> Result<(),String> {
18616 let __tmp_1 = CString::new(filename_).unwrap();
18617 handle_res_static(unsafe { MSK_linkfiletoenvstream(std::ptr::null(),whichstream_,__tmp_1.as_ptr(),append_) },"link_file_to_stream")?;
18618 return Result::Ok(());
18619} // linkfiletoenvstream
18620/// Optimize a number of tasks in parallel using a specified number of threads.
18621///
18622/// # Arguments
18623///
18624/// - `israce_` If nonzero, then the function is terminated after the first task has been completed.
18625/// - `maxtime_` Time limit for the function.
18626/// - `numthreads_` Number of threads to be employed.
18627/// - `trmcode_` The termination code for each task.
18628///
18629/// See [Rescode]
18630/// - `rcode_` The response code for each task.
18631///
18632/// See [Rescode]
18633///
18634/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.optimizebatch>
18635#[allow(unused_parens)]
18636pub fn optimize_batch(israce_ : bool,maxtime_ : f64,numthreads_ : i32,task_ : &[ & mut Task ],trmcode_ : &mut[i32],rcode_ : &mut[i32]) -> Result<(),String> {
18637 let numtask_ : i64 = task_.len() as i64;
18638 let arrptrs_task : Vec<* const u8> = task_.iter().map(|t| t.ptr).collect();
18639 if trmcode_.len() != (numtask_).try_into().unwrap() {
18640 return Result::Err("optimize_batch: Argument 'trmcode' has the wrong length, expected numtask_".to_string());
18641 }
18642 if rcode_.len() != (numtask_).try_into().unwrap() {
18643 return Result::Err("optimize_batch: Argument 'rcode' has the wrong length, expected numtask_".to_string());
18644 }
18645 handle_res_static(unsafe { MSK_optimizebatch(std::ptr::null(),israce_,maxtime_,numthreads_,numtask_,arrptrs_task.as_ptr(),trmcode_.as_mut_ptr(),rcode_.as_mut_ptr()) },"optimize_batch")?;
18646 return Result::Ok(());
18647} // optimizebatch
18648/// Computes a Cholesky factorization of a dense matrix.
18649///
18650/// # Arguments
18651///
18652/// - `uplo_` Indicates whether the upper or lower triangular part of the matrix is stored.
18653///
18654/// See [Uplo]
18655/// - `n_` Dimension of the symmetric matrix.
18656/// - `a_` A symmetric matrix stored in column-major order.
18657///
18658/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.potrf>
18659#[allow(unused_parens)]
18660pub fn potrf(uplo_ : i32,n_ : i32,a_ : &mut[f64]) -> Result<(),String> {
18661 if a_.len() != ((n_*n_)).try_into().unwrap() {
18662 return Result::Err("potrf: Argument 'a' has the wrong length, expected (n_*n_)".to_string());
18663 }
18664 handle_res_static(unsafe { MSK_potrf(std::ptr::null(),uplo_,n_,a_.as_mut_ptr()) },"potrf")?;
18665 return Result::Ok(());
18666} // potrf
18667/// Input a runtime license code.
18668///
18669/// # Arguments
18670///
18671/// - `code_` A license key string.
18672///
18673/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putlicensecode>
18674#[allow(unused_parens)]
18675pub fn put_license_code(code_ : &[i32]) -> Result<(),String> {
18676 if code_.len() > 0 && code_.len() != (Value::LICENSE_BUFFER_LENGTH).try_into().unwrap() {
18677 return Result::Err("put_license_code: Argument 'code' has the wrong length, expected Value::LICENSE_BUFFER_LENGTH".to_string());
18678 }
18679 handle_res_static(unsafe { MSK_putlicensecode(std::ptr::null(),if code_.len() == 0 { std::ptr::null() } else { code_.as_ptr() }) },"put_license_code")?;
18680 return Result::Ok(());
18681} // putlicensecode
18682/// Enables debug information for the license system.
18683///
18684/// # Arguments
18685///
18686/// - `licdebug_` Enable output of license check-out debug information.
18687///
18688/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putlicensedebug>
18689#[allow(unused_parens)]
18690pub fn put_license_debug(licdebug_ : i32) -> Result<(),String> {
18691 handle_res_static(unsafe { MSK_putlicensedebug(std::ptr::null(),licdebug_) },"put_license_debug")?;
18692 return Result::Ok(());
18693} // putlicensedebug
18694/// Set the path to the license file.
18695///
18696/// # Arguments
18697///
18698/// - `licensepath_` A path specifying where to search for the license.
18699///
18700/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putlicensepath>
18701#[allow(unused_parens)]
18702pub fn put_license_path(licensepath_ : &str) -> Result<(),String> {
18703 let __tmp_1 = CString::new(licensepath_).unwrap();
18704 handle_res_static(unsafe { MSK_putlicensepath(std::ptr::null(),__tmp_1.as_ptr()) },"put_license_path")?;
18705 return Result::Ok(());
18706} // putlicensepath
18707/// Control whether mosek should wait for an available license if no license is available.
18708///
18709/// # Arguments
18710///
18711/// - `licwait_` Enable waiting for a license.
18712///
18713/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.putlicensewait>
18714#[allow(unused_parens)]
18715pub fn put_license_wait(licwait_ : i32) -> Result<(),String> {
18716 handle_res_static(unsafe { MSK_putlicensewait(std::ptr::null(),licwait_) },"put_license_wait")?;
18717 return Result::Ok(());
18718} // putlicensewait
18719/// Reset the license expiry reporting startpoint.
18720///
18721/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.resetexpirylicenses>
18722#[allow(unused_parens)]
18723pub fn reset_expiry_licenses() -> Result<(),String> {
18724 handle_res_static(unsafe { MSK_resetexpirylicenses(std::ptr::null()) },"reset_expiry_licenses")?;
18725 return Result::Ok(());
18726} // resetexpirylicenses
18727/// Attempt to shut down global threadpool is used.
18728///
18729/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.shutdownglobalthreadpool>
18730#[allow(unused_parens)]
18731pub fn shutdown_global_threadpool() -> Result<(),String> {
18732 handle_res_static(unsafe { MSK_shutdownglobalthreadpool() },"shutdown_global_threadpool")?;
18733 return Result::Ok(());
18734} // shutdownglobalthreadpool
18735/// Solves a sparse triangular system of linear equations.
18736///
18737/// # Arguments
18738///
18739/// - `transposed_` Controls whether the solve is with L or the transposed L.
18740///
18741/// See [Transpose]
18742/// - `lnzc_` lnzc\[j\] is the number of nonzeros in column j.
18743/// - `lptrc_` lptrc\[j\] is a pointer to the first row index and value in column j.
18744/// - `lsubc_` Row indexes for each column stored sequentially.
18745/// - `lvalc_` The value corresponding to row indexed stored lsubc.
18746/// - `b_` The right-hand side of linear equation system to be solved as a dense vector.
18747///
18748/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.sparsetriangularsolvedense>
18749#[allow(unused_parens)]
18750pub fn sparse_triangular_solve_dense(transposed_ : i32,lnzc_ : &[i32],lptrc_ : &[i64],lsubc_ : &[i32],lvalc_ : &[f64],b_ : &mut[f64]) -> Result<(),String> {
18751 let n_ : i32 = std::cmp::min(std::cmp::min(b_.len(),lnzc_.len()),lptrc_.len()) as i32;
18752 if lnzc_.len() != (n_).try_into().unwrap() {
18753 return Result::Err("sparse_triangular_solve_dense: Argument 'lnzc' has the wrong length, expected n_".to_string());
18754 }
18755 if lptrc_.len() != (n_).try_into().unwrap() {
18756 return Result::Err("sparse_triangular_solve_dense: Argument 'lptrc' has the wrong length, expected n_".to_string());
18757 }
18758 let lensubnval_ : i64 = std::cmp::min(lsubc_.len(),lvalc_.len()) as i64;
18759 if lsubc_.len() != (lensubnval_).try_into().unwrap() {
18760 return Result::Err("sparse_triangular_solve_dense: Argument 'lsubc' has the wrong length, expected lensubnval_".to_string());
18761 }
18762 if lvalc_.len() != (lensubnval_).try_into().unwrap() {
18763 return Result::Err("sparse_triangular_solve_dense: Argument 'lvalc' has the wrong length, expected lensubnval_".to_string());
18764 }
18765 if b_.len() != (n_).try_into().unwrap() {
18766 return Result::Err("sparse_triangular_solve_dense: Argument 'b' has the wrong length, expected n_".to_string());
18767 }
18768 handle_res_static(unsafe { MSK_sparsetriangularsolvedense(std::ptr::null(),transposed_,n_,lnzc_.as_ptr(),lptrc_.as_ptr(),lensubnval_,lsubc_.as_ptr(),lvalc_.as_ptr(),b_.as_mut_ptr()) },"sparse_triangular_solve_dense")?;
18769 return Result::Ok(());
18770} // sparsetriangularsolvedense
18771/// Computes all eigenvalues of a symmetric dense matrix.
18772///
18773/// # Arguments
18774///
18775/// - `uplo_` Indicates whether the upper or lower triangular part is used.
18776///
18777/// See [Uplo]
18778/// - `n_` Dimension of the symmetric input matrix.
18779/// - `a_` Input matrix A.
18780/// - `w_` Array of length at least n containing the eigenvalues of A.
18781///
18782/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.syeig>
18783#[allow(unused_parens)]
18784pub fn syeig(uplo_ : i32,n_ : i32,a_ : &[f64],w_ : &mut[f64]) -> Result<(),String> {
18785 if a_.len() != ((n_*n_)).try_into().unwrap() {
18786 return Result::Err("syeig: Argument 'a' has the wrong length, expected (n_*n_)".to_string());
18787 }
18788 if w_.len() != (n_).try_into().unwrap() {
18789 return Result::Err("syeig: Argument 'w' has the wrong length, expected n_".to_string());
18790 }
18791 handle_res_static(unsafe { MSK_syeig(std::ptr::null(),uplo_,n_,a_.as_ptr(),w_.as_mut_ptr()) },"syeig")?;
18792 return Result::Ok(());
18793} // syeig
18794/// Computes all the eigenvalues and eigenvectors of a symmetric dense matrix, and thus its eigenvalue decomposition.
18795///
18796/// # Arguments
18797///
18798/// - `uplo_` Indicates whether the upper or lower triangular part is used.
18799///
18800/// See [Uplo]
18801/// - `n_` Dimension of the symmetric input matrix.
18802/// - `a_` Input matrix A.
18803/// - `w_` Array of length at least n containing the eigenvalues of A.
18804///
18805/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.syevd>
18806#[allow(unused_parens)]
18807pub fn syevd(uplo_ : i32,n_ : i32,a_ : &mut[f64],w_ : &mut[f64]) -> Result<(),String> {
18808 if a_.len() != ((n_*n_)).try_into().unwrap() {
18809 return Result::Err("syevd: Argument 'a' has the wrong length, expected (n_*n_)".to_string());
18810 }
18811 if w_.len() != (n_).try_into().unwrap() {
18812 return Result::Err("syevd: Argument 'w' has the wrong length, expected n_".to_string());
18813 }
18814 handle_res_static(unsafe { MSK_syevd(std::ptr::null(),uplo_,n_,a_.as_mut_ptr(),w_.as_mut_ptr()) },"syevd")?;
18815 return Result::Ok(());
18816} // syevd
18817/// Obtains the value corresponding to a symbolic name defined by MOSEK.
18818///
18819/// # Arguments
18820///
18821/// - `name_` Symbolic name.
18822///
18823/// # Returns
18824///
18825/// - `value` The corresponding value.
18826///
18827/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.symnamtovalue>
18828#[allow(unused_parens)]
18829pub fn sym_nam_to_value(name_ : &str) -> Result<String,String> {
18830 let __tmp_1 = CString::new(name_).unwrap();
18831 let mut value_ = Vec::new(); value_.resize(Value::MAX_STR_LEN as usize,0);
18832 handle_res_static(unsafe { MSK_symnamtovalue(__tmp_1.as_ptr(),value_.as_mut_ptr()) },"sym_nam_to_value")?;
18833 return Result::Ok(String::from_utf8_lossy(&value_[..value_.iter().position(|&c| c == 0).unwrap_or(Value::MAX_STR_LEN as usize)]).into_owned());
18834} // symnamtovalue
18835/// Performs a rank-k update of a symmetric matrix.
18836///
18837/// # Arguments
18838///
18839/// - `uplo_` Indicates whether the upper or lower triangular part of C is used.
18840///
18841/// See [Uplo]
18842/// - `trans_` Indicates whether the matrix A must be transposed.
18843///
18844/// See [Transpose]
18845/// - `n_` Specifies the order of C.
18846/// - `k_` Indicates the number of rows or columns of A, and its rank.
18847/// - `alpha_` A scalar value multiplying the result of the matrix multiplication.
18848/// - `a_` The pointer to the array storing matrix A in a column-major format.
18849/// - `beta_` A scalar value that multiplies C.
18850/// - `c_` The pointer to the array storing matrix C in a column-major format.
18851///
18852/// Full documentation: <https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.env.syrk>
18853#[allow(unused_parens)]
18854pub fn syrk(uplo_ : i32,trans_ : i32,n_ : i32,k_ : i32,alpha_ : f64,a_ : &[f64],beta_ : f64,c_ : &mut[f64]) -> Result<(),String> {
18855 if a_.len() != ((n_*k_)).try_into().unwrap() {
18856 return Result::Err("syrk: Argument 'a' has the wrong length, expected (n_*k_)".to_string());
18857 }
18858 if c_.len() != ((n_*n_)).try_into().unwrap() {
18859 return Result::Err("syrk: Argument 'c' has the wrong length, expected (n_*n_)".to_string());
18860 }
18861 handle_res_static(unsafe { MSK_syrk(std::ptr::null(),uplo_,trans_,n_,k_,alpha_,a_.as_ptr(),beta_,c_.as_mut_ptr()) },"syrk")?;
18862 return Result::Ok(());
18863} // syrk
18864