[SCIP] Specify design variables starting point (x0) for SCIP

Mathieu Besançon mathieu.besancon at gmail.com
Wed Aug 2 11:26:33 CEST 2023


Hi Johannes,

There is a function doing roughly this in the SCIP Julia wrapper:
https://github.com/scipopt/SCIP.jl/blob/master/src/MOI_wrapper.jl#L313

The idea is to create a partial solution, assign the variables you want to
set (your design variables, which I assume are in the context of a network
design problem?), and add the solution.

I roughly translated the solution to something C-like below, except for the
for loop but they key ideas should be there.

SCIP_SOL** sol__ NULL;
SCIP_CALL( SCIPcreatePartialSol(scip, sol__, C_NULL) );
@assert sol__[] != C_NULL;

# set all given values
sol_ = *sol__;
for idx in variable_indices
SCIP_CALL( SCIPsetSolVal(scip, sol_, my_design_variables[idx],
my_design_values[idx]) );
end

# submit the candidate
SCIP_Bool stored = FALSE;
SCIP_CALL( SCIPaddSolFree(o, sol__, &stored) );

Best,
Mathieu




On Wed, Aug 2, 2023 at 10:50 AM Johannes Jordaan <jordaan.johannes at gmail.com>
wrote:

> Hi
> How does one specify a starting point for design variables in SCIP?
> Regards
> Johannes Jordaan
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip
>


-- 
Mathieu Besançon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20230802/90070ff5/attachment.html>


More information about the Scip mailing list