Skip to content

Instantly share code, notes, and snippets.

View rocarvaj's full-sized avatar
🐀

Rodolfo Carvajal rocarvaj

🐀
View GitHub Profile
@rocarvaj
rocarvaj / README.md
Created September 5, 2012 13:40
diverseBB usage

What do you need?

  • [IBM ILOG CPLEX][cplex] (See section below on how to install CPLEX). The code works with CPLEX 12.2, but any later version should be fine.
  • MPI C++ compiler.

CPLEX

The process of downloading/installing CPLEX is a bit cumbersome, you have to get an account at IBM's academic initiative in order to get the software. Follow these steps:

Download software

  • Go to the [IBM academic initiative site][ibm] and create and account (click "Join now" at the right).
  • Once you have completed this, go back to the [home page][ibm] of the site and go to "Get software & access".
@rocarvaj
rocarvaj / GitNotes.md
Created September 21, 2012 19:50
Git Notes
  • How to Push a New Local Branch to a Remote Git Repository

// The one sending branch

git push --set-upstream origin plugin

// The one wanting to use the branch

git fetch origin >git checkout --track origin/plugin

@rocarvaj
rocarvaj / CMDMaker.sh
Created September 23, 2012 12:03
Submit multiple jobs to Condor
#!/bin/bash
########################################################
# This script generates multiples .cmd (Condor) files,
# one for each instance in the input file instances.txt.
# You can easily change this to have different arguments
# in the input file.
#
# After you have generated the file, use the multiSubmit.sh
# script to submit all your jobs at once.
@rocarvaj
rocarvaj / 120923-0636_submitting-multiple-jobs-in-condor.md
Created September 24, 2012 10:00
Submitting multiple jobs in Condor

A usual problem when running jobs in a cluster through the Condor job scheduler, is that it doesn't provide very flexible script-like functionality. In this post I propose a way to deal with a particular situation: Submitting a bunch of jobs with different arguments, in a batch.

This post assumes some familiarity with Condor. But I can tell you the short version: In Condor you create a "submitting" file (usually with extension .cmd) that looks something like this

universe = vanilla
executable = /path/to/my/executable
arguments = arg1 arg2 arg3
queue

Then, you submit this job to Condor with the command condor_submit .

@rocarvaj
rocarvaj / C-CppNotes.md
Created September 24, 2012 13:26
C/C++ Notes
@rocarvaj
rocarvaj / Callback.cpp
Last active May 5, 2020 18:59
Cut callback to get LP with cuts
int cutCallbackShareRootCuts (CPXCENVptr env,
void *cbdata,
int wherefrom,
void *cbhandle,
int *useraction_p)
{
int status;
*useraction_p = CPX_CALLBACK_DEFAULT;
Problem *tempProblem = (Problem*) cbhandle;
@rocarvaj
rocarvaj / README.md
Created October 4, 2012 16:05
Read file and parse strings

Read file and parse

Las funciones importantes est'an en parse.c. Adjunto tambi'en el archivo macros.h, que tiene algunas funciones macro que se llaman en parse.c, pero se llaman s'olo para cosas como testear para ver si hay alguna condici'on de lleve a error.

@rocarvaj
rocarvaj / csvToLP.py
Created October 11, 2012 15:40
Convert .dow and .csv files to .lp
#!/usr/bin/python
"""
Convert an instance from the multicommodity fixed charge
network flow problem in .csv format to .lp file (arc formulation)
Usage: ./csvToLP.py path/to/my/csv/file.csv
Rodolfo Carvajal <[email protected]>
@rocarvaj
rocarvaj / homework_guidelines.md
Last active December 11, 2015 02:48
Homework guidelines

ISyE 6662 - Spring 2013: Homework guidelines

The solutions to the homework are required to be typesetted in LaTeX. Please find a LaTeX template and more information in the LaTeX folder in the Resources section of the course's T-square site.

Please follow the following guidelines regarding your homework solutions:

Homeworks are meant as individual assignments. Although you are encouraged to discuss them with your classmates, each student should complete and submit his/her own work, unless specifically instructed to work in groups. Cite all reference sources used in your assignments. Late homework submissions will not be accepted, except for serious unavoidable circumstances.

Write your name and class clearly at the top of at least the first page, along with the assignment number and the page number(s). If you are not stapling or paper-clipping the pages together, then put your name or initials on all the pages.

@rocarvaj
rocarvaj / git-branching.md
Last active December 9, 2017 18:53
Git branching