Detailed Description
Problem data for Stochastic Capacitated Facility Location problem.
This file handles the main problem data used in that project. For more details see The global problem data page.
Definition in file probdata_scflp.c.
#include <string.h>
#include "probdata_scflp.h"
#include "scip/cons_linear.h"
#include "scip/benders_default.h"
#include "scip/scip.h"
#include "scip/scipdefplugins.h"
Go to the source code of this file.
Functions | |
Local methods | |
static SCIP_RETCODE | createOriginalproblem (SCIP *scip, SCIP_VAR **facilityvars, SCIP_VAR ****customervars, SCIP_CONS ***capconss, SCIP_CONS ***demandconss, SCIP_CONS **sufficientcap, SCIP_Real **costs, SCIP_Real **demands, SCIP_Real *capacity, SCIP_Real *fixedcost, int ncustomers, int nfacilities, int nscenarios) |
static SCIP_RETCODE | createMasterproblem (SCIP *scip, SCIP_VAR **facilityvars, SCIP_CONS **sufficientcap, SCIP_Real *capacity, SCIP_Real *fixedcost, SCIP_Real **demands, int ncustomers, int nfacilities, int nscenarios) |
static SCIP_RETCODE | createSubproblems (SCIP *scip, SCIP **subproblems, SCIP_VAR **facilityvars, SCIP_VAR ***subfacilityvars, SCIP_VAR ****customervars, SCIP_CONS ***capconss, SCIP_CONS ***demandconss, SCIP_Real **costs, SCIP_Real **demands, SCIP_Real *capacity, SCIP_Real *fixedcost, int ncustomers, int nfacilities, int nscenarios) |
static SCIP_RETCODE | probdataCreate (SCIP *scip, SCIP_PROBDATA **probdata, SCIP **subproblems, SCIP_VAR **facilityvars, SCIP_VAR ***subfacilityvars, SCIP_VAR ****customervars, SCIP_CONS ***capconss, SCIP_CONS ***demandconss, SCIP_CONS *sufficientcap, SCIP_Real **costs, SCIP_Real **demands, SCIP_Real *capacity, SCIP_Real *fixedcost, int ncustomers, int nfacilities, int nscenarios, SCIP_Bool usebenders) |
static SCIP_RETCODE | probdataFree (SCIP *scip, SCIP_PROBDATA **probdata) |
Callback methods of problem data | |
static | SCIP_DECL_PROBDELORIG (probdelorigScflp) |
static | SCIP_DECL_PROBTRANS (probtransScflp) |
static | SCIP_DECL_PROBDELTRANS (probdeltransScflp) |
Interface methods | |
SCIP_RETCODE | SCIPprobdataCreate (SCIP *scip, const char *probname, SCIP_Real **costs, SCIP_Real **demands, SCIP_Real *capacity, SCIP_Real *fixedcost, int ncustomers, int nfacilities, int nscenarios, SCIP_Bool usebenders) |
int | SCIPprobdataGetNFacilities (SCIP_PROBDATA *probdata) |
int | SCIPprobdataGetNCustomers (SCIP_PROBDATA *probdata) |
SCIP_VAR ** | SCIPprobdataGetFacilityVars (SCIP_PROBDATA *probdata) |
Function Documentation
◆ createOriginalproblem()
|
static |
creates the original problem
- Parameters
-
scip SCIP data structure facilityvars all variables representing facilities customervars all variables representing the satisfaction of demand capconss capacity constraints per facility demandconss demand constraints per customer sufficientcap ensuring sufficient capacity is provided to satisfy demand costs the transportation costs from a facility to a customer demands the customer demands capacity the capacity of each facility fixedcost the fixed cost of opening a facility ncustomers the number of customers nfacilities the number of facilities nscenarios the number of scenarios
Definition at line 161 of file probdata_scflp.c.
References NULL, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIPaddCoefLinear(), SCIPaddCons(), SCIPaddVar(), SCIPcreateConsBasicLinear(), SCIPcreateVarBasic(), SCIPinfinity(), and SCIPsnprintf().
Referenced by SCIPprobdataCreate().
◆ createMasterproblem()
|
static |
creates the Benders' decomposition master problem
- Parameters
-
scip SCIP data structure facilityvars all variables representing facilities sufficientcap ensuring sufficient capacity is provided to satisfy demand capacity the capacity of each facility fixedcost the fixed cost of opening a facility demands the customer demands ncustomers the number of customers nfacilities the number of facilities nscenarios the number of scenarios
Definition at line 283 of file probdata_scflp.c.
References NULL, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIPaddCoefLinear(), SCIPaddCons(), SCIPaddVar(), SCIPcreateConsBasicLinear(), SCIPcreateVarBasic(), SCIPinfinity(), and SCIPsnprintf().
Referenced by SCIPprobdataCreate().
◆ createSubproblems()
|
static |
creates the scenario subproblems
- Parameters
-
scip SCIP data structure subproblems the Benders' decomposition subproblems facilityvars all variables representing facilities subfacilityvars the copies of the facility variables in the subproblems customervars all variables representing the satisfaction of demand capconss capacity constraints per facility demandconss demand constraints per customer costs the transportation costs from a facility to a customer demands the customer demands capacity the capacity of each facility fixedcost the fixed cost of opening a facility ncustomers the number of customers nfacilities the number of facilities nscenarios the number of scenarios
Definition at line 340 of file probdata_scflp.c.
References NULL, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPaddCoefLinear(), SCIPaddCons(), SCIPaddVar(), SCIPcreateConsBasicLinear(), SCIPcreateVarBasic(), SCIPinfinity(), and SCIPsnprintf().
Referenced by SCIPprobdataCreate().
◆ probdataCreate()
|
static |
creates problem data
- Parameters
-
scip SCIP data structure probdata pointer to problem data subproblems the Benders' decomposition subproblems facilityvars all variables representing facilities subfacilityvars the copies of the facility variables in the subproblems customervars all variables representing the satisfaction of demand capconss capacity constraints per facility per scenario demandconss demand constraints per customer per scenario sufficientcap ensuring sufficient capacity is provided to satisfy demand costs the transportation costs to a customer from a facility demands the customer demands per scenario capacity the capacity of each facility fixedcost the fixed cost of opening a facility ncustomers the number of customers nfacilities the number of facilities nscenarios the number of scenarios usebenders whether Benders' decomposition is used
Definition at line 445 of file probdata_scflp.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, SCIPallocBlockMemoryArray, and SCIPduplicateBlockMemoryArray.
Referenced by SCIPprobdataCreate().
◆ probdataFree()
|
static |
frees the memory of the given problem data
- Parameters
-
scip SCIP data structure probdata pointer to problem data
Definition at line 527 of file probdata_scflp.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPfree(), SCIPfreeBlockMemory, SCIPfreeBlockMemoryArray, SCIPreleaseCons(), and SCIPreleaseVar().
Referenced by SCIP_DECL_PROBDELORIG().
◆ SCIP_DECL_PROBDELORIG()
|
static |
frees user data of original problem (called when the original problem is freed)
Definition at line 657 of file probdata_scflp.c.
References NULL, probdataFree(), SCIP_CALL, SCIP_OKAY, and SCIPdebugMsg.
◆ SCIP_DECL_PROBTRANS()
|
static |
creates user data of transformed problem by transforming the original user problem data (called after problem was transformed)
Definition at line 672 of file probdata_scflp.c.
References SCIP_OKAY, and SCIPdebugMsg.
◆ SCIP_DECL_PROBDELTRANS()
|
static |
frees user data of transformed problem (called when the transformed problem is freed)
Definition at line 681 of file probdata_scflp.c.
References SCIP_OKAY, and SCIPdebugMsg.
◆ SCIPprobdataCreate()
SCIP_RETCODE SCIPprobdataCreate | ( | SCIP * | scip, |
const char * | probname, | ||
SCIP_Real ** | costs, | ||
SCIP_Real ** | demands, | ||
SCIP_Real * | capacity, | ||
SCIP_Real * | fixedcost, | ||
int | ncustomers, | ||
int | nfacilities, | ||
int | nscenarios, | ||
SCIP_Bool | usebenders | ||
) |
sets up the problem data
- Parameters
-
scip SCIP data structure probname problem name costs the transportation costs from a facility to a customer demands the customer demands capacity the capacity of each facility fixedcost the fixed cost of opening a facility ncustomers the number of customers nfacilities the number of facilities nscenarios the number of Benders' decomposition scenarios usebenders will Benders' decomposition be used to solve the problem
Definition at line 697 of file probdata_scflp.c.
References createMasterproblem(), createOriginalproblem(), createSubproblems(), NULL, probdataCreate(), SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIPallocBufferArray, SCIPcreate(), SCIPcreateBendersDefault(), SCIPcreateProbBasic(), SCIPfreeBufferArray, SCIPincludeDefaultPlugins(), SCIPsetBoolParam(), SCIPsetIntParam(), SCIPsetObjsense(), SCIPsetProbData(), SCIPsetProbDelorig(), SCIPsetProbDeltrans(), SCIPsetProbTrans(), SCIPsnprintf(), and TRUE.
◆ SCIPprobdataGetNFacilities()
int SCIPprobdataGetNFacilities | ( | SCIP_PROBDATA * | probdata | ) |
returns the number of facilities
- Parameters
-
probdata problem data
Definition at line 837 of file probdata_scflp.c.
References NULL.
◆ SCIPprobdataGetNCustomers()
int SCIPprobdataGetNCustomers | ( | SCIP_PROBDATA * | probdata | ) |
returns the number of customers
- Parameters
-
probdata problem data
Definition at line 847 of file probdata_scflp.c.
References NULL.
◆ SCIPprobdataGetFacilityVars()
SCIP_VAR** SCIPprobdataGetFacilityVars | ( | SCIP_PROBDATA * | probdata | ) |
returns the facility variables
- Parameters
-
probdata problem data
Definition at line 857 of file probdata_scflp.c.
References NULL.