I hereby claim:
- I am jmarca on github.
- I am jmarca (https://keybase.io/jmarca) on keybase.
- I have a public key ASDOZyqQNeeNmM1lUq5km8TtJF03Y9sFVzXCr1HoArct1Ao
To claim this, I am signing this object:
// assignment as copy or reference? | |
// run in node.js as node copyorref.js | |
console.log('assignment by value for simple scalars') | |
var a = 8; | |
var b = a; | |
a++; | |
console.log('a: '+a + ', b (not changed): '+b); | |
console.log('\nassignment by reference: aa[4]=45 is also in other vars') |
/** makedir.js | |
* How I make directories recursively in node.js | |
* | |
* If you pass it a directory that you want to exist, it will traverse | |
* the directory tree up until it finds a directory that does exist, | |
* and then it will go back down the directory structure making all | |
* directories as needed. | |
* | |
* For example, if you have /home/james and you want to create | |
* /home/james/node/repository/makedir, |
var express = require('express') | |
, app = express() | |
, secapp = express() | |
, request = require('../../') | |
, assert = require('assert') | |
, should = require('should') | |
, querystring = require('querystring') | |
, https = require('https'); | |
app.use(express.cookieParser()) |
<div class="container"> | |
<header class="site-header"> | |
<a href="#0" class="logo">CalVAD Status</a> | |
<nav class="site-nav"> | |
<ul> | |
<li><a href="#0">downloads</a></li> | |
<li class="active"><a href="#0">raw processing</a></li> | |
<li><a href="#0">imputations</a></li> | |
<li><a href="#0">grid modeling</a></li> | |
</ul> |
license: GPL-3.0 |
I hereby claim:
To claim this, I am signing this object:
This demonstrates the problem, but has not yet hit a solution.
Modification of https://gist.github.com/Mizux/f200bd2b0fc6ad622922b0ca9e868823
Added disjunctions, and conditions (using distance_window) that require some nodes to be dropped.
The ideal solution drops the range 11 to 16, keeps node 2.
If you edit the source, and run with data['max_pseudoaxle_load'] = 300
, then the fake axle load thing is not binding and the solver will put the loads wherever it wants. For example:
Bin 0
{'position': 0, 'item': 10, 'weight': 30, 'value': 45, 'length': 2}
{'position': 2, 'item': 12, 'weight': 42, 'value': 20, 'length': 2}
{'position': 4, 'item': 3, 'weight': 36, 'value': 50, 'length': 12}
Sum of item lengths 16
Packed bin weight: 108
#!/usr/bin/env python3 | |
# Copyright 2010-2022 Google LLC | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |