Skip to main content
Sign in
Snippets Groups Projects
Commit 16c677ed authored by daveabiy's avatar daveabiy
Browse files

library for probdata_lagr.cpp

parent cb3d9bed
No related branches found
No related tags found
No related merge requests found
/**@file PROBDATA_lagr.h
* @brief Problem data for Lagrangian relaxation
* @author Dawit Hailu
*
*
* This file handles the main problem data used in the Lagrangian relaxation.
*/
/*---+----1----+----2----+----3----+----4----+----d5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_PROBDATA_LAGR__
#define __SCIP_PROBDATA_LAGR__
#include "scip/scip.h"
#include "vardata_lagr.h"
/*classifying and storing the slot and start constraints in PROBDATA
create probdata*/
SCIP_RETCODE SCIPcreateprobdata(
SCIP* scip,
SCIP_ProbData** probdata
);
/*get's the ids of the variables found in the slot constraints*/
int* SCIPconsGetvarids(
SCIP_ProbData* probdata
);
SCIP_CONS** SCIPgetSlotConss(
SCIP_ProbData* probdata
);
int SCIPgetNSlotConss(
SCIP_ProbData* probdata
);
/* here we create the probdata, which will be called for storage of values to the data*/
SCIP_RETCODE probdataCreate(
SCIP* scip, /**< SCIP data structure */
SCIP_PROBDATA** probdata, /**< pointer to problem data */
SCIP_CONS** SlotConss,
// SCIP_CONS** StartConss,
//SCIP_VAR** vars, /**< all exist variables */
//SCIP_CONS** conss, /**< set partitioning constraints for each job exactly one */
//int* varids, /**< array of ids of variables in the slot constraints */
//int nconss, /**< number of constraints */
int nSlotConss, /**< number of slot constraints */
int nStartConss
);
SCIP_RETCODE probdataFree(
SCIP* scip, /**< SCIP data structure */
SCIP_PROBDATA** probdata
);
SCIP_Real SCIPconsGetMultiplier(SCIP* scip,SCIP_CONS** cons,SCIP_Real subgradient,SCIP_Real C, SCIP_Real stepsize,SCIP_Bool firstiteration, SCIP_Real dualval);
SCIP_Real SCIPgetSubgradients(
SCIP* relaxscip,
SCIP_CONS* cons,
SCIP_Real* solvals
);
SCIP_RETCODE SCIPsolveiteration(SCIP* scip,int nSlotConss,SCIP_Real** subgradients, SCIP_Real C, SCIP_Real* stepsize,SCIP_Real** bestsolvals,SCIP_Real* upperbound,int niter);
SCIP_RETCODE SCIPgetFeasUpperbound(SCIP* scip,SCIP_Real** solvals, SCIP_Real** upperbound, SCIP_Real* solobj, int niter);
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment