Skip to content

Instantly share code, notes, and snippets.

@c3c
c3c / vrp.mod
Last active December 15, 2015 01:19
vrp with <i,j> tuples after rdv with raouda trying x[i][j][m] approach ... gives dvar warnings for unused combinations <i,j> with i==j y[i][m] approach
/*********************************************
* OPL 12.5 Model
* Author: crash
* Creation Date: Mar 6, 2013 at 3:33:35 PM
*********************************************/
// RGF93 ressemble WGS84 (sphère)
// Lambert93 = projection de RGF93 sur plan
using CP;
@c3c
c3c / gist:5220474
Created March 22, 2013 10:57
vrp with window as subtour elimination constraint
/*********************************************
* OPL 12.5 Model
* Author: crash
* Creation Date: Mar 6, 2013 at 3:33:35 PM
*********************************************/
using CP;
// Nodes
tuple node { string name; int x; int y; int tmin; int tmax; }
@c3c
c3c / gist:5223174
Created March 22, 2013 17:30
vrp with time window constraints (working)
/*********************************************
* OPL 12.5 Model
* Author: crash
* Creation Date: Mar 6, 2013 at 3:33:35 PM
*********************************************/
using CP;
// Nodes
tuple node { string name; int x; int y; int tmin; int tmax; }
@c3c
c3c / camions.dat
Created March 22, 2013 18:07
VRP with working time windows (and not-working dvar "r") (r = number of palettes in truck at that moment)
/*********************************************
* OPL 12.5 Data
* Author: crash
* Creation Date: Mar 6, 2013 at 3:38:56 PM
*********************************************/
// 17 clients, WGS84
//Clients = [
//<"Poitiers", 46.589069,0.340576>,
//<"La Rochelle", 46.1760-1.145325>,
@c3c
c3c / camions.dat
Created March 25, 2013 19:21
VRPTW delivery must happen using same truck + divide between multiple trucks(doesn't work)
/*********************************************
* OPL 12.5 Data
* Author: crash
* Creation Date: Mar 6, 2013 at 3:38:56 PM
*********************************************/
// 17 nodes, first node is depot.
// <Name, WGS84-Lat, WGS84-Lon, Lam93-X, Lam93-Y, TimeWin-Min, TimeWin-Max>
AllNodes = {
<"Poitiers" 46.589069,0.340576,496421,6613320,360,35000>,
@c3c
c3c / vrp.mod
Created March 26, 2013 14:55
Working SD
/*********************************************
* OPL 12.5 Model
* Author: crash
* Creation Date: Mar 6, 2013 at 3:33:35 PM
*********************************************/
using CP;
// Nodes
tuple node { string name; float lat; float lon; int x; int y; int tmin; int tmax; }
@c3c
c3c / gist:5256039
Created March 27, 2013 17:02
c+vrp+tw working for depot too
/*********************************************
* OPL 12.5 Model
* Author: crash
* Creation Date: Mar 6, 2013 at 3:33:35 PM
*********************************************/
using CP;
// Nodes
tuple node { string name; float lat; float lon; int x; int y; int tmin; int tmax; }
@c3c
c3c / camions.dat
Last active December 15, 2015 11:59
C+VRP+TW working + asserts added Updated data English comments
/*********************************************
* OPL 12.5 Data
* Author: crash
* Creation Date: Mar 6, 2013 at 3:38:56 PM
*********************************************/
// 17 nodes, first node is depot.
// <Name, NodeType {collab|client}, WGS84-Lat, WGS84-Lon, Lam93-X, Lam93-Y, TimeWin-Min, TimeWin-Max>
AllNodes = {
<"Poitiers" 1,46.589069,0.340576,496421,6613320,360,1200>, // 0
#!/bin/sh
##
## netscreen/jnpr ssl vpn connection magic
## [email protected] / @oogali
##
## i wrote this about a year ago (2009), when i had continuous access
## to a jnpr ssl vpn box and had to connect via it.
##
## if bits of this script are broken, i'll be glad to fix if someone
## gives me client access to a ssl vpn box to test against.
@c3c
c3c / SimpleHTTPServerWithUpload.py
Last active July 7, 2016 16:54 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload and allowing to bind different addresses
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""